diff --git a/.gitattributes b/.gitattributes index add7c17..3e805cb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -* text=auto +* text=auto eol=lf dist/** -diff linguist-generated=true diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 0d22c1a..157c833 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,6 +1,13 @@ { $schema: 'https://docs.renovatebot.com/renovate-schema.json', - extends: ['github>bfra-me/renovate-config#v3.5.2', 'github>bfra-me/renovate-config:internal.json5#v3.5.2'], + extends: [ + 'github>bfra-me/renovate-config#v3', + 'github>bfra-me/renovate-config:internal.json5#v3', + 'github>sanity-io/renovate-config:semantic-commit-type', + 'security:openssf-scorecard', + 'npm:unpublishSafe', + ], + automergeType: 'pr', packageRules: [ { matchPackageNames: ['@types/node', 'node', 'nodejs/node'], @@ -10,15 +17,26 @@ matchPackageNames: ['npm'], constraintsFiltering: 'strict', }, + { + matchDepNames: ['python'], + allowedVersions: '<=3.12', + }, + { + description: 'Enable SemVer digest pinning of @bfra-me GitHub actions, reusable workflows, and Renovate config presets.', + matchDatasources: ['github-tags'], + matchPackageNames: ['@bfra.me/**', 'bfra-me/**'], + updatePinnedDependencies: false, + }, + { + description: 'Enable SemVer digest pinning of @bfra-me GitHub actions, reusable workflows, and Renovate config presets.', + matchDatasources: ['github-tags'], + matchPackageNames: ['@bfra.me/**', 'bfra-me/**'], + matchUpdateTypes: ['major'], + updatePinnedDependencies: true, + }, ], postUpgradeTasks: { - commands: [ - 'npm install -g pnpm@9.14.2', - 'pnpm install --frozen-lockfile --ignore-scripts', - 'git checkout -- .npmrc', - 'pnpm run build', - 'pnpm run format', - ], + commands: ['pnpm bootstrap', 'pnpm fix', 'pnpm build', 'pnpm format'], executionMode: 'branch', }, } diff --git a/.github/settings.yml b/.github/settings.yml index e50e6a2..bfbdbf8 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -11,8 +11,8 @@ branches: - name: main protection: required_status_checks: - strict: false - contexts: ['Test', 'Release'] + strict: true + contexts: ['Test', 'Release', 'Renovate / Renovate'] enforce_admins: true required_pull_request_reviews: null restrictions: null diff --git a/.github/workflows/app.yaml b/.github/workflows/app.yaml index 0eb9a48..b4642d0 100644 --- a/.github/workflows/app.yaml +++ b/.github/workflows/app.yaml @@ -1,9 +1,14 @@ --- name: GitHub App + 'on': issues: types: - opened + +permissions: + contents: read + jobs: issuesOpened: name: Issues opened diff --git a/.github/workflows/ci.yaml b/.github/workflows/main.yaml similarity index 88% rename from .github/workflows/ci.yaml rename to .github/workflows/main.yaml index b71da32..533228b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/main.yaml @@ -1,11 +1,13 @@ --- -name: CI +name: Main 'on': push: - branches: [main, 'renovate/**'] + branches: [main] pull_request: - types: [opened, reopened, synchronize] + branches: [main] + types: [opened, ready_for_review, reopened, synchronize] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -39,11 +41,10 @@ jobs: steps: - id: get-workflow-access-token name: Get Workflow Access Token - uses: peter-murray/workflow-application-token-action@baa1ef2638c3d9e5967b7c8b86219f8fc919e1bb # v3.0.1 + uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0 with: - application_id: ${{ secrets.APPLICATION_ID }} - application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }} - permissions: 'contents:write, issues:write, pull_requests:write' + app-id: ${{ secrets.APPLICATION_ID }} + private-key: ${{ secrets.APPLICATION_PRIVATE_KEY }} - name: Setup Git user run: | git config --global user.email '118100583+bfra-me[bot]@users.noreply.github.com' diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index d7a8e99..b5a79d2 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -11,16 +11,21 @@ name: Renovate branches: ['**'] workflow_dispatch: inputs: - print_config: + print-config: description: Log the fully-resolved Renovate config for each repository, plus fully-resolved presets. required: false type: boolean default: false + workflow_run: + workflows: ['Main'] + branches: ['main'] + types: ['completed'] jobs: renovate: + if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} name: Renovate secrets: inherit - uses: bfra-me/.github/.github/workflows/renovate.yaml@be966e38a1d29304e727870884a145b416efeb3d # v1.8.1 + uses: bfra-me/.github/.github/workflows/renovate.yaml@v1 with: - print_config: ${{ inputs.print_config || false }} + print_config: ${{ inputs.print-config || false }} diff --git a/.github/workflows/update-repo-settings.yaml b/.github/workflows/update-repo-settings.yaml index c0b239c..f8490bb 100644 --- a/.github/workflows/update-repo-settings.yaml +++ b/.github/workflows/update-repo-settings.yaml @@ -13,4 +13,4 @@ jobs: update-repo-settings: name: Update Repo Settings secrets: inherit - uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@be966e38a1d29304e727870884a145b416efeb3d # v1.8.1 + uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@v1 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index c4cbfff..0000000 --- a/.prettierignore +++ /dev/null @@ -1,3 +0,0 @@ -dist -node_modules -pnpm-lock.yaml diff --git a/.prettierrc.yaml b/.prettierrc.yaml deleted file mode 100644 index 4686cd0..0000000 --- a/.prettierrc.yaml +++ /dev/null @@ -1,10 +0,0 @@ -bracketSpacing: false -jsxSingleQuote: true -printWidth: 120 -singleQuote: true -tabWidth: 2 -overrides: - - files: - - '.vscode/*.json' - options: - tabWidth: 4 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..7a33b5a --- /dev/null +++ b/.tool-versions @@ -0,0 +1,3 @@ +node 22.11.0 +pnpm 9.14.2 +python 3.12.7 diff --git a/.vscode/settings.json b/.vscode/settings.json index 8217536..e2517c3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,10 @@ { "cSpell.words": ["bfra", "conventionalcommits", "probot"], + "eslint.options": { + "flags": ["unstable_ts_config"] + }, + "search.exclude": { "**/dist": true, "**/node_modules": true diff --git a/app.js b/app.js index 8fa21cc..951d8fd 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ /** * @param {import('probot').Probot} app */ -module.exports = (app) => { - app.on('issues.opened', async (context) => { - return context.octokit.issues.createComment(context.issue({body: 'Hello, World!'})); - }); -}; +export default app => { + app.on('issues.opened', async context => { + return context.octokit.issues.createComment(context.issue({body: 'Hello, World!'})) + }) +} diff --git a/dist/195.index.js b/dist/195.index.js deleted file mode 100644 index 08e8ab4..0000000 --- a/dist/195.index.js +++ /dev/null @@ -1,14 +0,0 @@ -exports.id = 195; -exports.ids = [195]; -exports.modules = { - -/***/ 38195: -/***/ ((module) => { - -module.exports = eval("require")("smee-client"); - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/dist/542.index.js b/dist/542.index.js deleted file mode 100644 index 6c7d588..0000000 --- a/dist/542.index.js +++ /dev/null @@ -1,14 +0,0 @@ -exports.id = 542; -exports.ids = [542]; -exports.modules = { - -/***/ 2542: -/***/ ((module) => { - -module.exports = eval("require")("smee-client"); - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/dist/751.index.js b/dist/751.index.js deleted file mode 100644 index 0666e42..0000000 --- a/dist/751.index.js +++ /dev/null @@ -1,14 +0,0 @@ -exports.id = 751; -exports.ids = [751]; -exports.modules = { - -/***/ 90751: -/***/ ((module) => { - -module.exports = eval("require")("smee-client"); - - -/***/ }) - -}; -; \ No newline at end of file diff --git a/dist/file.js b/dist/file.js deleted file mode 100644 index ed9d86f..0000000 --- a/dist/file.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const pino = require('./pino') -const { once } = require('events') - -module.exports = async function (opts = {}) { - const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false }) - delete destOpts.destination - const destination = pino.destination(destOpts) - await once(destination, 'ready') - return destination -} diff --git a/dist/file1.js b/dist/file1.js deleted file mode 100644 index ed9d86f..0000000 --- a/dist/file1.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const pino = require('./pino') -const { once } = require('events') - -module.exports = async function (opts = {}) { - const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false }) - delete destOpts.destination - const destination = pino.destination(destOpts) - await once(destination, 'ready') - return destination -} diff --git a/dist/index.js b/dist/index.js index 2a7394c..ebf2dda 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,18536 +1,16666 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 75445: -/***/ ((module) => { - -/** - * @param {import('probot').Probot} app - */ -module.exports = (app) => { - app.on('issues.opened', async (context) => { - return context.octokit.issues.createComment(context.issue({body: 'Hello, World!'})); - }); -}; - - -/***/ }), - -/***/ 83191: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; +import {createRequire} from 'node:module';const require=createRequire(import.meta.url); +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); }); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __esm = (fn, res) => function __init() { + return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(70857)); -const utils_1 = __nccwpck_require__(96283); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = 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}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return (0, utils_1.toCommandValue)(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return (0, utils_1.toCommandValue)(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), - -/***/ 59999: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.platform = exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = exports.markdownSummary = exports.summary = exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(83191); -const file_command_1 = __nccwpck_require__(59058); -const utils_1 = __nccwpck_require__(96283); -const os = __importStar(__nccwpck_require__(70857)); -const path = __importStar(__nccwpck_require__(16928)); -const oidc_utils_1 = __nccwpck_require__(53549); -/** - * The code to exit an action - */ -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"; -})(ExitCode || (exports.ExitCode = 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 exportVariable(name, val) { - const convertedVal = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return (0, file_command_1.issueFileCommand)('ENV', (0, file_command_1.prepareKeyValueMessage)(name, val)); - } - (0, command_1.issueCommand)('set-env', { name }, convertedVal); -} -exports.exportVariable = exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - (0, command_1.issueCommand)('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - (0, file_command_1.issueFileCommand)('PATH', inputPath); - } - else { - (0, command_1.issueCommand)('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = 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 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}`); +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js +var require_cjs = __commonJS({ + "node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js"(exports2, module2) { + "use strict"; + var isMergeableObject = function isMergeableObject2(value) { + return isNonNullObject(value) && !isSpecial(value); + }; + function isNonNullObject(value) { + return !!value && typeof value === "object"; } - if (options && options.trimWhitespace === false) { - return val; + function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value); } - return val.trim(); -} -exports.getInput = 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 getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; + var canUseSymbol = typeof Symbol === "function" && Symbol.for; + var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for("react.element") : 60103; + function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE; } - return inputs.map(input => input.trim()); -} -exports.getMultilineInput = 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 getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = 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\``); -} -exports.getBooleanInput = 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 setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return (0, file_command_1.issueFileCommand)('OUTPUT', (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - process.stdout.write(os.EOL); - (0, command_1.issueCommand)('set-output', { name }, (0, utils_1.toCommandValue)(value)); -} -exports.setOutput = 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 setCommandEcho(enabled) { - (0, command_1.issue)('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = 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 setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - (0, command_1.issueCommand)('debug', {}, message); -} -exports.debug = 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 error(message, properties = {}) { - (0, command_1.issueCommand)('error', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.error = 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 warning(message, properties = {}) { - (0, command_1.issueCommand)('warning', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.warning = 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 notice(message, properties = {}) { - (0, command_1.issueCommand)('notice', (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); -} -exports.notice = notice; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = 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 startGroup(name) { - (0, command_1.issue)('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - (0, command_1.issue)('endgroup'); -} -exports.endGroup = 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 group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = 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 saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return (0, file_command_1.issueFileCommand)('STATE', (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - (0, command_1.issueCommand)('save-state', { name }, (0, utils_1.toCommandValue)(value)); -} -exports.saveState = 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 getState(name) { - return process.env[`STATE_${name}`] || ''; -} -exports.getState = getState; -function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); -} -exports.getIDToken = getIDToken; -/** - * Summary exports - */ -var summary_1 = __nccwpck_require__(71638); -Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); -/** - * @deprecated use core.summary - */ -var summary_2 = __nccwpck_require__(71638); -Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); -/** - * Path exports - */ -var path_utils_1 = __nccwpck_require__(40539); -Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); -Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); -Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); -/** - * Platform utilities exports - */ -exports.platform = __importStar(__nccwpck_require__(22563)); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 59058: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// For internal use, subject to change. -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -const crypto = __importStar(__nccwpck_require__(76982)); -const fs = __importStar(__nccwpck_require__(79896)); -const os = __importStar(__nccwpck_require__(70857)); -const utils_1 = __nccwpck_require__(96283); -function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); + function emptyTarget(val) { + return Array.isArray(val) ? [] : {}; } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); + function cloneUnlessOtherwiseSpecified(value, options2) { + return options2.clone !== false && options2.isMergeableObject(value) ? deepmerge(emptyTarget(value), value, options2) : value; } - fs.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -exports.issueFileCommand = issueFileCommand; -function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${crypto.randomUUID()}`; - const convertedValue = (0, utils_1.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}"`); + function defaultArrayMerge(target, source, options2) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options2); + }); } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + function getMergeFunction(key, options2) { + if (!options2.customMerge) { + return deepmerge; + } + var customMerge = options2.customMerge(key); + return typeof customMerge === "function" ? customMerge : deepmerge; } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -exports.prepareKeyValueMessage = prepareKeyValueMessage; -//# sourceMappingURL=file-command.js.map - -/***/ }), - -/***/ 53549: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(80787); -const auth_1 = __nccwpck_require__(63673); -const core_1 = __nccwpck_require__(59999); -class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return Object.propertyIsEnumerable.call(target, symbol); + }) : []; } - 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; + function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)); } - 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; + function propertyIsOnObject(object, property) { + try { + return property in object; + } catch (_) { + return false; + } } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = 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; - }); + function propertyIsUnsafe(target, key) { + return propertyIsOnObject(target, key) && !(Object.hasOwnProperty.call(target, key) && Object.propertyIsEnumerable.call(target, key)); } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } + function mergeObject(target, source, options2) { + var destination = {}; + if (options2.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options2); }); + } + getKeys(source).forEach(function(key) { + if (propertyIsUnsafe(target, key)) { + return; + } + if (propertyIsOnObject(target, key) && options2.isMergeableObject(source[key])) { + destination[key] = getMergeFunction(key, options2)(target[key], source[key], options2); + } else { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options2); + } + }); + return destination; + } + function deepmerge(target, source, options2) { + options2 = options2 || {}; + options2.arrayMerge = options2.arrayMerge || defaultArrayMerge; + options2.isMergeableObject = options2.isMergeableObject || isMergeableObject; + options2.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options2); + } else if (sourceIsArray) { + return options2.arrayMerge(target, source, options2); + } else { + return mergeObject(target, source, options2); + } } -} -exports.OidcClient = OidcClient; -//# sourceMappingURL=oidc-utils.js.map - -/***/ }), - -/***/ 40539: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(16928)); -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -exports.toPosixPath = toPosixPath; -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -exports.toWin32Path = toWin32Path; -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -exports.toPlatformPath = toPlatformPath; -//# sourceMappingURL=path-utils.js.map - -/***/ }), - -/***/ 22563: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDetails = exports.isLinux = exports.isMacOS = exports.isWindows = exports.arch = exports.platform = void 0; -const os_1 = __importDefault(__nccwpck_require__(70857)); -const exec = __importStar(__nccwpck_require__(58872)); -const getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', undefined, { - silent: true - }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - return { - name: name.trim(), - version: version.trim() - }; -}); -const getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput('sw_vers', undefined, { - silent: true - }); - const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ''; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ''; - return { - name, - version - }; -}); -const getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [name, version] = stdout.trim().split('\n'); - return { - name, - version + deepmerge.all = function deepmergeAll(array, options2) { + if (!Array.isArray(array)) { + throw new Error("first argument should be an array"); + } + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options2); + }, {}); }; + var deepmerge_1 = deepmerge; + module2.exports = deepmerge_1; + } }); -exports.platform = os_1.default.platform(); -exports.arch = os_1.default.arch(); -exports.isWindows = exports.platform === 'win32'; -exports.isMacOS = exports.platform === 'darwin'; -exports.isLinux = exports.platform === 'linux'; -function getDetails() { - return __awaiter(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, (yield (exports.isWindows - ? getWindowsInfo() - : exports.isMacOS - ? getMacOsInfo() - : getLinuxInfo()))), { platform: exports.platform, - arch: exports.arch, - isWindows: exports.isWindows, - isMacOS: exports.isMacOS, - isLinux: exports.isLinux }); - }); -} -exports.getDetails = getDetails; -//# sourceMappingURL=platform.js.map - -/***/ }), - -/***/ 71638: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(70857); -const fs_1 = __nccwpck_require__(79896); -const { access, appendFile, writeFile } = fs_1.promises; -exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/context.js +var require_context = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/context.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Context = void 0; + var node_path_1 = __importDefault(__require("node:path")); + var deepmerge_1 = __importDefault(require_cjs()); + var Context2 = class { + name; + id; + payload; + octokit; + log; + constructor(event, octokit, log2) { + this.name = event.name; + this.id = event.id; + this.payload = event.payload; + this.octokit = octokit; + this.log = log2; + octokit.hook.before("request", (options2) => { + options2.headers["x-github-delivery"] = event.id; }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; + } + /** + * Return the `owner` and `repo` params for making API requests against a + * repository. + * + * ```js + * const params = context.repo({path: '.github/config.yml'}) + * // Returns: {owner: 'username', repo: 'reponame', path: '.github/config.yml'} + * ``` + * + * @param object - Params to be merged with the repo params. + * + */ + repo(object) { + const repo = this.payload.repository; + if (!repo) { + throw new Error("context.repo() is not supported for this webhook event."); } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); + return Object.assign({ + owner: repo.owner.login, + repo: repo.name + }, object); + } + /** + * Return the `owner`, `repo`, and `issue_number` params for making API requests + * against an issue. The object passed in will be merged with the repo params. + * + * + * ```js + * const params = context.issue({body: 'Hello World!'}) + * // Returns: {owner: 'username', repo: 'reponame', issue_number: 123, body: 'Hello World!'} + * ``` + * + * @param object - Params to be merged with the issue params. + */ + issue(object) { + return Object.assign({ + issue_number: ( + // @ts-expect-error - this.payload may not have `issue` or `pull_request` keys + (this.payload.issue || this.payload.pull_request || this.payload).number + ) + }, this.repo(object)); + } + /** + * Return the `owner`, `repo`, and `pull_number` params for making API requests + * against a pull request. The object passed in will be merged with the repo params. + * + * + * ```js + * const params = context.pullRequest({body: 'Hello World!'}) + * // Returns: {owner: 'username', repo: 'reponame', pull_number: 123, body: 'Hello World!'} + * ``` + * + * @param object - Params to be merged with the pull request params. + */ + pullRequest(object) { + const payload = this.payload; + return Object.assign({ + // @ts-expect-error - this.payload may not have `issue` or `pull_request` keys + pull_number: (payload.issue || payload.pull_request || payload).number + }, this.repo(object)); + } + /** + * Returns a boolean if the actor on the event was a bot. + * @type {boolean} + */ + get isBot() { + return this.payload.sender.type === "Bot"; + } + /** + * Reads the app configuration from the given YAML file in the `.github` + * directory of the repository. + * + * For example, given a file named `.github/config.yml`: + * + * ```yml + * close: true + * comment: Check the specs on the rotary girder. + * ``` + * + * Your app can read that file from the target repository: + * + * ```js + * // Load config from .github/config.yml in the repository + * const config = await context.config('config.yml') + * + * if (config.close) { + * context.octokit.issues.comment(context.issue({body: config.comment})) + * context.octokit.issues.edit(context.issue({state: 'closed'})) + * } + * ``` + * + * You can also use a `defaultConfig` object: + * + * ```js + * // Load config from .github/config.yml in the repository and combine with default config + * const config = await context.config('config.yml', {comment: 'Make sure to check all the specs.'}) + * + * if (config.close) { + * context.octokit.issues.comment(context.issue({body: config.comment})); + * context.octokit.issues.edit(context.issue({state: 'closed'})) + * } + * ``` + * + * Config files can also specify a base that they extend. `deepMergeOptions` can be used + * to configure how the target config, extended base, and default configs are merged. + * + * For security reasons, configuration is only loaded from the repository's default branch, + * changes made in pull requests from different branches or forks are ignored. + * + * If you need more lower-level control over reading and merging configuration files, + * you can `context.octokit.config.get(options)`, see https://github.com/probot/octokit-plugin-config. + * + * @param fileName - Name of the YAML file in the `.github` directory + * @param defaultConfig - An object of default config options + * @param deepMergeOptions - Controls merging configs (from the [deepmerge](https://github.com/TehShrike/deepmerge) module) + * @return Configuration object read from the file + */ + async config(fileName, defaultConfig, deepMergeOptions) { + const params = this.repo({ + path: node_path_1.default.posix.join(".github", fileName), + defaults(configs) { + const result = deepmerge_1.default.all([defaultConfig || {}, ...configs], deepMergeOptions); + return result; + } }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -exports.markdownSummary = _summary; -exports.summary = _summary; -//# sourceMappingURL=summary.js.map - -/***/ }), - -/***/ 96283: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; + const { config: config2, files } = await this.octokit.config.get(params); + if (!defaultConfig && !files.find((file) => file.config !== null)) { + return null; + } + return config2; + } + }; + exports2.Context = Context2; + } +}); -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandProperties = 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 toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = 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 toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; +// node_modules/.pnpm/@wolfy1339+lru-cache@11.0.2-patch.1/node_modules/@wolfy1339/lru-cache/dist/commonjs/index.js +var require_commonjs = __commonJS({ + "node_modules/.pnpm/@wolfy1339+lru-cache@11.0.2-patch.1/node_modules/@wolfy1339/lru-cache/dist/commonjs/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LRUCache = void 0; + var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date; + var warned = /* @__PURE__ */ new Set(); + var PROCESS = typeof process === "object" && !!process ? process : {}; + var emitWarning = (msg, type2, code, fn) => { + typeof PROCESS.emitWarning === "function" ? PROCESS.emitWarning(msg, type2, code, fn) : console.error(`[${code}] ${type2}: ${msg}`); + }; + var AC = globalThis.AbortController; + var AS = globalThis.AbortSignal; + var _a2; + if (typeof AC === "undefined") { + AS = class AbortSignal { + onabort; + _onabort = []; + reason; + aborted = false; + addEventListener(_, fn) { + this._onabort.push(fn); + } + }; + AC = class AbortController { + constructor() { + warnACPolyfill(); + } + signal = new AS(); + abort(reason) { + var _a3, _b; + if (this.signal.aborted) + return; + this.signal.reason = reason; + this.signal.aborted = true; + for (const fn of this.signal._onabort) { + fn(reason); + } + (_b = (_a3 = this.signal).onabort) == null ? void 0 : _b.call(_a3, reason); + } + }; + let printACPolyfillWarning = ((_a2 = PROCESS.env) == null ? void 0 : _a2.LRU_CACHE_IGNORE_AC_WARNING) !== "1"; + const warnACPolyfill = () => { + if (!printACPolyfillWarning) + return; + printACPolyfillWarning = false; + emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", warnACPolyfill); + }; } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn + var shouldWarn = (code) => !warned.has(code); + var TYPE = Symbol("type"); + var isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); + var getUintArray = (max) => !isPosInt(max) ? null : max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null; + var ZeroArray = class extends Array { + constructor(size) { + super(size); + this.fill(0); + } }; -} -exports.toCommandProperties = toCommandProperties; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 58872: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.getExecOutput = exports.exec = void 0; -const string_decoder_1 = __nccwpck_require__(13193); -const tr = __importStar(__nccwpck_require__(73725)); -/** - * Exec a command. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code - */ -function exec(commandLine, args, options) { - return __awaiter(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + var Stack = class _Stack { + heap; + length; + // private constructor + static #constructing = false; + static create(max) { + const HeapCls = getUintArray(max); + if (!HeapCls) + return []; + _Stack.#constructing = true; + const s = new _Stack(max, HeapCls); + _Stack.#constructing = false; + return s; + } + constructor(max, HeapCls) { + if (!_Stack.#constructing) { + throw new TypeError("instantiate Stack using Stack.create(n)"); } - // Path to tool to execute should be first arg - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); -} -exports.exec = exec; -/** - * Exec a command and get the output. - * Output will be streamed to the live console. - * Returns promise with the exit code and collected stdout and stderr - * - * @param commandLine command to execute (can include additional args). Must be correctly escaped. - * @param args optional arguments for tool. Escaping is handled by the lib. - * @param options optional exec options. See ExecOptions - * @returns Promise exit code, stdout, and stderr - */ -function getExecOutput(commandLine, args, options) { - var _a, _b; - return __awaiter(this, void 0, void 0, function* () { - let stdout = ''; - let stderr = ''; - //Using string decoder covers the case where a mult-byte character is split - const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); - const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - //flush any remaining characters - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); + this.heap = new HeapCls(max); + this.length = 0; + } + push(n) { + this.heap[this.length++] = n; + } + pop() { + return this.heap[--this.length]; + } + }; + var LRUCache = class _LRUCache { + // options that cannot be changed without disaster + #max; + #maxSize; + #dispose; + #disposeAfter; + #fetchMethod; + #memoMethod; + /** + * {@link LRUCache.OptionsBase.ttl} + */ + ttl; + /** + * {@link LRUCache.OptionsBase.ttlResolution} + */ + ttlResolution; + /** + * {@link LRUCache.OptionsBase.ttlAutopurge} + */ + ttlAutopurge; + /** + * {@link LRUCache.OptionsBase.updateAgeOnGet} + */ + updateAgeOnGet; + /** + * {@link LRUCache.OptionsBase.updateAgeOnHas} + */ + updateAgeOnHas; + /** + * {@link LRUCache.OptionsBase.allowStale} + */ + allowStale; + /** + * {@link LRUCache.OptionsBase.noDisposeOnSet} + */ + noDisposeOnSet; + /** + * {@link LRUCache.OptionsBase.noUpdateTTL} + */ + noUpdateTTL; + /** + * {@link LRUCache.OptionsBase.maxEntrySize} + */ + maxEntrySize; + /** + * {@link LRUCache.OptionsBase.sizeCalculation} + */ + sizeCalculation; + /** + * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} + */ + noDeleteOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} + */ + noDeleteOnStaleGet; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} + */ + allowStaleOnFetchAbort; + /** + * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} + */ + allowStaleOnFetchRejection; + /** + * {@link LRUCache.OptionsBase.ignoreFetchAbort} + */ + ignoreFetchAbort; + // computed properties + #size; + #calculatedSize; + #keyMap; + #keyList; + #valList; + #next; + #prev; + #head; + #tail; + #free; + #disposed; + #sizes; + #starts; + #ttls; + #hasDispose; + #hasFetchMethod; + #hasDisposeAfter; + /** + * Do not call this method unless you need to inspect the + * inner workings of the cache. If anything returned by this + * object is modified in any way, strange breakage may occur. + * + * These fields are private for a reason! + * + * @internal + */ + static unsafeExposeInternals(c) { return { - exitCode, - stdout, - stderr + // properties + starts: c.#starts, + ttls: c.#ttls, + sizes: c.#sizes, + keyMap: c.#keyMap, + keyList: c.#keyList, + valList: c.#valList, + next: c.#next, + prev: c.#prev, + get head() { + return c.#head; + }, + get tail() { + return c.#tail; + }, + free: c.#free, + // methods + isBackgroundFetch: (p) => c.#isBackgroundFetch(p), + backgroundFetch: (k, index, options2, context) => c.#backgroundFetch(k, index, options2, context), + moveToTail: (index) => c.#moveToTail(index), + indexes: (options2) => c.#indexes(options2), + rindexes: (options2) => c.#rindexes(options2), + isStale: (index) => c.#isStale(index) }; - }); -} -exports.getExecOutput = getExecOutput; -//# sourceMappingURL=exec.js.map - -/***/ }), - -/***/ 73725: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.argStringToArray = exports.ToolRunner = void 0; -const os = __importStar(__nccwpck_require__(70857)); -const events = __importStar(__nccwpck_require__(24434)); -const child = __importStar(__nccwpck_require__(35317)); -const path = __importStar(__nccwpck_require__(16928)); -const io = __importStar(__nccwpck_require__(73357)); -const ioUtil = __importStar(__nccwpck_require__(52746)); -const timers_1 = __nccwpck_require__(53557); -/* eslint-disable @typescript-eslint/unbound-method */ -const IS_WINDOWS = process.platform === 'win32'; -/* - * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way. - */ -class ToolRunner extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + // Protected read-only members + /** + * {@link LRUCache.OptionsBase.max} (read-only) + */ + get max() { + return this.#max; + } + /** + * {@link LRUCache.OptionsBase.maxSize} (read-only) + */ + get maxSize() { + return this.#maxSize; + } + /** + * The total computed size of items in the cache (read-only) + */ + get calculatedSize() { + return this.#calculatedSize; + } + /** + * The number of items stored in the cache (read-only) + */ + get size() { + return this.#size; + } + /** + * {@link LRUCache.OptionsBase.fetchMethod} (read-only) + */ + get fetchMethod() { + return this.#fetchMethod; + } + get memoMethod() { + return this.#memoMethod; + } + /** + * {@link LRUCache.OptionsBase.dispose} (read-only) + */ + get dispose() { + return this.#dispose; + } + /** + * {@link LRUCache.OptionsBase.disposeAfter} (read-only) + */ + get disposeAfter() { + return this.#disposeAfter; + } + constructor(options2) { + const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options2; + if (max !== 0 && !isPosInt(max)) { + throw new TypeError("max option must be a nonnegative integer"); } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); + const UintArray = max ? getUintArray(max) : Array; + if (!UintArray) { + throw new Error("invalid max value: " + max); } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool - if (IS_WINDOWS) { - // Windows + cmd file - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows + verbatim - else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } - // Windows (regular) - else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } + this.#max = max; + this.#maxSize = maxSize; + this.maxEntrySize = maxEntrySize || this.#maxSize; + this.sizeCalculation = sizeCalculation; + if (this.sizeCalculation) { + if (!this.#maxSize && !this.maxEntrySize) { + throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize"); + } + if (typeof this.sizeCalculation !== "function") { + throw new TypeError("sizeCalculation set to non-function"); + } } - else { - // OSX/Linux - this can likely be improved with some form of quoting. - // creating processes on Unix is fundamentally different than Windows. - // on Unix, execvp() takes an arg array. - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } + if (memoMethod !== void 0 && typeof memoMethod !== "function") { + throw new TypeError("memoMethod must be a function if defined"); } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - // the rest of the string ... - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); - } - return s; + this.#memoMethod = memoMethod; + if (fetchMethod !== void 0 && typeof fetchMethod !== "function") { + throw new TypeError("fetchMethod must be a function if specified"); } - catch (err) { - // streaming lines to console is best effort. Don't fail a build. - this._debug(`error processing line. Failed with error ${err}`); - return ''; + this.#fetchMethod = fetchMethod; + this.#hasFetchMethod = !!fetchMethod; + this.#keyMap = /* @__PURE__ */ new Map(); + this.#keyList = new Array(max).fill(void 0); + this.#valList = new Array(max).fill(void 0); + this.#next = new UintArray(max); + this.#prev = new UintArray(max); + this.#head = 0; + this.#tail = 0; + this.#free = Stack.create(max); + this.#size = 0; + this.#calculatedSize = 0; + if (typeof dispose === "function") { + this.#dispose = dispose; } - } - _getSpawnFileName() { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - return process.env['COMSPEC'] || 'cmd.exe'; - } + if (typeof disposeAfter === "function") { + this.#disposeAfter = disposeAfter; + this.#disposed = []; + } else { + this.#disposeAfter = void 0; + this.#disposed = void 0; } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += ' '; - argline += options.windowsVerbatimArguments - ? a - : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; + this.#hasDispose = !!this.#dispose; + this.#hasDisposeAfter = !!this.#disposeAfter; + this.noDisposeOnSet = !!noDisposeOnSet; + this.noUpdateTTL = !!noUpdateTTL; + this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; + this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; + this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; + this.ignoreFetchAbort = !!ignoreFetchAbort; + if (this.maxEntrySize !== 0) { + if (this.#maxSize !== 0) { + if (!isPosInt(this.#maxSize)) { + throw new TypeError("maxSize must be a positive integer if specified"); } + } + if (!isPosInt(this.maxEntrySize)) { + throw new TypeError("maxEntrySize must be a positive integer if specified"); + } + this.#initializeSizeTracking(); } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return (this._endsWith(upperToolPath, '.CMD') || - this._endsWith(upperToolPath, '.BAT')); - } - _windowsQuoteCmdArg(arg) { - // for .exe, apply the normal quoting rules that libuv applies - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - // otherwise apply quoting rules specific to the cmd.exe command line parser. - // the libuv rules are generic and are not designed specifically for cmd.exe - // command line parser. - // - // for a detailed description of the cmd.exe command line parser, refer to - // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912 - // need quotes for empty arg - if (!arg) { - return '""'; + this.allowStale = !!allowStale; + this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; + this.updateAgeOnGet = !!updateAgeOnGet; + this.updateAgeOnHas = !!updateAgeOnHas; + this.ttlResolution = isPosInt(ttlResolution) || ttlResolution === 0 ? ttlResolution : 1; + this.ttlAutopurge = !!ttlAutopurge; + this.ttl = ttl || 0; + if (this.ttl) { + if (!isPosInt(this.ttl)) { + throw new TypeError("ttl must be a positive integer if specified"); + } + this.#initializeTTLTracking(); } - // determine whether the arg needs to be quoted - const cmdSpecialChars = [ - ' ', - '\t', - '&', - '(', - ')', - '[', - ']', - '{', - '}', - '^', - '=', - ';', - '!', - "'", - '+', - ',', - '`', - '~', - '|', - '<', - '>', - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some(x => x === char)) { - needsQuotes = true; - break; + if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { + throw new TypeError("At least one of max, maxSize, or ttl is required"); + } + if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { + const code = "LRU_CACHE_UNBOUNDED"; + if (shouldWarn(code)) { + warned.add(code); + const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption."; + emitWarning(msg, "UnboundedCacheWarning", code, _LRUCache); + } + } + } + /** + * Return the number of ms left in the item's TTL. If item is not in cache, + * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. + */ + getRemainingTTL(key) { + return this.#keyMap.has(key) ? Infinity : 0; + } + #initializeTTLTracking() { + const ttls = new ZeroArray(this.#max); + const starts = new ZeroArray(this.#max); + this.#ttls = ttls; + this.#starts = starts; + this.#setItemTTL = (index, ttl, start = perf.now()) => { + starts[index] = ttl !== 0 ? start : 0; + ttls[index] = ttl; + if (ttl !== 0 && this.ttlAutopurge) { + const t = setTimeout(() => { + if (this.#isStale(index)) { + this.#delete(this.#keyList[index], "expire"); + } + }, ttl + 1); + if (t.unref) { + t.unref(); + } + } + }; + this.#updateItemAge = (index) => { + starts[index] = ttls[index] !== 0 ? perf.now() : 0; + }; + this.#statusTTL = (status, index) => { + if (ttls[index]) { + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) + return; + status.ttl = ttl; + status.start = start; + status.now = cachedNow || getNow(); + const age = status.now - start; + status.remainingTTL = ttl - age; + } + }; + let cachedNow = 0; + const getNow = () => { + const n = perf.now(); + if (this.ttlResolution > 0) { + cachedNow = n; + const t = setTimeout(() => cachedNow = 0, this.ttlResolution); + if (t.unref) { + t.unref(); + } + } + return n; + }; + this.getRemainingTTL = (key) => { + const index = this.#keyMap.get(key); + if (index === void 0) { + return 0; + } + const ttl = ttls[index]; + const start = starts[index]; + if (!ttl || !start) { + return Infinity; + } + const age = (cachedNow || getNow()) - start; + return ttl - age; + }; + this.#isStale = (index) => { + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; + }; + } + // conditionally set private methods related to TTL + #updateItemAge = () => { + }; + #statusTTL = () => { + }; + #setItemTTL = () => { + }; + /* c8 ignore stop */ + #isStale = () => false; + #initializeSizeTracking() { + const sizes = new ZeroArray(this.#max); + this.#calculatedSize = 0; + this.#sizes = sizes; + this.#removeItemSize = (index) => { + this.#calculatedSize -= sizes[index]; + sizes[index] = 0; + }; + this.#requireSize = (k, v, size, sizeCalculation) => { + if (this.#isBackgroundFetch(v)) { + return 0; + } + if (!isPosInt(size)) { + if (sizeCalculation) { + if (typeof sizeCalculation !== "function") { + throw new TypeError("sizeCalculation must be a function"); + } + size = sizeCalculation(v, k); + if (!isPosInt(size)) { + throw new TypeError("sizeCalculation return invalid (expect positive integer)"); + } + } else { + throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set."); + } + } + return size; + }; + this.#addItemSize = (index, size, status) => { + sizes[index] = size; + if (this.#maxSize) { + const maxSize = this.#maxSize - sizes[index]; + while (this.#calculatedSize > maxSize) { + this.#evict(true); } + } + this.#calculatedSize += sizes[index]; + if (status) { + status.entrySize = size; + status.totalCalculatedSize = this.#calculatedSize; + } + }; + } + #removeItemSize = (_i) => { + }; + #addItemSize = (_i, _s, _st) => { + }; + #requireSize = (_k, _v, size, sizeCalculation) => { + if (size || sizeCalculation) { + throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache"); } - // short-circuit if quotes not needed - if (!needsQuotes) { - return arg; - } - // the following quoting rules are very similar to the rules that by libuv applies. - // - // 1) wrap the string in quotes - // - // 2) double-up quotes - i.e. " => "" - // - // this is different from the libuv quoting rules. libuv replaces " with \", which unfortunately - // doesn't work well with a cmd.exe command line. - // - // note, replacing " with "" also works well if the arg is passed to a downstream .NET console app. - // for example, the command line: - // foo.exe "myarg:""my val""" - // is parsed by a .NET console app into an arg array: - // [ "myarg:\"my val\"" ] - // which is the same end result when applying libuv quoting rules. although the actual - // command line from libuv quoting rules would look like: - // foo.exe "myarg:\"my val\"" - // - // 3) double-up slashes that precede a quote, - // e.g. hello \world => "hello \world" - // hello\"world => "hello\\""world" - // hello\\"world => "hello\\\\""world" - // hello world\ => "hello world\\" - // - // technically this is not required for a cmd.exe command line, or the batch argument parser. - // the reasons for including this as a .cmd quoting rule are: - // - // a) this is optimized for the scenario where the argument is passed from the .cmd file to an - // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule. - // - // b) it's what we've been doing previously (by deferring to node default behavior) and we - // haven't heard any complaints about that aspect. - // - // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be - // escaped when used on the command line directly - even though within a .cmd file % can be escaped - // by using %%. - // - // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts - // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing. - // - // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would - // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the - // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args - // to an external program. - // - // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file. - // % can be escaped within a .cmd file. - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; // double the slash + return 0; + }; + *#indexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#tail; true; ) { + if (!this.#isValidIndex(i)) { + break; } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; // double the quote + if (allowStale || !this.#isStale(i)) { + yield i; } - else { - quoteHit = false; + if (i === this.#head) { + break; + } else { + i = this.#prev[i]; } + } } - reverse += '"'; - return reverse - .split('') - .reverse() - .join(''); - } - _uvQuoteCmdArg(arg) { - // Tool runner wraps child_process.spawn() and needs to apply the same quoting as - // Node in certain cases where the undocumented spawn option windowsVerbatimArguments - // is used. - // - // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV, - // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details), - // pasting copyright notice from Node within this function: - // - // Copyright Joyent, Inc. and other Node contributors. All rights reserved. - // - // Permission is hereby granted, free of charge, to any person obtaining a copy - // of this software and associated documentation files (the "Software"), to - // deal in the Software without restriction, including without limitation the - // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - // sell copies of the Software, and to permit persons to whom the Software is - // furnished to do so, subject to the following conditions: - // - // The above copyright notice and this permission notice shall be included in - // all copies or substantial portions of the Software. - // - // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - // IN THE SOFTWARE. - if (!arg) { - // Need double quotation for empty argument - return '""'; - } - if (!arg.includes(' ') && !arg.includes('\t') && !arg.includes('"')) { - // No quotation needed - return arg; - } - if (!arg.includes('"') && !arg.includes('\\')) { - // No embedded double quotes or backslashes, so I can just wrap - // quote marks around the whole thing. - return `"${arg}"`; - } - // Expected input/output: - // input : hello"world - // output: "hello\"world" - // input : hello""world - // output: "hello\"\"world" - // input : hello\world - // output: hello\world - // input : hello\\world - // output: hello\\world - // input : hello\"world - // output: "hello\\\"world" - // input : hello\\"world - // output: "hello\\\\\"world" - // input : hello world\ - // output: "hello world\\" - note the comment in libuv actually reads "hello world\" - // but it appears the comment is wrong, it should be "hello world\\" - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - // walk the string in reverse - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === '\\') { - reverse += '\\'; + } + *#rindexes({ allowStale = this.allowStale } = {}) { + if (this.#size) { + for (let i = this.#head; true; ) { + if (!this.#isValidIndex(i)) { + break; } - else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '\\'; + if (allowStale || !this.#isStale(i)) { + yield i; } - else { - quoteHit = false; + if (i === this.#tail) { + break; + } else { + i = this.#next[i]; } + } } - reverse += '"'; - return reverse - .split('') - .reverse() - .join(''); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 10000 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result['windowsVerbatimArguments'] = - options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; + } + #isValidIndex(index) { + return index !== void 0 && this.#keyMap.get(this.#keyList[index]) === index; + } + /** + * Return a generator yielding `[key, value]` pairs, + * in order from most recently used to least recently used. + */ + *entries() { + for (const i of this.#indexes()) { + if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter(this, void 0, void 0, function* () { - // root the tool path if it is unrooted and contains relative pathing - if (!ioUtil.isRooted(this.toolPath) && - (this.toolPath.includes('/') || - (IS_WINDOWS && this.toolPath.includes('\\')))) { - // prefer options.cwd if it is specified, however options.cwd may also need to be rooted - this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - // if the tool is only a file name, then resolve it from the PATH - // otherwise verify it exists (add extension on Windows if necessary) - this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug('arguments:'); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); - } - const state = new ExecState(optionsNonNull, this.toolPath); - state.on('debug', (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ''; - if (cp.stdout) { - cp.stdout.on('data', (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ''; - if (cp.stderr) { - cp.stderr.on('data', (data) => { - state.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && - optionsNonNull.errStream && - optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr - ? optionsNonNull.errStream - : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on('error', (err) => { - state.processError = err.message; - state.processExited = true; - state.processClosed = true; - state.CheckComplete(); - }); - cp.on('exit', (code) => { - state.processExitCode = code; - state.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state.CheckComplete(); - }); - cp.on('close', (code) => { - state.processExitCode = code; - state.processExited = true; - state.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state.CheckComplete(); - }); - state.on('done', (error, exitCode) => { - if (stdbuffer.length > 0) { - this.emit('stdline', stdbuffer); - } - if (errbuffer.length > 0) { - this.emit('errline', errbuffer); - } - cp.removeAllListeners(); - if (error) { - reject(error); - } - else { - resolve(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error('child process missing stdin'); - } - cp.stdin.end(this.options.input); - } - })); - }); - } -} -exports.ToolRunner = ToolRunner; -/** - * Convert an arg string to an array of args. Handles escaping - * - * @param argString string of arguments - * @returns string[] array of arguments - */ -function argStringToArray(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ''; - function append(c) { - // we only escape double quotes. - if (escaped && c !== '"') { - arg += '\\'; + } + /** + * Inverse order version of {@link LRUCache.entries} + * + * Return a generator yielding `[key, value]` pairs, + * in order from least recently used to most recently used. + */ + *rentries() { + for (const i of this.#rindexes()) { + if (this.#valList[i] !== void 0 && this.#keyList[i] !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield [this.#keyList[i], this.#valList[i]]; + } } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } - else { - append(c); - } - continue; + } + /** + * Return a generator yielding the keys in the cache, + * in order from most recently used to least recently used. + */ + *keys() { + for (const i of this.#indexes()) { + const k = this.#keyList[i]; + if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } } - if (c === '\\' && escaped) { - append(c); + } + /** + * Inverse order version of {@link LRUCache.keys} + * + * Return a generator yielding the keys in the cache, + * in order from least recently used to most recently used. + */ + *rkeys() { + for (const i of this.#rindexes()) { + const k = this.#keyList[i]; + if (k !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield k; + } + } + } + /** + * Return a generator yielding the values in the cache, + * in order from most recently used to least recently used. + */ + *values() { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Inverse order version of {@link LRUCache.values} + * + * Return a generator yielding the values in the cache, + * in order from least recently used to most recently used. + */ + *rvalues() { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + if (v !== void 0 && !this.#isBackgroundFetch(this.#valList[i])) { + yield this.#valList[i]; + } + } + } + /** + * Iterating over the cache itself yields the same results as + * {@link LRUCache.entries} + */ + [Symbol.iterator]() { + return this.entries(); + } + /** + * A String value that is used in the creation of the default string + * description of an object. Called by the built-in method + * `Object.prototype.toString`. + */ + [Symbol.toStringTag] = "LRUCache"; + /** + * Find a value for which the supplied fn method returns a truthy value, + * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. + */ + find(fn, getOptions = {}) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (value === void 0) continue; + if (fn(value, this.#keyList[i], this)) { + return this.get(this.#keyList[i], getOptions); + } } - if (c === '\\' && inQuotes) { - escaped = true; + } + /** + * Call the supplied function on each item in the cache, in order from most + * recently used to least recently used. + * + * `fn` is called as `fn(value, key, cache)`. + * + * If `thisp` is provided, function will be called in the `this`-context of + * the provided object, or the cache if no `thisp` object is provided. + * + * Does not update age or recenty of use, or iterate over stale values. + */ + forEach(fn, thisp = this) { + for (const i of this.#indexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (value === void 0) continue; + fn.call(thisp, value, this.#keyList[i], this); } - if (c === ' ' && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ''; - } + } + /** + * The same as {@link LRUCache.forEach} but items are iterated over in + * reverse order. (ie, less recently used items are iterated over first.) + */ + rforEach(fn, thisp = this) { + for (const i of this.#rindexes()) { + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (value === void 0) continue; + fn.call(thisp, value, this.#keyList[i], this); } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; -} -exports.argStringToArray = argStringToArray; -class ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; // tracks whether the process has exited and stdio is closed - this.processError = ''; - this.processExitCode = 0; - this.processExited = false; // tracks whether the process has exited - this.processStderr = false; // tracks whether stderr was written to - this.delay = 10000; // 10 seconds - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error('toolPath must not be empty'); + } + /** + * Delete any stale entries. Returns true if anything was removed, + * false otherwise. + */ + purgeStale() { + let deleted = false; + for (const i of this.#rindexes({ allowStale: true })) { + if (this.#isStale(i)) { + this.#delete(this.#keyList[i], "expire"); + deleted = true; + } } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; + return deleted; + } + /** + * Get the extended info about a given entry, to get its value, size, and + * TTL info simultaneously. Returns `undefined` if the key is not present. + * + * Unlike {@link LRUCache#dump}, which is designed to be portable and survive + * serialization, the `start` value is always the current timestamp, and the + * `ttl` is a calculated remaining time to live (negative if expired). + * + * Always returns stale values, if their info is found in the cache, so be + * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) + * if relevant. + */ + info(key) { + const i = this.#keyMap.get(key); + if (i === void 0) + return void 0; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (value === void 0) + return void 0; + const entry = { value }; + if (this.#ttls && this.#starts) { + const ttl = this.#ttls[i]; + const start = this.#starts[i]; + if (ttl && start) { + const remain = ttl - (perf.now() - start); + entry.ttl = remain; + entry.start = Date.now(); + } } - } - CheckComplete() { - if (this.done) { - return; + if (this.#sizes) { + entry.size = this.#sizes[i]; } - if (this.processClosed) { - this._setResult(); + return entry; + } + /** + * Return an array of [key, {@link LRUCache.Entry}] tuples which can be + * passed to {@link LRUCache#load}. + * + * The `start` fields are calculated relative to a portable `Date.now()` + * timestamp, even if `performance.now()` is available. + * + * Stale entries are always included in the `dump`, even if + * {@link LRUCache.OptionsBase.allowStale} is false. + * + * Note: this returns an actual array, not a generator, so it can be more + * easily passed around. + */ + dump() { + const arr = []; + for (const i of this.#indexes({ allowStale: true })) { + const key = this.#keyList[i]; + const v = this.#valList[i]; + const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (value === void 0 || key === void 0) + continue; + const entry = { value }; + if (this.#ttls && this.#starts) { + entry.ttl = this.#ttls[i]; + const age = perf.now() - this.#starts[i]; + entry.start = Math.floor(Date.now() - age); + } + if (this.#sizes) { + entry.size = this.#sizes[i]; + } + arr.unshift([key, entry]); } - else if (this.processExited) { - this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); + return arr; + } + /** + * Reset the cache and load in the items in entries in the order listed. + * + * The shape of the resulting cache may be different if the same options are + * not used in both caches. + * + * The `start` fields are assumed to be calculated relative to a portable + * `Date.now()` timestamp, even if `performance.now()` is available. + */ + load(arr) { + this.clear(); + for (const [key, entry] of arr) { + if (entry.start) { + const age = Date.now() - entry.start; + entry.start = perf.now() - age; + } + this.set(key, entry.value, entry); } - } - _debug(message) { - this.emit('debug', message); - } - _setResult() { - // determine whether there is an error - let error; - if (this.processExited) { - if (this.processError) { - error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } + /** + * Add a value to the cache. + * + * Note: if `undefined` is specified as a value, this is an alias for + * {@link LRUCache#delete} + * + * Fields on the {@link LRUCache.SetOptions} options param will override + * their corresponding values in the constructor options for the scope + * of this single `set()` operation. + * + * If `start` is provided, then that will set the effective start + * time for the TTL calculation. Note that this must be a previous + * value of `performance.now()` if supported, or a previous value of + * `Date.now()` if not. + * + * Options object may also include `size`, which will prevent + * calling the `sizeCalculation` function and just use the specified + * number if it is a positive integer, and `noDisposeOnSet` which + * will prevent calling a `dispose` function in the case of + * overwrites. + * + * If the `size` (or return value of `sizeCalculation`) for a given + * entry is greater than `maxEntrySize`, then the item will not be + * added to the cache. + * + * Will update the recency of the entry. + * + * If the value is `undefined`, then this is an alias for + * `cache.delete(key)`. `undefined` is never stored in the cache. + */ + set(k, v, setOptions = {}) { + var _a3, _b, _c, _d, _e; + if (v === void 0) { + this.delete(k); + return this; + } + const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status } = setOptions; + let { noUpdateTTL = this.noUpdateTTL } = setOptions; + const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); + if (this.maxEntrySize && size > this.maxEntrySize) { + if (status) { + status.set = "miss"; + status.maxEntrySizeExceeded = true; + } + this.#delete(k, "set"); + return this; + } + let index = this.#size === 0 ? void 0 : this.#keyMap.get(k); + if (index === void 0) { + index = this.#size === 0 ? this.#tail : this.#free.length !== 0 ? this.#free.pop() : this.#size === this.#max ? this.#evict(false) : this.#size; + this.#keyList[index] = k; + this.#valList[index] = v; + this.#keyMap.set(k, index); + this.#next[this.#tail] = index; + this.#prev[index] = this.#tail; + this.#tail = index; + this.#size++; + this.#addItemSize(index, size, status); + if (status) + status.set = "add"; + noUpdateTTL = false; + } else { + this.#moveToTail(index); + const oldVal = this.#valList[index]; + if (v !== oldVal) { + if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { + oldVal.__abortController.abort(new Error("replaced")); + const { __staleWhileFetching: s } = oldVal; + if (s !== void 0 && !noDisposeOnSet) { + if (this.#hasDispose) { + (_a3 = this.#dispose) == null ? void 0 : _a3.call(this, s, k, "set"); + } + if (this.#hasDisposeAfter) { + (_b = this.#disposed) == null ? void 0 : _b.push([s, k, "set"]); + } + } + } else if (!noDisposeOnSet) { + if (this.#hasDispose) { + (_c = this.#dispose) == null ? void 0 : _c.call(this, oldVal, k, "set"); + } + if (this.#hasDisposeAfter) { + (_d = this.#disposed) == null ? void 0 : _d.push([oldVal, k, "set"]); + } + } + this.#removeItemSize(index); + this.#addItemSize(index, size, status); + this.#valList[index] = v; + if (status) { + status.set = "replace"; + const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal; + if (oldValue !== void 0) + status.oldValue = oldValue; } - else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (status) { + status.set = "update"; + } + } + if (ttl !== 0 && !this.#ttls) { + this.#initializeTTLTracking(); + } + if (this.#ttls) { + if (!noUpdateTTL) { + this.#setItemTTL(index, ttl, start); + } + if (status) + this.#statusTTL(status, index); + } + if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while (task = dt == null ? void 0 : dt.shift()) { + (_e = this.#disposeAfter) == null ? void 0 : _e.call(this, ...task); + } + } + return this; + } + /** + * Evict the least recently used item, returning its value or + * `undefined` if cache is empty. + */ + pop() { + var _a3; + try { + while (this.#size) { + const val = this.#valList[this.#head]; + this.#evict(true); + if (this.#isBackgroundFetch(val)) { + if (val.__staleWhileFetching) { + return val.__staleWhileFetching; + } + } else if (val !== void 0) { + return val; } - else if (this.processStderr && this.options.failOnStdErr) { - error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } + } finally { + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while (task = dt == null ? void 0 : dt.shift()) { + (_a3 = this.#disposeAfter) == null ? void 0 : _a3.call(this, ...task); } + } } - // clear the timeout - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; + } + #evict(free) { + var _a3, _b; + const head = this.#head; + const k = this.#keyList[head]; + const v = this.#valList[head]; + if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error("evicted")); + } else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + (_a3 = this.#dispose) == null ? void 0 : _a3.call(this, v, k, "evict"); + } + if (this.#hasDisposeAfter) { + (_b = this.#disposed) == null ? void 0 : _b.push([v, k, "evict"]); + } } - this.done = true; - this.emit('done', error, this.processExitCode); - } - static HandleTimeout(state) { - if (state.done) { - return; + this.#removeItemSize(head); + if (free) { + this.#keyList[head] = void 0; + this.#valList[head] = void 0; + this.#free.push(head); } - if (!state.processClosed && state.processExited) { - const message = `The STDIO streams did not close within ${state.delay / - 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state._debug(message); + if (this.#size === 1) { + this.#head = this.#tail = 0; + this.#free.length = 0; + } else { + this.#head = this.#next[head]; } - state._setResult(); - } -} -//# sourceMappingURL=toolrunner.js.map - -/***/ }), - -/***/ 63673: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); + this.#keyMap.delete(k); + this.#size--; + return head; + } + /** + * Check if a key is in the cache, without updating the recency of use. + * Will return false if the item is stale, even though it is technically + * in the cache. + * + * Check if a key is in the cache, without updating the recency of + * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set + * to `true` in either the options or the constructor. + * + * Will return `false` if the item is stale, even though it is technically in + * the cache. The difference can be determined (if it matters) by using a + * `status` argument, and inspecting the `has` field. + * + * Will not update item age unless + * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. + */ + has(k, hasOptions = {}) { + const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; + const index = this.#keyMap.get(k); + if (index !== void 0) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v) && v.__staleWhileFetching === void 0) { + return false; + } + if (!this.#isStale(index)) { + if (updateAgeOnHas) { + this.#updateItemAge(index); + } + if (status) { + status.has = "hit"; + this.#statusTTL(status, index); + } + return true; + } else if (status) { + status.has = "stale"; + this.#statusTTL(status, index); + } + } else if (status) { + status.has = "miss"; } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); + } + /** + * Like {@link LRUCache#get} but doesn't update recency or delete stale + * items. + * + * Returns `undefined` if the item is stale, unless + * {@link LRUCache.OptionsBase.allowStale} is set. + */ + peek(k, peekOptions = {}) { + const { allowStale = this.allowStale } = peekOptions; + const index = this.#keyMap.get(k); + if (index === void 0 || !allowStale && this.#isStale(index)) { + return; } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); + const v = this.#valList[index]; + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + } + #backgroundFetch(k, index, options2, context) { + const v = index === void 0 ? void 0 : this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + return v; } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map - -/***/ }), - -/***/ 80787: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __createBinding = (this && this.__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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__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)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(58611)); -const https = __importStar(__nccwpck_require__(65692)); -const pm = __importStar(__nccwpck_require__(77407)); -const tunnel = __importStar(__nccwpck_require__(16124)); -const undici_1 = __nccwpck_require__(71909); -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"; -})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers || (exports.Headers = Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes || (exports.MediaTypes = 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 getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __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()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __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)); - }); - })); + const ac = new AC(); + const { signal } = options2; + signal == null ? void 0 : signal.addEventListener("abort", () => ac.abort(signal.reason), { + signal: ac.signal }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class 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; + const fetchOpts = { + signal: ac.signal, + options: options2, + context + }; + const cb = (v2, updateCache = false) => { + const { aborted } = ac.signal; + const ignoreAbort = options2.ignoreFetchAbort && v2 !== void 0; + if (options2.status) { + if (aborted && !updateCache) { + options2.status.fetchAborted = true; + options2.status.fetchError = ac.signal.reason; + if (ignoreAbort) + options2.status.fetchAbortIgnored = true; + } else { + options2.status.fetchResolved = true; } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; + } + if (aborted && !ignoreAbort && !updateCache) { + return fetchFail(ac.signal.reason); + } + const bf2 = p; + if (this.#valList[index] === p) { + if (v2 === void 0) { + if (bf2.__staleWhileFetching) { + this.#valList[index] = bf2.__staleWhileFetching; + } else { + this.#delete(k, "fetch"); + } + } else { + if (options2.status) + options2.status.fetchUpdated = true; + this.set(k, v2, fetchOpts.options); } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + return v2; + }; + const eb = (er) => { + if (options2.status) { + options2.status.fetchRejected = true; + options2.status.fetchError = er; + } + return fetchFail(er); + }; + const fetchFail = (er) => { + const { aborted } = ac.signal; + const allowStaleAborted = aborted && options2.allowStaleOnFetchAbort; + const allowStale = allowStaleAborted || options2.allowStaleOnFetchRejection; + const noDelete = allowStale || options2.noDeleteOnFetchRejection; + const bf2 = p; + if (this.#valList[index] === p) { + const del = !noDelete || bf2.__staleWhileFetching === void 0; + if (del) { + this.#delete(k, "fetch"); + } else if (!allowStaleAborted) { + this.#valList[index] = bf2.__staleWhileFetching; } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (allowStale) { + if (options2.status && bf2.__staleWhileFetching !== void 0) { + options2.status.returnedStale = true; } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; + return bf2.__staleWhileFetching; + } else if (bf2.__returned === bf2) { + throw er; + } + }; + const pcall = (res, rej) => { + var _a3; + const fmp = (_a3 = this.#fetchMethod) == null ? void 0 : _a3.call(this, k, v, fetchOpts); + if (fmp && fmp instanceof Promise) { + fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej); + } + ac.signal.addEventListener("abort", () => { + if (!options2.ignoreFetchAbort || options2.allowStaleOnFetchAbort) { + res(void 0); + if (options2.allowStaleOnFetchAbort) { + res = (v2) => cb(v2, true); + } } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; + }); + }; + if (options2.status) + options2.status.fetchDispatched = true; + const p = new Promise(pcall).then(cb, eb); + const bf = Object.assign(p, { + __abortController: ac, + __staleWhileFetching: v, + __returned: void 0 + }); + if (index === void 0) { + this.set(k, bf, { ...fetchOpts.options, status: void 0 }); + index = this.#keyMap.get(k); + } else { + this.#valList[index] = bf; + } + return bf; + } + #isBackgroundFetch(p) { + if (!this.#hasFetchMethod) + return false; + const b = p; + return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC; + } + async fetch(k, fetchOptions = {}) { + const { + // get options + allowStale = this.allowStale, + updateAgeOnGet = this.updateAgeOnGet, + noDeleteOnStaleGet = this.noDeleteOnStaleGet, + // set options + ttl = this.ttl, + noDisposeOnSet = this.noDisposeOnSet, + size = 0, + sizeCalculation = this.sizeCalculation, + noUpdateTTL = this.noUpdateTTL, + // fetch exclusive options + noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, + allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, + ignoreFetchAbort = this.ignoreFetchAbort, + allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, + context, + forceRefresh = false, + status, + signal + } = fetchOptions; + if (!this.#hasFetchMethod) { + if (status) + status.fetch = "get"; + return this.get(k, { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + status + }); + } + const options2 = { + allowStale, + updateAgeOnGet, + noDeleteOnStaleGet, + ttl, + noDisposeOnSet, + size, + sizeCalculation, + noUpdateTTL, + noDeleteOnFetchRejection, + allowStaleOnFetchRejection, + allowStaleOnFetchAbort, + ignoreFetchAbort, + status, + signal + }; + let index = this.#keyMap.get(k); + if (index === void 0) { + if (status) + status.fetch = "miss"; + const p = this.#backgroundFetch(k, index, options2, context); + return p.__returned = p; + } else { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + const stale = allowStale && v.__staleWhileFetching !== void 0; + if (status) { + status.fetch = "inflight"; + if (stale) + status.returnedStale = true; } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; + return stale ? v.__staleWhileFetching : v.__returned = v; + } + const isStale = this.#isStale(index); + if (!forceRefresh && !isStale) { + if (status) + status.fetch = "hit"; + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); } + if (status) + this.#statusTTL(status, index); + return v; + } + const p = this.#backgroundFetch(k, index, options2, context); + const hasStale = p.__staleWhileFetching !== void 0; + const staleVal = hasStale && allowStale; + if (status) { + status.fetch = isStale ? "stale" : "refresh"; + if (staleVal && isStale) + status.returnedStale = true; + } + return staleVal ? p.__staleWhileFetching : p.__returned = p; } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); + } + async forceFetch(k, fetchOptions = {}) { + const v = await this.fetch(k, fetchOptions); + if (v === void 0) + throw new Error("fetch() returned undefined"); + return v; + } + memo(k, memoOptions = {}) { + const memoMethod = this.#memoMethod; + if (!memoMethod) { + throw new Error("no memoMethod provided to constructor"); + } + const { context, forceRefresh, ...options2 } = memoOptions; + const v = this.get(k, options2); + if (!forceRefresh && v !== void 0) + return v; + const vv = memoMethod(k, v, { + options: options2, + context }); - } - /** - * 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 __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * 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 __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 && 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 === 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 && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - 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 || - !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; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); + this.set(k, vv, options2); + return vv; + } + /** + * Return a value from the cache. Will update the recency of the cache + * entry found. + * + * If the key is not found, get() will return `undefined`. + */ + get(k, getOptions = {}) { + const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status } = getOptions; + const index = this.#keyMap.get(k); + if (index !== void 0) { + const value = this.#valList[index]; + const fetching = this.#isBackgroundFetch(value); + if (status) + this.#statusTTL(status, index); + if (this.#isStale(index)) { + if (status) + status.get = "stale"; + if (!fetching) { + if (!noDeleteOnStaleGet) { + this.#delete(k, "expire"); + } + if (status && allowStale) + status.returnedStale = true; + return allowStale ? value : void 0; + } else { + if (status && allowStale && value.__staleWhileFetching !== void 0) { + status.returnedStale = true; + } + return allowStale ? value.__staleWhileFetching : void 0; + } + } else { + if (status) + status.get = "hit"; + if (fetching) { + return value.__staleWhileFetching; + } + this.#moveToTail(index); + if (updateAgeOnGet) { + this.#updateItemAge(index); + } + return value; + } + } else if (status) { + status.get = "miss"; } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __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); - } + } + #connect(p, n) { + this.#prev[n] = p; + this.#next[p] = n; + } + #moveToTail(index) { + if (index !== this.#tail) { + if (index === this.#head) { + this.#head = this.#next[index]; + } else { + this.#connect(this.#prev[index], this.#next[index]); + } + this.#connect(this.#tail, index); + this.#tail = index; + } + } + /** + * Deletes a key out of the cache. + * + * Returns true if the key was deleted, false otherwise. + */ + delete(k) { + return this.#delete(k, "delete"); + } + #delete(k, reason) { + var _a3, _b, _c, _d; + let deleted = false; + if (this.#size !== 0) { + const index = this.#keyMap.get(k); + if (index !== void 0) { + deleted = true; + if (this.#size === 1) { + this.#clear(reason); + } else { + this.#removeItemSize(index); + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error("deleted")); + } else if (this.#hasDispose || this.#hasDisposeAfter) { + if (this.#hasDispose) { + (_a3 = this.#dispose) == null ? void 0 : _a3.call(this, v, k, reason); } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * 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 = {}; + if (this.#hasDisposeAfter) { + (_b = this.#disposed) == null ? void 0 : _b.push([v, k, reason]); + } + } + this.#keyMap.delete(k); + this.#keyList[index] = void 0; + this.#valList[index] = void 0; + if (index === this.#tail) { + this.#tail = this.#prev[index]; + } else if (index === this.#head) { + this.#head = this.#next[index]; + } else { + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; + } + this.#size--; + this.#free.push(index); } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } + if (this.#hasDisposeAfter && ((_c = this.#disposed) == null ? void 0 : _c.length)) { + const dt = this.#disposed; + let task; + while (task = dt == null ? void 0 : dt.shift()) { + (_d = this.#disposeAfter) == null ? void 0 : _d.call(this, ...task); + } } - const req = info.httpModule.request(info.options, (msg) => { - const res = new 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 || 3 * 60000, () => { - if (socket) { - socket.end(); + return deleted; + } + /** + * Clear the cache entirely, throwing away all values. + */ + clear() { + return this.#clear("delete"); + } + #clear(reason) { + var _a3, _b, _c; + for (const index of this.#rindexes({ allowStale: true })) { + const v = this.#valList[index]; + if (this.#isBackgroundFetch(v)) { + v.__abortController.abort(new Error("deleted")); + } else { + const k = this.#keyList[index]; + if (this.#hasDispose) { + (_a3 = this.#dispose) == null ? void 0 : _a3.call(this, v, k, reason); } - 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); + if (this.#hasDisposeAfter) { + (_b = this.#disposed) == null ? void 0 : _b.push([v, k, reason]); + } + } } - else { - req.end(); + this.#keyMap.clear(); + this.#valList.fill(void 0); + this.#keyList.fill(void 0); + if (this.#ttls && this.#starts) { + this.#ttls.fill(0); + this.#starts.fill(0); } - } - /** - * 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); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; + if (this.#sizes) { + this.#sizes.fill(0); } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : 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; + this.#head = 0; + this.#tail = 0; + this.#free.length = 0; + this.#calculatedSize = 0; + this.#size = 0; + if (this.#hasDisposeAfter && this.#disposed) { + const dt = this.#disposed; + let task; + while (task = dt == null ? void 0 : dt.shift()) { + (_c = this.#disposeAfter) == null ? void 0 : _c.call(this, ...task); + } } - 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); + } + }; + exports2.LRUCache = LRUCache; + } +}); + +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-authenticated-octokit.js +var require_get_authenticated_octokit = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-authenticated-octokit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getAuthenticatedOctokit = getAuthenticatedOctokit; + async function getAuthenticatedOctokit(state, installationId, log2) { + const { octokit } = state; + if (!installationId) + return octokit; + return octokit.auth({ + type: "installation", + installationId, + factory: ({ octokit: octokit2, octokitOptions, ...otherOptions }) => { + var _a2; + const pinoLog = log2 || state.log.child({ name: "github" }); + const options2 = { + ...octokitOptions, + log: { + fatal: pinoLog.fatal.bind(pinoLog), + error: pinoLog.error.bind(pinoLog), + warn: pinoLog.warn.bind(pinoLog), + info: pinoLog.info.bind(pinoLog), + debug: pinoLog.debug.bind(pinoLog), + trace: pinoLog.trace.bind(pinoLog) + }, + throttle: ((_a2 = octokitOptions.throttle) == null ? void 0 : _a2.enabled) ? { + ...octokitOptions.throttle, + id: String(installationId) + } : { enabled: false }, + auth: { + ...octokitOptions.auth, + otherOptions, + installationId } + }; + const Octokit2 = octokit2.constructor; + return new Octokit2(options2); } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); + }); } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; + } +}); + +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/auth.js +var require_auth = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/auth.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.auth = auth7; + var get_authenticated_octokit_js_1 = require_get_authenticated_octokit(); + async function auth7(state, installationId, log2) { + return (0, get_authenticated_octokit_js_1.getAuthenticatedOctokit)(Object.assign({}, state), installationId, log2); } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = 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 || http.globalAgent.maxSockets; + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js +var require_err_helpers = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js"(exports2, module2) { + "use strict"; + var isErrorLike = (err) => { + return err && typeof err.message === "string"; + }; + var getErrorCause = (err) => { + if (!err) return; + const cause = err.cause; + if (typeof cause === "function") { + const causeResult = err.cause(); + return isErrorLike(causeResult) ? causeResult : void 0; + } else { + return isErrorLike(cause) ? cause : void 0; + } + }; + var _stackWithCauses = (err, seen) => { + if (!isErrorLike(err)) return ""; + const stack = err.stack || ""; + if (seen.has(err)) { + return stack + "\ncauses have become circular..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + return stack + "\ncaused by: " + _stackWithCauses(cause, seen); + } else { + return stack; + } + }; + var stackWithCauses = (err) => _stackWithCauses(err, /* @__PURE__ */ new Set()); + var _messageWithCauses = (err, seen, skip) => { + if (!isErrorLike(err)) return ""; + const message = skip ? "" : err.message || ""; + if (seen.has(err)) { + return message + ": ..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + const skipIfVErrorStyleCause = typeof err.cause === "function"; + return message + (skipIfVErrorStyleCause ? "" : ": ") + _messageWithCauses(cause, seen, skipIfVErrorStyleCause); + } else { + return message; + } + }; + var messageWithCauses = (err) => _messageWithCauses(err, /* @__PURE__ */ new Set()); + module2.exports = { + isErrorLike, + getErrorCause, + stackWithCauses, + messageWithCauses + }; + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js +var require_err_proto = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js"(exports2, module2) { + "use strict"; + var seen = Symbol("circular-ref-tag"); + var rawSymbol = Symbol("pino-raw-err-ref"); + var pinoErrProto = Object.create({}, { + type: { + enumerable: true, + writable: true, + value: void 0 + }, + message: { + enumerable: true, + writable: true, + value: void 0 + }, + stack: { + enumerable: true, + writable: true, + value: void 0 + }, + aggregateErrors: { + enumerable: true, + writable: true, + value: void 0 + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - 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 ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + }); + Object.defineProperty(pinoErrProto, rawSymbol, { + writable: true, + value: {} + }); + module2.exports = { + pinoErrProto, + pinoErrorSymbols: { + seen, + rawSymbol + } + }; + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js +var require_err = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js"(exports2, module2) { + "use strict"; + module2.exports = errSerializer; + var { messageWithCauses, stackWithCauses, isErrorLike } = require_err_helpers(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto(); + var { seen } = pinoErrorSymbols; + var { toString: toString2 } = Object.prototype; + function errSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString2.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = messageWithCauses(err); + _err.stack = stackWithCauses(err); + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errSerializer(err2)); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errSerializer(val); } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if tunneling agent isn't assigned create a new agent - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new 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 - }); + } else { + _err[key] = val; + } } - return agent; + } + delete err[seen]; + _err.raw = err; + return _err; } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - // if agent is already assigned use that agent. - if (proxyAgent) { - return proxyAgent; + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js +var require_err_with_cause = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js"(exports2, module2) { + "use strict"; + module2.exports = errWithCauseSerializer; + var { isErrorLike } = require_err_helpers(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto(); + var { seen } = pinoErrorSymbols; + var { toString: toString2 } = Object.prototype; + function errWithCauseSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString2.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = err.message; + _err.stack = err.stack; + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errWithCauseSerializer(err2)); + } + if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) { + _err.cause = errWithCauseSerializer(err.cause); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (!Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errWithCauseSerializer(val); + } + } else { + _err[key] = val; + } } - const usingSsl = parsedUrl.protocol === 'https:'; - proxyAgent = new undici_1.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 - }); + } + delete err[seen]; + _err.raw = err; + return _err; + } + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js +var require_req = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpRequest, + reqSerializer + }; + var rawSymbol = Symbol("pino-raw-req-ref"); + var pinoReqProto = Object.create({}, { + id: { + enumerable: true, + writable: true, + value: "" + }, + method: { + enumerable: true, + writable: true, + value: "" + }, + url: { + enumerable: true, + writable: true, + value: "" + }, + query: { + enumerable: true, + writable: true, + value: "" + }, + params: { + enumerable: true, + writable: true, + value: "" + }, + headers: { + enumerable: true, + writable: true, + value: {} + }, + remoteAddress: { + enumerable: true, + writable: true, + value: "" + }, + remotePort: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; } - return proxyAgent; + } + }); + Object.defineProperty(pinoReqProto, rawSymbol, { + writable: true, + value: {} + }); + function reqSerializer(req) { + const connection = req.info || req.socket; + const _req = Object.create(pinoReqProto); + _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : void 0); + _req.method = req.method; + if (req.originalUrl) { + _req.url = req.originalUrl; + } else { + const path2 = req.path; + _req.url = typeof path2 === "string" ? path2 : req.url ? req.url.path || req.url : void 0; + } + if (req.query) { + _req.query = req.query; + } + if (req.params) { + _req.params = req.params; + } + _req.headers = req.headers; + _req.remoteAddress = connection && connection.remoteAddress; + _req.remotePort = connection && connection.remotePort; + _req.raw = req.raw || req; + return _req; } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); + function mapHttpRequest(req) { + return { + req: reqSerializer(req) + }; } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === 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 HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js +var require_res = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpResponse, + resSerializer + }; + var rawSymbol = Symbol("pino-raw-res-ref"); + var pinoResProto = Object.create({}, { + statusCode: { + enumerable: true, + writable: true, + value: 0 + }, + headers: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; + } + } + }); + Object.defineProperty(pinoResProto, rawSymbol, { + writable: true, + value: {} + }); + function resSerializer(res) { + const _res = Object.create(pinoResProto); + _res.statusCode = res.headersSent ? res.statusCode : null; + _res.headers = res.getHeaders ? res.getHeaders() : res._headers; + _res.raw = res; + return _res; + } + function mapHttpResponse(res) { + return { + res: resSerializer(res) + }; + } + } +}); + +// node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js +var require_pino_std_serializers = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js"(exports2, module2) { + "use strict"; + var errSerializer = require_err(); + var errWithCauseSerializer = require_err_with_cause(); + var reqSerializers = require_req(); + var resSerializers = require_res(); + module2.exports = { + err: errSerializer, + errWithCause: errWithCauseSerializer, + mapHttpRequest: reqSerializers.mapHttpRequest, + mapHttpResponse: resSerializers.mapHttpResponse, + req: reqSerializers.reqSerializer, + res: resSerializers.resSerializer, + wrapErrorSerializer: function wrapErrorSerializer(customSerializer) { + if (customSerializer === errSerializer) return customSerializer; + return function wrapErrSerializer(err) { + return customSerializer(errSerializer(err)); + }; + }, + wrapRequestSerializer: function wrapRequestSerializer(customSerializer) { + if (customSerializer === reqSerializers.reqSerializer) return customSerializer; + return function wrappedReqSerializer(req) { + return customSerializer(reqSerializers.reqSerializer(req)); + }; + }, + wrapResponseSerializer: function wrapResponseSerializer(customSerializer) { + if (customSerializer === resSerializers.resSerializer) return customSerializer; + return function wrappedResSerializer(res) { + return customSerializer(resSerializers.resSerializer(res)); + }; + } + }; + } +}); + +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/caller.js +var require_caller = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/caller.js"(exports2, module2) { + "use strict"; + function noOpPrepareStackTrace(_, stack) { + return stack; + } + module2.exports = function getCallers() { + const originalPrepare = Error.prepareStackTrace; + Error.prepareStackTrace = noOpPrepareStackTrace; + const stack = new Error().stack; + Error.prepareStackTrace = originalPrepare; + if (!Array.isArray(stack)) { + return void 0; + } + const entries = stack.slice(2); + const fileNames = []; + for (const entry of entries) { + if (!entry) { + continue; + } + fileNames.push(entry.getFileName()); + } + return fileNames; + }; + } +}); + +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/validator.js +var require_validator = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/validator.js"(exports2, module2) { + "use strict"; + module2.exports = validator; + function validator(opts = {}) { + const { + ERR_PATHS_MUST_BE_STRINGS = () => "fast-redact - Paths must be (non-empty) strings", + ERR_INVALID_PATH = (s) => `fast-redact \u2013 Invalid path (${s})` + } = opts; + return function validate({ paths }) { + paths.forEach((s) => { + if (typeof s !== "string") { + throw Error(ERR_PATHS_MUST_BE_STRINGS()); + } + try { + if (/〇/.test(s)) throw Error(); + const expr = (s[0] === "[" ? "" : ".") + s.replace(/^\*/, "\u3007").replace(/\.\*/g, ".\u3007").replace(/\[\*\]/g, "[\u3007]"); + if (/\n|\r|;/.test(expr)) throw Error(); + if (/\/\*/.test(expr)) throw Error(); + Function(` + 'use strict' + const o = new Proxy({}, { get: () => o, set: () => { throw Error() } }); + const \u3007 = null; + o${expr} + if ([o${expr}].length !== 1) throw Error()`)(); + } catch (e) { + throw Error(ERR_INVALID_PATH(s)); + } }); + }; } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map + } +}); -/***/ }), +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js +var require_rx = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js"(exports2, module2) { + "use strict"; + module2.exports = /[^.[\]]+|\[((?:.)*?)\]/g; + } +}); -/***/ 77407: -/***/ ((__unused_webpack_module, exports) => { +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/parse.js +var require_parse = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/parse.js"(exports2, module2) { + "use strict"; + var rx = require_rx(); + module2.exports = parse2; + function parse2({ paths }) { + const wildcards = []; + var wcLen = 0; + const secret = paths.reduce(function(o, strPath, ix) { + var path2 = strPath.match(rx).map((p) => p.replace(/'|"|`/g, "")); + const leadingBracket = strPath[0] === "["; + path2 = path2.map((p) => { + if (p[0] === "[") return p.substr(1, p.length - 2); + else return p; + }); + const star = path2.indexOf("*"); + if (star > -1) { + const before = path2.slice(0, star); + const beforeStr = before.join("."); + const after = path2.slice(star + 1, path2.length); + const nested = after.length > 0; + wcLen++; + wildcards.push({ + before, + beforeStr, + after, + nested + }); + } else { + o[strPath] = { + path: path2, + val: void 0, + precensored: false, + circle: "", + escPath: JSON.stringify(strPath), + leadingBracket + }; + } + return o; + }, {}); + return { wildcards, wcLen, secret }; + } + } +}); -"use strict"; +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/redactor.js +var require_redactor = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/redactor.js"(exports2, module2) { + "use strict"; + var rx = require_rx(); + module2.exports = redactor; + function redactor({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) { + const redact = Function("o", ` + if (typeof o !== 'object' || o == null) { + ${strictImpl(strict, serialize)} + } + const { censor, secret } = this + const originalSecret = {} + const secretKeys = Object.keys(secret) + for (var i = 0; i < secretKeys.length; i++) { + originalSecret[secretKeys[i]] = secret[secretKeys[i]] + } -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; + ${redactTmpl(secret, isCensorFct, censorFctTakesPath)} + this.compileRestore() + ${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)} + this.secret = originalSecret + ${resultTmpl(serialize)} + `).bind(state); + redact.state = state; + if (serialize === false) { + redact.restore = (o) => state.restore(o); + } + return redact; + } + function redactTmpl(secret, isCensorFct, censorFctTakesPath) { + return Object.keys(secret).map((path2) => { + const { escPath, leadingBracket, path: arrPath } = secret[path2]; + const skip = leadingBracket ? 1 : 0; + const delim = leadingBracket ? "" : "."; + const hops = []; + var match; + while ((match = rx.exec(path2)) !== null) { + const [, ix] = match; + const { index, input } = match; + if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1))); + } + var existence = hops.map((p) => `o${delim}${p}`).join(" && "); + if (existence.length === 0) existence += `o${delim}${path2} != null`; + else existence += ` && o${delim}${path2} != null`; + const circularDetection = ` + switch (true) { + ${hops.reverse().map((p) => ` + case o${delim}${p} === censor: + secret[${escPath}].circle = ${JSON.stringify(p)} + break + `).join("\n")} + } + `; + const censorArgs = censorFctTakesPath ? `val, ${JSON.stringify(arrPath)}` : `val`; + return ` + if (${existence}) { + const val = o${delim}${path2} + if (val === censor) { + secret[${escPath}].precensored = true + } else { + secret[${escPath}].val = val + o${delim}${path2} = ${isCensorFct ? `censor(${censorArgs})` : "censor"} + ${circularDetection} + } + } + `; + }).join("\n"); } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + function dynamicRedactTmpl(hasWildcards, isCensorFct, censorFctTakesPath) { + return hasWildcards === true ? ` + { + const { wildcards, wcLen, groupRedact, nestedRedact } = this + for (var i = 0; i < wcLen; i++) { + const { before, beforeStr, after, nested } = wildcards[i] + if (nested === true) { + secret[beforeStr] = secret[beforeStr] || [] + nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath}) + } else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath}) + } + } + ` : ""; + } + function resultTmpl(serialize) { + return serialize === false ? `return o` : ` + var s = this.serialize(o) + this.restore(o) + return s + `; + } + function strictImpl(strict, serialize) { + return strict === true ? `throw Error('fast-redact: primitives cannot be redacted')` : serialize === false ? `return o` : `return this.serialize(o)`; + } + } +}); + +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/modifiers.js +var require_modifiers = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/modifiers.js"(exports2, module2) { + "use strict"; + module2.exports = { + groupRedact, + groupRestore, + nestedRedact, + nestedRestore + }; + function groupRestore({ keys, values, target }) { + if (target == null || typeof target === "string") return; + const length = keys.length; + for (var i = 0; i < length; i++) { + const k = keys[i]; + target[k] = values[i]; + } + } + function groupRedact(o, path2, censor, isCensorFct, censorFctTakesPath) { + const target = get(o, path2); + if (target == null || typeof target === "string") return { keys: null, values: null, target, flat: true }; + const keys = Object.keys(target); + const keysLength = keys.length; + const pathLength = path2.length; + const pathWithKey = censorFctTakesPath ? [...path2] : void 0; + const values = new Array(keysLength); + for (var i = 0; i < keysLength; i++) { + const key = keys[i]; + values[i] = target[key]; + if (censorFctTakesPath) { + pathWithKey[pathLength] = key; + target[key] = censor(target[key], pathWithKey); + } else if (isCensorFct) { + target[key] = censor(target[key]); + } else { + target[key] = censor; + } + } + return { keys, values, target, flat: true }; + } + function nestedRestore(instructions) { + for (let i = 0; i < instructions.length; i++) { + const { target, path: path2, value } = instructions[i]; + let current = target; + for (let i2 = path2.length - 1; i2 > 0; i2--) { + current = current[path2[i2]]; + } + current[path2[0]] = value; + } + } + function nestedRedact(store, o, path2, ns, censor, isCensorFct, censorFctTakesPath) { + const target = get(o, path2); + if (target == null) return; + const keys = Object.keys(target); + const keysLength = keys.length; + for (var i = 0; i < keysLength; i++) { + const key = keys[i]; + specialSet(store, target, key, path2, ns, censor, isCensorFct, censorFctTakesPath); + } + return store; + } + function has(obj, prop) { + return obj !== void 0 && obj !== null ? "hasOwn" in Object ? Object.hasOwn(obj, prop) : Object.prototype.hasOwnProperty.call(obj, prop) : false; + } + function specialSet(store, o, k, path2, afterPath, censor, isCensorFct, censorFctTakesPath) { + const afterPathLen = afterPath.length; + const lastPathIndex = afterPathLen - 1; + const originalKey = k; + var i = -1; + var n; + var nv; + var ov; + var oov = null; + var wc = null; + var kIsWc; + var wcov; + var consecutive = false; + var level = 0; + var depth = 0; + var redactPathCurrent = tree(); + ov = n = o[k]; + if (typeof n !== "object") return; + while (n != null && ++i < afterPathLen) { + depth += 1; + k = afterPath[i]; + oov = ov; + if (k !== "*" && !wc && !(typeof n === "object" && k in n)) { + break; } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; + if (k === "*") { + if (wc === "*") { + consecutive = true; + } + wc = k; + if (i !== lastPathIndex) { + continue; + } } - })(); - if (proxyVar) { - try { - return new DecodedURL(proxyVar); + if (wc) { + const wcKeys = Object.keys(n); + for (var j = 0; j < wcKeys.length; j++) { + const wck = wcKeys[j]; + wcov = n[wck]; + kIsWc = k === "*"; + if (consecutive) { + redactPathCurrent = node2(redactPathCurrent, wck, depth); + level = i; + ov = iterateNthLevel(wcov, level - 1, k, path2, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, o[originalKey], depth + 1); + } else { + if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) { + if (kIsWc) { + ov = wcov; + } else { + ov = wcov[k]; + } + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path2, originalKey, ...afterPath]) : censor(ov) : censor; + if (kIsWc) { + const rv = restoreInstr(node2(redactPathCurrent, wck, depth), ov, o[originalKey]); + store.push(rv); + n[wck] = nv; + } else { + if (wcov[k] === nv) { + } else if (nv === void 0 && censor !== void 0 || has(wcov, k) && nv === ov) { + redactPathCurrent = node2(redactPathCurrent, wck, depth); + } else { + redactPathCurrent = node2(redactPathCurrent, wck, depth); + const rv = restoreInstr(node2(redactPathCurrent, k, depth + 1), ov, o[originalKey]); + store.push(rv); + wcov[k] = nv; + } + } + } + } + } + wc = null; + } else { + ov = n[k]; + redactPathCurrent = node2(redactPathCurrent, k, depth); + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path2, originalKey, ...afterPath]) : censor(ov) : censor; + if (has(n, k) && nv === ov || nv === void 0 && censor !== void 0) { + } else { + const rv = restoreInstr(redactPathCurrent, ov, o[originalKey]); + store.push(rv); + n[k] = nv; + } + n = n[k]; } - catch (_a) { - if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) - return new DecodedURL(`http://${proxyVar}`); + if (typeof n !== "object") break; + if (ov === oov || typeof ov === "undefined") { } + } } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress(reqHost)) { - return true; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; + function get(o, p) { + var i = -1; + var l = p.length; + var n = o; + while (n != null && ++i < l) { + n = n[p[i]]; + } + return n; } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); + function iterateNthLevel(wcov, level, k, path2, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth) { + if (level === 0) { + if (kIsWc || typeof wcov === "object" && wcov !== null && k in wcov) { + if (kIsWc) { + ov = wcov; + } else { + ov = wcov[k]; + } + nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [...path2, originalKey, ...afterPath]) : censor(ov) : censor; + if (kIsWc) { + const rv = restoreInstr(redactPathCurrent, ov, parent); + store.push(rv); + n[wck] = nv; + } else { + if (wcov[k] === nv) { + } else if (nv === void 0 && censor !== void 0 || has(wcov, k) && nv === ov) { + } else { + const rv = restoreInstr(node2(redactPathCurrent, k, depth + 1), ov, parent); + store.push(rv); + wcov[k] = nv; + } + } + } + } + for (const key in wcov) { + if (typeof wcov[key] === "object") { + redactPathCurrent = node2(redactPathCurrent, key, depth); + iterateNthLevel(wcov[key], level - 1, k, path2, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth + 1); + } + } } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; + function tree() { + return { parent: null, key: null, children: [], depth: 0 }; } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; + function node2(parent, key, depth) { + if (parent.depth === depth) { + return node2(parent.parent, key, depth); + } + var child = { + parent, + key, + depth, + children: [] + }; + parent.children.push(child); + return child; } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + function restoreInstr(node3, value, target) { + let current = node3; + const path2 = []; + do { + path2.push(current.key); + current = current.parent; + } while (current.parent != null); + return { path: path2, value, target }; } - // 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; + } +}); + +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/restorer.js +var require_restorer = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/restorer.js"(exports2, module2) { + "use strict"; + var { groupRestore, nestedRestore } = require_modifiers(); + module2.exports = restorer; + function restorer() { + return function compileRestore() { + if (this.restore) { + this.restore.state.secret = this.secret; + return; } + const { secret, wcLen } = this; + const paths = Object.keys(secret); + const resetters = resetTmpl(secret, paths); + const hasWildcards = wcLen > 0; + const state = hasWildcards ? { secret, groupRestore, nestedRestore } : { secret }; + this.restore = Function( + "o", + restoreTmpl(resetters, paths, hasWildcards) + ).bind(state); + this.restore.state = state; + }; } - return false; -} -exports.checkBypass = checkBypass; -function isLoopbackAddress(host) { - const hostLower = host.toLowerCase(); - return (hostLower === 'localhost' || - hostLower.startsWith('127.') || - hostLower.startsWith('[::1]') || - hostLower.startsWith('[0:0:0:0:0:0:0:1]')); -} -class DecodedURL extends URL { - constructor(url, base) { - super(url, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); + function resetTmpl(secret, paths) { + return paths.map((path2) => { + const { circle, escPath, leadingBracket } = secret[path2]; + const delim = leadingBracket ? "" : "."; + const reset = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${path2} = secret[${escPath}].val`; + const clear = `secret[${escPath}].val = undefined`; + return ` + if (secret[${escPath}].val !== undefined) { + try { ${reset} } catch (e) {} + ${clear} + } + `; + }).join(""); } - get username() { - return this._decodedUsername; + function restoreTmpl(resetters, paths, hasWildcards) { + const dynamicReset = hasWildcards === true ? ` + const keys = Object.keys(secret) + const len = keys.length + for (var i = len - 1; i >= ${paths.length}; i--) { + const k = keys[i] + const o = secret[k] + if (o) { + if (o.flat === true) this.groupRestore(o) + else this.nestedRestore(o) + secret[k] = null + } } - get password() { - return this._decodedPassword; + ` : ""; + return ` + const secret = this.secret + ${dynamicReset} + ${resetters} + return o + `; } -} -//# sourceMappingURL=proxy.js.map - -/***/ }), + } +}); -/***/ 52746: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/state.js +var require_state = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/state.js"(exports2, module2) { + "use strict"; + module2.exports = state; + function state(o) { + const { + secret, + censor, + compileRestore, + serialize, + groupRedact, + nestedRedact, + wildcards, + wcLen + } = o; + const builder = [{ secret, censor, compileRestore }]; + if (serialize !== false) builder.push({ serialize }); + if (wcLen > 0) builder.push({ groupRedact, nestedRedact, wildcards, wcLen }); + return Object.assign(...builder); + } + } +}); -"use strict"; +// node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/index.js +var require_fast_redact = __commonJS({ + "node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/index.js"(exports2, module2) { + "use strict"; + var validator = require_validator(); + var parse2 = require_parse(); + var redactor = require_redactor(); + var restorer = require_restorer(); + var { groupRedact, nestedRedact } = require_modifiers(); + var state = require_state(); + var rx = require_rx(); + var validate = validator(); + var noop3 = (o) => o; + noop3.restore = noop3; + var DEFAULT_CENSOR = "[REDACTED]"; + fastRedact.rx = rx; + fastRedact.validator = validator; + module2.exports = fastRedact; + function fastRedact(opts = {}) { + const paths = Array.from(new Set(opts.paths || [])); + const serialize = "serialize" in opts ? opts.serialize === false ? opts.serialize : typeof opts.serialize === "function" ? opts.serialize : JSON.stringify : JSON.stringify; + const remove = opts.remove; + if (remove === true && serialize !== JSON.stringify) { + throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify"); + } + const censor = remove === true ? void 0 : "censor" in opts ? opts.censor : DEFAULT_CENSOR; + const isCensorFct = typeof censor === "function"; + const censorFctTakesPath = isCensorFct && censor.length > 1; + if (paths.length === 0) return serialize || noop3; + validate({ paths, serialize, censor }); + const { wildcards, wcLen, secret } = parse2({ paths, censor }); + const compileRestore = restorer(); + const strict = "strict" in opts ? opts.strict : true; + return redactor({ secret, wcLen, serialize, strict, isCensorFct, censorFctTakesPath }, state({ + secret, + censor, + compileRestore, + serialize, + groupRedact, + nestedRedact, + wildcards, + wcLen + })); + } + } +}); -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/symbols.js +var require_symbols = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/symbols.js"(exports2, module2) { + "use strict"; + var setLevelSym = Symbol("pino.setLevel"); + var getLevelSym = Symbol("pino.getLevel"); + var levelValSym = Symbol("pino.levelVal"); + var levelCompSym = Symbol("pino.levelComp"); + var useLevelLabelsSym = Symbol("pino.useLevelLabels"); + var useOnlyCustomLevelsSym = Symbol("pino.useOnlyCustomLevels"); + var mixinSym = Symbol("pino.mixin"); + var lsCacheSym = Symbol("pino.lsCache"); + var chindingsSym = Symbol("pino.chindings"); + var asJsonSym = Symbol("pino.asJson"); + var writeSym = Symbol("pino.write"); + var redactFmtSym = Symbol("pino.redactFmt"); + var timeSym = Symbol("pino.time"); + var timeSliceIndexSym = Symbol("pino.timeSliceIndex"); + var streamSym = Symbol("pino.stream"); + var stringifySym = Symbol("pino.stringify"); + var stringifySafeSym = Symbol("pino.stringifySafe"); + var stringifiersSym = Symbol("pino.stringifiers"); + var endSym = Symbol("pino.end"); + var formatOptsSym = Symbol("pino.formatOpts"); + var messageKeySym = Symbol("pino.messageKey"); + var errorKeySym = Symbol("pino.errorKey"); + var nestedKeySym = Symbol("pino.nestedKey"); + var nestedKeyStrSym = Symbol("pino.nestedKeyStr"); + var mixinMergeStrategySym = Symbol("pino.mixinMergeStrategy"); + var msgPrefixSym = Symbol("pino.msgPrefix"); + var wildcardFirstSym = Symbol("pino.wildcardFirst"); + var serializersSym = Symbol.for("pino.serializers"); + var formattersSym = Symbol.for("pino.formatters"); + var hooksSym = Symbol.for("pino.hooks"); + var needsMetadataGsym = Symbol.for("pino.metadata"); + module2.exports = { + setLevelSym, + getLevelSym, + levelValSym, + levelCompSym, + useLevelLabelsSym, + mixinSym, + lsCacheSym, + chindingsSym, + asJsonSym, + writeSym, + serializersSym, + redactFmtSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + wildcardFirstSym, + needsMetadataGsym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + }; + } }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__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()); + +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/redaction.js +var require_redaction = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/redaction.js"(exports2, module2) { + "use strict"; + var fastRedact = require_fast_redact(); + var { redactFmtSym, wildcardFirstSym } = require_symbols(); + var { rx, validator } = fastRedact; + var validate = validator({ + ERR_PATHS_MUST_BE_STRINGS: () => "pino \u2013 redacted paths must be strings", + ERR_INVALID_PATH: (s) => `pino \u2013 redact paths array contains an invalid path (${s})` }); -}; -var _a; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; -const fs = __importStar(__nccwpck_require__(79896)); -const path = __importStar(__nccwpck_require__(16928)); -_a = fs.promises -// export const {open} = 'fs' -, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; -// export const {open} = 'fs' -exports.IS_WINDOWS = process.platform === 'win32'; -// See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691 -exports.UV_FS_O_EXLOCK = 0x10000000; -exports.READONLY = fs.constants.O_RDONLY; -function exists(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - try { - yield exports.stat(fsPath); - } - catch (err) { - if (err.code === 'ENOENT') { - return false; + var CENSOR = "[Redacted]"; + var strict = false; + function redaction(opts, serialize) { + const { paths, censor } = handle(opts); + const shape = paths.reduce((o, str2) => { + rx.lastIndex = 0; + const first = rx.exec(str2); + const next = rx.exec(str2); + let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0]; + if (ns === "*") { + ns = wildcardFirstSym; + } + if (next === null) { + o[ns] = null; + return o; + } + if (o[ns] === null) { + return o; + } + const { index } = next; + const nextPath = `${str2.substr(index, str2.length - 1)}`; + o[ns] = o[ns] || []; + if (ns !== wildcardFirstSym && o[ns].length === 0) { + o[ns].push(...o[wildcardFirstSym] || []); + } + if (ns === wildcardFirstSym) { + Object.keys(o).forEach(function(k) { + if (o[k]) { + o[k].push(nextPath); } - throw err; + }); } - return true; - }); -} -exports.exists = exists; -function isDirectory(fsPath, useStat = false) { - return __awaiter(this, void 0, void 0, function* () { - const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath); - return stats.isDirectory(); - }); -} -exports.isDirectory = isDirectory; -/** - * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like: - * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). - */ -function isRooted(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); + o[ns].push(nextPath); + return o; + }, {}); + const result = { + [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) + }; + const topCensor = (...args) => { + return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor); + }; + return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { + if (shape[k] === null) { + o[k] = (value) => topCensor(value, [k]); + } else { + const wrappedCensor = typeof censor === "function" ? (value, path2) => { + return censor(value, [k, ...path2]); + } : censor; + o[k] = fastRedact({ + paths: shape[k], + censor: wrappedCensor, + serialize, + strict + }); + } + return o; + }, result); } - if (exports.IS_WINDOWS) { - return (p.startsWith('\\') || /^[A-Z]:/i.test(p) // e.g. \ or \hello or \\hello - ); // e.g. C: or C:\hello - } - return p.startsWith('/'); -} -exports.isRooted = isRooted; -/** - * Best effort attempt to determine whether a file exists and is executable. - * @param filePath file path to check - * @param extensions additional file extensions to try - * @return if file exists and is executable, returns the file path. otherwise empty string. - */ -function tryGetExecutablePath(filePath, extensions) { - return __awaiter(this, void 0, void 0, function* () { - let stats = undefined; - try { - // test file exists - stats = yield exports.stat(filePath); + function handle(opts) { + if (Array.isArray(opts)) { + opts = { paths: opts, censor: CENSOR }; + validate(opts); + return opts; + } + let { paths, censor = CENSOR, remove } = opts; + if (Array.isArray(paths) === false) { + throw Error("pino \u2013 redact must contain an array of strings"); + } + if (remove === true) censor = void 0; + validate({ paths, censor }); + return { paths, censor }; + } + module2.exports = redaction; + } +}); + +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/time.js +var require_time = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/time.js"(exports2, module2) { + "use strict"; + var nullTime = () => ""; + var epochTime = () => `,"time":${Date.now()}`; + var unixTime = () => `,"time":${Math.round(Date.now() / 1e3)}`; + var isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"`; + module2.exports = { nullTime, epochTime, unixTime, isoTime }; + } +}); + +// node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js +var require_quick_format_unescaped = __commonJS({ + "node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js"(exports2, module2) { + "use strict"; + function tryStringify(o) { + try { + return JSON.stringify(o); + } catch (e) { + return '"[Circular]"'; + } + } + module2.exports = format2; + function format2(f, args, opts) { + var ss = opts && opts.stringify || tryStringify; + var offset = 1; + if (typeof f === "object" && f !== null) { + var len = args.length + offset; + if (len === 1) return f; + var objects = new Array(len); + objects[0] = ss(f); + for (var index = 1; index < len; index++) { + objects[index] = ss(args[index]); + } + return objects.join(" "); + } + if (typeof f !== "string") { + return f; + } + var argLen = args.length; + if (argLen === 0) return f; + var str2 = ""; + var a = 1 - offset; + var lastPos = -1; + var flen = f && f.length || 0; + for (var i = 0; i < flen; ) { + if (f.charCodeAt(i) === 37 && i + 1 < flen) { + lastPos = lastPos > -1 ? lastPos : 0; + switch (f.charCodeAt(i + 1)) { + case 100: + // 'd' + case 102: + if (a >= argLen) + break; + if (args[a] == null) break; + if (lastPos < i) + str2 += f.slice(lastPos, i); + str2 += Number(args[a]); + lastPos = i + 2; + i++; + break; + case 105: + if (a >= argLen) + break; + if (args[a] == null) break; + if (lastPos < i) + str2 += f.slice(lastPos, i); + str2 += Math.floor(Number(args[a])); + lastPos = i + 2; + i++; + break; + case 79: + // 'O' + case 111: + // 'o' + case 106: + if (a >= argLen) + break; + if (args[a] === void 0) break; + if (lastPos < i) + str2 += f.slice(lastPos, i); + var type2 = typeof args[a]; + if (type2 === "string") { + str2 += "'" + args[a] + "'"; + lastPos = i + 2; + i++; + break; + } + if (type2 === "function") { + str2 += args[a].name || ""; + lastPos = i + 2; + i++; + break; + } + str2 += ss(args[a]); + lastPos = i + 2; + i++; + break; + case 115: + if (a >= argLen) + break; + if (lastPos < i) + str2 += f.slice(lastPos, i); + str2 += String(args[a]); + lastPos = i + 2; + i++; + break; + case 37: + if (lastPos < i) + str2 += f.slice(lastPos, i); + str2 += "%"; + lastPos = i + 2; + i++; + a--; + break; + } + ++a; } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } + ++i; + } + if (lastPos === -1) + return f; + else if (lastPos < flen) { + str2 += f.slice(lastPos); + } + return str2; + } + } +}); + +// node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js +var require_atomic_sleep = __commonJS({ + "node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js"(exports2, module2) { + "use strict"; + if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") { + let sleep = function(ms) { + const valid = ms > 0 && ms < Infinity; + if (valid === false) { + if (typeof ms !== "number" && typeof ms !== "bigint") { + throw TypeError("sleep: ms must be a number"); + } + throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // on Windows, test for valid extension - const upperExt = path.extname(filePath).toUpperCase(); - if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } + Atomics.wait(nil, 0, 0, Number(ms)); + }; + const nil = new Int32Array(new SharedArrayBuffer(4)); + module2.exports = sleep; + } else { + let sleep = function(ms) { + const valid = ms > 0 && ms < Infinity; + if (valid === false) { + if (typeof ms !== "number" && typeof ms !== "bigint") { + throw TypeError("sleep: ms must be a number"); + } + throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); } - // try each extension - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = undefined; - try { - stats = yield exports.stat(filePath); - } - catch (err) { - if (err.code !== 'ENOENT') { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports.IS_WINDOWS) { - // preserve the case of the actual file (since an extension was appended) - try { - const directory = path.dirname(filePath); - const upperName = path.basename(filePath).toUpperCase(); - for (const actualName of yield exports.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path.join(directory, actualName); - break; - } - } - } - catch (err) { - // eslint-disable-next-line no-console - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } - else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } + const target = Date.now() + Number(ms); + while (target > Date.now()) { } - return ''; - }); -} -exports.tryGetExecutablePath = tryGetExecutablePath; -function normalizeSeparators(p) { - p = p || ''; - if (exports.IS_WINDOWS) { - // convert slashes on Windows - p = p.replace(/\//g, '\\'); - // remove redundant slashes - return p.replace(/\\\\+/g, '\\'); - } - // remove redundant slashes - return p.replace(/\/\/+/g, '/'); -} -// on Mac/Linux, test the execute bit -// R W X R W X R W X -// 256 128 64 32 16 8 4 2 1 -function isUnixExecutable(stats) { - return ((stats.mode & 1) > 0 || - ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || - ((stats.mode & 64) > 0 && stats.uid === process.getuid())); -} -// Get the path of cmd.exe in windows -function getCmdPath() { - var _a; - return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; -} -exports.getCmdPath = getCmdPath; -//# sourceMappingURL=io-util.js.map - -/***/ }), - -/***/ 73357: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__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(exports, "__esModule", ({ value: true })); -exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; -const assert_1 = __nccwpck_require__(42613); -const path = __importStar(__nccwpck_require__(16928)); -const ioUtil = __importStar(__nccwpck_require__(52746)); -/** - * Copies a file or folder. - * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js - * - * @param source source path - * @param dest destination path - * @param options optional. See CopyOptions. - */ -function cp(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - // Dest is an existing file, but not forcing - if (destStat && destStat.isFile() && !force) { - return; + }; + module2.exports = sleep; + } + } +}); + +// node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js +var require_sonic_boom = __commonJS({ + "node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js"(exports2, module2) { + "use strict"; + var fs2 = __require("fs"); + var EventEmitter = __require("events"); + var inherits = __require("util").inherits; + var path2 = __require("path"); + var sleep = require_atomic_sleep(); + var assert = __require("assert"); + var BUSY_WRITE_TIMEOUT = 100; + var kEmptyBuffer = Buffer.allocUnsafe(0); + var MAX_WRITE = 16 * 1024; + var kContentModeBuffer = "buffer"; + var kContentModeUtf8 = "utf8"; + var [major, minor] = (process.versions.node || "0.0").split(".").map(Number); + var kCopyBuffer = major >= 22 && minor >= 7; + function openFile(file, sonic) { + sonic._opening = true; + sonic._writing = true; + sonic._asyncDrainScheduled = false; + function fileOpened(err, fd) { + if (err) { + sonic._reopening = false; + sonic._writing = false; + sonic._opening = false; + if (sonic.sync) { + process.nextTick(() => { + if (sonic.listenerCount("error") > 0) { + sonic.emit("error", err); + } + }); + } else { + sonic.emit("error", err); + } + return; } - // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() && copySourceDirectory - ? path.join(dest, path.basename(source)) - : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); + const reopening = sonic._reopening; + sonic.fd = fd; + sonic.file = file; + sonic._reopening = false; + sonic._opening = false; + sonic._writing = false; + if (sonic.sync) { + process.nextTick(() => sonic.emit("ready")); + } else { + sonic.emit("ready"); } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } - else { - yield cpDirRecursive(source, newDest, 0, force); - } + if (sonic.destroyed) { + return; } - else { - if (path.relative(source, newDest) === '') { - // a file cannot be copied to itself - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile(source, newDest, force); + if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) { + sonic._actualWrite(); + } else if (reopening) { + process.nextTick(() => sonic.emit("drain")); } - }); -} -exports.cp = cp; -/** - * Moves a path. - * - * @param source source path - * @param dest destination path - * @param options optional. See MoveOptions. - */ -function mv(source, dest, options = {}) { - return __awaiter(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - // If dest is directory copy src into dest - dest = path.join(dest, path.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } - else { - throw new Error('Destination already exists'); - } + } + const flags = sonic.append ? "a" : "w"; + const mode = sonic.mode; + if (sonic.sync) { + try { + if (sonic.mkdir) fs2.mkdirSync(path2.dirname(file), { recursive: true }); + const fd = fs2.openSync(file, flags, mode); + fileOpened(null, fd); + } catch (err) { + fileOpened(err); + throw err; + } + } else if (sonic.mkdir) { + fs2.mkdir(path2.dirname(file), { recursive: true }, (err) => { + if (err) return fileOpened(err); + fs2.open(file, flags, mode, fileOpened); + }); + } else { + fs2.open(file, flags, mode, fileOpened); + } + } + function SonicBoom(opts) { + if (!(this instanceof SonicBoom)) { + return new SonicBoom(opts); + } + let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {}; + fd = fd || dest; + this._len = 0; + this.fd = -1; + this._bufs = []; + this._lens = []; + this._writing = false; + this._ending = false; + this._reopening = false; + this._asyncDrainScheduled = false; + this._flushPending = false; + this._hwm = Math.max(minLength || 0, 16387); + this.file = null; + this.destroyed = false; + this.minLength = minLength || 0; + this.maxLength = maxLength || 0; + this.maxWrite = maxWrite || MAX_WRITE; + this._periodicFlush = periodicFlush || 0; + this._periodicFlushTimer = void 0; + this.sync = sync || false; + this.writable = true; + this._fsync = fsync || false; + this.append = append || false; + this.mode = mode; + this.retryEAGAIN = retryEAGAIN || (() => true); + this.mkdir = mkdir || false; + let fsWriteSync; + let fsWrite; + if (contentMode === kContentModeBuffer) { + this._writingBuf = kEmptyBuffer; + this.write = writeBuffer; + this.flush = flushBuffer; + this.flushSync = flushBufferSync; + this._actualWrite = actualWriteBuffer; + fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf); + fsWrite = () => fs2.write(this.fd, this._writingBuf, this.release); + } else if (contentMode === void 0 || contentMode === kContentModeUtf8) { + this._writingBuf = ""; + this.write = write; + this.flush = flush2; + this.flushSync = flushSync; + this._actualWrite = actualWrite; + fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf, "utf8"); + fsWrite = () => fs2.write(this.fd, this._writingBuf, "utf8", this.release); + } else { + throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`); + } + if (typeof fd === "number") { + this.fd = fd; + process.nextTick(() => this.emit("ready")); + } else if (typeof fd === "string") { + openFile(fd, this); + } else { + throw new Error("SonicBoom supports only file descriptors and files"); + } + if (this.minLength >= this.maxWrite) { + throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`); + } + this.release = (err, n) => { + if (err) { + if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { + if (this.sync) { + try { + sleep(BUSY_WRITE_TIMEOUT); + this.release(void 0, 0); + } catch (err2) { + this.release(err2); + } + } else { + setTimeout(fsWrite, BUSY_WRITE_TIMEOUT); } + } else { + this._writing = false; + this.emit("error", err); + } + return; } - yield mkdirP(path.dirname(dest)); - yield ioUtil.rename(source, dest); - }); -} -exports.mv = mv; -/** - * Remove a path recursively with force - * - * @param inputPath path to remove - */ -function rmRF(inputPath) { - return __awaiter(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - // Check for invalid characters - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + this.emit("write", n); + const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n); + this._len = releasedBufObj.len; + this._writingBuf = releasedBufObj.writingBuf; + if (this._writingBuf.length) { + if (!this.sync) { + fsWrite(); + return; + } + try { + do { + const n2 = fsWriteSync(); + const releasedBufObj2 = releaseWritingBuf(this._writingBuf, this._len, n2); + this._len = releasedBufObj2.len; + this._writingBuf = releasedBufObj2.writingBuf; + } while (this._writingBuf.length); + } catch (err2) { + this.release(err2); + return; + } + } + if (this._fsync) { + fs2.fsyncSync(this.fd); + } + const len = this._len; + if (this._reopening) { + this._writing = false; + this._reopening = false; + this.reopen(); + } else if (len > this.minLength) { + this._actualWrite(); + } else if (this._ending) { + if (len > 0) { + this._actualWrite(); + } else { + this._writing = false; + actualClose(this); + } + } else { + this._writing = false; + if (this.sync) { + if (!this._asyncDrainScheduled) { + this._asyncDrainScheduled = true; + process.nextTick(emitDrain, this); } + } else { + this.emit("drain"); + } } - try { - // note if path does not exist, error is silent - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 + }; + this.on("newListener", function(name) { + if (name === "drain") { + this._asyncDrainScheduled = false; + } + }); + if (this._periodicFlush !== 0) { + this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush); + this._periodicFlushTimer.unref(); + } + } + function releaseWritingBuf(writingBuf, len, n) { + if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) { + n = Buffer.from(writingBuf).subarray(0, n).toString().length; + } + len = Math.max(len - n, 0); + writingBuf = writingBuf.slice(n); + return { writingBuf, len }; + } + function emitDrain(sonic) { + const hasListeners = sonic.listenerCount("drain") > 0; + if (!hasListeners) return; + sonic._asyncDrainScheduled = false; + sonic.emit("drain"); + } + inherits(SonicBoom, EventEmitter); + function mergeBuf(bufs, len) { + if (bufs.length === 0) { + return kEmptyBuffer; + } + if (bufs.length === 1) { + return bufs[0]; + } + return Buffer.concat(bufs, len); + } + function write(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) { + bufs.push("" + data); + } else { + bufs[bufs.length - 1] += data; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; + } + function writeBuffer(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + const lens = this._lens; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || lens[lens.length - 1] + data.length > this.maxWrite) { + bufs.push([data]); + lens.push(data.length); + } else { + bufs[bufs.length - 1].push(data); + lens[lens.length - 1] += data.length; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; + } + function callFlushCallbackOnDrain(cb) { + this._flushPending = true; + const onDrain = () => { + if (!this._fsync) { + try { + fs2.fsync(this.fd, (err) => { + this._flushPending = false; + cb(err); }); + } catch (err) { + cb(err); + } + } else { + this._flushPending = false; + cb(); } - catch (err) { - throw new Error(`File was unable to be removed ${err}`); + this.off("error", onError); + }; + const onError = (err) => { + this._flushPending = false; + cb(err); + this.off("drain", onDrain); + }; + this.once("drain", onDrain); + this.once("error", onError); + } + function flush2(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; } - }); -} -exports.rmRF = rmRF; -/** - * Make a directory. Creates the full path with folders in between - * Will throw if it fails - * - * @param fsPath path to create - * @returns Promise - */ -function mkdirP(fsPath) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); -} -exports.mkdirP = mkdirP; -/** - * Returns path of a tool had the tool actually been invoked. Resolves via paths. - * If you check and the tool does not exist, it will throw. - * - * @param tool name of the tool - * @param check whether to check if tool exists - * @returns Promise path to tool - */ -function which(tool, check) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); + throw error; + } + if (this.minLength <= 0) { + cb == null ? void 0 : cb(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push(""); + } + this._actualWrite(); + } + function flushBuffer(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; } - // recursive when check=true - if (check) { - const result = yield which(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } - else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } + throw error; + } + if (this.minLength <= 0) { + cb == null ? void 0 : cb(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push([]); + this._lens.push(0); + } + this._actualWrite(); + } + SonicBoom.prototype.reopen = function(file) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.reopen(file); + }); + return; + } + if (this._ending) { + return; + } + if (!this.file) { + throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom"); + } + if (file) { + this.file = file; + } + this._reopening = true; + if (this._writing) { + return; + } + const fd = this.fd; + this.once("ready", () => { + if (fd !== this.fd) { + fs2.close(fd, (err) => { + if (err) { + return this.emit("error", err); } - return result; + }); } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; + }); + openFile(this.file, this); + }; + SonicBoom.prototype.end = function() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.end(); + }); + return; + } + if (this._ending) { + return; + } + this._ending = true; + if (this._writing) { + return; + } + if (this._len > 0 && this.fd >= 0) { + this._actualWrite(); + } else { + actualClose(this); + } + }; + function flushSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift(this._writingBuf); + this._writingBuf = ""; + } + let buf = ""; + while (this._bufs.length || buf) { + if (buf.length <= 0) { + buf = this._bufs[0]; } - return ''; - }); -} -exports.which = which; -/** - * Returns a list of all occurrences of the given tool on the system path. - * - * @returns Promise the paths of the tool - */ -function findInPath(tool) { - return __awaiter(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); + try { + const n = fs2.writeSync(this.fd, buf, "utf8"); + const releasedBufObj = releaseWritingBuf(buf, this._len, n); + buf = releasedBufObj.writingBuf; + this._len = releasedBufObj.len; + if (buf.length <= 0) { + this._bufs.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); } - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { - for (const extension of process.env['PATHEXT'].split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } + } + try { + fs2.fsyncSync(this.fd); + } catch { + } + } + function flushBufferSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift([this._writingBuf]); + this._writingBuf = kEmptyBuffer; + } + let buf = kEmptyBuffer; + while (this._bufs.length || buf.length) { + if (buf.length <= 0) { + buf = mergeBuf(this._bufs[0], this._lens[0]); } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - // if any path separators, return empty - if (tool.includes(path.sep)) { - return []; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } + try { + const n = fs2.writeSync(this.fd, buf); + buf = buf.subarray(n); + this._len = Math.max(this._len - n, 0); + if (buf.length <= 0) { + this._bufs.shift(); + this._lens.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); } - // find all matches - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } + } + } + SonicBoom.prototype.destroy = function() { + if (this.destroyed) { + return; + } + actualClose(this); + }; + function actualWrite() { + const release2 = this.release; + this._writing = true; + this._writingBuf = this._writingBuf || this._bufs.shift() || ""; + if (this.sync) { + try { + const written = fs2.writeSync(this.fd, this._writingBuf, "utf8"); + release2(null, written); + } catch (err) { + release2(err); } - return matches; - }); -} -exports.findInPath = findInPath; -function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null - ? true - : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; -} -function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter(this, void 0, void 0, function* () { - // Ensure there is not a run away recursive copy - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - // Recurse - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } - else { - yield copyFile(srcFile, destFile, force); - } + } else { + fs2.write(this.fd, this._writingBuf, "utf8", release2); + } + } + function actualWriteBuffer() { + const release2 = this.release; + this._writing = true; + this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()); + if (this.sync) { + try { + const written = fs2.writeSync(this.fd, this._writingBuf); + release2(null, written); + } catch (err) { + release2(err); } - // Change the mode for the newly created directory - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); -} -// Buffered file copy -function copyFile(srcFile, destFile, force) { - return __awaiter(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - // unlink/re-link it - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } - catch (e) { - // Try to override file permission - if (e.code === 'EPERM') { - yield ioUtil.chmod(destFile, '0666'); - yield ioUtil.unlink(destFile); - } - // other errors = it doesn't exist, no work to do - } - // Copy over symlink - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null); + } else { + if (kCopyBuffer) { + this._writingBuf = Buffer.from(this._writingBuf); } - else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); + fs2.write(this.fd, this._writingBuf, release2); + } + } + function actualClose(sonic) { + if (sonic.fd === -1) { + sonic.once("ready", actualClose.bind(null, sonic)); + return; + } + if (sonic._periodicFlushTimer !== void 0) { + clearInterval(sonic._periodicFlushTimer); + } + sonic.destroyed = true; + sonic._bufs = []; + sonic._lens = []; + assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`); + try { + fs2.fsync(sonic.fd, closeWrapped); + } catch { + } + function closeWrapped() { + if (sonic.fd !== 1 && sonic.fd !== 2) { + fs2.close(sonic.fd, done); + } else { + done(); } - }); -} -//# sourceMappingURL=io.js.map - -/***/ }), - -/***/ 90779: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - - -const internals = { - suspectRx: /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/ -}; - - -exports.parse = function (text, ...args) { - - // Normalize arguments - - const firstOptions = typeof args[0] === 'object' && args[0]; - const reviver = args.length > 1 || !firstOptions ? args[0] : undefined; - const options = (args.length > 1 && args[1]) || firstOptions || {}; - - // Parse normally, allowing exceptions - - const obj = JSON.parse(text, reviver); - - // options.protoAction: 'error' (default) / 'remove' / 'ignore' - - if (options.protoAction === 'ignore') { - return obj; + } + function done(err) { + if (err) { + sonic.emit("error", err); + return; + } + if (sonic._ending && !sonic._writing) { + sonic.emit("finish"); + } + sonic.emit("close"); + } } + SonicBoom.SonicBoom = SonicBoom; + SonicBoom.default = SonicBoom; + module2.exports = SonicBoom; + } +}); - // Ignore null and non-objects - - if (!obj || - typeof obj !== 'object') { - - return obj; +// node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js +var require_on_exit_leak_free = __commonJS({ + "node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js"(exports2, module2) { + "use strict"; + var refs = { + exit: [], + beforeExit: [] + }; + var functions = { + exit: onExit, + beforeExit: onBeforeExit + }; + var registry; + function ensureRegistry() { + if (registry === void 0) { + registry = new FinalizationRegistry(clear); + } } - - // Check original string for potential exploit - - if (!text.match(internals.suspectRx)) { - return obj; + function install(event) { + if (refs[event].length > 0) { + return; + } + process.on(event, functions[event]); } - - // Scan result for proto keys - - exports.scan(obj, options); - - return obj; -}; - - -exports.scan = function (obj, options = {}) { - - let next = [obj]; - - while (next.length) { - const nodes = next; - next = []; - - for (const node of nodes) { - if (Object.prototype.hasOwnProperty.call(node, '__proto__')) { // Avoid calling node.hasOwnProperty directly - if (options.protoAction !== 'remove') { - throw new SyntaxError('Object contains forbidden prototype property'); - } - - delete node.__proto__; - } - - for (const key in node) { - const value = node[key]; - if (value && - typeof value === 'object') { - - next.push(node[key]); - } - } + function uninstall(event) { + if (refs[event].length > 0) { + return; + } + process.removeListener(event, functions[event]); + if (refs.exit.length === 0 && refs.beforeExit.length === 0) { + registry = void 0; + } + } + function onExit() { + callRefs("exit"); + } + function onBeforeExit() { + callRefs("beforeExit"); + } + function callRefs(event) { + for (const ref of refs[event]) { + const obj = ref.deref(); + const fn = ref.fn; + if (obj !== void 0) { + fn(obj, event); } + } + refs[event] = []; } -}; - - -exports.safeParse = function (text, reviver) { - - try { - return exports.parse(text, reviver); + function clear(ref) { + for (const event of ["exit", "beforeExit"]) { + const index = refs[event].indexOf(ref); + refs[event].splice(index, index + 1); + uninstall(event); + } } - catch (ignoreError) { - return null; + function _register(event, obj, fn) { + if (obj === void 0) { + throw new Error("the object can't be undefined"); + } + install(event); + const ref = new WeakRef(obj); + ref.fn = fn; + ensureRegistry(); + registry.register(obj, ref); + refs[event].push(ref); } -}; - - -/***/ }), - -/***/ 4458: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getKeyIndexes = exports.hasFlag = exports.exists = exports.list = void 0; -const commands_json_1 = __importDefault(__nccwpck_require__(8148)); -/** - * Redis command list - * - * All commands are lowercased. - */ -exports.list = Object.keys(commands_json_1.default); -const flags = {}; -exports.list.forEach((commandName) => { - flags[commandName] = commands_json_1.default[commandName].flags.reduce(function (flags, flag) { - flags[flag] = true; - return flags; - }, {}); -}); -/** - * Check if the command exists - */ -function exists(commandName) { - return Boolean(commands_json_1.default[commandName]); -} -exports.exists = exists; -/** - * Check if the command has the flag - * - * Some of possible flags: readonly, noscript, loading - */ -function hasFlag(commandName, flag) { - if (!flags[commandName]) { - throw new Error("Unknown command " + commandName); + function register(obj, fn) { + _register("exit", obj, fn); } - return Boolean(flags[commandName][flag]); -} -exports.hasFlag = hasFlag; -/** - * Get indexes of keys in the command arguments - * - * @example - * ```javascript - * getKeyIndexes('set', ['key', 'value']) // [0] - * getKeyIndexes('mget', ['key1', 'key2']) // [0, 1] - * ``` - */ -function getKeyIndexes(commandName, args, options) { - const command = commands_json_1.default[commandName]; - if (!command) { - throw new Error("Unknown command " + commandName); + function registerBeforeExit(obj, fn) { + _register("beforeExit", obj, fn); } - if (!Array.isArray(args)) { - throw new Error("Expect args to be an array"); + function unregister(obj) { + if (registry === void 0) { + return; + } + registry.unregister(obj); + for (const event of ["exit", "beforeExit"]) { + refs[event] = refs[event].filter((ref) => { + const _obj = ref.deref(); + return _obj && _obj !== obj; + }); + uninstall(event); + } } - const keys = []; - const parseExternalKey = Boolean(options && options.parseExternalKey); - const takeDynamicKeys = (args, startIndex) => { - const keys = []; - const keyStop = Number(args[startIndex]); - for (let i = 0; i < keyStop; i++) { - keys.push(i + startIndex + 1); - } - return keys; + module2.exports = { + register, + registerBeforeExit, + unregister + }; + } +}); + +// node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json +var require_package = __commonJS({ + "node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json"(exports2, module2) { + module2.exports = { + name: "thread-stream", + version: "3.1.0", + description: "A streaming way to send data to a Node.js Worker Thread", + main: "index.js", + types: "index.d.ts", + dependencies: { + "real-require": "^0.2.0" + }, + devDependencies: { + "@types/node": "^20.1.0", + "@types/tap": "^15.0.0", + "@yao-pkg/pkg": "^5.11.5", + desm: "^1.3.0", + fastbench: "^1.0.1", + husky: "^9.0.6", + "pino-elasticsearch": "^8.0.0", + "sonic-boom": "^4.0.1", + standard: "^17.0.0", + tap: "^16.2.0", + "ts-node": "^10.8.0", + typescript: "^5.3.2", + "why-is-node-running": "^2.2.2" + }, + scripts: { + build: "tsc --noEmit", + test: 'standard && npm run build && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts', + "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts", + "test:ci:js": 'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"', + "test:ci:ts": 'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"', + "test:yarn": 'npm run transpile && tap "test/**/*.test.js" --no-check-coverage', + transpile: "sh ./test/ts/transpile.sh", + prepare: "husky install" + }, + standard: { + ignore: [ + "test/ts/**/*", + "test/syntax-error.mjs" + ] + }, + repository: { + type: "git", + url: "git+https://github.com/mcollina/thread-stream.git" + }, + keywords: [ + "worker", + "thread", + "threads", + "stream" + ], + author: "Matteo Collina ", + license: "MIT", + bugs: { + url: "https://github.com/mcollina/thread-stream/issues" + }, + homepage: "https://github.com/mcollina/thread-stream#readme" }; - const takeKeyAfterToken = (args, startIndex, token) => { - for (let i = startIndex; i < args.length - 1; i += 1) { - if (String(args[i]).toLowerCase() === token.toLowerCase()) { - return i + 1; + } +}); + +// node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js +var require_wait = __commonJS({ + "node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js"(exports2, module2) { + "use strict"; + var MAX_TIMEOUT = 1e3; + function wait2(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current === expected) { + done(null, "ok"); + return; + } + let prior = current; + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + prior = current; + current = Atomics.load(state, index); + if (current === prior) { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } else { + if (current === expected) done(null, "ok"); + else done(null, "not-equal"); } + }, backoff); } - return null; - }; - switch (commandName) { - case "zunionstore": - case "zinterstore": - case "zdiffstore": - keys.push(0, ...takeDynamicKeys(args, 1)); - break; - case "eval": - case "evalsha": - case "eval_ro": - case "evalsha_ro": - case "fcall": - case "fcall_ro": - case "blmpop": - case "bzmpop": - keys.push(...takeDynamicKeys(args, 1)); - break; - case "sintercard": - case "lmpop": - case "zunion": - case "zinter": - case "zmpop": - case "zintercard": - case "zdiff": { - keys.push(...takeDynamicKeys(args, 0)); - break; + }; + check(1); + } + function waitDiff(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + return; + } + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + } else { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } + }, backoff); } - case "georadius": { - keys.push(0); - const storeKey = takeKeyAfterToken(args, 5, "STORE"); - if (storeKey) - keys.push(storeKey); - const distKey = takeKeyAfterToken(args, 5, "STOREDIST"); - if (distKey) - keys.push(distKey); - break; + }; + check(1); + } + module2.exports = { wait: wait2, waitDiff }; + } +}); + +// node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js +var require_indexes = __commonJS({ + "node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js"(exports2, module2) { + "use strict"; + var WRITE_INDEX = 4; + var READ_INDEX = 8; + module2.exports = { + WRITE_INDEX, + READ_INDEX + }; + } +}); + +// node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js +var require_thread_stream = __commonJS({ + "node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js"(exports2, module2) { + "use strict"; + var { version } = require_package(); + var { EventEmitter } = __require("events"); + var { Worker } = __require("worker_threads"); + var { join: join5 } = __require("path"); + var { pathToFileURL } = __require("url"); + var { wait: wait2 } = require_wait(); + var { + WRITE_INDEX, + READ_INDEX + } = require_indexes(); + var buffer = __require("buffer"); + var assert = __require("assert"); + var kImpl = Symbol("kImpl"); + var MAX_STRING = buffer.constants.MAX_STRING_LENGTH; + var FakeWeakRef = class { + constructor(value) { + this._value = value; + } + deref() { + return this._value; + } + }; + var FakeFinalizationRegistry = class { + register() { + } + unregister() { + } + }; + var FinalizationRegistry2 = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry; + var WeakRef2 = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef; + var registry = new FinalizationRegistry2((worker) => { + if (worker.exited) { + return; + } + worker.terminate(); + }); + function createWorker(stream, opts) { + const { filename, workerData } = opts; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + const toExecute = bundlerOverrides["thread-stream-worker"] || join5(__dirname, "lib", "worker.js"); + const worker = new Worker(toExecute, { + ...opts.workerOpts, + trackUnmanagedFds: false, + workerData: { + filename: filename.indexOf("file://") === 0 ? filename : pathToFileURL(filename).href, + dataBuf: stream[kImpl].dataBuf, + stateBuf: stream[kImpl].stateBuf, + workerData: { + $context: { + threadStreamVersion: version + }, + ...workerData + } } - case "georadiusbymember": { - keys.push(0); - const storeKey = takeKeyAfterToken(args, 4, "STORE"); - if (storeKey) - keys.push(storeKey); - const distKey = takeKeyAfterToken(args, 4, "STOREDIST"); - if (distKey) - keys.push(distKey); - break; + }); + worker.stream = new FakeWeakRef(stream); + worker.on("message", onWorkerMessage); + worker.on("exit", onWorkerExit); + registry.register(stream, worker); + return worker; + } + function drain(stream) { + assert(!stream[kImpl].sync); + if (stream[kImpl].needDrain) { + stream[kImpl].needDrain = false; + stream.emit("drain"); + } + } + function nextFlush(stream) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover > 0) { + if (stream[kImpl].buf.length === 0) { + stream[kImpl].flushing = false; + if (stream[kImpl].ending) { + end2(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + return; } - case "sort": - case "sort_ro": - keys.push(0); - for (let i = 1; i < args.length - 1; i++) { - let arg = args[i]; - if (typeof arg !== "string") { - continue; - } - const directive = arg.toUpperCase(); - if (directive === "GET") { - i += 1; - arg = args[i]; - if (arg !== "#") { - if (parseExternalKey) { - keys.push([i, getExternalKeyNameLength(arg)]); - } - else { - keys.push(i); - } - } - } - else if (directive === "BY") { - i += 1; - if (parseExternalKey) { - keys.push([i, getExternalKeyNameLength(args[i])]); - } - else { - keys.push(i); - } - } - else if (directive === "STORE") { - i += 1; - keys.push(i); - } - } - break; - case "migrate": - if (args[2] === "") { - for (let i = 5; i < args.length - 1; i++) { - const arg = args[i]; - if (typeof arg === "string" && arg.toUpperCase() === "KEYS") { - for (let j = i + 1; j < args.length; j++) { - keys.push(j); - } - break; - } - } - } - else { - keys.push(2); - } - break; - case "xreadgroup": - case "xread": - // Keys are 1st half of the args after STREAMS argument. - for (let i = commandName === "xread" ? 0 : 3; i < args.length - 1; i++) { - if (String(args[i]).toUpperCase() === "STREAMS") { - for (let j = i + 1; j <= i + (args.length - 1 - i) / 2; j++) { - keys.push(j); - } - break; - } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + } else { + stream.flush(() => { + if (stream.destroyed) { + return; } - break; - default: - // Step has to be at least one in this case, otherwise the command does - // not contain a key. - if (command.step > 0) { - const keyStart = command.keyStart - 1; - const keyStop = command.keyStop > 0 - ? command.keyStop - : args.length + command.keyStop + 1; - for (let i = keyStart; i < keyStop; i += command.step) { - keys.push(i); - } + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].data.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); } - break; - } - return keys; -} -exports.getKeyIndexes = getKeyIndexes; -function getExternalKeyNameLength(key) { - if (typeof key !== "string") { - key = String(key); + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + }); + } + } else if (leftover === 0) { + if (writeIndex === 0 && stream[kImpl].buf.length === 0) { + return; + } + stream.flush(() => { + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + nextFlush(stream); + }); + } else { + destroy(stream, new Error("overwritten")); + } } - const hashPos = key.indexOf("->"); - return hashPos === -1 ? key.length : hashPos; -} - - -/***/ }), - -/***/ 8670: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createAppAuth: () => createAppAuth, - createOAuthUserAuth: () => import_auth_oauth_user2.createOAuthUserAuth -}); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(59279); -var import_request = __nccwpck_require__(27382); -var import_auth_oauth_app = __nccwpck_require__(14772); - -// pkg/dist-src/auth.js -var import_deprecation = __nccwpck_require__(45546); -var OAuthAppAuth = __toESM(__nccwpck_require__(14772)); - -// pkg/dist-src/get-app-authentication.js -var import_universal_github_app_jwt = __nccwpck_require__(67767); -async function getAppAuthentication({ - appId, - privateKey, - timeDifference -}) { - try { - const appAuthentication = await (0, import_universal_github_app_jwt.githubAppJwt)({ - id: +appId, - privateKey, - now: timeDifference && Math.floor(Date.now() / 1e3) + timeDifference - }); - return { - type: "app", - token: appAuthentication.token, - appId: appAuthentication.appId, - expiresAt: new Date(appAuthentication.expiration * 1e3).toISOString() - }; - } catch (error) { - if (privateKey === "-----BEGIN RSA PRIVATE KEY-----") { - throw new Error( - "The 'privateKey` option contains only the first line '-----BEGIN RSA PRIVATE KEY-----'. If you are setting it using a `.env` file, make sure it is set on a single line with newlines replaced by '\n'" - ); - } else { - throw error; + function onWorkerMessage(msg) { + const stream = this.stream.deref(); + if (stream === void 0) { + this.exited = true; + this.terminate(); + return; + } + switch (msg.code) { + case "READY": + this.stream = new WeakRef2(stream); + stream.flush(() => { + stream[kImpl].ready = true; + stream.emit("ready"); + }); + break; + case "ERROR": + destroy(stream, msg.err); + break; + case "EVENT": + if (Array.isArray(msg.args)) { + stream.emit(msg.name, ...msg.args); + } else { + stream.emit(msg.name, msg.args); + } + break; + case "WARNING": + process.emitWarning(msg.err); + break; + default: + destroy(stream, new Error("this should not happen: " + msg.code)); + } } - } -} - -// pkg/dist-src/cache.js -var import_lru_cache = __nccwpck_require__(33627); -function getCache() { - return new import_lru_cache.LRUCache({ - // cache max. 15000 tokens, that will use less than 10mb memory - max: 15e3, - // Cache for 1 minute less than GitHub expiry - ttl: 1e3 * 60 * 59 - }); -} -async function get(cache, options) { - const cacheKey = optionsToCacheKey(options); - const result = await cache.get(cacheKey); - if (!result) { - return; - } - const [ - token, - createdAt, - expiresAt, - repositorySelection, - permissionsString, - singleFileName - ] = result.split("|"); - const permissions = options.permissions || permissionsString.split(/,/).reduce((permissions2, string) => { - if (/!$/.test(string)) { - permissions2[string.slice(0, -1)] = "write"; - } else { - permissions2[string] = "read"; + function onWorkerExit(code) { + const stream = this.stream.deref(); + if (stream === void 0) { + return; + } + registry.unregister(stream); + stream.worker.exited = true; + stream.worker.off("exit", onWorkerExit); + destroy(stream, code !== 0 ? new Error("the worker thread exited") : null); } - return permissions2; - }, {}); - return { - token, - createdAt, - expiresAt, - permissions, - repositoryIds: options.repositoryIds, - repositoryNames: options.repositoryNames, - singleFileName, - repositorySelection - }; -} -async function set(cache, options, data) { - const key = optionsToCacheKey(options); - const permissionsString = options.permissions ? "" : Object.keys(data.permissions).map( - (name) => `${name}${data.permissions[name] === "write" ? "!" : ""}` - ).join(","); - const value = [ - data.token, - data.createdAt, - data.expiresAt, - data.repositorySelection, - permissionsString, - data.singleFileName - ].join("|"); - await cache.set(key, value); -} -function optionsToCacheKey({ - installationId, - permissions = {}, - repositoryIds = [], - repositoryNames = [] -}) { - const permissionsString = Object.keys(permissions).sort().map((name) => permissions[name] === "read" ? name : `${name}!`).join(","); - const repositoryIdsString = repositoryIds.sort().join(","); - const repositoryNamesString = repositoryNames.join(","); - return [ - installationId, - repositoryIdsString, - repositoryNamesString, - permissionsString - ].filter(Boolean).join("|"); -} - -// pkg/dist-src/to-token-authentication.js -function toTokenAuthentication({ - installationId, - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName -}) { - return Object.assign( - { - type: "token", - tokenType: "installation", - token, - installationId, - permissions, - createdAt, - expiresAt, - repositorySelection - }, - repositoryIds ? { repositoryIds } : null, - repositoryNames ? { repositoryNames } : null, - singleFileName ? { singleFileName } : null - ); -} - -// pkg/dist-src/get-installation-authentication.js -async function getInstallationAuthentication(state, options, customRequest) { - const installationId = Number(options.installationId || state.installationId); - if (!installationId) { - throw new Error( - "[@octokit/auth-app] installationId option is required for installation authentication." - ); - } - if (options.factory) { - const { type, factory, oauthApp, ...factoryAuthOptions } = { - ...state, - ...options + var ThreadStream = class extends EventEmitter { + constructor(opts = {}) { + super(); + if (opts.bufferSize < 4) { + throw new Error("bufferSize must at least fit a 4-byte utf-8 char"); + } + this[kImpl] = {}; + this[kImpl].stateBuf = new SharedArrayBuffer(128); + this[kImpl].state = new Int32Array(this[kImpl].stateBuf); + this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024); + this[kImpl].data = Buffer.from(this[kImpl].dataBuf); + this[kImpl].sync = opts.sync || false; + this[kImpl].ending = false; + this[kImpl].ended = false; + this[kImpl].needDrain = false; + this[kImpl].destroyed = false; + this[kImpl].flushing = false; + this[kImpl].ready = false; + this[kImpl].finished = false; + this[kImpl].errored = null; + this[kImpl].closed = false; + this[kImpl].buf = ""; + this.worker = createWorker(this, opts); + this.on("message", (message, transferList) => { + this.worker.postMessage(message, transferList); + }); + } + write(data) { + if (this[kImpl].destroyed) { + error(this, new Error("the worker has exited")); + return false; + } + if (this[kImpl].ending) { + error(this, new Error("the worker is ending")); + return false; + } + if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { + try { + writeSync(this); + this[kImpl].flushing = true; + } catch (err) { + destroy(this, err); + return false; + } + } + this[kImpl].buf += data; + if (this[kImpl].sync) { + try { + writeSync(this); + return true; + } catch (err) { + destroy(this, err); + return false; + } + } + if (!this[kImpl].flushing) { + this[kImpl].flushing = true; + setImmediate(nextFlush, this); + } + this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0; + return !this[kImpl].needDrain; + } + end() { + if (this[kImpl].destroyed) { + return; + } + this[kImpl].ending = true; + end2(this); + } + flush(cb) { + if (this[kImpl].destroyed) { + if (typeof cb === "function") { + process.nextTick(cb, new Error("the worker has exited")); + } + return; + } + const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX); + wait2(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { + if (err) { + destroy(this, err); + process.nextTick(cb, err); + return; + } + if (res === "not-equal") { + this.flush(cb); + return; + } + process.nextTick(cb); + }); + } + flushSync() { + if (this[kImpl].destroyed) { + return; + } + writeSync(this); + flushSync(this); + } + unref() { + this.worker.unref(); + } + ref() { + this.worker.ref(); + } + get ready() { + return this[kImpl].ready; + } + get destroyed() { + return this[kImpl].destroyed; + } + get closed() { + return this[kImpl].closed; + } + get writable() { + return !this[kImpl].destroyed && !this[kImpl].ending; + } + get writableEnded() { + return this[kImpl].ending; + } + get writableFinished() { + return this[kImpl].finished; + } + get writableNeedDrain() { + return this[kImpl].needDrain; + } + get writableObjectMode() { + return false; + } + get writableErrored() { + return this[kImpl].errored; + } }; - return factory(factoryAuthOptions); - } - const optionsWithInstallationTokenFromState = Object.assign( - { installationId }, - options - ); - if (!options.refresh) { - const result = await get( - state.cache, - optionsWithInstallationTokenFromState - ); - if (result) { - const { - token: token2, - createdAt: createdAt2, - expiresAt: expiresAt2, - permissions: permissions2, - repositoryIds: repositoryIds2, - repositoryNames: repositoryNames2, - singleFileName: singleFileName2, - repositorySelection: repositorySelection2 - } = result; - return toTokenAuthentication({ - installationId, - token: token2, - createdAt: createdAt2, - expiresAt: expiresAt2, - permissions: permissions2, - repositorySelection: repositorySelection2, - repositoryIds: repositoryIds2, - repositoryNames: repositoryNames2, - singleFileName: singleFileName2 + function error(stream, err) { + setImmediate(() => { + stream.emit("error", err); }); } - } - const appAuthentication = await getAppAuthentication(state); - const request = customRequest || state.request; - const { - data: { - token, - expires_at: expiresAt, - repositories, - permissions: permissionsOptional, - repository_selection: repositorySelectionOptional, - single_file: singleFileName - } - } = await request("POST /app/installations/{installation_id}/access_tokens", { - installation_id: installationId, - repository_ids: options.repositoryIds, - repositories: options.repositoryNames, - permissions: options.permissions, - mediaType: { - previews: ["machine-man"] - }, - headers: { - authorization: `bearer ${appAuthentication.token}` + function destroy(stream, err) { + if (stream[kImpl].destroyed) { + return; + } + stream[kImpl].destroyed = true; + if (err) { + stream[kImpl].errored = err; + error(stream, err); + } + if (!stream.worker.exited) { + stream.worker.terminate().catch(() => { + }).then(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } else { + setImmediate(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } } - }); - const permissions = permissionsOptional || {}; - const repositorySelection = repositorySelectionOptional || "all"; - const repositoryIds = repositories ? repositories.map((r) => r.id) : void 0; - const repositoryNames = repositories ? repositories.map((repo) => repo.name) : void 0; - const createdAt = (/* @__PURE__ */ new Date()).toISOString(); - await set(state.cache, optionsWithInstallationTokenFromState, { - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName - }); - return toTokenAuthentication({ - installationId, - token, - createdAt, - expiresAt, - repositorySelection, - permissions, - repositoryIds, - repositoryNames, - singleFileName - }); -} + function write(stream, data, cb) { + const current = Atomics.load(stream[kImpl].state, WRITE_INDEX); + const length = Buffer.byteLength(data); + stream[kImpl].data.write(data, current); + Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + cb(); + return true; + } + function end2(stream) { + if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { + return; + } + stream[kImpl].ended = true; + try { + stream.flushSync(); + let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + Atomics.store(stream[kImpl].state, WRITE_INDEX, -1); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (readIndex !== -1) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + destroy(stream, new Error("end() failed")); + return; + } + if (++spins === 10) { + destroy(stream, new Error("end() took too long (10s)")); + return; + } + } + process.nextTick(() => { + stream[kImpl].finished = true; + stream.emit("finish"); + }); + } catch (err) { + destroy(stream, err); + } + } + function writeSync(stream) { + const cb = () => { + if (stream[kImpl].ending) { + end2(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + }; + stream[kImpl].flushing = false; + while (stream[kImpl].buf.length !== 0) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover === 0) { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + continue; + } else if (leftover < 0) { + throw new Error("overwritten"); + } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } else { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].buf.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } + } + } + function flushSync(stream) { + if (stream[kImpl].flushing) { + throw new Error("unable to flush while flushing"); + } + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (true) { + const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + throw Error("_flushSync failed"); + } + if (readIndex !== writeIndex) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + } else { + break; + } + if (++spins === 10) { + throw new Error("_flushSync took too long (10s)"); + } + } + } + module2.exports = ThreadStream; + } +}); -// pkg/dist-src/auth.js -async function auth(state, authOptions) { - switch (authOptions.type) { - case "app": - return getAppAuthentication(state); - case "oauth": - state.log.warn( - // @ts-expect-error `log.warn()` expects string - new import_deprecation.Deprecation( - `[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead` - ) - ); - case "oauth-app": - return state.oauthApp({ type: "oauth-app" }); - case "installation": - authOptions; - return getInstallationAuthentication(state, { - ...authOptions, - type: "installation" +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/transport.js +var require_transport = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/transport.js"(exports2, module2) { + "use strict"; + var { createRequire } = __require("module"); + var getCallers = require_caller(); + var { join: join5, isAbsolute: isAbsolute2, sep: sep2 } = __require("node:path"); + var sleep = require_atomic_sleep(); + var onExit = require_on_exit_leak_free(); + var ThreadStream = require_thread_stream(); + function setupOnExit(stream) { + onExit.register(stream, autoEnd); + onExit.registerBeforeExit(stream, flush2); + stream.on("close", function() { + onExit.unregister(stream); }); - case "oauth-user": - return state.oauthApp(authOptions); - default: - throw new Error(`Invalid auth type: ${authOptions.type}`); - } -} - -// pkg/dist-src/hook.js -var import_auth_oauth_user = __nccwpck_require__(29801); -var import_request_error = __nccwpck_require__(2534); - -// pkg/dist-src/requires-app-auth.js -var PATHS = [ - "/app", - "/app/hook/config", - "/app/hook/deliveries", - "/app/hook/deliveries/{delivery_id}", - "/app/hook/deliveries/{delivery_id}/attempts", - "/app/installations", - "/app/installations/{installation_id}", - "/app/installations/{installation_id}/access_tokens", - "/app/installations/{installation_id}/suspended", - "/app/installation-requests", - "/marketplace_listing/accounts/{account_id}", - "/marketplace_listing/plan", - "/marketplace_listing/plans", - "/marketplace_listing/plans/{plan_id}/accounts", - "/marketplace_listing/stubbed/accounts/{account_id}", - "/marketplace_listing/stubbed/plan", - "/marketplace_listing/stubbed/plans", - "/marketplace_listing/stubbed/plans/{plan_id}/accounts", - "/orgs/{org}/installation", - "/repos/{owner}/{repo}/installation", - "/users/{username}/installation" -]; -function routeMatcher(paths) { - const regexes = paths.map( - (p) => p.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") - ); - const regex = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})$`; - return new RegExp(regex, "i"); -} -var REGEX = routeMatcher(PATHS); -function requiresAppAuth(url) { - return !!url && REGEX.test(url.split("?")[0]); -} - -// pkg/dist-src/hook.js -var FIVE_SECONDS_IN_MS = 5 * 1e3; -function isNotTimeSkewError(error) { - return !(error.message.match( - /'Expiration time' claim \('exp'\) must be a numeric value representing the future time at which the assertion expires/ - ) || error.message.match( - /'Issued at' claim \('iat'\) must be an Integer representing the time that the assertion was issued/ - )); -} -async function hook(state, request, route, parameters) { - const endpoint = request.endpoint.merge(route, parameters); - const url = endpoint.url; - if (/\/login\/oauth\/access_token$/.test(url)) { - return request(endpoint); - } - if (requiresAppAuth(url.replace(request.endpoint.DEFAULTS.baseUrl, ""))) { - const { token: token2 } = await getAppAuthentication(state); - endpoint.headers.authorization = `bearer ${token2}`; - let response; - try { - response = await request(endpoint); - } catch (error) { - if (isNotTimeSkewError(error)) { - throw error; + } + function buildStream(filename, workerData, workerOpts, sync) { + const stream = new ThreadStream({ + filename, + workerData, + workerOpts, + sync + }); + stream.on("ready", onReady); + stream.on("close", function() { + process.removeListener("exit", onExit2); + }); + process.on("exit", onExit2); + function onReady() { + process.removeListener("exit", onExit2); + stream.unref(); + if (workerOpts.autoEnd !== false) { + setupOnExit(stream); + } } - if (typeof error.response.headers.date === "undefined") { - throw error; + function onExit2() { + if (stream.closed) { + return; + } + stream.flushSync(); + sleep(100); + stream.end(); } - const diff = Math.floor( - (Date.parse(error.response.headers.date) - Date.parse((/* @__PURE__ */ new Date()).toString())) / 1e3 - ); - state.log.warn(error.message); - state.log.warn( - `[@octokit/auth-app] GitHub API time and system time are different by ${diff} seconds. Retrying request with the difference accounted for.` - ); - const { token: token3 } = await getAppAuthentication({ - ...state, - timeDifference: diff + return stream; + } + function autoEnd(stream) { + stream.ref(); + stream.flushSync(); + stream.end(); + stream.once("close", function() { + stream.unref(); }); - endpoint.headers.authorization = `bearer ${token3}`; - return request(endpoint); } - return response; - } - if ((0, import_auth_oauth_user.requiresBasicAuth)(url)) { - const authentication = await state.oauthApp({ type: "oauth-app" }); - endpoint.headers.authorization = authentication.headers.authorization; - return request(endpoint); - } - const { token, createdAt } = await getInstallationAuthentication( - state, - // @ts-expect-error TBD - {}, - request.defaults({ baseUrl: endpoint.baseUrl }) - ); - endpoint.headers.authorization = `token ${token}`; - return sendRequestWithRetries( - state, - request, - endpoint, - createdAt - ); -} -async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) { - const timeSinceTokenCreationInMs = +/* @__PURE__ */ new Date() - +new Date(createdAt); - try { - return await request(options); - } catch (error) { - if (error.status !== 401) { - throw error; + function flush2(stream) { + stream.flushSync(); } - if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) { - if (retries > 0) { - error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1e3}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`; + function transport2(fullOptions) { + const { pipeline, targets, levels, dedupe, worker = {}, caller = getCallers(), sync = false } = fullOptions; + const options2 = { + ...fullOptions.options + }; + const callers = typeof caller === "string" ? [caller] : caller; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + let target = fullOptions.target; + if (target && targets) { + throw new Error("only one of target or targets can be specified"); + } + if (targets) { + target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js"); + options2.targets = targets.filter((dest) => dest.target).map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + }); + options2.pipelines = targets.filter((dest) => dest.pipeline).map((dest) => { + return dest.pipeline.map((t) => { + return { + ...t, + level: dest.level, + // duplicate the pipeline `level` property defined in the upper level + target: fixTarget(t.target) + }; + }); + }); + } else if (pipeline) { + target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js"); + options2.pipelines = [pipeline.map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + })]; + } + if (levels) { + options2.levels = levels; + } + if (dedupe) { + options2.dedupe = dedupe; + } + options2.pinoWillSendConfig = true; + return buildStream(fixTarget(target), options2, worker, sync); + function fixTarget(origin) { + origin = bundlerOverrides[origin] || origin; + if (isAbsolute2(origin) || origin.indexOf("file://") === 0) { + return origin; + } + if (origin === "pino/file") { + return join5(__dirname, "..", "file.js"); + } + let fixTarget2; + for (const filePath of callers) { + try { + const context = filePath === "node:repl" ? process.cwd() + sep2 : filePath; + fixTarget2 = createRequire(context).resolve(origin); + break; + } catch (err) { + continue; + } + } + if (!fixTarget2) { + throw new Error(`unable to determine transport target for "${origin}"`); + } + return fixTarget2; } - throw error; } - ++retries; - const awaitTime = retries * 1e3; - state.log.warn( - `[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1e3}s)` - ); - await new Promise((resolve) => setTimeout(resolve, awaitTime)); - return sendRequestWithRetries(state, request, options, createdAt, retries); + module2.exports = transport2; } -} - -// pkg/dist-src/version.js -var VERSION = "6.1.3"; +}); -// pkg/dist-src/index.js -var import_auth_oauth_user2 = __nccwpck_require__(29801); -function createAppAuth(options) { - if (!options.appId) { - throw new Error("[@octokit/auth-app] appId option is required"); - } - if (!Number.isFinite(+options.appId)) { - throw new Error( - "[@octokit/auth-app] appId option must be a number or numeric string" - ); - } - if (!options.privateKey) { - throw new Error("[@octokit/auth-app] privateKey option is required"); - } - if ("installationId" in options && !options.installationId) { - throw new Error( - "[@octokit/auth-app] installationId is set to a falsy value" - ); - } - const log = Object.assign( - { - warn: console.warn.bind(console) - }, - options.log - ); - const request = options.request || import_request.request.defaults({ - headers: { - "user-agent": `octokit-auth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/tools.js +var require_tools = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/tools.js"(exports2, module2) { + "use strict"; + var format2 = require_quick_format_unescaped(); + var { mapHttpRequest, mapHttpResponse } = require_pino_std_serializers(); + var SonicBoom = require_sonic_boom(); + var onExit = require_on_exit_leak_free(); + var { + lsCacheSym, + chindingsSym, + writeSym, + serializersSym, + formatOptsSym, + endSym, + stringifiersSym, + stringifySym, + stringifySafeSym, + wildcardFirstSym, + nestedKeySym, + formattersSym, + messageKeySym, + errorKeySym, + nestedKeyStrSym, + msgPrefixSym + } = require_symbols(); + var { isMainThread } = __require("worker_threads"); + var transport2 = require_transport(); + function noop3() { + } + function genLog(level, hook6) { + if (!hook6) return LOG; + return function hookWrappedLog(...args) { + hook6.call(this, args, LOG, level); + }; + function LOG(o, ...n) { + if (typeof o === "object") { + let msg = o; + if (o !== null) { + if (o.method && o.headers && o.socket) { + o = mapHttpRequest(o); + } else if (typeof o.setHeader === "function") { + o = mapHttpResponse(o); + } + } + let formatParams; + if (msg === null && n.length === 0) { + formatParams = [null]; + } else { + msg = n.shift(); + formatParams = n; + } + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](o, format2(msg, formatParams, this[formatOptsSym]), level); + } else { + let msg = o === void 0 ? n.shift() : o; + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](null, format2(msg, n, this[formatOptsSym]), level); + } + } } - }); - const state = Object.assign( - { - request, - cache: getCache() - }, - options, - options.installationId ? { installationId: Number(options.installationId) } : {}, - { - log, - oauthApp: (0, import_auth_oauth_app.createOAuthAppAuth)({ - clientType: "github-app", - clientId: options.clientId || "", - clientSecret: options.clientSecret || "", - request - }) + function asString(str2) { + let result = ""; + let last = 0; + let found = false; + let point = 255; + const l = str2.length; + if (l > 100) { + return JSON.stringify(str2); + } + for (var i = 0; i < l && point >= 32; i++) { + point = str2.charCodeAt(i); + if (point === 34 || point === 92) { + result += str2.slice(last, i) + "\\"; + last = i; + found = true; + } + } + if (!found) { + result = str2; + } else { + result += str2.slice(last); + } + return point < 32 ? JSON.stringify(str2) : '"' + result + '"'; + } + function asJson(obj, msg, num, time) { + const stringify2 = this[stringifySym]; + const stringifySafe = this[stringifySafeSym]; + const stringifiers = this[stringifiersSym]; + const end2 = this[endSym]; + const chindings = this[chindingsSym]; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const messageKey = this[messageKeySym]; + const errorKey = this[errorKeySym]; + let data = this[lsCacheSym][num] + time; + data = data + chindings; + let value; + if (formatters.log) { + obj = formatters.log(obj); + } + const wildcardStringifier = stringifiers[wildcardFirstSym]; + let propStr = ""; + for (const key in obj) { + value = obj[key]; + if (Object.prototype.hasOwnProperty.call(obj, key) && value !== void 0) { + if (serializers[key]) { + value = serializers[key](value); + } else if (key === errorKey && serializers.err) { + value = serializers.err(value); + } + const stringifier = stringifiers[key] || wildcardStringifier; + switch (typeof value) { + case "undefined": + case "function": + continue; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + break; + case "string": + value = (stringifier || asString)(value); + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + } + if (value === void 0) continue; + const strKey = asString(key); + propStr += "," + strKey + ":" + value; + } + } + let msgStr = ""; + if (msg !== void 0) { + value = serializers[messageKey] ? serializers[messageKey](msg) : msg; + const stringifier = stringifiers[messageKey] || wildcardStringifier; + switch (typeof value) { + case "function": + break; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + msgStr = ',"' + messageKey + '":' + value; + break; + case "string": + value = (stringifier || asString)(value); + msgStr = ',"' + messageKey + '":' + value; + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + msgStr = ',"' + messageKey + '":' + value; + } + } + if (this[nestedKeySym] && propStr) { + return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end2; + } else { + return data + propStr + msgStr + end2; + } + } + function asChindings(instance, bindings) { + let value; + let data = instance[chindingsSym]; + const stringify2 = instance[stringifySym]; + const stringifySafe = instance[stringifySafeSym]; + const stringifiers = instance[stringifiersSym]; + const wildcardStringifier = stringifiers[wildcardFirstSym]; + const serializers = instance[serializersSym]; + const formatter = instance[formattersSym].bindings; + bindings = formatter(bindings); + for (const key in bindings) { + value = bindings[key]; + const valid = key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels" && bindings.hasOwnProperty(key) && value !== void 0; + if (valid === true) { + value = serializers[key] ? serializers[key](value) : value; + value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe); + if (value === void 0) continue; + data += ',"' + key + '":' + value; + } + } + return data; } - ); - return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 14772: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + function hasBeenTampered(stream) { + return stream.write !== stream.constructor.prototype.write; + } + var hasNodeCodeCoverage = process.env.NODE_V8_COVERAGE || process.env.V8_COVERAGE; + function buildSafeSonicBoom(opts) { + const stream = new SonicBoom(opts); + stream.on("error", filterBrokenPipe); + if (!hasNodeCodeCoverage && !opts.sync && isMainThread) { + onExit.register(stream, autoEnd); + stream.on("close", function() { + onExit.unregister(stream); + }); + } + return stream; + function filterBrokenPipe(err) { + if (err.code === "EPIPE") { + stream.write = noop3; + stream.end = noop3; + stream.flushSync = noop3; + stream.destroy = noop3; + return; + } + stream.removeListener("error", filterBrokenPipe); + stream.emit("error", err); + } + } + function autoEnd(stream, eventName) { + if (stream.destroyed) { + return; + } + if (eventName === "beforeExit") { + stream.flush(); + stream.on("drain", function() { + stream.end(); + }); + } else { + stream.flushSync(); + } + } + function createArgsNormalizer(defaultOptions) { + return function normalizeArgs(instance, caller, opts = {}, stream) { + if (typeof opts === "string") { + stream = buildSafeSonicBoom({ dest: opts }); + opts = {}; + } else if (typeof stream === "string") { + if (opts && opts.transport) { + throw Error("only one of option.transport or stream can be specified"); + } + stream = buildSafeSonicBoom({ dest: stream }); + } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { + stream = opts; + opts = {}; + } else if (opts.transport) { + if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) { + throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)"); + } + if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") { + throw Error("option.transport.targets do not allow custom level formatters"); + } + let customLevels; + if (opts.customLevels) { + customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels); + } + stream = transport2({ caller, ...opts.transport, levels: customLevels }); + } + opts = Object.assign({}, defaultOptions, opts); + opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers); + opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters); + if (opts.prettyPrint) { + throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)"); + } + const { enabled, onChild } = opts; + if (enabled === false) opts.level = "silent"; + if (!onChild) opts.onChild = noop3; + if (!stream) { + if (!hasBeenTampered(process.stdout)) { + stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 }); + } else { + stream = process.stdout; + } + } + return { opts, stream }; + }; + } + function stringify(obj, stringifySafeFn) { + try { + return JSON.stringify(obj); + } catch (_) { + try { + const stringify2 = stringifySafeFn || this[stringifySafeSym]; + return stringify2(obj); + } catch (_2) { + return '"[unable to serialize, circular reference is too complex to analyze]"'; + } + } + } + function buildFormatters(level, bindings, log2) { + return { + level, + bindings, + log: log2 + }; + } + function normalizeDestFileDescriptor(destination) { + const fd = Number(destination); + if (typeof destination === "string" && Number.isFinite(fd)) { + return fd; + } + if (destination === void 0) { + return 1; + } + return destination; + } + module2.exports = { + noop: noop3, + buildSafeSonicBoom, + asChindings, + asJson, + genLog, + createArgsNormalizer, + stringify, + buildFormatters, + normalizeDestFileDescriptor + }; } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createOAuthAppAuth: () => createOAuthAppAuth, - createOAuthUserAuth: () => import_auth_oauth_user3.createOAuthUserAuth }); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(59279); -var import_request = __nccwpck_require__(27382); -// pkg/dist-src/auth.js -var import_btoa_lite = __toESM(__nccwpck_require__(95432)); -var import_auth_oauth_user = __nccwpck_require__(29801); -async function auth(state, authOptions) { - if (authOptions.type === "oauth-app") { - return { - type: "oauth-app", - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - headers: { - authorization: `basic ${(0, import_btoa_lite.default)( - `${state.clientId}:${state.clientSecret}` - )}` - } +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/constants.js +var require_constants = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/constants.js"(exports2, module2) { + var DEFAULT_LEVELS = { + trace: 10, + debug: 20, + info: 30, + warn: 40, + error: 50, + fatal: 60 }; - } - if ("factory" in authOptions) { - const { type, ...options } = { - ...authOptions, - ...state + var SORTING_ORDER = { + ASC: "ASC", + DESC: "DESC" + }; + module2.exports = { + DEFAULT_LEVELS, + SORTING_ORDER }; - return authOptions.factory(options); - } - const common = { - clientId: state.clientId, - clientSecret: state.clientSecret, - request: state.request, - ...authOptions - }; - const userAuth = state.clientType === "oauth-app" ? await (0, import_auth_oauth_user.createOAuthUserAuth)({ - ...common, - clientType: state.clientType - }) : await (0, import_auth_oauth_user.createOAuthUserAuth)({ - ...common, - clientType: state.clientType - }); - return userAuth(); -} - -// pkg/dist-src/hook.js -var import_btoa_lite2 = __toESM(__nccwpck_require__(95432)); -var import_auth_oauth_user2 = __nccwpck_require__(29801); -async function hook(state, request2, route, parameters) { - let endpoint = request2.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { - return request2(endpoint); - } - if (state.clientType === "github-app" && !(0, import_auth_oauth_user2.requiresBasicAuth)(endpoint.url)) { - throw new Error( - `[@octokit/auth-oauth-app] GitHub Apps cannot use their client ID/secret for basic authentication for endpoints other than "/applications/{client_id}/**". "${endpoint.method} ${endpoint.url}" is not supported.` - ); - } - const credentials = (0, import_btoa_lite2.default)(`${state.clientId}:${state.clientSecret}`); - endpoint.headers.authorization = `basic ${credentials}`; - try { - return await request2(endpoint); - } catch (error) { - if (error.status !== 401) - throw error; - error.message = `[@octokit/auth-oauth-app] "${endpoint.method} ${endpoint.url}" does not support clientId/clientSecret basic authentication.`; - throw error; } -} - -// pkg/dist-src/version.js -var VERSION = "7.1.0"; +}); -// pkg/dist-src/index.js -var import_auth_oauth_user3 = __nccwpck_require__(29801); -function createOAuthAppAuth(options) { - const state = Object.assign( - { - request: import_request.request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/levels.js +var require_levels = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/levels.js"(exports2, module2) { + "use strict"; + var { + lsCacheSym, + levelValSym, + useOnlyCustomLevelsSym, + streamSym, + formattersSym, + hooksSym, + levelCompSym + } = require_symbols(); + var { noop: noop3, genLog } = require_tools(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants(); + var levelMethods = { + fatal: (hook6) => { + const logFatal = genLog(DEFAULT_LEVELS.fatal, hook6); + return function(...args) { + const stream = this[streamSym]; + logFatal.call(this, ...args); + if (typeof stream.flushSync === "function") { + try { + stream.flushSync(); + } catch (e) { + } + } + }; + }, + error: (hook6) => genLog(DEFAULT_LEVELS.error, hook6), + warn: (hook6) => genLog(DEFAULT_LEVELS.warn, hook6), + info: (hook6) => genLog(DEFAULT_LEVELS.info, hook6), + debug: (hook6) => genLog(DEFAULT_LEVELS.debug, hook6), + trace: (hook6) => genLog(DEFAULT_LEVELS.trace, hook6) + }; + var nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => { + o[DEFAULT_LEVELS[k]] = k; + return o; + }, {}); + var initialLsCache = Object.keys(nums).reduce((o, k) => { + o[k] = '{"level":' + Number(k); + return o; + }, {}); + function genLsCache(instance) { + const formatter = instance[formattersSym].level; + const { labels } = instance.levels; + const cache = {}; + for (const label in labels) { + const level = formatter(labels[label], Number(label)); + cache[label] = JSON.stringify(level).slice(0, -1); + } + instance[lsCacheSym] = cache; + return instance; + } + function isStandardLevel(level, useOnlyCustomLevels) { + if (useOnlyCustomLevels) { + return false; + } + switch (level) { + case "fatal": + case "error": + case "warn": + case "info": + case "debug": + case "trace": + return true; + default: + return false; + } + } + function setLevel(level) { + const { labels, values } = this.levels; + if (typeof level === "number") { + if (labels[level] === void 0) throw Error("unknown level value" + level); + level = labels[level]; + } + if (values[level] === void 0) throw Error("unknown level " + level); + const preLevelVal = this[levelValSym]; + const levelVal = this[levelValSym] = values[level]; + const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym]; + const levelComparison = this[levelCompSym]; + const hook6 = this[hooksSym].logMethod; + for (const key in values) { + if (levelComparison(values[key], levelVal) === false) { + this[key] = noop3; + continue; } - }), - clientType: "oauth-app" - }, - options - ); - return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 38487: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook6) : genLog(values[key], hook6); + } + this.emit( + "level-change", + level, + levelVal, + labels[preLevelVal], + preLevelVal, + this + ); + } + function getLevel(level) { + const { levels, levelVal } = this; + return levels && levels.labels ? levels.labels[levelVal] : ""; + } + function isLevelEnabled(logLevel) { + const { values } = this.levels; + const logLevelVal = values[logLevel]; + return logLevelVal !== void 0 && this[levelCompSym](logLevelVal, this[levelValSym]); + } + function compareLevel(direction, current, expected) { + if (direction === SORTING_ORDER.DESC) { + return current <= expected; + } + return current >= expected; + } + function genLevelComparison(levelComparison) { + if (typeof levelComparison === "string") { + return compareLevel.bind(null, levelComparison); + } + return levelComparison; + } + function mappings(customLevels = null, useOnlyCustomLevels = false) { + const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => { + o[customLevels[k]] = k; + return o; + }, {}) : null; + const labels = Object.assign( + Object.create(Object.prototype, { Infinity: { value: "silent" } }), + useOnlyCustomLevels ? null : nums, + customNums + ); + const values = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + return { labels, values }; + } + function assertDefaultLevelFound(defaultLevel, customLevels, useOnlyCustomLevels) { + if (typeof defaultLevel === "number") { + const values = [].concat( + Object.keys(customLevels || {}).map((key) => customLevels[key]), + useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), + Infinity + ); + if (!values.includes(defaultLevel)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } + return; + } + const labels = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + if (!(defaultLevel in labels)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } + } + function assertNoLevelCollisions(levels, customLevels) { + const { labels, values } = levels; + for (const k in customLevels) { + if (k in values) { + throw Error("levels cannot be overridden"); + } + if (customLevels[k] in labels) { + throw Error("pre-existing level values cannot be used for new levels"); + } + } + } + function assertLevelComparison(levelComparison) { + if (typeof levelComparison === "function") { + return; + } + if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) { + return; + } + throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type'); + } + module2.exports = { + initialLsCache, + genLsCache, + levelMethods, + getLevel, + setLevel, + isLevelEnabled, + mappings, + assertNoLevelCollisions, + assertDefaultLevelFound, + genLevelComparison, + assertLevelComparison + }; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +}); -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createOAuthDeviceAuth: () => createOAuthDeviceAuth +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/meta.js +var require_meta = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/meta.js"(exports2, module2) { + "use strict"; + module2.exports = { version: "9.5.0" }; + } }); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(59279); -var import_request = __nccwpck_require__(27382); -// pkg/dist-src/get-oauth-access-token.js -var import_oauth_methods = __nccwpck_require__(87813); -async function getOAuthAccessToken(state, options) { - const cachedAuthentication = getCachedAuthentication(state, options.auth); - if (cachedAuthentication) - return cachedAuthentication; - const { data: verification } = await (0, import_oauth_methods.createDeviceCode)({ - clientType: state.clientType, - clientId: state.clientId, - request: options.request || state.request, - // @ts-expect-error the extra code to make TS happy is not worth it - scopes: options.auth.scopes || state.scopes - }); - await state.onVerification(verification); - const authentication = await waitForAccessToken( - options.request || state.request, - state.clientId, - state.clientType, - verification - ); - state.authentication = authentication; - return authentication; -} -function getCachedAuthentication(state, auth2) { - if (auth2.refresh === true) - return false; - if (!state.authentication) - return false; - if (state.clientType === "github-app") { - return state.authentication; - } - const authentication = state.authentication; - const newScope = ("scopes" in auth2 && auth2.scopes || state.scopes).join( - " " - ); - const currentScope = authentication.scopes.join(" "); - return newScope === currentScope ? authentication : false; -} -async function wait(seconds) { - await new Promise((resolve) => setTimeout(resolve, seconds * 1e3)); -} -async function waitForAccessToken(request, clientId, clientType, verification) { - try { - const options = { - clientId, - request, - code: verification.device_code +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/proto.js +var require_proto = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/proto.js"(exports2, module2) { + "use strict"; + var { EventEmitter } = __require("node:events"); + var { + lsCacheSym, + levelValSym, + setLevelSym, + getLevelSym, + chindingsSym, + parsedChindingsSym, + mixinSym, + asJsonSym, + writeSym, + mixinMergeStrategySym, + timeSym, + timeSliceIndexSym, + streamSym, + serializersSym, + formattersSym, + errorKeySym, + messageKeySym, + useOnlyCustomLevelsSym, + needsMetadataGsym, + redactFmtSym, + stringifySym, + formatOptsSym, + stringifiersSym, + msgPrefixSym + } = require_symbols(); + var { + getLevel, + setLevel, + isLevelEnabled, + mappings, + initialLsCache, + genLsCache, + assertNoLevelCollisions + } = require_levels(); + var { + asChindings, + asJson, + buildFormatters, + stringify + } = require_tools(); + var { + version + } = require_meta(); + var redaction = require_redaction(); + var constructor = class Pino { }; - const { authentication } = clientType === "oauth-app" ? await (0, import_oauth_methods.exchangeDeviceCode)({ - ...options, - clientType: "oauth-app" - }) : await (0, import_oauth_methods.exchangeDeviceCode)({ - ...options, - clientType: "github-app" - }); - return { - type: "token", - tokenType: "oauth", - ...authentication + var prototype = { + constructor, + child, + bindings, + setBindings, + flush: flush2, + isLevelEnabled, + version, + get level() { + return this[getLevelSym](); + }, + set level(lvl) { + this[setLevelSym](lvl); + }, + get levelVal() { + return this[levelValSym]; + }, + set levelVal(n) { + throw Error("levelVal is read-only"); + }, + [lsCacheSym]: initialLsCache, + [writeSym]: write, + [asJsonSym]: asJson, + [getLevelSym]: getLevel, + [setLevelSym]: setLevel }; - } catch (error) { - if (!error.response) - throw error; - const errorType = error.response.data.error; - if (errorType === "authorization_pending") { - await wait(verification.interval); - return waitForAccessToken(request, clientId, clientType, verification); + Object.setPrototypeOf(prototype, EventEmitter.prototype); + module2.exports = function() { + return Object.create(prototype); + }; + var resetChildingsFormatter = (bindings2) => bindings2; + function child(bindings2, options2) { + if (!bindings2) { + throw Error("missing bindings for child Pino"); + } + options2 = options2 || {}; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const instance = Object.create(this); + if (options2.hasOwnProperty("serializers") === true) { + instance[serializersSym] = /* @__PURE__ */ Object.create(null); + for (const k in serializers) { + instance[serializersSym][k] = serializers[k]; + } + const parentSymbols = Object.getOwnPropertySymbols(serializers); + for (var i = 0; i < parentSymbols.length; i++) { + const ks = parentSymbols[i]; + instance[serializersSym][ks] = serializers[ks]; + } + for (const bk in options2.serializers) { + instance[serializersSym][bk] = options2.serializers[bk]; + } + const bindingsSymbols = Object.getOwnPropertySymbols(options2.serializers); + for (var bi = 0; bi < bindingsSymbols.length; bi++) { + const bks = bindingsSymbols[bi]; + instance[serializersSym][bks] = options2.serializers[bks]; + } + } else instance[serializersSym] = serializers; + if (options2.hasOwnProperty("formatters")) { + const { level, bindings: chindings, log: log2 } = options2.formatters; + instance[formattersSym] = buildFormatters( + level || formatters.level, + chindings || resetChildingsFormatter, + log2 || formatters.log + ); + } else { + instance[formattersSym] = buildFormatters( + formatters.level, + resetChildingsFormatter, + formatters.log + ); + } + if (options2.hasOwnProperty("customLevels") === true) { + assertNoLevelCollisions(this.levels, options2.customLevels); + instance.levels = mappings(options2.customLevels, instance[useOnlyCustomLevelsSym]); + genLsCache(instance); + } + if (typeof options2.redact === "object" && options2.redact !== null || Array.isArray(options2.redact)) { + instance.redact = options2.redact; + const stringifiers = redaction(instance.redact, stringify); + const formatOpts = { stringify: stringifiers[redactFmtSym] }; + instance[stringifySym] = stringify; + instance[stringifiersSym] = stringifiers; + instance[formatOptsSym] = formatOpts; + } + if (typeof options2.msgPrefix === "string") { + instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options2.msgPrefix; + } + instance[chindingsSym] = asChindings(instance, bindings2); + const childLevel = options2.level || this.level; + instance[setLevelSym](childLevel); + this.onChild(instance); + return instance; + } + function bindings() { + const chindings = this[chindingsSym]; + const chindingsJson = `{${chindings.substr(1)}}`; + const bindingsFromJson = JSON.parse(chindingsJson); + delete bindingsFromJson.pid; + delete bindingsFromJson.hostname; + return bindingsFromJson; + } + function setBindings(newBindings) { + const chindings = asChindings(this, newBindings); + this[chindingsSym] = chindings; + delete this[parsedChindingsSym]; + } + function defaultMixinMergeStrategy(mergeObject, mixinObject) { + return Object.assign(mixinObject, mergeObject); + } + function write(_obj, msg, num) { + const t = this[timeSym](); + const mixin = this[mixinSym]; + const errorKey = this[errorKeySym]; + const messageKey = this[messageKeySym]; + const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy; + let obj; + if (_obj === void 0 || _obj === null) { + obj = {}; + } else if (_obj instanceof Error) { + obj = { [errorKey]: _obj }; + if (msg === void 0) { + msg = _obj.message; + } + } else { + obj = _obj; + if (msg === void 0 && _obj[messageKey] === void 0 && _obj[errorKey]) { + msg = _obj[errorKey].message; + } + } + if (mixin) { + obj = mixinMergeStrategy(obj, mixin(obj, num, this)); + } + const s = this[asJsonSym](obj, msg, num, t); + const stream = this[streamSym]; + if (stream[needsMetadataGsym] === true) { + stream.lastLevel = num; + stream.lastObj = obj; + stream.lastMsg = msg; + stream.lastTime = t.slice(this[timeSliceIndexSym]); + stream.lastLogger = this; + } + stream.write(s); } - if (errorType === "slow_down") { - await wait(verification.interval + 5); - return waitForAccessToken(request, clientId, clientType, verification); + function noop3() { + } + function flush2(cb) { + if (cb != null && typeof cb !== "function") { + throw Error("callback must be a function"); + } + const stream = this[streamSym]; + if (typeof stream.flush === "function") { + stream.flush(cb || noop3); + } else if (cb) cb(); } - throw error; } -} - -// pkg/dist-src/auth.js -async function auth(state, authOptions) { - return getOAuthAccessToken(state, { - auth: authOptions - }); -} +}); -// pkg/dist-src/hook.js -async function hook(state, request, route, parameters) { - let endpoint = request.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { - return request(endpoint); +// node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js +var require_safe_stable_stringify = __commonJS({ + "node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports2, module2) { + "use strict"; + var { hasOwnProperty: hasOwnProperty2 } = Object.prototype; + var stringify = configure(); + stringify.configure = configure; + stringify.stringify = stringify; + stringify.default = stringify; + exports2.stringify = stringify; + exports2.configure = configure; + module2.exports = stringify; + var strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/; + function strEscape(str2) { + if (str2.length < 5e3 && !strEscapeSequencesRegExp.test(str2)) { + return `"${str2}"`; + } + return JSON.stringify(str2); + } + function sort(array, comparator) { + if (array.length > 200 || comparator) { + return array.sort(comparator); + } + for (let i = 1; i < array.length; i++) { + const currentValue = array[i]; + let position = i; + while (position !== 0 && array[position - 1] > currentValue) { + array[position] = array[position - 1]; + position--; + } + array[position] = currentValue; + } + return array; + } + var typedArrayPrototypeGetSymbolToStringTag = Object.getOwnPropertyDescriptor( + Object.getPrototypeOf( + Object.getPrototypeOf( + new Int8Array() + ) + ), + Symbol.toStringTag + ).get; + function isTypedArrayWithEntries(value) { + return typedArrayPrototypeGetSymbolToStringTag.call(value) !== void 0 && value.length !== 0; + } + function stringifyTypedArray(array, separator, maximumBreadth) { + if (array.length < maximumBreadth) { + maximumBreadth = array.length; + } + const whitespace = separator === "," ? "" : " "; + let res = `"0":${whitespace}${array[0]}`; + for (let i = 1; i < maximumBreadth; i++) { + res += `${separator}"${i}":${whitespace}${array[i]}`; + } + return res; + } + function getCircularValueOption(options2) { + if (hasOwnProperty2.call(options2, "circularValue")) { + const circularValue = options2.circularValue; + if (typeof circularValue === "string") { + return `"${circularValue}"`; + } + if (circularValue == null) { + return circularValue; + } + if (circularValue === Error || circularValue === TypeError) { + return { + toString() { + throw new TypeError("Converting circular structure to JSON"); + } + }; + } + throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined'); + } + return '"[Circular]"'; + } + function getDeterministicOption(options2) { + let value; + if (hasOwnProperty2.call(options2, "deterministic")) { + value = options2.deterministic; + if (typeof value !== "boolean" && typeof value !== "function") { + throw new TypeError('The "deterministic" argument must be of type boolean or comparator function'); + } + } + return value === void 0 ? true : value; + } + function getBooleanOption(options2, key) { + let value; + if (hasOwnProperty2.call(options2, key)) { + value = options2[key]; + if (typeof value !== "boolean") { + throw new TypeError(`The "${key}" argument must be of type boolean`); + } + } + return value === void 0 ? true : value; + } + function getPositiveIntegerOption(options2, key) { + let value; + if (hasOwnProperty2.call(options2, key)) { + value = options2[key]; + if (typeof value !== "number") { + throw new TypeError(`The "${key}" argument must be of type number`); + } + if (!Number.isInteger(value)) { + throw new TypeError(`The "${key}" argument must be an integer`); + } + if (value < 1) { + throw new RangeError(`The "${key}" argument must be >= 1`); + } + } + return value === void 0 ? Infinity : value; + } + function getItemCount(number) { + if (number === 1) { + return "1 item"; + } + return `${number} items`; + } + function getUniqueReplacerSet(replacerArray) { + const replacerSet = /* @__PURE__ */ new Set(); + for (const value of replacerArray) { + if (typeof value === "string" || typeof value === "number") { + replacerSet.add(String(value)); + } + } + return replacerSet; + } + function getStrictOption(options2) { + if (hasOwnProperty2.call(options2, "strict")) { + const value = options2.strict; + if (typeof value !== "boolean") { + throw new TypeError('The "strict" argument must be of type boolean'); + } + if (value) { + return (value2) => { + let message = `Object can not safely be stringified. Received type ${typeof value2}`; + if (typeof value2 !== "function") message += ` (${value2.toString()})`; + throw new Error(message); + }; + } + } + } + function configure(options2) { + options2 = { ...options2 }; + const fail = getStrictOption(options2); + if (fail) { + if (options2.bigint === void 0) { + options2.bigint = false; + } + if (!("circularValue" in options2)) { + options2.circularValue = Error; + } + } + const circularValue = getCircularValueOption(options2); + const bigint = getBooleanOption(options2, "bigint"); + const deterministic = getDeterministicOption(options2); + const comparator = typeof deterministic === "function" ? deterministic : void 0; + const maximumDepth = getPositiveIntegerOption(options2, "maximumDepth"); + const maximumBreadth = getPositiveIntegerOption(options2, "maximumBreadth"); + function stringifyFnReplacer(key, parent, stack, replacer, spacer, indentation) { + let value = parent[key]; + if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { + value = value.toJSON(key); + } + value = replacer.call(parent, key, value); + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + let res = ""; + let join5 = ","; + const originalIndentation = indentation; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + if (spacer !== "") { + indentation += spacer; + res += ` +${indentation}`; + join5 = `, +${indentation}`; + } + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += join5; + } + const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`; + } + if (spacer !== "") { + res += ` +${originalIndentation}`; + } + stack.pop(); + return `[${res}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + let whitespace = ""; + let separator = ""; + if (spacer !== "") { + indentation += spacer; + join5 = `, +${indentation}`; + whitespace = " "; + } + const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (deterministic && !isTypedArrayWithEntries(value)) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`; + separator = join5; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`; + separator = join5; + } + if (spacer !== "" && separator.length > 1) { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifyArrayReplacer(key, value, stack, replacer, spacer, indentation) { + if (typeof value === "object" && value !== null && typeof value.toJSON === "function") { + value = value.toJSON(key); + } + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + const originalIndentation = indentation; + let res = ""; + let join5 = ","; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + if (spacer !== "") { + indentation += spacer; + res += ` +${indentation}`; + join5 = `, +${indentation}`; + } + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += join5; + } + const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `${join5}"... ${getItemCount(removedKeys)} not stringified"`; + } + if (spacer !== "") { + res += ` +${originalIndentation}`; + } + stack.pop(); + return `[${res}]`; + } + stack.push(value); + let whitespace = ""; + if (spacer !== "") { + indentation += spacer; + join5 = `, +${indentation}`; + whitespace = " "; + } + let separator = ""; + for (const key2 of replacer) { + const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`; + separator = join5; + } + } + if (spacer !== "" && separator.length > 1) { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifyIndent(key, value, stack, spacer, indentation) { + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (typeof value.toJSON === "function") { + value = value.toJSON(key); + if (typeof value !== "object") { + return stringifyIndent(key, value, stack, spacer, indentation); + } + if (value === null) { + return "null"; + } + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + const originalIndentation = indentation; + if (Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + indentation += spacer; + let res2 = ` +${indentation}`; + const join6 = `, +${indentation}`; + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation); + res2 += tmp2 !== void 0 ? tmp2 : "null"; + res2 += join6; + } + const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation); + res2 += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res2 += `${join6}"... ${getItemCount(removedKeys)} not stringified"`; + } + res2 += ` +${originalIndentation}`; + stack.pop(); + return `[${res2}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + indentation += spacer; + const join5 = `, +${indentation}`; + let res = ""; + let separator = ""; + let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (isTypedArrayWithEntries(value)) { + res += stringifyTypedArray(value, join5, maximumBreadth); + keys = keys.slice(value.length); + maximumPropertiesToStringify -= value.length; + separator = join5; + } + if (deterministic) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}: ${tmp}`; + separator = join5; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`; + separator = join5; + } + if (separator !== "") { + res = ` +${indentation}${res} +${originalIndentation}`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringifySimple(key, value, stack) { + switch (typeof value) { + case "string": + return strEscape(value); + case "object": { + if (value === null) { + return "null"; + } + if (typeof value.toJSON === "function") { + value = value.toJSON(key); + if (typeof value !== "object") { + return stringifySimple(key, value, stack); + } + if (value === null) { + return "null"; + } + } + if (stack.indexOf(value) !== -1) { + return circularValue; + } + let res = ""; + const hasLength = value.length !== void 0; + if (hasLength && Array.isArray(value)) { + if (value.length === 0) { + return "[]"; + } + if (maximumDepth < stack.length + 1) { + return '"[Array]"'; + } + stack.push(value); + const maximumValuesToStringify = Math.min(value.length, maximumBreadth); + let i = 0; + for (; i < maximumValuesToStringify - 1; i++) { + const tmp2 = stringifySimple(String(i), value[i], stack); + res += tmp2 !== void 0 ? tmp2 : "null"; + res += ","; + } + const tmp = stringifySimple(String(i), value[i], stack); + res += tmp !== void 0 ? tmp : "null"; + if (value.length - 1 > maximumBreadth) { + const removedKeys = value.length - maximumBreadth - 1; + res += `,"... ${getItemCount(removedKeys)} not stringified"`; + } + stack.pop(); + return `[${res}]`; + } + let keys = Object.keys(value); + const keyLength = keys.length; + if (keyLength === 0) { + return "{}"; + } + if (maximumDepth < stack.length + 1) { + return '"[Object]"'; + } + let separator = ""; + let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth); + if (hasLength && isTypedArrayWithEntries(value)) { + res += stringifyTypedArray(value, ",", maximumBreadth); + keys = keys.slice(value.length); + maximumPropertiesToStringify -= value.length; + separator = ","; + } + if (deterministic) { + keys = sort(keys, comparator); + } + stack.push(value); + for (let i = 0; i < maximumPropertiesToStringify; i++) { + const key2 = keys[i]; + const tmp = stringifySimple(key2, value[key2], stack); + if (tmp !== void 0) { + res += `${separator}${strEscape(key2)}:${tmp}`; + separator = ","; + } + } + if (keyLength > maximumBreadth) { + const removedKeys = keyLength - maximumBreadth; + res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"`; + } + stack.pop(); + return `{${res}}`; + } + case "number": + return isFinite(value) ? String(value) : fail ? fail(value) : "null"; + case "boolean": + return value === true ? "true" : "false"; + case "undefined": + return void 0; + case "bigint": + if (bigint) { + return String(value); + } + // fallthrough + default: + return fail ? fail(value) : void 0; + } + } + function stringify2(value, replacer, space) { + if (arguments.length > 1) { + let spacer = ""; + if (typeof space === "number") { + spacer = " ".repeat(Math.min(space, 10)); + } else if (typeof space === "string") { + spacer = space.slice(0, 10); + } + if (replacer != null) { + if (typeof replacer === "function") { + return stringifyFnReplacer("", { "": value }, [], replacer, spacer, ""); + } + if (Array.isArray(replacer)) { + return stringifyArrayReplacer("", value, [], getUniqueReplacerSet(replacer), spacer, ""); + } + } + if (spacer.length !== 0) { + return stringifyIndent("", value, [], spacer, ""); + } + } + return stringifySimple("", value, []); + } + return stringify2; + } } - const { token } = await getOAuthAccessToken(state, { - request, - auth: { type: "oauth" } - }); - endpoint.headers.authorization = `token ${token}`; - return request(endpoint); -} - -// pkg/dist-src/version.js -var VERSION = "6.1.0"; +}); -// pkg/dist-src/index.js -function createOAuthDeviceAuth(options) { - const requestWithDefaults = options.request || import_request.request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-device.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/multistream.js +var require_multistream = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/lib/multistream.js"(exports2, module2) { + "use strict"; + var metadata = Symbol.for("pino.metadata"); + var { DEFAULT_LEVELS } = require_constants(); + var DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info; + function multistream(streamsArray, opts) { + let counter = 0; + streamsArray = streamsArray || []; + opts = opts || { dedupe: false }; + const streamLevels = Object.create(DEFAULT_LEVELS); + streamLevels.silent = Infinity; + if (opts.levels && typeof opts.levels === "object") { + Object.keys(opts.levels).forEach((i) => { + streamLevels[i] = opts.levels[i]; + }); + } + const res = { + write, + add, + emit, + flushSync, + end: end2, + minLevel: 0, + streams: [], + clone, + [metadata]: true, + streamLevels + }; + if (Array.isArray(streamsArray)) { + streamsArray.forEach(add, res); + } else { + add.call(res, streamsArray); + } + streamsArray = null; + return res; + function write(data) { + let dest; + const level = this.lastLevel; + const { streams } = this; + let recordedLevel = 0; + let stream; + for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) { + dest = streams[i]; + if (dest.level <= level) { + if (recordedLevel !== 0 && recordedLevel !== dest.level) { + break; + } + stream = dest.stream; + if (stream[metadata]) { + const { lastTime, lastMsg, lastObj, lastLogger } = this; + stream.lastLevel = level; + stream.lastTime = lastTime; + stream.lastMsg = lastMsg; + stream.lastObj = lastObj; + stream.lastLogger = lastLogger; + } + stream.write(data); + if (opts.dedupe) { + recordedLevel = dest.level; + } + } else if (!opts.dedupe) { + break; + } + } + } + function emit(...args) { + for (const { stream } of this.streams) { + if (typeof stream.emit === "function") { + stream.emit(...args); + } + } + } + function flushSync() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + } + } + function add(dest) { + if (!dest) { + return res; + } + const isStream = typeof dest.write === "function" || dest.stream; + const stream_ = dest.write ? dest : dest.stream; + if (!isStream) { + throw Error("stream object needs to implement either StreamEntry or DestinationStream interface"); + } + const { streams, streamLevels: streamLevels2 } = this; + let level; + if (typeof dest.levelVal === "number") { + level = dest.levelVal; + } else if (typeof dest.level === "string") { + level = streamLevels2[dest.level]; + } else if (typeof dest.level === "number") { + level = dest.level; + } else { + level = DEFAULT_INFO_LEVEL; + } + const dest_ = { + stream: stream_, + level, + levelVal: void 0, + id: counter++ + }; + streams.unshift(dest_); + streams.sort(compareByLevel); + this.minLevel = streams[0].level; + return res; + } + function end2() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + stream.end(); + } + } + function clone(level) { + const streams = new Array(this.streams.length); + for (let i = 0; i < streams.length; i++) { + streams[i] = { + level, + stream: this.streams[i].stream + }; + } + return { + write, + add, + minLevel: level, + streams, + clone, + emit, + flushSync, + [metadata]: true + }; + } } - }); - const { request = requestWithDefaults, ...otherOptions } = options; - const state = options.clientType === "github-app" ? { - ...otherOptions, - clientType: "github-app", - request - } : { - ...otherOptions, - clientType: "oauth-app", - request, - scopes: options.scopes || [] - }; - if (!options.clientId) { - throw new Error( - '[@octokit/auth-oauth-device] "clientId" option must be set (https://github.com/octokit/auth-oauth-device.js#usage)' - ); - } - if (!options.onVerification) { - throw new Error( - '[@octokit/auth-oauth-device] "onVerification" option must be a function (https://github.com/octokit/auth-oauth-device.js#usage)' - ); + function compareByLevel(a, b) { + return a.level - b.level; + } + function initLoopVar(length, dedupe) { + return dedupe ? length - 1 : 0; + } + function adjustLoopVar(i, dedupe) { + return dedupe ? i - 1 : i + 1; + } + function checkLoopVar(i, length, dedupe) { + return dedupe ? i >= 0 : i < length; + } + module2.exports = multistream; } - return Object.assign(auth.bind(null, state), { - hook: hook.bind(null, state) - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 29801: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +}); -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/pino@9.5.0/node_modules/pino/pino.js +var require_pino = __commonJS({ + "node_modules/.pnpm/pino@9.5.0/node_modules/pino/pino.js"(exports2, module2) { + "use strict"; + var os3 = __require("node:os"); + var stdSerializers = require_pino_std_serializers(); + var caller = require_caller(); + var redaction = require_redaction(); + var time = require_time(); + var proto = require_proto(); + var symbols = require_symbols(); + var { configure } = require_safe_stable_stringify(); + var { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = require_levels(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants(); + var { + createArgsNormalizer, + asChindings, + buildSafeSonicBoom, + buildFormatters, + stringify, + normalizeDestFileDescriptor, + noop: noop3 + } = require_tools(); + var { version } = require_meta(); + var { + chindingsSym, + redactFmtSym, + serializersSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + setLevelSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + mixinSym, + levelCompSym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + } = symbols; + var { epochTime, nullTime } = time; + var { pid } = process; + var hostname2 = os3.hostname(); + var defaultErrorSerializer = stdSerializers.err; + var defaultOptions = { + level: "info", + levelComparison: SORTING_ORDER.ASC, + levels: DEFAULT_LEVELS, + messageKey: "msg", + errorKey: "err", + nestedKey: null, + enabled: true, + base: { pid, hostname: hostname2 }, + serializers: Object.assign(/* @__PURE__ */ Object.create(null), { + err: defaultErrorSerializer + }), + formatters: Object.assign(/* @__PURE__ */ Object.create(null), { + bindings(bindings) { + return bindings; + }, + level(label, number) { + return { level: number }; + } + }), + hooks: { + logMethod: void 0 + }, + timestamp: epochTime, + name: void 0, + redact: null, + customLevels: null, + useOnlyCustomLevels: false, + depthLimit: 5, + edgeLimit: 100 + }; + var normalize2 = createArgsNormalizer(defaultOptions); + var serializers = Object.assign(/* @__PURE__ */ Object.create(null), stdSerializers); + function pino3(...args) { + const instance = {}; + const { opts, stream } = normalize2(instance, caller(), ...args); + if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0) opts.level = opts.level.toLowerCase(); + const { + redact, + crlf, + serializers: serializers2, + timestamp: timestamp2, + messageKey, + errorKey, + nestedKey, + base, + name, + level, + customLevels, + levelComparison, + mixin, + mixinMergeStrategy, + useOnlyCustomLevels, + formatters, + hooks, + depthLimit, + edgeLimit, + onChild, + msgPrefix + } = opts; + const stringifySafe = configure({ + maximumDepth: depthLimit, + maximumBreadth: edgeLimit + }); + const allFormatters = buildFormatters( + formatters.level, + formatters.bindings, + formatters.log + ); + const stringifyFn = stringify.bind({ + [stringifySafeSym]: stringifySafe + }); + const stringifiers = redact ? redaction(redact, stringifyFn) : {}; + const formatOpts = redact ? { stringify: stringifiers[redactFmtSym] } : { stringify: stringifyFn }; + const end2 = "}" + (crlf ? "\r\n" : "\n"); + const coreChindings = asChindings.bind(null, { + [chindingsSym]: "", + [serializersSym]: serializers2, + [stringifiersSym]: stringifiers, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [formattersSym]: allFormatters + }); + let chindings = ""; + if (base !== null) { + if (name === void 0) { + chindings = coreChindings(base); + } else { + chindings = coreChindings(Object.assign({}, base, { name })); + } + } + const time2 = timestamp2 instanceof Function ? timestamp2 : timestamp2 ? epochTime : nullTime; + const timeSliceIndex = time2().indexOf(":") + 1; + if (useOnlyCustomLevels && !customLevels) throw Error("customLevels is required if useOnlyCustomLevels is set true"); + if (mixin && typeof mixin !== "function") throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`); + if (msgPrefix && typeof msgPrefix !== "string") throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`); + assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels); + const levels = mappings(customLevels, useOnlyCustomLevels); + if (typeof stream.emit === "function") { + stream.emit("message", { code: "PINO_CONFIG", config: { levels, messageKey, errorKey } }); + } + assertLevelComparison(levelComparison); + const levelCompFunc = genLevelComparison(levelComparison); + Object.assign(instance, { + levels, + [levelCompSym]: levelCompFunc, + [useOnlyCustomLevelsSym]: useOnlyCustomLevels, + [streamSym]: stream, + [timeSym]: time2, + [timeSliceIndexSym]: timeSliceIndex, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [stringifiersSym]: stringifiers, + [endSym]: end2, + [formatOptsSym]: formatOpts, + [messageKeySym]: messageKey, + [errorKeySym]: errorKey, + [nestedKeySym]: nestedKey, + // protect against injection + [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : "", + [serializersSym]: serializers2, + [mixinSym]: mixin, + [mixinMergeStrategySym]: mixinMergeStrategy, + [chindingsSym]: chindings, + [formattersSym]: allFormatters, + [hooksSym]: hooks, + silent: noop3, + onChild, + [msgPrefixSym]: msgPrefix + }); + Object.setPrototypeOf(instance, proto()); + genLsCache(instance); + instance[setLevelSym](level); + return instance; + } + module2.exports = pino3; + module2.exports.destination = (dest = process.stdout.fd) => { + if (typeof dest === "object") { + dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd); + return buildSafeSonicBoom(dest); + } else { + return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 }); + } + }; + module2.exports.transport = require_transport(); + module2.exports.multistream = require_multistream(); + module2.exports.levels = mappings(); + module2.exports.stdSerializers = serializers; + module2.exports.stdTimeFunctions = Object.assign({}, time); + module2.exports.symbols = symbols; + module2.exports.version = version; + module2.exports.default = pino3; + module2.exports.pino = pino3; } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +}); -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createOAuthUserAuth: () => createOAuthUserAuth, - requiresBasicAuth: () => requiresBasicAuth +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = __require("stream"); + } }); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(59279); -var import_request = __nccwpck_require__(27382); -// pkg/dist-src/version.js -var VERSION = "4.1.0"; +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js +var require_buffer_list = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) { + "use strict"; + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { writable: false }); + return Constructor; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var _require = __require("buffer"); + var Buffer3 = _require.Buffer; + var _require2 = __require("util"); + var inspect2 = _require2.inspect; + var custom = inspect2 && inspect2.custom || "inspect"; + function copyBuffer(src, target, offset) { + Buffer3.prototype.copy.call(src, target, offset); + } + module2.exports = /* @__PURE__ */ function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + _createClass(BufferList, [{ + key: "push", + value: function push(v) { + var entry = { + data: v, + next: null + }; + if (this.length > 0) this.tail.next = entry; + else this.head = entry; + this.tail = entry; + ++this.length; + } + }, { + key: "unshift", + value: function unshift(v) { + var entry = { + data: v, + next: this.head + }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + } + }, { + key: "shift", + value: function shift() { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null; + else this.head = this.head.next; + --this.length; + return ret; + } + }, { + key: "clear", + value: function clear() { + this.head = this.tail = null; + this.length = 0; + } + }, { + key: "join", + value: function join5(s) { + if (this.length === 0) return ""; + var p = this.head; + var ret = "" + p.data; + while (p = p.next) ret += s + p.data; + return ret; + } + }, { + key: "concat", + value: function concat(n) { + if (this.length === 0) return Buffer3.alloc(0); + var ret = Buffer3.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret, i); + i += p.data.length; + p = p.next; + } + return ret; + } + // Consumes a specified amount of bytes or characters from the buffered data. + }, { + key: "consume", + value: function consume(n, hasStrings) { + var ret; + if (n < this.head.data.length) { + ret = this.head.data.slice(0, n); + this.head.data = this.head.data.slice(n); + } else if (n === this.head.data.length) { + ret = this.shift(); + } else { + ret = hasStrings ? this._getString(n) : this._getBuffer(n); + } + return ret; + } + }, { + key: "first", + value: function first() { + return this.head.data; + } + // Consumes a specified amount of characters from the buffered data. + }, { + key: "_getString", + value: function _getString(n) { + var p = this.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str2 = p.data; + var nb = n > str2.length ? str2.length : n; + if (nb === str2.length) ret += str2; + else ret += str2.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str2.length) { + ++c; + if (p.next) this.head = p.next; + else this.head = this.tail = null; + } else { + this.head = p; + p.data = str2.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + // Consumes a specified amount of bytes from the buffered data. + }, { + key: "_getBuffer", + value: function _getBuffer(n) { + var ret = Buffer3.allocUnsafe(n); + var p = this.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) this.head = p.next; + else this.head = this.tail = null; + } else { + this.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + this.length -= c; + return ret; + } + // Make sure the linked list only shows the minimal necessary information. + }, { + key: custom, + value: function value(_, options2) { + return inspect2(this, _objectSpread(_objectSpread({}, options2), {}, { + // Only inspect one level. + depth: 0, + // It should not recurse. + customInspect: false + })); + } + }]); + return BufferList; + }(); + } +}); -// pkg/dist-src/get-authentication.js -var import_auth_oauth_device = __nccwpck_require__(38487); -var import_oauth_methods = __nccwpck_require__(87813); -async function getAuthentication(state) { - if ("code" in state.strategyOptions) { - const { authentication } = await (0, import_oauth_methods.exchangeWebFlowCode)({ - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request - }); - return { - type: "token", - tokenType: "oauth", - ...authentication +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + process.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + process.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + process.nextTick(emitErrorAndCloseNT, _this, err2); + } else { + process.nextTick(emitCloseNT, _this); + } + } else if (cb) { + process.nextTick(emitCloseNT, _this); + cb(err2); + } else { + process.nextTick(emitCloseNT, _this); + } + }); + return this; + } + function emitErrorAndCloseNT(self2, err) { + emitErrorNT(self2, err); + emitCloseNT(self2); + } + function emitCloseNT(self2) { + if (self2._writableState && !self2._writableState.emitClose) return; + if (self2._readableState && !self2._readableState.emitClose) return; + self2.emit("close"); + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + function errorOrDestroy(stream, err) { + var rState = stream._readableState; + var wState = stream._writableState; + if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err); + else stream.emit("error", err); + } + module2.exports = { + destroy, + undestroy, + errorOrDestroy }; } - if ("onVerification" in state.strategyOptions) { - const deviceAuth = (0, import_auth_oauth_device.createOAuthDeviceAuth)({ - clientType: state.clientType, - clientId: state.clientId, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions, - request: state.request +}); + +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js +var require_errors = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/errors.js"(exports2, module2) { + "use strict"; + var codes = {}; + function createErrorType(code, message, Base) { + if (!Base) { + Base = Error; + } + function getMessage(arg1, arg2, arg3) { + if (typeof message === "string") { + return message; + } else { + return message(arg1, arg2, arg3); + } + } + class NodeError extends Base { + constructor(arg1, arg2, arg3) { + super(getMessage(arg1, arg2, arg3)); + } + } + NodeError.prototype.name = Base.name; + NodeError.prototype.code = code; + codes[code] = NodeError; + } + function oneOf(expected, thing) { + if (Array.isArray(expected)) { + const len = expected.length; + expected = expected.map((i) => String(i)); + if (len > 2) { + return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1]; + } else if (len === 2) { + return `one of ${thing} ${expected[0]} or ${expected[1]}`; + } else { + return `of ${thing} ${expected[0]}`; + } + } else { + return `of ${thing} ${String(expected)}`; + } + } + function startsWith(str2, search, pos) { + return str2.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + } + function endsWith(str2, search, this_len) { + if (this_len === void 0 || this_len > str2.length) { + this_len = str2.length; + } + return str2.substring(this_len - search.length, this_len) === search; + } + function includes(str2, search, start) { + if (typeof start !== "number") { + start = 0; + } + if (start + search.length > str2.length) { + return false; + } else { + return str2.indexOf(search, start) !== -1; + } + } + createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) { + return 'The value "' + value + '" is invalid for option "' + name + '"'; + }, TypeError); + createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) { + let determiner; + if (typeof expected === "string" && startsWith(expected, "not ")) { + determiner = "must not be"; + expected = expected.replace(/^not /, ""); + } else { + determiner = "must be"; + } + let msg; + if (endsWith(name, " argument")) { + msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`; + } else { + const type2 = includes(name, ".") ? "property" : "argument"; + msg = `The "${name}" ${type2} ${determiner} ${oneOf(expected, "type")}`; + } + msg += `. Received type ${typeof actual}`; + return msg; + }, TypeError); + createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"); + createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) { + return "The " + name + " method is not implemented"; }); - const authentication = await deviceAuth({ - type: "oauth" + createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close"); + createErrorType("ERR_STREAM_DESTROYED", function(name) { + return "Cannot call " + name + " after a stream was destroyed"; }); - return { - clientSecret: state.clientSecret, - ...authentication - }; + createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"); + createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"); + createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end"); + createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError); + createErrorType("ERR_UNKNOWN_ENCODING", function(arg) { + return "Unknown encoding: " + arg; + }, TypeError); + createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event"); + module2.exports.codes = codes; } - if ("token" in state.strategyOptions) { - return { - type: "token", - tokenType: "oauth", - clientId: state.clientId, - clientSecret: state.clientSecret, - clientType: state.clientType, - onTokenCreated: state.onTokenCreated, - ...state.strategyOptions +}); + +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js +var require_state2 = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) { + "use strict"; + var ERR_INVALID_OPT_VALUE = require_errors().codes.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom(options2, isDuplex, duplexKey) { + return options2.highWaterMark != null ? options2.highWaterMark : isDuplex ? options2[duplexKey] : null; + } + function getHighWaterMark(state, options2, duplexKey, isDuplex) { + var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey); + if (hwm != null) { + if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { + var name = isDuplex ? duplexKey : "highWaterMark"; + throw new ERR_INVALID_OPT_VALUE(name, hwm); + } + return Math.floor(hwm); + } + return state.objectMode ? 16 : 16 * 1024; + } + module2.exports = { + getHighWaterMark }; } - throw new Error("[@octokit/auth-oauth-user] Invalid strategy options"); -} +}); -// pkg/dist-src/auth.js -var import_oauth_methods2 = __nccwpck_require__(87813); -async function auth(state, options = {}) { - var _a, _b; - if (!state.authentication) { - state.authentication = state.clientType === "oauth-app" ? await getAuthentication(state) : await getAuthentication(state); - } - if (state.authentication.invalid) { - throw new Error("[@octokit/auth-oauth-user] Token is invalid"); - } - const currentAuthentication = state.authentication; - if ("expiresAt" in currentAuthentication) { - if (options.type === "refresh" || new Date(currentAuthentication.expiresAt) < /* @__PURE__ */ new Date()) { - const { authentication } = await (0, import_oauth_methods2.refreshToken)({ - clientType: "github-app", - clientId: state.clientId, - clientSecret: state.clientSecret, - refreshToken: currentAuthentication.refreshToken, - request: state.request - }); - state.authentication = { - tokenType: "oauth", - type: "token", - ...authentication +// node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + } + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + } }; } } - if (options.type === "refresh") { - if (state.clientType === "oauth-app") { - throw new Error( - "[@octokit/auth-oauth-user] OAuth Apps do not support expiring tokens" - ); - } - if (!currentAuthentication.hasOwnProperty("expiresAt")) { - throw new Error("[@octokit/auth-oauth-user] Refresh token missing"); +}); + +// node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js"(exports2, module2) { + try { + util2 = __require("util"); + if (typeof util2.inherits !== "function") throw ""; + module2.exports = util2.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); } - await ((_a = state.onTokenCreated) == null ? void 0 : _a.call(state, state.authentication, { - type: options.type - })); + var util2; } - if (options.type === "check" || options.type === "reset") { - const method = options.type === "check" ? import_oauth_methods2.checkToken : import_oauth_methods2.resetToken; - try { - const { authentication } = await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request +}); + +// node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js +var require_node = __commonJS({ + "node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/node.js"(exports2, module2) { + module2.exports = __require("util").deprecate; + } +}); + +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var Duplex; + Writable.WritableState = WritableState; + var internalUtil = { + deprecate: require_node() + }; + var Stream = require_stream(); + var Buffer3 = __require("buffer").Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer3.from(chunk); + } + function _isUint8Array(obj) { + return Buffer3.isBuffer(obj) || obj instanceof OurUint8Array; + } + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES; + var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END; + var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + var errorOrDestroy = destroyImpl.errorOrDestroy; + require_inherits()(Writable, Stream); + function nop() { + } + function WritableState(options2, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options2 = options2 || {}; + if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; + this.objectMode = !!options2.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options2.writableObjectMode; + this.highWaterMark = getHighWaterMark(this, options2, "writableHighWaterMark", isDuplex); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options2.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options2.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.emitClose = options2.emitClose !== false; + this.autoDestroy = !!options2.autoDestroy; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function writableStateBufferGetter() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function value(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } }); - state.authentication = { - tokenType: "oauth", - type: "token", - // @ts-expect-error TBD - ...authentication + } else { + realHasInstance = function realHasInstance2(object) { + return object instanceof this; }; - if (options.type === "reset") { - await ((_b = state.onTokenCreated) == null ? void 0 : _b.call(state, state.authentication, { - type: options.type - })); + } + function Writable(options2) { + Duplex = Duplex || require_stream_duplex(); + var isDuplex = this instanceof Duplex; + if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options2); + this._writableState = new WritableState(options2, this, isDuplex); + this.writable = true; + if (options2) { + if (typeof options2.write === "function") this._write = options2.write; + if (typeof options2.writev === "function") this._writev = options2.writev; + if (typeof options2.destroy === "function") this._destroy = options2.destroy; + if (typeof options2.final === "function") this._final = options2.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); + }; + function writeAfterEnd(stream, cb) { + var er = new ERR_STREAM_WRITE_AFTER_END(); + errorOrDestroy(stream, er); + process.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var er; + if (chunk === null) { + er = new ERR_STREAM_NULL_VALUES(); + } else if (typeof chunk !== "string" && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk); } - return state.authentication; - } catch (error) { - if (error.status === 404) { - error.message = "[@octokit/auth-oauth-user] Token is invalid"; - state.authentication.invalid = true; + if (er) { + errorOrDestroy(stream, er); + process.nextTick(cb, er); + return false; } - throw error; + return true; } - } - if (options.type === "delete" || options.type === "deleteAuthorization") { - const method = options.type === "delete" ? import_oauth_methods2.deleteToken : import_oauth_methods2.deleteAuthorization; - try { - await method({ - // @ts-expect-error making TS happy would require unnecessary code so no - clientType: state.clientType, - clientId: state.clientId, - clientSecret: state.clientSecret, - token: state.authentication.token, - request: state.request - }); - } catch (error) { - if (error.status !== 404) - throw error; + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer3.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = "buffer"; + else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== "function") cb = nop; + if (state.ending) writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret; + }; + Writable.prototype.cork = function() { + this._writableState.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + Object.defineProperty(Writable.prototype, "writableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer3.from(chunk, encoding); + } + return chunk; } - state.authentication.invalid = true; - return state.authentication; - } - return state.authentication; -} - -// pkg/dist-src/hook.js -var import_btoa_lite = __toESM(__nccwpck_require__(95432)); - -// pkg/dist-src/requires-basic-auth.js -var ROUTES_REQUIRING_BASIC_AUTH = /\/applications\/[^/]+\/(token|grant)s?/; -function requiresBasicAuth(url) { - return url && ROUTES_REQUIRING_BASIC_AUTH.test(url); -} - -// pkg/dist-src/hook.js -async function hook(state, request, route, parameters = {}) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - if (/\/login\/(oauth\/access_token|device\/code)$/.test(endpoint.url)) { - return request(endpoint); - } - if (requiresBasicAuth(endpoint.url)) { - const credentials = (0, import_btoa_lite.default)(`${state.clientId}:${state.clientSecret}`); - endpoint.headers.authorization = `basic ${credentials}`; - return request(endpoint); - } - const { token } = state.clientType === "oauth-app" ? await auth({ ...state, request }) : await auth({ ...state, request }); - endpoint.headers.authorization = "token " + token; - return request(endpoint); -} - -// pkg/dist-src/index.js -function createOAuthUserAuth({ - clientId, - clientSecret, - clientType = "oauth-app", - request = import_request.request.defaults({ - headers: { - "user-agent": `octokit-auth-oauth-app.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret = state.length < state.highWaterMark; + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret; } - }), - onTokenCreated, - ...strategyOptions -}) { - const state = Object.assign({ - clientType, - clientId, - clientSecret, - onTokenCreated, - strategyOptions, - request - }); - return Object.assign(auth.bind(null, state), { - // @ts-expect-error not worth the extra code needed to appease TS - hook: hook.bind(null, state) - }); -} -createOAuthUserAuth.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 96602: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createTokenAuth: () => createTokenAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -var REGEX_IS_INSTALLATION = /^ghs_/; -var REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token, - tokenType - }; -} - -// pkg/dist-src/with-authorization-prefix.js -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - return `token ${token}`; -} - -// pkg/dist-src/hook.js -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -// pkg/dist-src/index.js -var createTokenAuth = function createTokenAuth2(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - if (typeof token !== "string") { - throw new Error( - "[@octokit/auth-token] Token passed to createTokenAuth is not a string" - ); - } - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 49788: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - createUnauthenticatedAuth: () => createUnauthenticatedAuth -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/auth.js -async function auth(reason) { - return { - type: "unauthenticated", - reason - }; -} - -// pkg/dist-src/is-rate-limit-error.js -var import_request_error = __nccwpck_require__(2534); -function isRateLimitError(error) { - if (error.status !== 403) { - return false; - } - if (!error.response) { - return false; - } - return error.response.headers["x-ratelimit-remaining"] === "0"; -} - -// pkg/dist-src/is-abuse-limit-error.js -var import_request_error2 = __nccwpck_require__(2534); -var REGEX_ABUSE_LIMIT_MESSAGE = /\babuse\b/i; -function isAbuseLimitError(error) { - if (error.status !== 403) { - return false; - } - return REGEX_ABUSE_LIMIT_MESSAGE.test(error.message); -} - -// pkg/dist-src/hook.js -async function hook(reason, request, route, parameters) { - const endpoint = request.endpoint.merge( - route, - parameters - ); - return request(endpoint).catch((error) => { - if (error.status === 404) { - error.message = `Not found. May be due to lack of authentication. Reason: ${reason}`; - throw error; + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED("write")); + else if (writev) stream._writev(chunk, state.onwrite); + else stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + process.nextTick(cb, er); + process.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + errorOrDestroy(stream, er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK(); + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + process.nextTick(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; } - if (isRateLimitError(error)) { - error.message = `API rate limit exceeded. This maybe caused by the lack of authentication. Reason: ${reason}`; - throw error; + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) endWritable(this, state, cb); + return this; + }; + Object.defineProperty(Writable.prototype, "writableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } - if (isAbuseLimitError(error)) { - error.message = `You have triggered an abuse detection mechanism. This maybe caused by the lack of authentication. Reason: ${reason}`; - throw error; + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + errorOrDestroy(stream, err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); } - if (error.status === 401) { - error.message = `Unauthorized. "${endpoint.method} ${endpoint.url}" failed most likely due to lack of authentication. Reason: ${reason}`; - throw error; + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function" && !state.destroyed) { + state.pendingcb++; + state.finalCalled = true; + process.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + if (state.autoDestroy) { + var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { + stream.destroy(); + } + } + } + } + return need; } - if (error.status >= 400 && error.status < 500) { - error.message = error.message.replace( - /\.?$/, - `. May be caused by lack of authentication (${reason}).` - ); + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) process.nextTick(cb); + else stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; } - throw error; - }); -} - -// pkg/dist-src/index.js -var createUnauthenticatedAuth = function createUnauthenticatedAuth2(options) { - if (!options || !options.reason) { - throw new Error( - "[@octokit/auth-unauthenticated] No reason passed to createUnauthenticatedAuth" - ); + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function set3(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + cb(err); + }; } - return Object.assign(auth.bind(null, options.reason), { - hook: hook.bind(null, options.reason) - }); -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 76407: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var objectKeys = Object.keys || function(obj) { + var keys2 = []; + for (var key in obj) keys2.push(key); + return keys2; + }; + module2.exports = Duplex; + var Readable2 = require_stream_readable(); + var Writable = require_stream_writable(); + require_inherits()(Duplex, Readable2); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options2) { + if (!(this instanceof Duplex)) return new Duplex(options2); + Readable2.call(this, options2); + Writable.call(this, options2); + this.allowHalfOpen = true; + if (options2) { + if (options2.readable === false) this.readable = false; + if (options2.writable === false) this.writable = false; + if (options2.allowHalfOpen === false) { + this.allowHalfOpen = false; + this.once("end", onend); + } + } + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.highWaterMark; + } + }); + Object.defineProperty(Duplex.prototype, "writableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState && this._writableState.getBuffer(); + } + }); + Object.defineProperty(Duplex.prototype, "writableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._writableState.length; + } + }); + function onend() { + if (this._writableState.ended) return; + process.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function set3(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Octokit: () => Octokit }); -module.exports = __toCommonJS(dist_src_exports); -var import_universal_user_agent = __nccwpck_require__(59279); -var import_before_after_hook = __nccwpck_require__(48841); -var import_request = __nccwpck_require__(27382); -var import_graphql = __nccwpck_require__(85432); -var import_auth_token = __nccwpck_require__(96602); -// pkg/dist-src/version.js -var VERSION = "5.2.0"; - -// pkg/dist-src/index.js -var noop = () => { -}; -var consoleWarn = console.warn.bind(console); -var consoleError = console.error.bind(console); -var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var Octokit = class { - static { - this.VERSION = VERSION; - } - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - if (typeof defaults === "function") { - super(defaults(options)); - return; +// node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js +var require_safe_buffer = __commonJS({ + "node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = __require("buffer"); + var Buffer3 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer3.from && Buffer3.alloc && Buffer3.allocUnsafe && Buffer3.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer3(arg, encodingOrOffset, length); + } + SafeBuffer.prototype = Object.create(Buffer3.prototype); + copyProps(Buffer3, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer3(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill2, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer3(size); + if (fill2 !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill2, encoding); + } else { + buf.fill(fill2); } - super( - Object.assign( - {}, - defaults, - options, - options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null - ) - ); + } else { + buf.fill(0); } + return buf; }; - return OctokitWithDefaults; - } - static { - this.plugins = []; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - static plugin(...newPlugins) { - const currentPlugins = this.plugins; - const NewOctokit = class extends this { - static { - this.plugins = currentPlugins.concat( - newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) - ); + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); } + return Buffer3(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); }; - return NewOctokit; } - constructor(options = {}) { - const hook = new import_before_after_hook.Collection(); - const requestDefaults = { - baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" +}); + +// node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder = __commonJS({ + "node_modules/.pnpm/string_decoder@1.3.0/node_modules/string_decoder/lib/string_decoder.js"(exports2) { + "use strict"; + var Buffer3 = require_safe_buffer().Buffer; + var isEncoding = Buffer3.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer3.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports2.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer3.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; }; - requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return byte >> 6 === 2 ? -1 : -2; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD"; + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD"; + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD"; + } + } + } } - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end2 = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end2); + return buf.toString("utf8", i, end2); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD"; + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); } - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end2 = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end2); + } + return r; } - this.request = import_request.request.defaults(requestDefaults); - this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); - this.log = Object.assign( - { - debug: noop, - info: noop, - warn: consoleWarn, - error: consoleError - }, - options.log - ); - this.hook = hook; - if (!options.authStrategy) { - if (!options.auth) { - this.auth = async () => ({ - type: "unauthenticated" - }); + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; } else { - const auth = (0, import_auth_token.createTokenAuth)(options.auth); - hook.wrap("request", auth.hook); - this.auth = auth; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; } - } else { - const { authStrategy, ...otherOptions } = options; - const auth = authStrategy( - Object.assign( - { - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, - options.auth - ) - ); - hook.wrap("request", auth.hook); - this.auth = auth; + return buf.toString("base64", i, buf.length - n); } - const classConstructor = this.constructor; - for (let i = 0; i < classConstructor.plugins.length; ++i) { - Object.assign(this, classConstructor.plugins[i](this, options)); + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; } } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 69284: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - endpoint: () => endpoint }); -module.exports = __toCommonJS(dist_src_exports); -// pkg/dist-src/defaults.js -var import_universal_user_agent = __nccwpck_require__(59279); - -// pkg/dist-src/version.js -var VERSION = "9.0.5"; - -// pkg/dist-src/defaults.js -var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; -var DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "" - } -}; - -// pkg/dist-src/util/lowercase-keys.js -function lowercaseKeys(object) { - if (!object) { - return {}; - } - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -// pkg/dist-src/util/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/util/merge-deep.js -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach((key) => { - if (isPlainObject(options[key])) { - if (!(key in defaults)) - Object.assign(result, { [key]: options[key] }); - else - result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { [key]: options[key] }); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +var require_end_of_stream = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { + "use strict"; + var ERR_STREAM_PREMATURE_CLOSE = require_errors().codes.ERR_STREAM_PREMATURE_CLOSE; + function once2(callback) { + var called = false; + return function() { + if (called) return; + called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + callback.apply(this, args); + }; } - }); - return result; -} - -// pkg/dist-src/util/remove-undefined-properties.js -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === void 0) { - delete obj[key]; + function noop3() { } - } - return obj; -} - -// pkg/dist-src/merge.js -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); - } else { - options = Object.assign({}, route); - } - options.headers = lowercaseKeys(options.headers); - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); - if (options.url === "/graphql") { - if (defaults && defaults.mediaType.previews?.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( - (preview) => !mergedOptions.mediaType.previews.includes(preview) - ).concat(mergedOptions.mediaType.previews); + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; } - mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); - } - return mergedOptions; -} - -// pkg/dist-src/util/add-query-parameters.js -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - if (names.length === 0) { - return url; - } - return url + separator + names.map((name) => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + function eos(stream, opts, callback) { + if (typeof opts === "function") return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once2(callback || noop3); + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish2() { + if (!stream.writable) onfinish(); + }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish2() { + writable = false; + writableEnded = true; + if (!readable) callback.call(stream); + }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend2() { + readable = false; + readableEnded = true; + if (!writable) callback.call(stream); + }; + var onerror = function onerror2(err) { + callback.call(stream, err); + }; + var onclose = function onclose2() { + var err; + if (readable && !readableEnded) { + if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + if (writable && !writableEnded) { + if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); + return callback.call(stream, err); + } + }; + var onrequest = function onrequest2() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) onrequest(); + else stream.on("request", onrequest); + } else if (writable && !stream._writableState) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) stream.on("error", onerror); + stream.on("close", onclose); + return function() { + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; } - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -// pkg/dist-src/util/extract-url-variable-names.js -var urlVariableRegex = /\{[^}]+\}/g; -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - if (!matches) { - return []; + module2.exports = eos; } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} +}); -// pkg/dist-src/util/omit.js -function omit(object, keysToOmit) { - const result = { __proto__: null }; - for (const key of Object.keys(object)) { - if (keysToOmit.indexOf(key) === -1) { - result[key] = object[key]; +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js +var require_async_iterator = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { + "use strict"; + var _Object$setPrototypeO; + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var finished = require_end_of_stream(); + var kLastResolve = Symbol("lastResolve"); + var kLastReject = Symbol("lastReject"); + var kError = Symbol("error"); + var kEnded = Symbol("ended"); + var kLastPromise = Symbol("lastPromise"); + var kHandlePromise = Symbol("handlePromise"); + var kStream = Symbol("stream"); + function createIterResult(value, done) { + return { + value, + done + }; } - } - return result; -} - -// pkg/dist-src/util/url-template.js -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + function readAndResolve(iter) { + var resolve4 = iter[kLastResolve]; + if (resolve4 !== null) { + var data = iter[kStream].read(); + if (data !== null) { + iter[kLastPromise] = null; + iter[kLastResolve] = null; + iter[kLastReject] = null; + resolve4(createIterResult(data, false)); + } + } } - return part; - }).join(""); -} -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} -function isDefined(value) { - return value !== void 0 && value !== null; -} -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} -function getValues(context, operator, key, modifier) { - var value = context[key], result = []; - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - result.push( - encodeValue(operator, value, isKeyOperator(operator) ? key : "") - ); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - result.push( - encodeValue(operator, value2, isKeyOperator(operator) ? key : "") - ); + function onReadable(iter) { + process.nextTick(readAndResolve, iter); + } + function wrapForNext(lastPromise, iter) { + return function(resolve4, reject) { + lastPromise.then(function() { + if (iter[kEnded]) { + resolve4(createIterResult(void 0, true)); + return; + } + iter[kHandlePromise](resolve4, reject); + }, reject); + }; + } + var AsyncIteratorPrototype = Object.getPrototypeOf(function() { + }); + var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { + get stream() { + return this[kStream]; + }, + next: function next() { + var _this = this; + var error = this[kError]; + if (error !== null) { + return Promise.reject(error); + } + if (this[kEnded]) { + return Promise.resolve(createIterResult(void 0, true)); + } + if (this[kStream].destroyed) { + return new Promise(function(resolve4, reject) { + process.nextTick(function() { + if (_this[kError]) { + reject(_this[kError]); + } else { + resolve4(createIterResult(void 0, true)); + } + }); }); + } + var lastPromise = this[kLastPromise]; + var promise; + if (lastPromise) { + promise = new Promise(wrapForNext(lastPromise, this)); } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); + var data = this[kStream].read(); + if (data !== null) { + return Promise.resolve(createIterResult(data, false)); + } + promise = new Promise(this[kHandlePromise]); + } + this[kLastPromise] = promise; + return promise; + } + }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() { + return this; + }), _defineProperty(_Object$setPrototypeO, "return", function _return() { + var _this2 = this; + return new Promise(function(resolve4, reject) { + _this2[kStream].destroy(null, function(err) { + if (err) { + reject(err); + return; + } + resolve4(createIterResult(void 0, true)); + }); + }); + }), _Object$setPrototypeO), AsyncIteratorPrototype); + var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) { + var _Object$create; + var iterator2 = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { + value: stream, + writable: true + }), _defineProperty(_Object$create, kLastResolve, { + value: null, + writable: true + }), _defineProperty(_Object$create, kLastReject, { + value: null, + writable: true + }), _defineProperty(_Object$create, kError, { + value: null, + writable: true + }), _defineProperty(_Object$create, kEnded, { + value: stream._readableState.endEmitted, + writable: true + }), _defineProperty(_Object$create, kHandlePromise, { + value: function value(resolve4, reject) { + var data = iterator2[kStream].read(); + if (data) { + iterator2[kLastPromise] = null; + iterator2[kLastResolve] = null; + iterator2[kLastReject] = null; + resolve4(createIterResult(data, false)); + } else { + iterator2[kLastResolve] = resolve4; + iterator2[kLastReject] = reject; + } + }, + writable: true + }), _Object$create)); + iterator2[kLastPromise] = null; + finished(stream, function(err) { + if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") { + var reject = iterator2[kLastReject]; + if (reject !== null) { + iterator2[kLastPromise] = null; + iterator2[kLastResolve] = null; + iterator2[kLastReject] = null; + reject(err); + } + iterator2[kError] = err; + return; + } + var resolve4 = iterator2[kLastResolve]; + if (resolve4 !== null) { + iterator2[kLastPromise] = null; + iterator2[kLastResolve] = null; + iterator2[kLastReject] = null; + resolve4(createIterResult(void 0, true)); + } + iterator2[kEnded] = true; + }); + stream.on("readable", onReadable.bind(null, iterator2)); + return iterator2; + }; + module2.exports = createReadableStreamAsyncIterator; + } +}); + +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js +var require_from = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function(sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + return keys; + } + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), true).forEach(function(key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + return target; + } + function _defineProperty(obj, key, value) { + key = _toPropertyKey(key); + if (key in obj) { + Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + } else { + obj[key] = value; + } + return obj; + } + function _toPropertyKey(arg) { + var key = _toPrimitive(arg, "string"); + return typeof key === "symbol" ? key : String(key); + } + function _toPrimitive(input, hint) { + if (typeof input !== "object" || input === null) return input; + var prim = input[Symbol.toPrimitive]; + if (prim !== void 0) { + var res = prim.call(input, hint || "default"); + if (typeof res !== "object") return res; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return (hint === "string" ? String : Number)(input); + } + var ERR_INVALID_ARG_TYPE = require_errors().codes.ERR_INVALID_ARG_TYPE; + function from(Readable2, iterable, opts) { + var iterator2; + if (iterable && typeof iterable.next === "function") { + iterator2 = iterable; + } else if (iterable && iterable[Symbol.asyncIterator]) iterator2 = iterable[Symbol.asyncIterator](); + else if (iterable && iterable[Symbol.iterator]) iterator2 = iterable[Symbol.iterator](); + else throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable); + var readable = new Readable2(_objectSpread({ + objectMode: true + }, opts)); + var reading = false; + readable._read = function() { + if (!reading) { + reading = true; + next(); + } + }; + function next() { + return _next2.apply(this, arguments); + } + function _next2() { + _next2 = _asyncToGenerator2(function* () { + try { + var _yield$iterator$next = yield iterator2.next(), value = _yield$iterator$next.value, done = _yield$iterator$next.done; + if (done) { + readable.push(null); + } else if (readable.push(yield value)) { + next(); + } else { + reading = false; } - }); + } catch (err) { + readable.destroy(err); + } + }); + return _next2.apply(this, arguments); + } + return readable; + } + module2.exports = from; + } +}); + +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + module2.exports = Readable2; + var Duplex; + Readable2.ReadableState = ReadableState; + var EE = __require("events").EventEmitter; + var EElistenerCount = function EElistenerCount2(emitter, type2) { + return emitter.listeners(type2).length; + }; + var Stream = require_stream(); + var Buffer3 = __require("buffer").Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer3.from(chunk); + } + function _isUint8Array(obj) { + return Buffer3.isBuffer(obj) || obj instanceof OurUint8Array; + } + var debugUtil = __require("util"); + var debug3; + if (debugUtil && debugUtil.debuglog) { + debug3 = debugUtil.debuglog("stream"); + } else { + debug3 = function debug4() { + }; + } + var BufferList = require_buffer_list(); + var destroyImpl = require_destroy(); + var _require = require_state2(); + var getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require_errors().codes; + var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE; + var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; + var StringDecoder; + var createReadableStreamAsyncIterator; + var from; + require_inherits()(Readable2, Stream); + var errorOrDestroy = destroyImpl.errorOrDestroy; + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn) { + if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); + else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn); + else emitter._events[event] = [fn, emitter._events[event]]; + } + function ReadableState(options2, stream, isDuplex) { + Duplex = Duplex || require_stream_duplex(); + options2 = options2 || {}; + if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex; + this.objectMode = !!options2.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options2.readableObjectMode; + this.highWaterMark = getHighWaterMark(this, options2, "readableHighWaterMark", isDuplex); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.paused = true; + this.emitClose = options2.emitClose !== false; + this.autoDestroy = !!options2.autoDestroy; + this.destroyed = false; + this.defaultEncoding = options2.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options2.encoding) { + if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; + this.decoder = new StringDecoder(options2.encoding); + this.encoding = options2.encoding; + } + } + function Readable2(options2) { + Duplex = Duplex || require_stream_duplex(); + if (!(this instanceof Readable2)) return new Readable2(options2); + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options2, this, isDuplex); + this.readable = true; + if (options2) { + if (typeof options2.read === "function") this._read = options2.read; + if (typeof options2.destroy === "function") this._destroy = options2.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable2.prototype, "destroyed", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function set3(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable2.prototype.destroy = destroyImpl.destroy; + Readable2.prototype._undestroy = destroyImpl.undestroy; + Readable2.prototype._destroy = function(err, cb) { + cb(err); + }; + Readable2.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer3.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; } } else { - const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function(value2) { - tmp.push(encodeValue(operator, value2)); - }); - } else { - Object.keys(value).forEach(function(k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable2.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + debug3("readableAddChunk", chunk); + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + errorOrDestroy(stream, er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer3.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT()); + else addChunk(stream, state, chunk, true); + } else if (state.ended) { + errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); + } else if (state.destroyed) { + return false; + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); + else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); } - }); + } + } else if (!addToFront) { + state.reading = false; + maybeReadMore(stream, state); } - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); + } + return !state.ended && (state.length < state.highWaterMark || state.length === 0); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + state.awaitDrain = 0; + stream.emit("data", chunk); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk); + else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk); + } + return er; + } + Readable2.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable2.prototype.setEncoding = function(enc) { + if (!StringDecoder) StringDecoder = require_string_decoder().StringDecoder; + var decoder = new StringDecoder(enc); + this._readableState.decoder = decoder; + this._readableState.encoding = this._readableState.decoder.encoding; + var p = this._readableState.buffer.head; + var content = ""; + while (p !== null) { + content += decoder.write(p.data); + p = p.next; + } + this._readableState.buffer.clear(); + if (content !== "") this._readableState.buffer.push(content); + this._readableState.length = content.length; + return this; + }; + var MAX_HWM = 1073741824; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + if (state.flowing && state.length) return state.buffer.head.data.length; + else return state.length; + } + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable2.prototype.read = function(n) { + debug3("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { + debug3("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this); + else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + var doRead = state.needReadable; + debug3("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug3("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug3("reading or ended", doRead); + } else if (doRead) { + debug3("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret; + if (n > 0) ret = fromList(n, state); + else ret = null; + if (ret === null) { + state.needReadable = state.length <= state.highWaterMark; + n = 0; + } else { + state.length -= n; + state.awaitDrain = 0; + } + if (state.length === 0) { + if (!state.ended) state.needReadable = true; + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret !== null) this.emit("data", ret); + return ret; + }; + function onEofChunk(stream, state) { + debug3("onEofChunk"); + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + if (state.sync) { + emitReadable(stream); + } else { + state.needReadable = false; + if (!state.emittedReadable) { + state.emittedReadable = true; + emitReadable_(stream); } } } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); + function emitReadable(stream) { + var state = stream._readableState; + debug3("emitReadable", state.needReadable, state.emittedReadable); + state.needReadable = false; + if (!state.emittedReadable) { + debug3("emitReadable", state.flowing); + state.emittedReadable = true; + process.nextTick(emitReadable_, stream); } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); } - } - return result; -} -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - template = template.replace( - /\{([^\{\}]+)\}|([^\{\}]+)/g, - function(_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); + function emitReadable_(stream) { + var state = stream._readableState; + debug3("emitReadable_", state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { + stream.emit("readable"); + state.emittedReadable = false; + } + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { + var len = state.length; + debug3("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + } + state.readingMore = false; + } + Readable2.prototype._read = function(n) { + errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()")); + }; + Readable2.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug3("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) process.nextTick(endFn); + else src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug3("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } } - expression.split(/,/g).forEach(function(variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + } + function onend() { + debug3("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug3("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + src.on("data", ondata); + function ondata(chunk) { + debug3("ondata"); + var ret = dest.write(chunk); + debug3("dest.write", ret); + if (ret === false) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug3("false write response, pause", state.awaitDrain); + state.awaitDrain++; + } + src.pause(); + } + } + function onerror(er) { + debug3("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug3("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug3("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug3("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function pipeOnDrainFunctionResult() { + var state = src._readableState; + debug3("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable2.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { + hasUnpiped: false + }; + if (state.pipesCount === 0) return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) dests[i].emit("unpipe", this, { + hasUnpiped: false }); - if (operator && operator !== "+") { - var separator = ","; - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable2.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + var state = this._readableState; + if (ev === "data") { + state.readableListening = this.listenerCount("readable") > 0; + if (state.flowing !== false) this.resume(); + } else if (ev === "readable") { + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.flowing = false; + state.emittedReadable = false; + debug3("on readable", state.length, state.reading); + if (state.length) { + emitReadable(this); + } else if (!state.reading) { + process.nextTick(nReadingNextTick, this); } - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); } + } + return res; + }; + Readable2.prototype.addListener = Readable2.prototype.on; + Readable2.prototype.removeListener = function(ev, fn) { + var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === "readable") { + process.nextTick(updateReadableListening, this); + } + return res; + }; + Readable2.prototype.removeAllListeners = function(ev) { + var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === "readable" || ev === void 0) { + process.nextTick(updateReadableListening, this); + } + return res; + }; + function updateReadableListening(self2) { + var state = self2._readableState; + state.readableListening = self2.listenerCount("readable") > 0; + if (state.resumeScheduled && !state.paused) { + state.flowing = true; + } else if (self2.listenerCount("data") > 0) { + self2.resume(); + } + } + function nReadingNextTick(self2) { + debug3("readable nexttick read 0"); + self2.read(0); + } + Readable2.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug3("resume"); + state.flowing = !state.readableListening; + resume2(this, state); + } + state.paused = false; + return this; + }; + function resume2(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + debug3("resume", state.reading); + if (!state.reading) { + stream.read(0); + } + state.resumeScheduled = false; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } + Readable2.prototype.pause = function() { + debug3("call pause flowing=%j", this._readableState.flowing); + if (this._readableState.flowing !== false) { + debug3("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + this._readableState.paused = true; + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug3("flow", state.flowing); + while (state.flowing && stream.read() !== null) ; + } + Readable2.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug3("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug3("wrapped data"); + if (state.decoder) chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = /* @__PURE__ */ function methodWrap(method) { + return function methodWrapReturnFunction() { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug3("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + if (typeof Symbol === "function") { + Readable2.prototype[Symbol.asyncIterator] = function() { + if (createReadableStreamAsyncIterator === void 0) { + createReadableStreamAsyncIterator = require_async_iterator(); + } + return createReadableStreamAsyncIterator(this); + }; + } + Object.defineProperty(Readable2.prototype, "readableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.highWaterMark; + } + }); + Object.defineProperty(Readable2.prototype, "readableBuffer", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState && this._readableState.buffer; + } + }); + Object.defineProperty(Readable2.prototype, "readableFlowing", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.flowing; + }, + set: function set3(state) { + if (this._readableState) { + this._readableState.flowing = state; + } + } + }); + Readable2._fromList = fromList; + Object.defineProperty(Readable2.prototype, "readableLength", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function get() { + return this._readableState.length; + } + }); + function fromList(n, state) { + if (state.length === 0) return null; + var ret; + if (state.objectMode) ret = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) ret = state.buffer.join(""); + else if (state.buffer.length === 1) ret = state.buffer.first(); + else ret = state.buffer.concat(state.length); + state.buffer.clear(); } else { - return encodeReserved(literal); + ret = state.buffer.consume(n, state.decoder); } + return ret; + } + function endReadable(stream) { + var state = stream._readableState; + debug3("endReadable", state.endEmitted); + if (!state.endEmitted) { + state.ended = true; + process.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + debug3("endReadableNT", state.endEmitted, state.length); + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + if (state.autoDestroy) { + var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { + stream.destroy(); + } + } + } + } + if (typeof Symbol === "function") { + Readable2.from = function(iterable, opts) { + if (from === void 0) { + from = require_from(); + } + return from(Readable2, iterable, opts); + }; + } + function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; } - ); - if (template === "/") { - return template; - } else { - return template.replace(/\/$/, ""); } -} +}); -// pkg/dist-src/parse.js -function parse(options) { - let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, [ - "method", - "baseUrl", - "url", - "headers", - "request", - "mediaType" - ]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { - if (options.mediaType.format) { - headers.accept = headers.accept.split(/,/).map( - (format) => format.replace( - /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, - `application/vnd$1$2.${options.mediaType.format}` - ) - ).join(","); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var _require$codes = require_errors().codes; + var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED; + var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK; + var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING; + var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + var Duplex = require_stream_duplex(); + require_inherits()(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (cb === null) { + return this.emit("error", new ERR_MULTIPLE_CALLBACK()); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options2) { + if (!(this instanceof Transform)) return new Transform(options2); + Duplex.call(this, options2); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options2) { + if (typeof options2.transform === "function") this._transform = options2.transform; + if (typeof options2.flush === "function") this._flush = options2.flush; + } + this.on("prefinish", prefinish); } - if (url.endsWith("/graphql")) { - if (options.mediaType.previews?.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); + function prefinish() { + var _this = this; + if (typeof this._flush === "function" && !this._readableState.destroyed) { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); } } - } - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()")); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + }); + }; + function done(stream, er, data) { + if (er) return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); + if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); + return stream.push(null); } } - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } - return Object.assign( - { method, url, headers }, - typeof body !== "undefined" ? { body } : null, - options.request ? { request: options.request } : null - ); -} - -// pkg/dist-src/endpoint-with-defaults.js -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS2 = merge(oldDefaults, newDefaults); - const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); - return Object.assign(endpoint2, { - DEFAULTS: DEFAULTS2, - defaults: withDefaults.bind(null, DEFAULTS2), - merge: merge.bind(null, DEFAULTS2), - parse - }); -} - -// pkg/dist-src/index.js -var endpoint = withDefaults(null, DEFAULTS); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 85432: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform(); + require_inherits()(PassThrough, Transform); + function PassThrough(options2) { + if (!(this instanceof PassThrough)) return new PassThrough(options2); + Transform.call(this, options2); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - GraphqlResponseError: () => GraphqlResponseError, - graphql: () => graphql2, - withCustomRequest: () => withCustomRequest }); -module.exports = __toCommonJS(dist_src_exports); -var import_request3 = __nccwpck_require__(27382); -var import_universal_user_agent = __nccwpck_require__(59279); -// pkg/dist-src/version.js -var VERSION = "7.1.0"; - -// pkg/dist-src/with-defaults.js -var import_request2 = __nccwpck_require__(27382); - -// pkg/dist-src/graphql.js -var import_request = __nccwpck_require__(27382); - -// pkg/dist-src/error.js -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors: -` + data.errors.map((e) => ` - ${e.message}`).join("\n"); -} -var GraphqlResponseError = class extends Error { - constructor(request2, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request2; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; - this.errors = response.errors; - this.data = response.data; - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js +var require_pipeline = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { + "use strict"; + var eos; + function once2(callback) { + var called = false; + return function() { + if (called) return; + called = true; + callback.apply(void 0, arguments); + }; } - } -}; - -// pkg/dist-src/graphql.js -var NON_VARIABLE_OPTIONS = [ - "method", - "baseUrl", - "url", - "headers", - "request", - "query", - "mediaType" -]; -var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request2, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject( - new Error(`[@octokit/graphql] "query" cannot be used as variable name`) - ); + var _require$codes = require_errors().codes; + var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; + var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + function noop3(err) { + if (err) throw err; } - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) - continue; - return Promise.reject( - new Error( - `[@octokit/graphql] "${key}" cannot be used as variable name` - ) - ); + function isRequest(stream) { + return stream.setHeader && typeof stream.abort === "function"; } - } - const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; - const requestOptions = Object.keys( - parsedOptions - ).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; + function destroyer(stream, reading, writing, callback) { + callback = once2(callback); + var closed = false; + stream.on("close", function() { + closed = true; + }); + if (eos === void 0) eos = require_end_of_stream(); + eos(stream, { + readable: reading, + writable: writing + }, function(err) { + if (err) return callback(err); + closed = true; + callback(); + }); + var destroyed = false; + return function(err) { + if (closed) return; + if (destroyed) return; + destroyed = true; + if (isRequest(stream)) return stream.abort(); + if (typeof stream.destroy === "function") return stream.destroy(); + callback(err || new ERR_STREAM_DESTROYED("pipe")); + }; } - if (!result.variables) { - result.variables = {}; + function call(fn) { + fn(); + } + function pipe(from, to) { + return from.pipe(to); + } + function popCallback(streams) { + if (!streams.length) return noop3; + if (typeof streams[streams.length - 1] !== "function") return noop3; + return streams.pop(); + } + function pipeline() { + for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { + streams[_key] = arguments[_key]; + } + var callback = popCallback(streams); + if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { + throw new ERR_MISSING_ARGS("streams"); + } + var error; + var destroys = streams.map(function(stream, i) { + var reading = i < streams.length - 1; + var writing = i > 0; + return destroyer(stream, reading, writing, function(err) { + if (!error) error = err; + if (err) destroys.forEach(call); + if (reading) return; + destroys.forEach(call); + callback(error); + }); + }); + return streams.reduce(pipe); } - result.variables[key] = parsedOptions[key]; - return result; - }, {}); - const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + module2.exports = pipeline; } - return request2(requestOptions).then((response) => { - if (response.data.errors) { - const headers = {}; - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - throw new GraphqlResponseError( - requestOptions, - headers, - response.data - ); - } - return response.data.data; - }); -} - -// pkg/dist-src/with-defaults.js -function withDefaults(request2, newDefaults) { - const newRequest = request2.defaults(newDefaults); - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: newRequest.endpoint - }); -} - -// pkg/dist-src/index.js -var graphql2 = withDefaults(import_request3.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` - }, - method: "POST", - url: "/graphql" }); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 82962: -/***/ ((module) => { -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js +var require_readable = __commonJS({ + "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = __require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream.Readable; + Object.assign(module2.exports, Stream); + module2.exports.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable(); + exports2.Duplex = require_stream_duplex(); + exports2.Transform = require_stream_transform(); + exports2.PassThrough = require_stream_passthrough(); + exports2.finished = require_end_of_stream(); + exports2.pipeline = require_pipeline(); + } } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - oauthAuthorizationUrl: () => oauthAuthorizationUrl }); -module.exports = __toCommonJS(dist_src_exports); -function oauthAuthorizationUrl(options) { - const clientType = options.clientType || "oauth-app"; - const baseUrl = options.baseUrl || "https://github.com"; - const result = { - clientType, - allowSignup: options.allowSignup === false ? false : true, - clientId: options.clientId, - login: options.login || null, - redirectUrl: options.redirectUrl || null, - state: options.state || Math.random().toString(36).substr(2), - url: "" - }; - if (clientType === "oauth-app") { - const scopes = "scopes" in options ? options.scopes : []; - result.scopes = typeof scopes === "string" ? scopes.split(/[,\s]+/).filter(Boolean) : scopes; - } - result.url = urlBuilderAuthorize(`${baseUrl}/login/oauth/authorize`, result); - return result; -} -function urlBuilderAuthorize(base, options) { - const map = { - allowSignup: "allow_signup", - clientId: "client_id", - login: "login", - redirectUrl: "redirect_uri", - scopes: "scope", - state: "state" - }; - let url = base; - Object.keys(map).filter((k) => options[k] !== null).filter((k) => { - if (k !== "scopes") - return true; - if (options.clientType === "github-app") - return false; - return !Array.isArray(options[k]) || options[k].length > 0; - }).map((key) => [map[key], `${options[key]}`]).forEach(([key, value], index) => { - url += index === 0 ? `?` : "&"; - url += `${key}=${encodeURIComponent(value)}`; - }); - return url; -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); +// node_modules/.pnpm/colorette@1.4.0/node_modules/colorette/index.cjs +var require_colorette = __commonJS({ + "node_modules/.pnpm/colorette@1.4.0/node_modules/colorette/index.cjs"(exports2) { + var tty = __require("tty"); + var env = process.env; + var isDisabled = "NO_COLOR" in env; + var isForced = "FORCE_COLOR" in env; + var isWindows = process.platform === "win32"; + var isCompatibleTerminal = tty && tty.isatty(1) && env.TERM && env.TERM !== "dumb"; + var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env); + var enabled = !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI); + var raw = (open, close2, searchRegex, replaceValue) => (s) => enabled ? open + (~(s += "").indexOf(close2, 4) ? s.replace(searchRegex, replaceValue) : s) + close2 : s; + var init2 = (open, close2) => { + return raw( + `\x1B[${open}m`, + `\x1B[${close2}m`, + new RegExp(`\\x1b\\[${close2}m`, "g"), + `\x1B[${open}m` + ); + }; + exports2.options = Object.defineProperty({}, "enabled", { + get: () => enabled, + set: (value) => enabled = value + }); + exports2.reset = init2(0, 0); + exports2.bold = raw("\x1B[1m", "\x1B[22m", /\x1b\[22m/g, "\x1B[22m\x1B[1m"); + exports2.dim = raw("\x1B[2m", "\x1B[22m", /\x1b\[22m/g, "\x1B[22m\x1B[2m"); + exports2.italic = init2(3, 23); + exports2.underline = init2(4, 24); + exports2.inverse = init2(7, 27); + exports2.hidden = init2(8, 28); + exports2.strikethrough = init2(9, 29); + exports2.black = init2(30, 39); + exports2.red = init2(31, 39); + exports2.green = init2(32, 39); + exports2.yellow = init2(33, 39); + exports2.blue = init2(34, 39); + exports2.magenta = init2(35, 39); + exports2.cyan = init2(36, 39); + exports2.white = init2(37, 39); + exports2.gray = init2(90, 39); + exports2.bgBlack = init2(40, 49); + exports2.bgRed = init2(41, 49); + exports2.bgGreen = init2(42, 49); + exports2.bgYellow = init2(43, 49); + exports2.bgBlue = init2(44, 49); + exports2.bgMagenta = init2(45, 49); + exports2.bgCyan = init2(46, 49); + exports2.bgWhite = init2(47, 49); + exports2.blackBright = init2(90, 39); + exports2.redBright = init2(91, 39); + exports2.greenBright = init2(92, 39); + exports2.yellowBright = init2(93, 39); + exports2.blueBright = init2(94, 39); + exports2.magentaBright = init2(95, 39); + exports2.cyanBright = init2(96, 39); + exports2.whiteBright = init2(97, 39); + exports2.bgBlackBright = init2(100, 49); + exports2.bgRedBright = init2(101, 49); + exports2.bgGreenBright = init2(102, 49); + exports2.bgYellowBright = init2(103, 49); + exports2.bgBlueBright = init2(104, 49); + exports2.bgMagentaBright = init2(105, 49); + exports2.bgCyanBright = init2(106, 49); + exports2.bgWhiteBright = init2(107, 49); + } +}); -/***/ }), - -/***/ 87813: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - VERSION: () => VERSION, - checkToken: () => checkToken, - createDeviceCode: () => createDeviceCode, - deleteAuthorization: () => deleteAuthorization, - deleteToken: () => deleteToken, - exchangeDeviceCode: () => exchangeDeviceCode, - exchangeWebFlowCode: () => exchangeWebFlowCode, - getWebFlowAuthorizationUrl: () => getWebFlowAuthorizationUrl, - refreshToken: () => refreshToken, - resetToken: () => resetToken, - scopeToken: () => scopeToken -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "4.1.0"; - -// pkg/dist-src/get-web-flow-authorization-url.js -var import_oauth_authorization_url = __nccwpck_require__(82962); -var import_request = __nccwpck_require__(27382); - -// pkg/dist-src/utils.js -var import_request_error = __nccwpck_require__(2534); -function requestToOAuthBaseUrl(request) { - const endpointDefaults = request.endpoint.DEFAULTS; - return /^https:\/\/(api\.)?github\.com$/.test(endpointDefaults.baseUrl) ? "https://github.com" : endpointDefaults.baseUrl.replace("/api/v3", ""); -} -async function oauthRequest(request, route, parameters) { - const withOAuthParameters = { - baseUrl: requestToOAuthBaseUrl(request), - headers: { - accept: "application/json" - }, - ...parameters - }; - const response = await request(route, withOAuthParameters); - if ("error" in response.data) { - const error = new import_request_error.RequestError( - `${response.data.error_description} (${response.data.error}, ${response.data.error_uri})`, - 400, - { - request: request.endpoint.merge( - route, - withOAuthParameters - ), - headers: response.headers +// node_modules/.pnpm/jmespath@0.15.0/node_modules/jmespath/jmespath.js +var require_jmespath = __commonJS({ + "node_modules/.pnpm/jmespath@0.15.0/node_modules/jmespath/jmespath.js"(exports2) { + (function(exports3) { + "use strict"; + function isArray(obj) { + if (obj !== null) { + return Object.prototype.toString.call(obj) === "[object Array]"; + } else { + return false; + } } - ); - error.response = response; - throw error; - } - return response; -} - -// pkg/dist-src/get-web-flow-authorization-url.js -function getWebFlowAuthorizationUrl({ - request = import_request.request, - ...options -}) { - const baseUrl = requestToOAuthBaseUrl(request); - return (0, import_oauth_authorization_url.oauthAuthorizationUrl)({ - ...options, - baseUrl - }); -} - -// pkg/dist-src/exchange-web-flow-code.js -var import_request2 = __nccwpck_require__(27382); -async function exchangeWebFlowCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request2.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - code: options.code, - redirect_uri: options.redirectUrl - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/create-device-code.js -var import_request3 = __nccwpck_require__(27382); -async function createDeviceCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request3.request; - const parameters = { - client_id: options.clientId - }; - if ("scopes" in options && Array.isArray(options.scopes)) { - parameters.scope = options.scopes.join(" "); - } - return oauthRequest(request, "POST /login/device/code", parameters); -} - -// pkg/dist-src/exchange-device-code.js -var import_request4 = __nccwpck_require__(27382); -async function exchangeDeviceCode(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request4.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - device_code: options.code, - grant_type: "urn:ietf:params:oauth:grant-type:device_code" - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - token: response.data.access_token, - scopes: response.data.scope.split(/\s+/).filter(Boolean) - }; - if ("clientSecret" in options) { - authentication.clientSecret = options.clientSecret; - } - if (options.clientType === "github-app") { - if ("refresh_token" in response.data) { - const apiTimeInMs = new Date(response.headers.date).getTime(); - authentication.refreshToken = response.data.refresh_token, authentication.expiresAt = toTimestamp2( - apiTimeInMs, - response.data.expires_in - ), authentication.refreshTokenExpiresAt = toTimestamp2( - apiTimeInMs, - response.data.refresh_token_expires_in - ); - } - delete authentication.scopes; - } - return { ...response, authentication }; -} -function toTimestamp2(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/check-token.js -var import_request5 = __nccwpck_require__(27382); -var import_btoa_lite = __toESM(__nccwpck_require__(95432)); -async function checkToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request5.request; - const response = await request("POST /applications/{client_id}/token", { - headers: { - authorization: `basic ${(0, import_btoa_lite.default)( - `${options.clientId}:${options.clientSecret}` - )}` - }, - client_id: options.clientId, - access_token: options.token - }); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: options.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} - -// pkg/dist-src/refresh-token.js -var import_request6 = __nccwpck_require__(27382); -async function refreshToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request6.request; - const response = await oauthRequest( - request, - "POST /login/oauth/access_token", - { - client_id: options.clientId, - client_secret: options.clientSecret, - grant_type: "refresh_token", - refresh_token: options.refreshToken - } - ); - const apiTimeInMs = new Date(response.headers.date).getTime(); - const authentication = { - clientType: "github-app", - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.access_token, - refreshToken: response.data.refresh_token, - expiresAt: toTimestamp3(apiTimeInMs, response.data.expires_in), - refreshTokenExpiresAt: toTimestamp3( - apiTimeInMs, - response.data.refresh_token_expires_in - ) - }; - return { ...response, authentication }; -} -function toTimestamp3(apiTimeInMs, expirationInSeconds) { - return new Date(apiTimeInMs + expirationInSeconds * 1e3).toISOString(); -} - -// pkg/dist-src/scope-token.js -var import_request7 = __nccwpck_require__(27382); -var import_btoa_lite2 = __toESM(__nccwpck_require__(95432)); -async function scopeToken(options) { - const { - request: optionsRequest, - clientType, - clientId, - clientSecret, - token, - ...requestOptions - } = options; - const request = optionsRequest || /* istanbul ignore next: we always pass a custom request in tests */ - import_request7.request; - const response = await request( - "POST /applications/{client_id}/token/scoped", - { - headers: { - authorization: `basic ${(0, import_btoa_lite2.default)(`${clientId}:${clientSecret}`)}` - }, - client_id: clientId, - access_token: token, - ...requestOptions - } - ); - const authentication = Object.assign( - { - clientType, - clientId, - clientSecret, - token: response.data.token - }, - response.data.expires_at ? { expiresAt: response.data.expires_at } : {} - ); - return { ...response, authentication }; -} - -// pkg/dist-src/reset-token.js -var import_request8 = __nccwpck_require__(27382); -var import_btoa_lite3 = __toESM(__nccwpck_require__(95432)); -async function resetToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request8.request; - const auth = (0, import_btoa_lite3.default)(`${options.clientId}:${options.clientSecret}`); - const response = await request( - "PATCH /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); - const authentication = { - clientType: options.clientType, - clientId: options.clientId, - clientSecret: options.clientSecret, - token: response.data.token, - scopes: response.data.scopes - }; - if (response.data.expires_at) - authentication.expiresAt = response.data.expires_at; - if (options.clientType === "github-app") { - delete authentication.scopes; - } - return { ...response, authentication }; -} - -// pkg/dist-src/delete-token.js -var import_request9 = __nccwpck_require__(27382); -var import_btoa_lite4 = __toESM(__nccwpck_require__(95432)); -async function deleteToken(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request9.request; - const auth = (0, import_btoa_lite4.default)(`${options.clientId}:${options.clientSecret}`); - return request( - "DELETE /applications/{client_id}/token", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); -} - -// pkg/dist-src/delete-authorization.js -var import_request10 = __nccwpck_require__(27382); -var import_btoa_lite5 = __toESM(__nccwpck_require__(95432)); -async function deleteAuthorization(options) { - const request = options.request || /* istanbul ignore next: we always pass a custom request in tests */ - import_request10.request; - const auth = (0, import_btoa_lite5.default)(`${options.clientId}:${options.clientSecret}`); - return request( - "DELETE /applications/{client_id}/grant", - { - headers: { - authorization: `basic ${auth}` - }, - client_id: options.clientId, - access_token: options.token - } - ); -} -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 10145: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - enterpriseCompatibility: () => enterpriseCompatibility -}); -module.exports = __toCommonJS(dist_src_exports); -var import_request_error = __nccwpck_require__(2534); - -// pkg/dist-src/version.js -var VERSION = "4.1.0"; - -// pkg/dist-src/index.js -function enterpriseCompatibility(octokit) { - octokit.hook.wrap("request", async (request, options) => { - if (/\/orgs\/[^/]+\/teams/.test(options.url)) { - try { - return await request(options); - } catch (error) { - if (error.status !== 404) { - throw error; + function isObject2(obj) { + if (obj !== null) { + return Object.prototype.toString.call(obj) === "[object Object]"; + } else { + return false; } - if (!error.response || !error.response.headers["x-github-enterprise-version"]) { - throw error; + } + function strictDeepEqual(first, second) { + if (first === second) { + return true; } - const deprecatedUrl = options.url.replace( - /\/orgs\/[^/]+\/teams\/[^/]+/, - "/teams/{team_id}" - ); - throw new import_request_error.RequestError( - `"${options.method} ${options.url}" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request("${options.method} ${deprecatedUrl}", { team_id })`, - 404, - { - request: options + var firstType = Object.prototype.toString.call(first); + if (firstType !== Object.prototype.toString.call(second)) { + return false; + } + if (isArray(first) === true) { + if (first.length !== second.length) { + return false; } - ); + for (var i = 0; i < first.length; i++) { + if (strictDeepEqual(first[i], second[i]) === false) { + return false; + } + } + return true; + } + if (isObject2(first) === true) { + var keysSeen = {}; + for (var key in first) { + if (hasOwnProperty.call(first, key)) { + if (strictDeepEqual(first[key], second[key]) === false) { + return false; + } + keysSeen[key] = true; + } + } + for (var key2 in second) { + if (hasOwnProperty.call(second, key2)) { + if (keysSeen[key2] !== true) { + return false; + } + } + } + return true; + } + return false; } - } - return request(options); - }); -} -enterpriseCompatibility.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 84301: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - composePaginateRest: () => composePaginateRest, - isPaginatingEndpoint: () => isPaginatingEndpoint, - paginateRest: () => paginateRest, - paginatingEndpoints: () => paginatingEndpoints -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "9.2.1"; - -// pkg/dist-src/normalize-paginated-list-response.js -function normalizePaginatedListResponse(response) { - if (!response.data) { - return { - ...response, - data: [] - }; - } - const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) - return response; - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - response.data.total_count = totalCount; - return response; -} - -// pkg/dist-src/iterator.js -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) - return { done: true }; - try { - const response = await requestMethod({ method, url, headers }); - const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( - /<([^>]+)>;\s*rel="next"/ - ) || [])[1]; - return { value: normalizedResponse }; - } catch (error) { - if (error.status !== 409) - throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] + function isFalse(obj) { + if (obj === "" || obj === false || obj === null) { + return true; + } else if (isArray(obj) && obj.length === 0) { + return true; + } else if (isObject2(obj)) { + for (var key in obj) { + if (obj.hasOwnProperty(key)) { + return false; } - }; + } + return true; + } else { + return false; } } - }) - }; -} - -// pkg/dist-src/paginate.js -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = void 0; - } - return gather( - octokit, - [], - iterator(octokit, route, parameters)[Symbol.asyncIterator](), - mapFn - ); -} -function gather(octokit, results, iterator2, mapFn) { - return iterator2.next().then((result) => { - if (result.done) { - return results; - } - let earlyExit = false; - function done() { - earlyExit = true; - } - results = results.concat( - mapFn ? mapFn(result.value, done) : result.value.data - ); - if (earlyExit) { - return results; - } - return gather(octokit, results, iterator2, mapFn); - }); -} - -// pkg/dist-src/compose-paginate.js -var composePaginateRest = Object.assign(paginate, { - iterator -}); - -// pkg/dist-src/generated/paginating-endpoints.js -var paginatingEndpoints = [ - "GET /advisories", - "GET /app/hook/deliveries", - "GET /app/installation-requests", - "GET /app/installations", - "GET /assignments/{assignment_id}/accepted_assignments", - "GET /classrooms", - "GET /classrooms/{classroom_id}/assignments", - "GET /enterprises/{enterprise}/dependabot/alerts", - "GET /enterprises/{enterprise}/secret-scanning/alerts", - "GET /events", - "GET /gists", - "GET /gists/public", - "GET /gists/starred", - "GET /gists/{gist_id}/comments", - "GET /gists/{gist_id}/commits", - "GET /gists/{gist_id}/forks", - "GET /installation/repositories", - "GET /issues", - "GET /licenses", - "GET /marketplace_listing/plans", - "GET /marketplace_listing/plans/{plan_id}/accounts", - "GET /marketplace_listing/stubbed/plans", - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", - "GET /networks/{owner}/{repo}/events", - "GET /notifications", - "GET /organizations", - "GET /orgs/{org}/actions/cache/usage-by-repository", - "GET /orgs/{org}/actions/permissions/repositories", - "GET /orgs/{org}/actions/runners", - "GET /orgs/{org}/actions/secrets", - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", - "GET /orgs/{org}/actions/variables", - "GET /orgs/{org}/actions/variables/{name}/repositories", - "GET /orgs/{org}/blocks", - "GET /orgs/{org}/code-scanning/alerts", - "GET /orgs/{org}/codespaces", - "GET /orgs/{org}/codespaces/secrets", - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", - "GET /orgs/{org}/copilot/billing/seats", - "GET /orgs/{org}/dependabot/alerts", - "GET /orgs/{org}/dependabot/secrets", - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", - "GET /orgs/{org}/events", - "GET /orgs/{org}/failed_invitations", - "GET /orgs/{org}/hooks", - "GET /orgs/{org}/hooks/{hook_id}/deliveries", - "GET /orgs/{org}/installations", - "GET /orgs/{org}/invitations", - "GET /orgs/{org}/invitations/{invitation_id}/teams", - "GET /orgs/{org}/issues", - "GET /orgs/{org}/members", - "GET /orgs/{org}/members/{username}/codespaces", - "GET /orgs/{org}/migrations", - "GET /orgs/{org}/migrations/{migration_id}/repositories", - "GET /orgs/{org}/organization-roles/{role_id}/teams", - "GET /orgs/{org}/organization-roles/{role_id}/users", - "GET /orgs/{org}/outside_collaborators", - "GET /orgs/{org}/packages", - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - "GET /orgs/{org}/personal-access-token-requests", - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", - "GET /orgs/{org}/personal-access-tokens", - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", - "GET /orgs/{org}/projects", - "GET /orgs/{org}/properties/values", - "GET /orgs/{org}/public_members", - "GET /orgs/{org}/repos", - "GET /orgs/{org}/rulesets", - "GET /orgs/{org}/rulesets/rule-suites", - "GET /orgs/{org}/secret-scanning/alerts", - "GET /orgs/{org}/security-advisories", - "GET /orgs/{org}/teams", - "GET /orgs/{org}/teams/{team_slug}/discussions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", - "GET /orgs/{org}/teams/{team_slug}/invitations", - "GET /orgs/{org}/teams/{team_slug}/members", - "GET /orgs/{org}/teams/{team_slug}/projects", - "GET /orgs/{org}/teams/{team_slug}/repos", - "GET /orgs/{org}/teams/{team_slug}/teams", - "GET /projects/columns/{column_id}/cards", - "GET /projects/{project_id}/collaborators", - "GET /projects/{project_id}/columns", - "GET /repos/{owner}/{repo}/actions/artifacts", - "GET /repos/{owner}/{repo}/actions/caches", - "GET /repos/{owner}/{repo}/actions/organization-secrets", - "GET /repos/{owner}/{repo}/actions/organization-variables", - "GET /repos/{owner}/{repo}/actions/runners", - "GET /repos/{owner}/{repo}/actions/runs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", - "GET /repos/{owner}/{repo}/actions/secrets", - "GET /repos/{owner}/{repo}/actions/variables", - "GET /repos/{owner}/{repo}/actions/workflows", - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", - "GET /repos/{owner}/{repo}/activity", - "GET /repos/{owner}/{repo}/assignees", - "GET /repos/{owner}/{repo}/branches", - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", - "GET /repos/{owner}/{repo}/code-scanning/alerts", - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - "GET /repos/{owner}/{repo}/code-scanning/analyses", - "GET /repos/{owner}/{repo}/codespaces", - "GET /repos/{owner}/{repo}/codespaces/devcontainers", - "GET /repos/{owner}/{repo}/codespaces/secrets", - "GET /repos/{owner}/{repo}/collaborators", - "GET /repos/{owner}/{repo}/comments", - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/commits", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", - "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", - "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", - "GET /repos/{owner}/{repo}/commits/{ref}/status", - "GET /repos/{owner}/{repo}/commits/{ref}/statuses", - "GET /repos/{owner}/{repo}/contributors", - "GET /repos/{owner}/{repo}/dependabot/alerts", - "GET /repos/{owner}/{repo}/dependabot/secrets", - "GET /repos/{owner}/{repo}/deployments", - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", - "GET /repos/{owner}/{repo}/environments", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", - "GET /repos/{owner}/{repo}/events", - "GET /repos/{owner}/{repo}/forks", - "GET /repos/{owner}/{repo}/hooks", - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", - "GET /repos/{owner}/{repo}/invitations", - "GET /repos/{owner}/{repo}/issues", - "GET /repos/{owner}/{repo}/issues/comments", - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/issues/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", - "GET /repos/{owner}/{repo}/issues/{issue_number}/events", - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", - "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", - "GET /repos/{owner}/{repo}/keys", - "GET /repos/{owner}/{repo}/labels", - "GET /repos/{owner}/{repo}/milestones", - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", - "GET /repos/{owner}/{repo}/notifications", - "GET /repos/{owner}/{repo}/pages/builds", - "GET /repos/{owner}/{repo}/projects", - "GET /repos/{owner}/{repo}/pulls", - "GET /repos/{owner}/{repo}/pulls/comments", - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", - "GET /repos/{owner}/{repo}/releases", - "GET /repos/{owner}/{repo}/releases/{release_id}/assets", - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", - "GET /repos/{owner}/{repo}/rules/branches/{branch}", - "GET /repos/{owner}/{repo}/rulesets", - "GET /repos/{owner}/{repo}/rulesets/rule-suites", - "GET /repos/{owner}/{repo}/secret-scanning/alerts", - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", - "GET /repos/{owner}/{repo}/security-advisories", - "GET /repos/{owner}/{repo}/stargazers", - "GET /repos/{owner}/{repo}/subscribers", - "GET /repos/{owner}/{repo}/tags", - "GET /repos/{owner}/{repo}/teams", - "GET /repos/{owner}/{repo}/topics", - "GET /repositories", - "GET /repositories/{repository_id}/environments/{environment_name}/secrets", - "GET /repositories/{repository_id}/environments/{environment_name}/variables", - "GET /search/code", - "GET /search/commits", - "GET /search/issues", - "GET /search/labels", - "GET /search/repositories", - "GET /search/topics", - "GET /search/users", - "GET /teams/{team_id}/discussions", - "GET /teams/{team_id}/discussions/{discussion_number}/comments", - "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", - "GET /teams/{team_id}/discussions/{discussion_number}/reactions", - "GET /teams/{team_id}/invitations", - "GET /teams/{team_id}/members", - "GET /teams/{team_id}/projects", - "GET /teams/{team_id}/repos", - "GET /teams/{team_id}/teams", - "GET /user/blocks", - "GET /user/codespaces", - "GET /user/codespaces/secrets", - "GET /user/emails", - "GET /user/followers", - "GET /user/following", - "GET /user/gpg_keys", - "GET /user/installations", - "GET /user/installations/{installation_id}/repositories", - "GET /user/issues", - "GET /user/keys", - "GET /user/marketplace_purchases", - "GET /user/marketplace_purchases/stubbed", - "GET /user/memberships/orgs", - "GET /user/migrations", - "GET /user/migrations/{migration_id}/repositories", - "GET /user/orgs", - "GET /user/packages", - "GET /user/packages/{package_type}/{package_name}/versions", - "GET /user/public_emails", - "GET /user/repos", - "GET /user/repository_invitations", - "GET /user/social_accounts", - "GET /user/ssh_signing_keys", - "GET /user/starred", - "GET /user/subscriptions", - "GET /user/teams", - "GET /users", - "GET /users/{username}/events", - "GET /users/{username}/events/orgs/{org}", - "GET /users/{username}/events/public", - "GET /users/{username}/followers", - "GET /users/{username}/following", - "GET /users/{username}/gists", - "GET /users/{username}/gpg_keys", - "GET /users/{username}/keys", - "GET /users/{username}/orgs", - "GET /users/{username}/packages", - "GET /users/{username}/projects", - "GET /users/{username}/received_events", - "GET /users/{username}/received_events/public", - "GET /users/{username}/repos", - "GET /users/{username}/social_accounts", - "GET /users/{username}/ssh_signing_keys", - "GET /users/{username}/starred", - "GET /users/{username}/subscriptions" -]; - -// pkg/dist-src/paginating-endpoints.js -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -// pkg/dist-src/index.js -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 90869: -/***/ ((module) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - legacyRestEndpointMethods: () => legacyRestEndpointMethods, - restEndpointMethods: () => restEndpointMethods -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/version.js -var VERSION = "10.4.1"; - -// pkg/dist-src/generated/endpoints.js -var Endpoints = { - actions: { - addCustomLabelsToSelfHostedRunnerForOrg: [ - "POST /orgs/{org}/actions/runners/{runner_id}/labels" - ], - addCustomLabelsToSelfHostedRunnerForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - approveWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" - ], - cancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" - ], - createEnvironmentVariable: [ - "POST /repositories/{repository_id}/environments/{environment_name}/variables" - ], - createOrUpdateEnvironmentSecret: [ - "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" - ], - createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - createOrgVariable: ["POST /orgs/{org}/actions/variables"], - createRegistrationTokenForOrg: [ - "POST /orgs/{org}/actions/runners/registration-token" - ], - createRegistrationTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/registration-token" - ], - createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], - createRemoveTokenForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/remove-token" - ], - createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], - createWorkflowDispatch: [ - "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" - ], - deleteActionsCacheById: [ - "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" - ], - deleteActionsCacheByKey: [ - "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" - ], - deleteArtifact: [ - "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" - ], - deleteEnvironmentSecret: [ - "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" - ], - deleteEnvironmentVariable: [ - "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" - ], - deleteRepoVariable: [ - "DELETE /repos/{owner}/{repo}/actions/variables/{name}" - ], - deleteSelfHostedRunnerFromOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}" - ], - deleteSelfHostedRunnerFromRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], - deleteWorkflowRunLogs: [ - "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - disableSelectedRepositoryGithubActionsOrganization: [ - "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - disableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" - ], - downloadArtifact: [ - "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" - ], - downloadJobLogsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" - ], - downloadWorkflowRunAttemptLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" - ], - downloadWorkflowRunLogs: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" - ], - enableSelectedRepositoryGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" - ], - enableWorkflow: [ - "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" - ], - forceCancelWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" - ], - generateRunnerJitconfigForOrg: [ - "POST /orgs/{org}/actions/runners/generate-jitconfig" - ], - generateRunnerJitconfigForRepo: [ - "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" - ], - getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], - getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], - getActionsCacheUsageByRepoForOrg: [ - "GET /orgs/{org}/actions/cache/usage-by-repository" - ], - getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], - getAllowedActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/selected-actions" - ], - getAllowedActionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], - getCustomOidcSubClaimForRepo: [ - "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - getEnvironmentPublicKey: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" - ], - getEnvironmentSecret: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" - ], - getEnvironmentVariable: [ - "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}" - ], - getGithubActionsDefaultWorkflowPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions/workflow" - ], - getGithubActionsDefaultWorkflowPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/workflow" - ], - getGithubActionsPermissionsOrganization: [ - "GET /orgs/{org}/actions/permissions" - ], - getGithubActionsPermissionsRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions" - ], - getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], - getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], - getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], - getPendingDeploymentsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - getRepoPermissions: [ - "GET /repos/{owner}/{repo}/actions/permissions", - {}, - { renamed: ["actions", "getGithubActionsPermissionsRepository"] } - ], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], - getReviewsForRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" - ], - getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" - ], - getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], - getWorkflowAccessToRepository: [ - "GET /repos/{owner}/{repo}/actions/permissions/access" - ], - getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], - getWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" - ], - getWorkflowRunUsage: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" - ], - getWorkflowUsage: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" - ], - listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], - listEnvironmentSecrets: [ - "GET /repositories/{repository_id}/environments/{environment_name}/secrets" - ], - listEnvironmentVariables: [ - "GET /repositories/{repository_id}/environments/{environment_name}/variables" - ], - listJobsForWorkflowRun: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" - ], - listJobsForWorkflowRunAttempt: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" - ], - listLabelsForSelfHostedRunnerForOrg: [ - "GET /orgs/{org}/actions/runners/{runner_id}/labels" - ], - listLabelsForSelfHostedRunnerForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], - listOrgVariables: ["GET /orgs/{org}/actions/variables"], - listRepoOrganizationSecrets: [ - "GET /repos/{owner}/{repo}/actions/organization-secrets" - ], - listRepoOrganizationVariables: [ - "GET /repos/{owner}/{repo}/actions/organization-variables" - ], - listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], - listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], - listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], - listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: [ - "GET /repos/{owner}/{repo}/actions/runners/downloads" - ], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - listSelectedReposForOrgVariable: [ - "GET /orgs/{org}/actions/variables/{name}/repositories" - ], - listSelectedRepositoriesEnabledGithubActionsOrganization: [ - "GET /orgs/{org}/actions/permissions/repositories" - ], - listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], - listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: [ - "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" - ], - listWorkflowRuns: [ - "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" - ], - listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], - reRunJobForWorkflowRun: [ - "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" - ], - reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], - reRunWorkflowFailedJobs: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" - ], - removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" - ], - removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - removeCustomLabelFromSelfHostedRunnerForOrg: [ - "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" - ], - removeCustomLabelFromSelfHostedRunnerForRepo: [ - "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgVariable: [ - "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" - ], - reviewCustomGatesForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" - ], - reviewPendingDeploymentsForRun: [ - "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" - ], - setAllowedActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/selected-actions" - ], - setAllowedActionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" - ], - setCustomLabelsForSelfHostedRunnerForOrg: [ - "PUT /orgs/{org}/actions/runners/{runner_id}/labels" - ], - setCustomLabelsForSelfHostedRunnerForRepo: [ - "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" - ], - setCustomOidcSubClaimForRepo: [ - "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" - ], - setGithubActionsDefaultWorkflowPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/workflow" - ], - setGithubActionsDefaultWorkflowPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/workflow" - ], - setGithubActionsPermissionsOrganization: [ - "PUT /orgs/{org}/actions/permissions" - ], - setGithubActionsPermissionsRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgVariable: [ - "PUT /orgs/{org}/actions/variables/{name}/repositories" - ], - setSelectedRepositoriesEnabledGithubActionsOrganization: [ - "PUT /orgs/{org}/actions/permissions/repositories" - ], - setWorkflowAccessToRepository: [ - "PUT /repos/{owner}/{repo}/actions/permissions/access" - ], - updateEnvironmentVariable: [ - "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}" - ], - updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], - updateRepoVariable: [ - "PATCH /repos/{owner}/{repo}/actions/variables/{name}" - ] - }, - activity: { - checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], - deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: [ - "DELETE /notifications/threads/{thread_id}/subscription" - ], - getFeeds: ["GET /feeds"], - getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], - getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: [ - "GET /notifications/threads/{thread_id}/subscription" - ], - listEventsForAuthenticatedUser: ["GET /users/{username}/events"], - listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: [ - "GET /users/{username}/events/orgs/{org}" - ], - listPublicEvents: ["GET /events"], - listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], - listPublicEventsForUser: ["GET /users/{username}/events/public"], - listPublicOrgEvents: ["GET /orgs/{org}/events"], - listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: [ - "GET /users/{username}/received_events/public" - ], - listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/notifications" - ], - listReposStarredByAuthenticatedUser: ["GET /user/starred"], - listReposStarredByUser: ["GET /users/{username}/starred"], - listReposWatchedByUser: ["GET /users/{username}/subscriptions"], - listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], - listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], - listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], - markNotificationsAsRead: ["PUT /notifications"], - markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], - markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], - markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], - setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: [ - "PUT /notifications/threads/{thread_id}/subscription" - ], - starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], - unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] - }, - apps: { - addRepoToInstallation: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } - ], - addRepoToInstallationForAuthenticatedUser: [ - "PUT /user/installations/{installation_id}/repositories/{repository_id}" - ], - checkToken: ["POST /applications/{client_id}/token"], - createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: [ - "POST /app/installations/{installation_id}/access_tokens" - ], - deleteAuthorization: ["DELETE /applications/{client_id}/grant"], - deleteInstallation: ["DELETE /app/installations/{installation_id}"], - deleteToken: ["DELETE /applications/{client_id}/token"], - getAuthenticated: ["GET /app"], - getBySlug: ["GET /apps/{app_slug}"], - getInstallation: ["GET /app/installations/{installation_id}"], - getOrgInstallation: ["GET /orgs/{org}/installation"], - getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: [ - "GET /marketplace_listing/accounts/{account_id}" - ], - getSubscriptionPlanForAccountStubbed: [ - "GET /marketplace_listing/stubbed/accounts/{account_id}" - ], - getUserInstallation: ["GET /users/{username}/installation"], - getWebhookConfigForApp: ["GET /app/hook/config"], - getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], - listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: [ - "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" - ], - listInstallationReposForAuthenticatedUser: [ - "GET /user/installations/{installation_id}/repositories" - ], - listInstallationRequestsForAuthenticatedApp: [ - "GET /app/installation-requests" - ], - listInstallations: ["GET /app/installations"], - listInstallationsForAuthenticatedUser: ["GET /user/installations"], - listPlans: ["GET /marketplace_listing/plans"], - listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], - listReposAccessibleToInstallation: ["GET /installation/repositories"], - listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], - listSubscriptionsForAuthenticatedUserStubbed: [ - "GET /user/marketplace_purchases/stubbed" - ], - listWebhookDeliveries: ["GET /app/hook/deliveries"], - redeliverWebhookDelivery: [ - "POST /app/hook/deliveries/{delivery_id}/attempts" - ], - removeRepoFromInstallation: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}", - {}, - { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } - ], - removeRepoFromInstallationForAuthenticatedUser: [ - "DELETE /user/installations/{installation_id}/repositories/{repository_id}" - ], - resetToken: ["PATCH /applications/{client_id}/token"], - revokeInstallationAccessToken: ["DELETE /installation/token"], - scopeToken: ["POST /applications/{client_id}/token/scoped"], - suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: [ - "DELETE /app/installations/{installation_id}/suspended" - ], - updateWebhookConfigForApp: ["PATCH /app/hook/config"] - }, - billing: { - getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], - getGithubActionsBillingUser: [ - "GET /users/{username}/settings/billing/actions" - ], - getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: [ - "GET /users/{username}/settings/billing/packages" - ], - getSharedStorageBillingOrg: [ - "GET /orgs/{org}/settings/billing/shared-storage" - ], - getSharedStorageBillingUser: [ - "GET /users/{username}/settings/billing/shared-storage" - ] - }, - checks: { - create: ["POST /repos/{owner}/{repo}/check-runs"], - createSuite: ["POST /repos/{owner}/{repo}/check-suites"], - get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], - getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], - listAnnotations: [ - "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" - ], - listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], - listForSuite: [ - "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" - ], - listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], - rerequestRun: [ - "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" - ], - rerequestSuite: [ - "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" - ], - setSuitesPreferences: [ - "PATCH /repos/{owner}/{repo}/check-suites/preferences" - ], - update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] - }, - codeScanning: { - deleteAnalysis: [ - "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" - ], - getAlert: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", - {}, - { renamedParameters: { alert_id: "alert_number" } } - ], - getAnalysis: [ - "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" - ], - getCodeqlDatabase: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" - ], - getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], - getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], - listAlertInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" - ], - listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: [ - "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", - {}, - { renamed: ["codeScanning", "listAlertInstances"] } - ], - listCodeqlDatabases: [ - "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" - ], - listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" - ], - updateDefaultSetup: [ - "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" - ], - uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] - }, - codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct"], - getConductCode: ["GET /codes_of_conduct/{key}"] - }, - codespaces: { - addRepositoryForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - checkPermissionsForDevcontainer: [ - "GET /repos/{owner}/{repo}/codespaces/permissions_check" - ], - codespaceMachinesForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/machines" - ], - createForAuthenticatedUser: ["POST /user/codespaces"], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - createOrUpdateSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}" - ], - createWithPrForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" - ], - createWithRepoForAuthenticatedUser: [ - "POST /repos/{owner}/{repo}/codespaces" - ], - deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], - deleteFromOrganization: [ - "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - deleteSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}" - ], - exportForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/exports" - ], - getCodespacesForUserInOrg: [ - "GET /orgs/{org}/members/{username}/codespaces" - ], - getExportDetailsForAuthenticatedUser: [ - "GET /user/codespaces/{codespace_name}/exports/{export_id}" - ], - getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], - getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], - getPublicKeyForAuthenticatedUser: [ - "GET /user/codespaces/secrets/public-key" - ], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" - ], - getSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}" - ], - listDevcontainersInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/devcontainers" - ], - listForAuthenticatedUser: ["GET /user/codespaces"], - listInOrganization: [ - "GET /orgs/{org}/codespaces", - {}, - { renamedParameters: { org_id: "org" } } - ], - listInRepositoryForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces" - ], - listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], - listRepositoriesForSecretForAuthenticatedUser: [ - "GET /user/codespaces/secrets/{secret_name}/repositories" - ], - listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - preFlightWithRepoForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/new" - ], - publishForAuthenticatedUser: [ - "POST /user/codespaces/{codespace_name}/publish" - ], - removeRepositoryForSecretForAuthenticatedUser: [ - "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" - ], - repoMachinesForAuthenticatedUser: [ - "GET /repos/{owner}/{repo}/codespaces/machines" - ], - setRepositoriesForSecretForAuthenticatedUser: [ - "PUT /user/codespaces/secrets/{secret_name}/repositories" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" - ], - startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], - stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], - stopInOrganization: [ - "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" - ], - updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] - }, - copilot: { - addCopilotSeatsForTeams: [ - "POST /orgs/{org}/copilot/billing/selected_teams" - ], - addCopilotSeatsForUsers: [ - "POST /orgs/{org}/copilot/billing/selected_users" - ], - cancelCopilotSeatAssignmentForTeams: [ - "DELETE /orgs/{org}/copilot/billing/selected_teams" - ], - cancelCopilotSeatAssignmentForUsers: [ - "DELETE /orgs/{org}/copilot/billing/selected_users" - ], - getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], - getCopilotSeatDetailsForUser: [ - "GET /orgs/{org}/members/{username}/copilot" - ], - listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] - }, - dependabot: { - addSelectedRepoToOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - createOrUpdateOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}" - ], - createOrUpdateRepoSecret: [ - "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], - deleteRepoSecret: [ - "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], - getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], - getRepoPublicKey: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" - ], - getRepoSecret: [ - "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" - ], - listAlertsForEnterprise: [ - "GET /enterprises/{enterprise}/dependabot/alerts" - ], - listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], - listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], - listSelectedReposForOrgSecret: [ - "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - removeSelectedRepoFromOrgSecret: [ - "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" - ], - setSelectedReposForOrgSecret: [ - "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" - ] - }, - dependencyGraph: { - createRepositorySnapshot: [ - "POST /repos/{owner}/{repo}/dependency-graph/snapshots" - ], - diffRange: [ - "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" - ], - exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] - }, - emojis: { get: ["GET /emojis"] }, - gists: { - checkIsStarred: ["GET /gists/{gist_id}/star"], - create: ["POST /gists"], - createComment: ["POST /gists/{gist_id}/comments"], - delete: ["DELETE /gists/{gist_id}"], - deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], - fork: ["POST /gists/{gist_id}/forks"], - get: ["GET /gists/{gist_id}"], - getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], - getRevision: ["GET /gists/{gist_id}/{sha}"], - list: ["GET /gists"], - listComments: ["GET /gists/{gist_id}/comments"], - listCommits: ["GET /gists/{gist_id}/commits"], - listForUser: ["GET /users/{username}/gists"], - listForks: ["GET /gists/{gist_id}/forks"], - listPublic: ["GET /gists/public"], - listStarred: ["GET /gists/starred"], - star: ["PUT /gists/{gist_id}/star"], - unstar: ["DELETE /gists/{gist_id}/star"], - update: ["PATCH /gists/{gist_id}"], - updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] - }, - git: { - createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], - createCommit: ["POST /repos/{owner}/{repo}/git/commits"], - createRef: ["POST /repos/{owner}/{repo}/git/refs"], - createTag: ["POST /repos/{owner}/{repo}/git/tags"], - createTree: ["POST /repos/{owner}/{repo}/git/trees"], - deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], - getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], - getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], - getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], - getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], - getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], - listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], - updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] - }, - gitignore: { - getAllTemplates: ["GET /gitignore/templates"], - getTemplate: ["GET /gitignore/templates/{name}"] - }, - interactions: { - getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], - getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], - getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], - getRestrictionsForYourPublicRepos: [ - "GET /user/interaction-limits", - {}, - { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } - ], - removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], - removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], - removeRestrictionsForRepo: [ - "DELETE /repos/{owner}/{repo}/interaction-limits" - ], - removeRestrictionsForYourPublicRepos: [ - "DELETE /user/interaction-limits", - {}, - { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } - ], - setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], - setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], - setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], - setRestrictionsForYourPublicRepos: [ - "PUT /user/interaction-limits", - {}, - { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } - ] - }, - issues: { - addAssignees: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], - checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], - checkUserCanBeAssignedToIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" - ], - create: ["POST /repos/{owner}/{repo}/issues"], - createComment: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" - ], - createLabel: ["POST /repos/{owner}/{repo}/labels"], - createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" - ], - deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: [ - "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" - ], - get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], - getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], - getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], - getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], - getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], - list: ["GET /issues"], - listAssignees: ["GET /repos/{owner}/{repo}/assignees"], - listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], - listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], - listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], - listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" - ], - listForAuthenticatedUser: ["GET /user/issues"], - listForOrg: ["GET /orgs/{org}/issues"], - listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: [ - "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" - ], - listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: [ - "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - listMilestones: ["GET /repos/{owner}/{repo}/milestones"], - lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" - ], - removeAssignees: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" - ], - removeLabel: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" - ], - setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], - unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], - update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], - updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], - updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: [ - "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" - ] - }, - licenses: { - get: ["GET /licenses/{license}"], - getAllCommonlyUsed: ["GET /licenses"], - getForRepo: ["GET /repos/{owner}/{repo}/license"] - }, - markdown: { - render: ["POST /markdown"], - renderRaw: [ - "POST /markdown/raw", - { headers: { "content-type": "text/plain; charset=utf-8" } } - ] - }, - meta: { - get: ["GET /meta"], - getAllVersions: ["GET /versions"], - getOctocat: ["GET /octocat"], - getZen: ["GET /zen"], - root: ["GET /"] - }, - migrations: { - cancelImport: [ - "DELETE /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" + function objValues(obj) { + var keys = Object.keys(obj); + var values = []; + for (var i = 0; i < keys.length; i++) { + values.push(obj[keys[i]]); + } + return values; } - ], - deleteArchiveForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/archive" - ], - deleteArchiveForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/archive" - ], - downloadArchiveForOrg: [ - "GET /orgs/{org}/migrations/{migration_id}/archive" - ], - getArchiveForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/archive" - ], - getCommitAuthors: [ - "GET /repos/{owner}/{repo}/import/authors", - {}, - { - deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" + function merge3(a, b) { + var merged = {}; + for (var key in a) { + merged[key] = a[key]; + } + for (var key2 in b) { + merged[key2] = b[key2]; + } + return merged; } - ], - getImportStatus: [ - "GET /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" + var trimLeft; + if (typeof String.prototype.trimLeft === "function") { + trimLeft = function(str2) { + return str2.trimLeft(); + }; + } else { + trimLeft = function(str2) { + return str2.match(/^\s*(.*)/)[1]; + }; } - ], - getLargeFiles: [ - "GET /repos/{owner}/{repo}/import/large_files", - {}, - { - deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" + var TYPE_NUMBER = 0; + var TYPE_ANY = 1; + var TYPE_STRING = 2; + var TYPE_ARRAY = 3; + var TYPE_OBJECT = 4; + var TYPE_BOOLEAN = 5; + var TYPE_EXPREF = 6; + var TYPE_NULL = 7; + var TYPE_ARRAY_NUMBER = 8; + var TYPE_ARRAY_STRING = 9; + var TOK_EOF = "EOF"; + var TOK_UNQUOTEDIDENTIFIER = "UnquotedIdentifier"; + var TOK_QUOTEDIDENTIFIER = "QuotedIdentifier"; + var TOK_RBRACKET = "Rbracket"; + var TOK_RPAREN = "Rparen"; + var TOK_COMMA = "Comma"; + var TOK_COLON = "Colon"; + var TOK_RBRACE = "Rbrace"; + var TOK_NUMBER = "Number"; + var TOK_CURRENT = "Current"; + var TOK_EXPREF = "Expref"; + var TOK_PIPE = "Pipe"; + var TOK_OR = "Or"; + var TOK_AND = "And"; + var TOK_EQ = "EQ"; + var TOK_GT = "GT"; + var TOK_LT = "LT"; + var TOK_GTE = "GTE"; + var TOK_LTE = "LTE"; + var TOK_NE = "NE"; + var TOK_FLATTEN = "Flatten"; + var TOK_STAR = "Star"; + var TOK_FILTER = "Filter"; + var TOK_DOT = "Dot"; + var TOK_NOT = "Not"; + var TOK_LBRACE = "Lbrace"; + var TOK_LBRACKET = "Lbracket"; + var TOK_LPAREN = "Lparen"; + var TOK_LITERAL = "Literal"; + var basicTokens = { + ".": TOK_DOT, + "*": TOK_STAR, + ",": TOK_COMMA, + ":": TOK_COLON, + "{": TOK_LBRACE, + "}": TOK_RBRACE, + "]": TOK_RBRACKET, + "(": TOK_LPAREN, + ")": TOK_RPAREN, + "@": TOK_CURRENT + }; + var operatorStartToken = { + "<": true, + ">": true, + "=": true, + "!": true + }; + var skipChars = { + " ": true, + " ": true, + "\n": true + }; + function isAlpha(ch) { + return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch === "_"; } - ], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], - listForAuthenticatedUser: ["GET /user/migrations"], - listForOrg: ["GET /orgs/{org}/migrations"], - listReposForAuthenticatedUser: [ - "GET /user/migrations/{migration_id}/repositories" - ], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], - listReposForUser: [ - "GET /user/migrations/{migration_id}/repositories", - {}, - { renamed: ["migrations", "listReposForAuthenticatedUser"] } - ], - mapCommitAuthor: [ - "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", - {}, - { - deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" + function isNum(ch) { + return ch >= "0" && ch <= "9" || ch === "-"; } - ], - setLfsPreference: [ - "PATCH /repos/{owner}/{repo}/import/lfs", - {}, - { - deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" + function isAlphaNum(ch) { + return ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z" || ch >= "0" && ch <= "9" || ch === "_"; } - ], - startForAuthenticatedUser: ["POST /user/migrations"], - startForOrg: ["POST /orgs/{org}/migrations"], - startImport: [ - "PUT /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" + function Lexer() { } - ], - unlockRepoForAuthenticatedUser: [ - "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" - ], - unlockRepoForOrg: [ - "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" - ], - updateImport: [ - "PATCH /repos/{owner}/{repo}/import", - {}, - { - deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" + Lexer.prototype = { + tokenize: function(stream) { + var tokens = []; + this._current = 0; + var start; + var identifier; + var token; + while (this._current < stream.length) { + if (isAlpha(stream[this._current])) { + start = this._current; + identifier = this._consumeUnquotedIdentifier(stream); + tokens.push({ + type: TOK_UNQUOTEDIDENTIFIER, + value: identifier, + start + }); + } else if (basicTokens[stream[this._current]] !== void 0) { + tokens.push({ + type: basicTokens[stream[this._current]], + value: stream[this._current], + start: this._current + }); + this._current++; + } else if (isNum(stream[this._current])) { + token = this._consumeNumber(stream); + tokens.push(token); + } else if (stream[this._current] === "[") { + token = this._consumeLBracket(stream); + tokens.push(token); + } else if (stream[this._current] === '"') { + start = this._current; + identifier = this._consumeQuotedIdentifier(stream); + tokens.push({ + type: TOK_QUOTEDIDENTIFIER, + value: identifier, + start + }); + } else if (stream[this._current] === "'") { + start = this._current; + identifier = this._consumeRawStringLiteral(stream); + tokens.push({ + type: TOK_LITERAL, + value: identifier, + start + }); + } else if (stream[this._current] === "`") { + start = this._current; + var literal = this._consumeLiteral(stream); + tokens.push({ + type: TOK_LITERAL, + value: literal, + start + }); + } else if (operatorStartToken[stream[this._current]] !== void 0) { + tokens.push(this._consumeOperator(stream)); + } else if (skipChars[stream[this._current]] !== void 0) { + this._current++; + } else if (stream[this._current] === "&") { + start = this._current; + this._current++; + if (stream[this._current] === "&") { + this._current++; + tokens.push({ type: TOK_AND, value: "&&", start }); + } else { + tokens.push({ type: TOK_EXPREF, value: "&", start }); + } + } else if (stream[this._current] === "|") { + start = this._current; + this._current++; + if (stream[this._current] === "|") { + this._current++; + tokens.push({ type: TOK_OR, value: "||", start }); + } else { + tokens.push({ type: TOK_PIPE, value: "|", start }); + } + } else { + var error = new Error("Unknown character:" + stream[this._current]); + error.name = "LexerError"; + throw error; + } + } + return tokens; + }, + _consumeUnquotedIdentifier: function(stream) { + var start = this._current; + this._current++; + while (this._current < stream.length && isAlphaNum(stream[this._current])) { + this._current++; + } + return stream.slice(start, this._current); + }, + _consumeQuotedIdentifier: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (stream[this._current] !== '"' && this._current < maxLength) { + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === '"')) { + current += 2; + } else { + current++; + } + this._current = current; + } + this._current++; + return JSON.parse(stream.slice(start, this._current)); + }, + _consumeRawStringLiteral: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (stream[this._current] !== "'" && this._current < maxLength) { + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "'")) { + current += 2; + } else { + current++; + } + this._current = current; + } + this._current++; + var literal = stream.slice(start + 1, this._current - 1); + return literal.replace("\\'", "'"); + }, + _consumeNumber: function(stream) { + var start = this._current; + this._current++; + var maxLength = stream.length; + while (isNum(stream[this._current]) && this._current < maxLength) { + this._current++; + } + var value = parseInt(stream.slice(start, this._current)); + return { type: TOK_NUMBER, value, start }; + }, + _consumeLBracket: function(stream) { + var start = this._current; + this._current++; + if (stream[this._current] === "?") { + this._current++; + return { type: TOK_FILTER, value: "[?", start }; + } else if (stream[this._current] === "]") { + this._current++; + return { type: TOK_FLATTEN, value: "[]", start }; + } else { + return { type: TOK_LBRACKET, value: "[", start }; + } + }, + _consumeOperator: function(stream) { + var start = this._current; + var startingChar = stream[start]; + this._current++; + if (startingChar === "!") { + if (stream[this._current] === "=") { + this._current++; + return { type: TOK_NE, value: "!=", start }; + } else { + return { type: TOK_NOT, value: "!", start }; + } + } else if (startingChar === "<") { + if (stream[this._current] === "=") { + this._current++; + return { type: TOK_LTE, value: "<=", start }; + } else { + return { type: TOK_LT, value: "<", start }; + } + } else if (startingChar === ">") { + if (stream[this._current] === "=") { + this._current++; + return { type: TOK_GTE, value: ">=", start }; + } else { + return { type: TOK_GT, value: ">", start }; + } + } else if (startingChar === "=") { + if (stream[this._current] === "=") { + this._current++; + return { type: TOK_EQ, value: "==", start }; + } + } + }, + _consumeLiteral: function(stream) { + this._current++; + var start = this._current; + var maxLength = stream.length; + var literal; + while (stream[this._current] !== "`" && this._current < maxLength) { + var current = this._current; + if (stream[current] === "\\" && (stream[current + 1] === "\\" || stream[current + 1] === "`")) { + current += 2; + } else { + current++; + } + this._current = current; + } + var literalString = trimLeft(stream.slice(start, this._current)); + literalString = literalString.replace("\\`", "`"); + if (this._looksLikeJSON(literalString)) { + literal = JSON.parse(literalString); + } else { + literal = JSON.parse('"' + literalString + '"'); + } + this._current++; + return literal; + }, + _looksLikeJSON: function(literalString) { + var startingChars = '[{"'; + var jsonLiterals = ["true", "false", "null"]; + var numberLooking = "-0123456789"; + if (literalString === "") { + return false; + } else if (startingChars.indexOf(literalString[0]) >= 0) { + return true; + } else if (jsonLiterals.indexOf(literalString) >= 0) { + return true; + } else if (numberLooking.indexOf(literalString[0]) >= 0) { + try { + JSON.parse(literalString); + return true; + } catch (ex) { + return false; + } + } else { + return false; + } + } + }; + var bindingPower = {}; + bindingPower[TOK_EOF] = 0; + bindingPower[TOK_UNQUOTEDIDENTIFIER] = 0; + bindingPower[TOK_QUOTEDIDENTIFIER] = 0; + bindingPower[TOK_RBRACKET] = 0; + bindingPower[TOK_RPAREN] = 0; + bindingPower[TOK_COMMA] = 0; + bindingPower[TOK_RBRACE] = 0; + bindingPower[TOK_NUMBER] = 0; + bindingPower[TOK_CURRENT] = 0; + bindingPower[TOK_EXPREF] = 0; + bindingPower[TOK_PIPE] = 1; + bindingPower[TOK_OR] = 2; + bindingPower[TOK_AND] = 3; + bindingPower[TOK_EQ] = 5; + bindingPower[TOK_GT] = 5; + bindingPower[TOK_LT] = 5; + bindingPower[TOK_GTE] = 5; + bindingPower[TOK_LTE] = 5; + bindingPower[TOK_NE] = 5; + bindingPower[TOK_FLATTEN] = 9; + bindingPower[TOK_STAR] = 20; + bindingPower[TOK_FILTER] = 21; + bindingPower[TOK_DOT] = 40; + bindingPower[TOK_NOT] = 45; + bindingPower[TOK_LBRACE] = 50; + bindingPower[TOK_LBRACKET] = 55; + bindingPower[TOK_LPAREN] = 60; + function Parser() { } - ] - }, - oidc: { - getOidcCustomSubTemplateForOrg: [ - "GET /orgs/{org}/actions/oidc/customization/sub" - ], - updateOidcCustomSubTemplateForOrg: [ - "PUT /orgs/{org}/actions/oidc/customization/sub" - ] - }, - orgs: { - addSecurityManagerTeam: [ - "PUT /orgs/{org}/security-managers/teams/{team_slug}" - ], - assignTeamToOrgRole: [ - "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - assignUserToOrgRole: [ - "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - blockUser: ["PUT /orgs/{org}/blocks/{username}"], - cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], - checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], - checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], - checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: [ - "PUT /orgs/{org}/outside_collaborators/{username}" - ], - createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], - createInvitation: ["POST /orgs/{org}/invitations"], - createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], - createOrUpdateCustomPropertiesValuesForRepos: [ - "PATCH /orgs/{org}/properties/values" - ], - createOrUpdateCustomProperty: [ - "PUT /orgs/{org}/properties/schema/{custom_property_name}" - ], - createWebhook: ["POST /orgs/{org}/hooks"], - delete: ["DELETE /orgs/{org}"], - deleteCustomOrganizationRole: [ - "DELETE /orgs/{org}/organization-roles/{role_id}" - ], - deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], - enableOrDisableSecurityProductOnAllOrgRepos: [ - "POST /orgs/{org}/{security_product}/{enablement}" - ], - get: ["GET /orgs/{org}"], - getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], - getCustomProperty: [ - "GET /orgs/{org}/properties/schema/{custom_property_name}" - ], - getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], - getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], - getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], - getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], - getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], - getWebhookDelivery: [ - "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - list: ["GET /organizations"], - listAppInstallations: ["GET /orgs/{org}/installations"], - listBlockedUsers: ["GET /orgs/{org}/blocks"], - listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], - listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], - listForAuthenticatedUser: ["GET /user/orgs"], - listForUser: ["GET /users/{username}/orgs"], - listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], - listMembers: ["GET /orgs/{org}/members"], - listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], - listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], - listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], - listOrgRoles: ["GET /orgs/{org}/organization-roles"], - listOrganizationFineGrainedPermissions: [ - "GET /orgs/{org}/organization-fine-grained-permissions" - ], - listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], - listPatGrantRepositories: [ - "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" - ], - listPatGrantRequestRepositories: [ - "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" - ], - listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], - listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], - listPendingInvitations: ["GET /orgs/{org}/invitations"], - listPublicMembers: ["GET /orgs/{org}/public_members"], - listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], - listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /orgs/{org}/hooks"], - patchCustomOrganizationRole: [ - "PATCH /orgs/{org}/organization-roles/{role_id}" - ], - pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeCustomProperty: [ - "DELETE /orgs/{org}/properties/schema/{custom_property_name}" - ], - removeMember: ["DELETE /orgs/{org}/members/{username}"], - removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: [ - "DELETE /orgs/{org}/outside_collaborators/{username}" - ], - removePublicMembershipForAuthenticatedUser: [ - "DELETE /orgs/{org}/public_members/{username}" - ], - removeSecurityManagerTeam: [ - "DELETE /orgs/{org}/security-managers/teams/{team_slug}" - ], - reviewPatGrantRequest: [ - "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" - ], - reviewPatGrantRequestsInBulk: [ - "POST /orgs/{org}/personal-access-token-requests" - ], - revokeAllOrgRolesTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" - ], - revokeAllOrgRolesUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}" - ], - revokeOrgRoleTeam: [ - "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" - ], - revokeOrgRoleUser: [ - "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" - ], - setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: [ - "PUT /orgs/{org}/public_members/{username}" - ], - unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], - update: ["PATCH /orgs/{org}"], - updateMembershipForAuthenticatedUser: [ - "PATCH /user/memberships/orgs/{org}" - ], - updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], - updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], - updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], - updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] - }, - packages: { - deletePackageForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}" - ], - deletePackageForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}" - ], - deletePackageForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}" - ], - deletePackageVersionForAuthenticatedUser: [ - "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForOrg: [ - "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - deletePackageVersionForUser: [ - "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getAllPackageVersionsForAPackageOwnedByAnOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", - {}, - { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } - ], - getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions", - {}, - { - renamed: [ - "packages", - "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" - ] + Parser.prototype = { + parse: function(expression) { + this._loadTokens(expression); + this.index = 0; + var ast = this.expression(0); + if (this._lookahead(0) !== TOK_EOF) { + var t = this._lookaheadToken(0); + var error = new Error( + "Unexpected token type: " + t.type + ", value: " + t.value + ); + error.name = "ParserError"; + throw error; + } + return ast; + }, + _loadTokens: function(expression) { + var lexer = new Lexer(); + var tokens = lexer.tokenize(expression); + tokens.push({ type: TOK_EOF, value: "", start: expression.length }); + this.tokens = tokens; + }, + expression: function(rbp) { + var leftToken = this._lookaheadToken(0); + this._advance(); + var left = this.nud(leftToken); + var currentToken = this._lookahead(0); + while (rbp < bindingPower[currentToken]) { + this._advance(); + left = this.led(currentToken, left); + currentToken = this._lookahead(0); + } + return left; + }, + _lookahead: function(number) { + return this.tokens[this.index + number].type; + }, + _lookaheadToken: function(number) { + return this.tokens[this.index + number]; + }, + _advance: function() { + this.index++; + }, + nud: function(token) { + var left; + var right; + var expression; + switch (token.type) { + case TOK_LITERAL: + return { type: "Literal", value: token.value }; + case TOK_UNQUOTEDIDENTIFIER: + return { type: "Field", name: token.value }; + case TOK_QUOTEDIDENTIFIER: + var node2 = { type: "Field", name: token.value }; + if (this._lookahead(0) === TOK_LPAREN) { + throw new Error("Quoted identifier not allowed for function names."); + } else { + return node2; + } + break; + case TOK_NOT: + right = this.expression(bindingPower.Not); + return { type: "NotExpression", children: [right] }; + case TOK_STAR: + left = { type: "Identity" }; + right = null; + if (this._lookahead(0) === TOK_RBRACKET) { + right = { type: "Identity" }; + } else { + right = this._parseProjectionRHS(bindingPower.Star); + } + return { type: "ValueProjection", children: [left, right] }; + case TOK_FILTER: + return this.led(token.type, { type: "Identity" }); + case TOK_LBRACE: + return this._parseMultiselectHash(); + case TOK_FLATTEN: + left = { type: TOK_FLATTEN, children: [{ type: "Identity" }] }; + right = this._parseProjectionRHS(bindingPower.Flatten); + return { type: "Projection", children: [left, right] }; + case TOK_LBRACKET: + if (this._lookahead(0) === TOK_NUMBER || this._lookahead(0) === TOK_COLON) { + right = this._parseIndexExpression(); + return this._projectIfSlice({ type: "Identity" }, right); + } else if (this._lookahead(0) === TOK_STAR && this._lookahead(1) === TOK_RBRACKET) { + this._advance(); + this._advance(); + right = this._parseProjectionRHS(bindingPower.Star); + return { + type: "Projection", + children: [{ type: "Identity" }, right] + }; + } else { + return this._parseMultiselectList(); + } + break; + case TOK_CURRENT: + return { type: TOK_CURRENT }; + case TOK_EXPREF: + expression = this.expression(bindingPower.Expref); + return { type: "ExpressionReference", children: [expression] }; + case TOK_LPAREN: + var args = []; + while (this._lookahead(0) !== TOK_RPAREN) { + if (this._lookahead(0) === TOK_CURRENT) { + expression = { type: TOK_CURRENT }; + this._advance(); + } else { + expression = this.expression(0); + } + args.push(expression); + } + this._match(TOK_RPAREN); + return args[0]; + default: + this._errorToken(token); + } + }, + led: function(tokenName, left) { + var right; + switch (tokenName) { + case TOK_DOT: + var rbp = bindingPower.Dot; + if (this._lookahead(0) !== TOK_STAR) { + right = this._parseDotRHS(rbp); + return { type: "Subexpression", children: [left, right] }; + } else { + this._advance(); + right = this._parseProjectionRHS(rbp); + return { type: "ValueProjection", children: [left, right] }; + } + break; + case TOK_PIPE: + right = this.expression(bindingPower.Pipe); + return { type: TOK_PIPE, children: [left, right] }; + case TOK_OR: + right = this.expression(bindingPower.Or); + return { type: "OrExpression", children: [left, right] }; + case TOK_AND: + right = this.expression(bindingPower.And); + return { type: "AndExpression", children: [left, right] }; + case TOK_LPAREN: + var name = left.name; + var args = []; + var expression, node2; + while (this._lookahead(0) !== TOK_RPAREN) { + if (this._lookahead(0) === TOK_CURRENT) { + expression = { type: TOK_CURRENT }; + this._advance(); + } else { + expression = this.expression(0); + } + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); + } + args.push(expression); + } + this._match(TOK_RPAREN); + node2 = { type: "Function", name, children: args }; + return node2; + case TOK_FILTER: + var condition = this.expression(0); + this._match(TOK_RBRACKET); + if (this._lookahead(0) === TOK_FLATTEN) { + right = { type: "Identity" }; + } else { + right = this._parseProjectionRHS(bindingPower.Filter); + } + return { type: "FilterProjection", children: [left, right, condition] }; + case TOK_FLATTEN: + var leftNode = { type: TOK_FLATTEN, children: [left] }; + var rightNode = this._parseProjectionRHS(bindingPower.Flatten); + return { type: "Projection", children: [leftNode, rightNode] }; + case TOK_EQ: + case TOK_NE: + case TOK_GT: + case TOK_GTE: + case TOK_LT: + case TOK_LTE: + return this._parseComparator(left, tokenName); + case TOK_LBRACKET: + var token = this._lookaheadToken(0); + if (token.type === TOK_NUMBER || token.type === TOK_COLON) { + right = this._parseIndexExpression(); + return this._projectIfSlice(left, right); + } else { + this._match(TOK_STAR); + this._match(TOK_RBRACKET); + right = this._parseProjectionRHS(bindingPower.Star); + return { type: "Projection", children: [left, right] }; + } + break; + default: + this._errorToken(this._lookaheadToken(0)); + } + }, + _match: function(tokenType) { + if (this._lookahead(0) === tokenType) { + this._advance(); + } else { + var t = this._lookaheadToken(0); + var error = new Error("Expected " + tokenType + ", got: " + t.type); + error.name = "ParserError"; + throw error; + } + }, + _errorToken: function(token) { + var error = new Error("Invalid token (" + token.type + '): "' + token.value + '"'); + error.name = "ParserError"; + throw error; + }, + _parseIndexExpression: function() { + if (this._lookahead(0) === TOK_COLON || this._lookahead(1) === TOK_COLON) { + return this._parseSliceExpression(); + } else { + var node2 = { + type: "Index", + value: this._lookaheadToken(0).value + }; + this._advance(); + this._match(TOK_RBRACKET); + return node2; + } + }, + _projectIfSlice: function(left, right) { + var indexExpr = { type: "IndexExpression", children: [left, right] }; + if (right.type === "Slice") { + return { + type: "Projection", + children: [indexExpr, this._parseProjectionRHS(bindingPower.Star)] + }; + } else { + return indexExpr; + } + }, + _parseSliceExpression: function() { + var parts = [null, null, null]; + var index = 0; + var currentToken = this._lookahead(0); + while (currentToken !== TOK_RBRACKET && index < 3) { + if (currentToken === TOK_COLON) { + index++; + this._advance(); + } else if (currentToken === TOK_NUMBER) { + parts[index] = this._lookaheadToken(0).value; + this._advance(); + } else { + var t = this._lookahead(0); + var error = new Error("Syntax error, unexpected token: " + t.value + "(" + t.type + ")"); + error.name = "Parsererror"; + throw error; + } + currentToken = this._lookahead(0); + } + this._match(TOK_RBRACKET); + return { + type: "Slice", + children: parts + }; + }, + _parseComparator: function(left, comparator) { + var right = this.expression(bindingPower[comparator]); + return { type: "Comparator", name: comparator, children: [left, right] }; + }, + _parseDotRHS: function(rbp) { + var lookahead = this._lookahead(0); + var exprTokens = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER, TOK_STAR]; + if (exprTokens.indexOf(lookahead) >= 0) { + return this.expression(rbp); + } else if (lookahead === TOK_LBRACKET) { + this._match(TOK_LBRACKET); + return this._parseMultiselectList(); + } else if (lookahead === TOK_LBRACE) { + this._match(TOK_LBRACE); + return this._parseMultiselectHash(); + } + }, + _parseProjectionRHS: function(rbp) { + var right; + if (bindingPower[this._lookahead(0)] < 10) { + right = { type: "Identity" }; + } else if (this._lookahead(0) === TOK_LBRACKET) { + right = this.expression(rbp); + } else if (this._lookahead(0) === TOK_FILTER) { + right = this.expression(rbp); + } else if (this._lookahead(0) === TOK_DOT) { + this._match(TOK_DOT); + right = this._parseDotRHS(rbp); + } else { + var t = this._lookaheadToken(0); + var error = new Error("Sytanx error, unexpected token: " + t.value + "(" + t.type + ")"); + error.name = "ParserError"; + throw error; + } + return right; + }, + _parseMultiselectList: function() { + var expressions = []; + while (this._lookahead(0) !== TOK_RBRACKET) { + var expression = this.expression(0); + expressions.push(expression); + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); + if (this._lookahead(0) === TOK_RBRACKET) { + throw new Error("Unexpected token Rbracket"); + } + } + } + this._match(TOK_RBRACKET); + return { type: "MultiSelectList", children: expressions }; + }, + _parseMultiselectHash: function() { + var pairs2 = []; + var identifierTypes = [TOK_UNQUOTEDIDENTIFIER, TOK_QUOTEDIDENTIFIER]; + var keyToken, keyName, value, node2; + for (; ; ) { + keyToken = this._lookaheadToken(0); + if (identifierTypes.indexOf(keyToken.type) < 0) { + throw new Error("Expecting an identifier token, got: " + keyToken.type); + } + keyName = keyToken.value; + this._advance(); + this._match(TOK_COLON); + value = this.expression(0); + node2 = { type: "KeyValuePair", name: keyName, value }; + pairs2.push(node2); + if (this._lookahead(0) === TOK_COMMA) { + this._match(TOK_COMMA); + } else if (this._lookahead(0) === TOK_RBRACE) { + this._match(TOK_RBRACE); + break; + } + } + return { type: "MultiSelectHash", children: pairs2 }; + } + }; + function TreeInterpreter(runtime) { + this.runtime = runtime; } - ], - getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByOrg: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" - ], - getAllPackageVersionsForPackageOwnedByUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions" - ], - getPackageForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}" - ], - getPackageForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}" - ], - getPackageForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}" - ], - getPackageVersionForAuthenticatedUser: [ - "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForOrganization: [ - "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - getPackageVersionForUser: [ - "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" - ], - listDockerMigrationConflictingPackagesForAuthenticatedUser: [ - "GET /user/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForOrganization: [ - "GET /orgs/{org}/docker/conflicts" - ], - listDockerMigrationConflictingPackagesForUser: [ - "GET /users/{username}/docker/conflicts" - ], - listPackagesForAuthenticatedUser: ["GET /user/packages"], - listPackagesForOrganization: ["GET /orgs/{org}/packages"], - listPackagesForUser: ["GET /users/{username}/packages"], - restorePackageForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" - ], - restorePackageVersionForAuthenticatedUser: [ - "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForOrg: [ - "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ], - restorePackageVersionForUser: [ - "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" - ] - }, - projects: { - addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], - createCard: ["POST /projects/columns/{column_id}/cards"], - createColumn: ["POST /projects/{project_id}/columns"], - createForAuthenticatedUser: ["POST /user/projects"], - createForOrg: ["POST /orgs/{org}/projects"], - createForRepo: ["POST /repos/{owner}/{repo}/projects"], - delete: ["DELETE /projects/{project_id}"], - deleteCard: ["DELETE /projects/columns/cards/{card_id}"], - deleteColumn: ["DELETE /projects/columns/{column_id}"], - get: ["GET /projects/{project_id}"], - getCard: ["GET /projects/columns/cards/{card_id}"], - getColumn: ["GET /projects/columns/{column_id}"], - getPermissionForUser: [ - "GET /projects/{project_id}/collaborators/{username}/permission" - ], - listCards: ["GET /projects/columns/{column_id}/cards"], - listCollaborators: ["GET /projects/{project_id}/collaborators"], - listColumns: ["GET /projects/{project_id}/columns"], - listForOrg: ["GET /orgs/{org}/projects"], - listForRepo: ["GET /repos/{owner}/{repo}/projects"], - listForUser: ["GET /users/{username}/projects"], - moveCard: ["POST /projects/columns/cards/{card_id}/moves"], - moveColumn: ["POST /projects/columns/{column_id}/moves"], - removeCollaborator: [ - "DELETE /projects/{project_id}/collaborators/{username}" - ], - update: ["PATCH /projects/{project_id}"], - updateCard: ["PATCH /projects/columns/cards/{card_id}"], - updateColumn: ["PATCH /projects/columns/{column_id}"] - }, - pulls: { - checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" - ], - createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - deletePendingReview: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - deleteReviewComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ], - dismissReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" - ], - get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" - ], - listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], - listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - listReviewComments: [ - "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" - ], - listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], - listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: [ - "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - requestReviewers: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" - ], - submitReview: [ - "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" - ], - update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" - ], - updateReview: [ - "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" - ], - updateReviewComment: [ - "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" - ] - }, - rateLimit: { get: ["GET /rate_limit"] }, - reactions: { - createForCommitComment: [ - "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - createForIssue: [ - "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" - ], - createForIssueComment: [ - "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - createForPullRequestReviewComment: [ - "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - createForRelease: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - createForTeamDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - createForTeamDiscussionInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ], - deleteForCommitComment: [ - "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForIssue: [ - "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" - ], - deleteForIssueComment: [ - "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForPullRequestComment: [ - "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" - ], - deleteForRelease: [ - "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" - ], - deleteForTeamDiscussion: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" - ], - deleteForTeamDiscussionComment: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" - ], - listForCommitComment: [ - "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" - ], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], - listForIssueComment: [ - "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" - ], - listForPullRequestReviewComment: [ - "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" - ], - listForRelease: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" - ], - listForTeamDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" - ], - listForTeamDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" - ] - }, - repos: { - acceptInvitation: [ - "PATCH /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } - ], - acceptInvitationForAuthenticatedUser: [ - "PATCH /user/repository_invitations/{invitation_id}" - ], - addAppAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - addTeamAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - addUserAccessRestrictions: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - cancelPagesDeployment: [ - "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" - ], - checkAutomatedSecurityFixes: [ - "GET /repos/{owner}/{repo}/automated-security-fixes" - ], - checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkVulnerabilityAlerts: [ - "GET /repos/{owner}/{repo}/vulnerability-alerts" - ], - codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], - compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], - compareCommitsWithBasehead: [ - "GET /repos/{owner}/{repo}/compare/{basehead}" - ], - createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], - createCommitComment: [ - "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - createCommitSignatureProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], - createDeployKey: ["POST /repos/{owner}/{repo}/keys"], - createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentBranchPolicy: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - createDeploymentProtectionRule: [ - "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - createDeploymentStatus: [ - "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], - createForAuthenticatedUser: ["POST /user/repos"], - createFork: ["POST /repos/{owner}/{repo}/forks"], - createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateCustomPropertiesValues: [ - "PATCH /repos/{owner}/{repo}/properties/values" - ], - createOrUpdateEnvironment: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}" - ], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createOrgRuleset: ["POST /orgs/{org}/rulesets"], - createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages"], - createRelease: ["POST /repos/{owner}/{repo}/releases"], - createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], - createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], - createUsingTemplate: [ - "POST /repos/{template_owner}/{template_repo}/generate" - ], - createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: [ - "DELETE /user/repository_invitations/{invitation_id}", - {}, - { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } - ], - declineInvitationForAuthenticatedUser: [ - "DELETE /user/repository_invitations/{invitation_id}" - ], - delete: ["DELETE /repos/{owner}/{repo}"], - deleteAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - deleteAdminBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - deleteAnEnvironment: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}" - ], - deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], - deleteBranchProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" - ], - deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: [ - "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" - ], - deleteDeploymentBranchPolicy: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], - deleteInvitation: [ - "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], - deletePullRequestReviewProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], - deleteReleaseAsset: [ - "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - deleteTagProtection: [ - "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" - ], - deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: [ - "DELETE /repos/{owner}/{repo}/automated-security-fixes" - ], - disableDeploymentProtectionRule: [ - "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - disablePrivateVulnerabilityReporting: [ - "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - disableVulnerabilityAlerts: [ - "DELETE /repos/{owner}/{repo}/vulnerability-alerts" - ], - downloadArchive: [ - "GET /repos/{owner}/{repo}/zipball/{ref}", - {}, - { renamed: ["repos", "downloadZipballArchive"] } - ], - downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], - downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], - enableAutomatedSecurityFixes: [ - "PUT /repos/{owner}/{repo}/automated-security-fixes" - ], - enablePrivateVulnerabilityReporting: [ - "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" - ], - enableVulnerabilityAlerts: [ - "PUT /repos/{owner}/{repo}/vulnerability-alerts" - ], - generateReleaseNotes: [ - "POST /repos/{owner}/{repo}/releases/generate-notes" - ], - get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" - ], - getAdminBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - getAllDeploymentProtectionRules: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" - ], - getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], - getAllStatusCheckContexts: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" - ], - getAllTopics: ["GET /repos/{owner}/{repo}/topics"], - getAppsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" - ], - getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], - getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection" - ], - getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], - getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], - getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: [ - "GET /repos/{owner}/{repo}/collaborators/{username}/permission" - ], - getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], - getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], - getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], - getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" - ], - getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], - getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], - getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], - getCustomDeploymentProtectionRule: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" - ], - getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], - getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], - getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentBranchPolicy: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - getDeploymentStatus: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" - ], - getEnvironment: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}" - ], - getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], - getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], - getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], - getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], - getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], - getOrgRulesets: ["GET /orgs/{org}/rulesets"], - getPages: ["GET /repos/{owner}/{repo}/pages"], - getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], - getPagesDeployment: [ - "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" - ], - getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], - getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], - getReadme: ["GET /repos/{owner}/{repo}/readme"], - getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], - getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], - getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], - getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getRepoRuleSuite: [ - "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" - ], - getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], - getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], - getStatusChecksProtection: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - getTeamsWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" - ], - getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], - getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: [ - "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" - ], - getViews: ["GET /repos/{owner}/{repo}/traffic/views"], - getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], - getWebhookConfigForRepo: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - getWebhookDelivery: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" - ], - listActivities: ["GET /repos/{owner}/{repo}/activity"], - listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], - listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" - ], - listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" - ], - listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: [ - "GET /repos/{owner}/{repo}/commits/{ref}/statuses" - ], - listCommits: ["GET /repos/{owner}/{repo}/commits"], - listContributors: ["GET /repos/{owner}/{repo}/contributors"], - listCustomDeploymentRuleIntegrations: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" - ], - listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentBranchPolicies: [ - "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" - ], - listDeploymentStatuses: [ - "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" - ], - listDeployments: ["GET /repos/{owner}/{repo}/deployments"], - listForAuthenticatedUser: ["GET /user/repos"], - listForOrg: ["GET /orgs/{org}/repos"], - listForUser: ["GET /users/{username}/repos"], - listForks: ["GET /repos/{owner}/{repo}/forks"], - listInvitations: ["GET /repos/{owner}/{repo}/invitations"], - listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], - listLanguages: ["GET /repos/{owner}/{repo}/languages"], - listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], - listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: [ - "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" - ], - listReleaseAssets: [ - "GET /repos/{owner}/{repo}/releases/{release_id}/assets" - ], - listReleases: ["GET /repos/{owner}/{repo}/releases"], - listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], - listTags: ["GET /repos/{owner}/{repo}/tags"], - listTeams: ["GET /repos/{owner}/{repo}/teams"], - listWebhookDeliveries: [ - "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" - ], - listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], - merge: ["POST /repos/{owner}/{repo}/merges"], - mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], - pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: [ - "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" - ], - removeAppAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - removeCollaborator: [ - "DELETE /repos/{owner}/{repo}/collaborators/{username}" - ], - removeStatusCheckContexts: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - removeStatusCheckProtection: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - removeTeamAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - removeUserAccessRestrictions: [ - "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], - requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: [ - "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" - ], - setAppAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", - {}, - { mapToData: "apps" } - ], - setStatusCheckContexts: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", - {}, - { mapToData: "contexts" } - ], - setTeamAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", - {}, - { mapToData: "teams" } - ], - setUserAccessRestrictions: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", - {}, - { mapToData: "users" } - ], - testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], - transfer: ["POST /repos/{owner}/{repo}/transfer"], - update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: [ - "PUT /repos/{owner}/{repo}/branches/{branch}/protection" - ], - updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], - updateDeploymentBranchPolicy: [ - "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" - ], - updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: [ - "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" - ], - updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], - updatePullRequestReviewProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" - ], - updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: [ - "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" - ], - updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], - updateStatusCheckPotection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", - {}, - { renamed: ["repos", "updateStatusCheckProtection"] } - ], - updateStatusCheckProtection: [ - "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" - ], - updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - updateWebhookConfigForRepo: [ - "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" - ], - uploadReleaseAsset: [ - "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", - { baseUrl: "https://uploads.github.com" } - ] - }, - search: { - code: ["GET /search/code"], - commits: ["GET /search/commits"], - issuesAndPullRequests: ["GET /search/issues"], - labels: ["GET /search/labels"], - repos: ["GET /search/repositories"], - topics: ["GET /search/topics"], - users: ["GET /search/users"] - }, - secretScanning: { - getAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ], - listAlertsForEnterprise: [ - "GET /enterprises/{enterprise}/secret-scanning/alerts" - ], - listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], - listLocationsForAlert: [ - "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" - ], - updateAlert: [ - "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" - ] - }, - securityAdvisories: { - createFork: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" - ], - createPrivateVulnerabilityReport: [ - "POST /repos/{owner}/{repo}/security-advisories/reports" - ], - createRepositoryAdvisory: [ - "POST /repos/{owner}/{repo}/security-advisories" - ], - createRepositoryAdvisoryCveRequest: [ - "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" - ], - getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], - getRepositoryAdvisory: [ - "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ], - listGlobalAdvisories: ["GET /advisories"], - listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], - listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], - updateRepositoryAdvisory: [ - "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" - ] - }, - teams: { - addOrUpdateMembershipForUserInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - addOrUpdateProjectPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - addOrUpdateRepoPermissionsInOrg: [ - "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - checkPermissionsForProjectInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - checkPermissionsForRepoInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: [ - "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - deleteDiscussionInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], - getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - getDiscussionInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - getMembershipForUserInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - list: ["GET /orgs/{org}/teams"], - listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" - ], - listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], - listForAuthenticatedUser: ["GET /user/teams"], - listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], - listPendingInvitationsInOrg: [ - "GET /orgs/{org}/teams/{team_slug}/invitations" - ], - listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], - listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" - ], - removeProjectInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" - ], - removeRepoInOrg: [ - "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" - ], - updateDiscussionCommentInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" - ], - updateDiscussionInOrg: [ - "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - ], - updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] - }, - users: { - addEmailForAuthenticated: [ - "POST /user/emails", - {}, - { renamed: ["users", "addEmailForAuthenticatedUser"] } - ], - addEmailForAuthenticatedUser: ["POST /user/emails"], - addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], - block: ["PUT /user/blocks/{username}"], - checkBlocked: ["GET /user/blocks/{username}"], - checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], - checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: [ - "POST /user/gpg_keys", - {}, - { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } - ], - createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: [ - "POST /user/keys", - {}, - { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } - ], - createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], - createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], - deleteEmailForAuthenticated: [ - "DELETE /user/emails", - {}, - { renamed: ["users", "deleteEmailForAuthenticatedUser"] } - ], - deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: [ - "DELETE /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } - ], - deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: [ - "DELETE /user/keys/{key_id}", - {}, - { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } - ], - deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], - deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], - deleteSshSigningKeyForAuthenticatedUser: [ - "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - follow: ["PUT /user/following/{username}"], - getAuthenticated: ["GET /user"], - getByUsername: ["GET /users/{username}"], - getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: [ - "GET /user/gpg_keys/{gpg_key_id}", - {}, - { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } - ], - getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: [ - "GET /user/keys/{key_id}", - {}, - { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } - ], - getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], - getSshSigningKeyForAuthenticatedUser: [ - "GET /user/ssh_signing_keys/{ssh_signing_key_id}" - ], - list: ["GET /users"], - listBlockedByAuthenticated: [ - "GET /user/blocks", - {}, - { renamed: ["users", "listBlockedByAuthenticatedUser"] } - ], - listBlockedByAuthenticatedUser: ["GET /user/blocks"], - listEmailsForAuthenticated: [ - "GET /user/emails", - {}, - { renamed: ["users", "listEmailsForAuthenticatedUser"] } - ], - listEmailsForAuthenticatedUser: ["GET /user/emails"], - listFollowedByAuthenticated: [ - "GET /user/following", - {}, - { renamed: ["users", "listFollowedByAuthenticatedUser"] } - ], - listFollowedByAuthenticatedUser: ["GET /user/following"], - listFollowersForAuthenticatedUser: ["GET /user/followers"], - listFollowersForUser: ["GET /users/{username}/followers"], - listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: [ - "GET /user/gpg_keys", - {}, - { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } - ], - listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], - listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: [ - "GET /user/public_emails", - {}, - { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } - ], - listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], - listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: [ - "GET /user/keys", - {}, - { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } - ], - listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], - listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], - listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], - listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], - listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], - setPrimaryEmailVisibilityForAuthenticated: [ - "PATCH /user/email/visibility", - {}, - { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } - ], - setPrimaryEmailVisibilityForAuthenticatedUser: [ - "PATCH /user/email/visibility" - ], - unblock: ["DELETE /user/blocks/{username}"], - unfollow: ["DELETE /user/following/{username}"], - updateAuthenticated: ["PATCH /user"] - } -}; -var endpoints_default = Endpoints; - -// pkg/dist-src/endpoints-to-methods.js -var endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign( - { - method, - url - }, - defaults - ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); - } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations - }); - } -} -var handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true - }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; - return true; - }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; - }, - set(target, methodName, value) { - return target.cache[methodName] = value; - }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; - } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; - } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); - } - return cache[methodName]; - } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); - } - return newMethods; -} -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); - } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); - } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); - } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; + TreeInterpreter.prototype = { + search: function(node2, value) { + return this.visit(node2, value); + }, + visit: function(node2, value) { + var matched, current, result, first, second, field, left, right, collected, i; + switch (node2.type) { + case "Field": + if (value === null) { + return null; + } else if (isObject2(value)) { + field = value[node2.name]; + if (field === void 0) { + return null; + } else { + return field; + } + } else { + return null; + } + break; + case "Subexpression": + result = this.visit(node2.children[0], value); + for (i = 1; i < node2.children.length; i++) { + result = this.visit(node2.children[1], result); + if (result === null) { + return null; + } + } + return result; + case "IndexExpression": + left = this.visit(node2.children[0], value); + right = this.visit(node2.children[1], left); + return right; + case "Index": + if (!isArray(value)) { + return null; + } + var index = node2.value; + if (index < 0) { + index = value.length + index; + } + result = value[index]; + if (result === void 0) { + result = null; + } + return result; + case "Slice": + if (!isArray(value)) { + return null; + } + var sliceParams = node2.children.slice(0); + var computed = this.computeSliceParams(value.length, sliceParams); + var start = computed[0]; + var stop = computed[1]; + var step = computed[2]; + result = []; + if (step > 0) { + for (i = start; i < stop; i += step) { + result.push(value[i]); + } + } else { + for (i = start; i > stop; i += step) { + result.push(value[i]); + } + } + return result; + case "Projection": + var base = this.visit(node2.children[0], value); + if (!isArray(base)) { + return null; + } + collected = []; + for (i = 0; i < base.length; i++) { + current = this.visit(node2.children[1], base[i]); + if (current !== null) { + collected.push(current); + } + } + return collected; + case "ValueProjection": + base = this.visit(node2.children[0], value); + if (!isObject2(base)) { + return null; + } + collected = []; + var values = objValues(base); + for (i = 0; i < values.length; i++) { + current = this.visit(node2.children[1], values[i]); + if (current !== null) { + collected.push(current); + } + } + return collected; + case "FilterProjection": + base = this.visit(node2.children[0], value); + if (!isArray(base)) { + return null; + } + var filtered = []; + var finalResults = []; + for (i = 0; i < base.length; i++) { + matched = this.visit(node2.children[2], base[i]); + if (!isFalse(matched)) { + filtered.push(base[i]); + } + } + for (var j = 0; j < filtered.length; j++) { + current = this.visit(node2.children[1], filtered[j]); + if (current !== null) { + finalResults.push(current); + } + } + return finalResults; + case "Comparator": + first = this.visit(node2.children[0], value); + second = this.visit(node2.children[1], value); + switch (node2.name) { + case TOK_EQ: + result = strictDeepEqual(first, second); + break; + case TOK_NE: + result = !strictDeepEqual(first, second); + break; + case TOK_GT: + result = first > second; + break; + case TOK_GTE: + result = first >= second; + break; + case TOK_LT: + result = first < second; + break; + case TOK_LTE: + result = first <= second; + break; + default: + throw new Error("Unknown comparator: " + node2.name); + } + return result; + case TOK_FLATTEN: + var original = this.visit(node2.children[0], value); + if (!isArray(original)) { + return null; + } + var merged = []; + for (i = 0; i < original.length; i++) { + current = original[i]; + if (isArray(current)) { + merged.push.apply(merged, current); + } else { + merged.push(current); + } + } + return merged; + case "Identity": + return value; + case "MultiSelectList": + if (value === null) { + return null; + } + collected = []; + for (i = 0; i < node2.children.length; i++) { + collected.push(this.visit(node2.children[i], value)); + } + return collected; + case "MultiSelectHash": + if (value === null) { + return null; + } + collected = {}; + var child; + for (i = 0; i < node2.children.length; i++) { + child = node2.children[i]; + collected[child.name] = this.visit(child.value, value); + } + return collected; + case "OrExpression": + matched = this.visit(node2.children[0], value); + if (isFalse(matched)) { + matched = this.visit(node2.children[1], value); + } + return matched; + case "AndExpression": + first = this.visit(node2.children[0], value); + if (isFalse(first) === true) { + return first; + } + return this.visit(node2.children[1], value); + case "NotExpression": + first = this.visit(node2.children[0], value); + return isFalse(first); + case "Literal": + return node2.value; + case TOK_PIPE: + left = this.visit(node2.children[0], value); + return this.visit(node2.children[1], left); + case TOK_CURRENT: + return value; + case "Function": + var resolvedArgs = []; + for (i = 0; i < node2.children.length; i++) { + resolvedArgs.push(this.visit(node2.children[i], value)); + } + return this.runtime.callFunction(node2.name, resolvedArgs); + case "ExpressionReference": + var refNode = node2.children[0]; + refNode.jmespathType = TOK_EXPREF; + return refNode; + default: + throw new Error("Unknown node type: " + node2.type); + } + }, + computeSliceParams: function(arrayLength, sliceParams) { + var start = sliceParams[0]; + var stop = sliceParams[1]; + var step = sliceParams[2]; + var computed = [null, null, null]; + if (step === null) { + step = 1; + } else if (step === 0) { + var error = new Error("Invalid slice, step cannot be 0"); + error.name = "RuntimeError"; + throw error; + } + var stepValueNegative = step < 0 ? true : false; + if (start === null) { + start = stepValueNegative ? arrayLength - 1 : 0; + } else { + start = this.capSliceRange(arrayLength, start, step); + } + if (stop === null) { + stop = stepValueNegative ? -1 : arrayLength; + } else { + stop = this.capSliceRange(arrayLength, stop, step); + } + computed[0] = start; + computed[1] = stop; + computed[2] = step; + return computed; + }, + capSliceRange: function(arrayLength, actualValue, step) { + if (actualValue < 0) { + actualValue += arrayLength; + if (actualValue < 0) { + actualValue = step < 0 ? -1 : 0; + } + } else if (actualValue >= arrayLength) { + actualValue = step < 0 ? arrayLength - 1 : arrayLength; } - delete options2[name]; + return actualValue; } + }; + function Runtime(interpreter) { + this._interpreter = interpreter; + this.functionTable = { + // name: [function, ] + // The can be: + // + // { + // args: [[type1, type2], [type1, type2]], + // variadic: true|false + // } + // + // Each arg in the arg list is a list of valid types + // (if the function is overloaded and supports multiple + // types. If the type is "any" then no type checking + // occurs on the argument. Variadic is optional + // and if not provided is assumed to be false. + abs: { _func: this._functionAbs, _signature: [{ types: [TYPE_NUMBER] }] }, + avg: { _func: this._functionAvg, _signature: [{ types: [TYPE_ARRAY_NUMBER] }] }, + ceil: { _func: this._functionCeil, _signature: [{ types: [TYPE_NUMBER] }] }, + contains: { + _func: this._functionContains, + _signature: [ + { types: [TYPE_STRING, TYPE_ARRAY] }, + { types: [TYPE_ANY] } + ] + }, + "ends_with": { + _func: this._functionEndsWith, + _signature: [{ types: [TYPE_STRING] }, { types: [TYPE_STRING] }] + }, + floor: { _func: this._functionFloor, _signature: [{ types: [TYPE_NUMBER] }] }, + length: { + _func: this._functionLength, + _signature: [{ types: [TYPE_STRING, TYPE_ARRAY, TYPE_OBJECT] }] + }, + map: { + _func: this._functionMap, + _signature: [{ types: [TYPE_EXPREF] }, { types: [TYPE_ARRAY] }] + }, + max: { + _func: this._functionMax, + _signature: [{ types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING] }] + }, + "merge": { + _func: this._functionMerge, + _signature: [{ types: [TYPE_OBJECT], variadic: true }] + }, + "max_by": { + _func: this._functionMaxBy, + _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }] + }, + sum: { _func: this._functionSum, _signature: [{ types: [TYPE_ARRAY_NUMBER] }] }, + "starts_with": { + _func: this._functionStartsWith, + _signature: [{ types: [TYPE_STRING] }, { types: [TYPE_STRING] }] + }, + min: { + _func: this._functionMin, + _signature: [{ types: [TYPE_ARRAY_NUMBER, TYPE_ARRAY_STRING] }] + }, + "min_by": { + _func: this._functionMinBy, + _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }] + }, + type: { _func: this._functionType, _signature: [{ types: [TYPE_ANY] }] }, + keys: { _func: this._functionKeys, _signature: [{ types: [TYPE_OBJECT] }] }, + values: { _func: this._functionValues, _signature: [{ types: [TYPE_OBJECT] }] }, + sort: { _func: this._functionSort, _signature: [{ types: [TYPE_ARRAY_STRING, TYPE_ARRAY_NUMBER] }] }, + "sort_by": { + _func: this._functionSortBy, + _signature: [{ types: [TYPE_ARRAY] }, { types: [TYPE_EXPREF] }] + }, + join: { + _func: this._functionJoin, + _signature: [ + { types: [TYPE_STRING] }, + { types: [TYPE_ARRAY_STRING] } + ] + }, + reverse: { + _func: this._functionReverse, + _signature: [{ types: [TYPE_STRING, TYPE_ARRAY] }] + }, + "to_array": { _func: this._functionToArray, _signature: [{ types: [TYPE_ANY] }] }, + "to_string": { _func: this._functionToString, _signature: [{ types: [TYPE_ANY] }] }, + "to_number": { _func: this._functionToNumber, _signature: [{ types: [TYPE_ANY] }] }, + "not_null": { + _func: this._functionNotNull, + _signature: [{ types: [TYPE_ANY], variadic: true }] + } + }; } - return requestWithDefaults(options2); - } - return requestWithDefaults(...args); - } - return Object.assign(withDecorations, requestWithDefaults); -} - -// pkg/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; -} -legacyRestEndpointMethods.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 84576: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - VERSION: () => VERSION, - retry: () => retry -}); -module.exports = __toCommonJS(dist_src_exports); -var import_core = __nccwpck_require__(76407); - -// pkg/dist-src/error-request.js -async function errorRequest(state, octokit, error, options) { - if (!error.request || !error.request.request) { - throw error; - } - if (error.status >= 400 && !state.doNotRetry.includes(error.status)) { - const retries = options.request.retries != null ? options.request.retries : state.retries; - const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); - throw octokit.retry.retryRequest(error, retries, retryAfter); - } - throw error; -} - -// pkg/dist-src/wrap-request.js -var import_light = __toESM(__nccwpck_require__(27447)); -var import_request_error = __nccwpck_require__(2534); -async function wrapRequest(state, octokit, request, options) { - const limiter = new import_light.default(); - limiter.on("failed", function(error, info) { - const maxRetries = ~~error.request.request.retries; - const after = ~~error.request.request.retryAfter; - options.request.retryCount = info.retryCount + 1; - if (maxRetries > info.retryCount) { - return after * state.retryAfterBaseValue; - } - }); - return limiter.schedule( - requestWithGraphqlErrorHandling.bind(null, state, octokit, request), - options - ); -} -async function requestWithGraphqlErrorHandling(state, octokit, request, options) { - const response = await request(request, options); - if (response.data && response.data.errors && /Something went wrong while executing your query/.test( - response.data.errors[0].message - )) { - const error = new import_request_error.RequestError(response.data.errors[0].message, 500, { - request: options, - response - }); - return errorRequest(state, octokit, error, options); + Runtime.prototype = { + callFunction: function(name, resolvedArgs) { + var functionEntry = this.functionTable[name]; + if (functionEntry === void 0) { + throw new Error("Unknown function: " + name + "()"); + } + this._validateArgs(name, resolvedArgs, functionEntry._signature); + return functionEntry._func.call(this, resolvedArgs); + }, + _validateArgs: function(name, args, signature) { + var pluralized; + if (signature[signature.length - 1].variadic) { + if (args.length < signature.length) { + pluralized = signature.length === 1 ? " argument" : " arguments"; + throw new Error("ArgumentError: " + name + "() takes at least" + signature.length + pluralized + " but received " + args.length); + } + } else if (args.length !== signature.length) { + pluralized = signature.length === 1 ? " argument" : " arguments"; + throw new Error("ArgumentError: " + name + "() takes " + signature.length + pluralized + " but received " + args.length); + } + var currentSpec; + var actualType; + var typeMatched; + for (var i = 0; i < signature.length; i++) { + typeMatched = false; + currentSpec = signature[i].types; + actualType = this._getTypeName(args[i]); + for (var j = 0; j < currentSpec.length; j++) { + if (this._typeMatches(actualType, currentSpec[j], args[i])) { + typeMatched = true; + break; + } + } + if (!typeMatched) { + throw new Error("TypeError: " + name + "() expected argument " + (i + 1) + " to be type " + currentSpec + " but received type " + actualType + " instead."); + } + } + }, + _typeMatches: function(actual, expected, argValue) { + if (expected === TYPE_ANY) { + return true; + } + if (expected === TYPE_ARRAY_STRING || expected === TYPE_ARRAY_NUMBER || expected === TYPE_ARRAY) { + if (expected === TYPE_ARRAY) { + return actual === TYPE_ARRAY; + } else if (actual === TYPE_ARRAY) { + var subtype; + if (expected === TYPE_ARRAY_NUMBER) { + subtype = TYPE_NUMBER; + } else if (expected === TYPE_ARRAY_STRING) { + subtype = TYPE_STRING; + } + for (var i = 0; i < argValue.length; i++) { + if (!this._typeMatches( + this._getTypeName(argValue[i]), + subtype, + argValue[i] + )) { + return false; + } + } + return true; + } + } else { + return actual === expected; + } + }, + _getTypeName: function(obj) { + switch (Object.prototype.toString.call(obj)) { + case "[object String]": + return TYPE_STRING; + case "[object Number]": + return TYPE_NUMBER; + case "[object Array]": + return TYPE_ARRAY; + case "[object Boolean]": + return TYPE_BOOLEAN; + case "[object Null]": + return TYPE_NULL; + case "[object Object]": + if (obj.jmespathType === TOK_EXPREF) { + return TYPE_EXPREF; + } else { + return TYPE_OBJECT; + } + } + }, + _functionStartsWith: function(resolvedArgs) { + return resolvedArgs[0].lastIndexOf(resolvedArgs[1]) === 0; + }, + _functionEndsWith: function(resolvedArgs) { + var searchStr = resolvedArgs[0]; + var suffix = resolvedArgs[1]; + return searchStr.indexOf(suffix, searchStr.length - suffix.length) !== -1; + }, + _functionReverse: function(resolvedArgs) { + var typeName = this._getTypeName(resolvedArgs[0]); + if (typeName === TYPE_STRING) { + var originalStr = resolvedArgs[0]; + var reversedStr = ""; + for (var i = originalStr.length - 1; i >= 0; i--) { + reversedStr += originalStr[i]; + } + return reversedStr; + } else { + var reversedArray = resolvedArgs[0].slice(0); + reversedArray.reverse(); + return reversedArray; + } + }, + _functionAbs: function(resolvedArgs) { + return Math.abs(resolvedArgs[0]); + }, + _functionCeil: function(resolvedArgs) { + return Math.ceil(resolvedArgs[0]); + }, + _functionAvg: function(resolvedArgs) { + var sum = 0; + var inputArray = resolvedArgs[0]; + for (var i = 0; i < inputArray.length; i++) { + sum += inputArray[i]; + } + return sum / inputArray.length; + }, + _functionContains: function(resolvedArgs) { + return resolvedArgs[0].indexOf(resolvedArgs[1]) >= 0; + }, + _functionFloor: function(resolvedArgs) { + return Math.floor(resolvedArgs[0]); + }, + _functionLength: function(resolvedArgs) { + if (!isObject2(resolvedArgs[0])) { + return resolvedArgs[0].length; + } else { + return Object.keys(resolvedArgs[0]).length; + } + }, + _functionMap: function(resolvedArgs) { + var mapped = []; + var interpreter = this._interpreter; + var exprefNode = resolvedArgs[0]; + var elements = resolvedArgs[1]; + for (var i = 0; i < elements.length; i++) { + mapped.push(interpreter.visit(exprefNode, elements[i])); + } + return mapped; + }, + _functionMerge: function(resolvedArgs) { + var merged = {}; + for (var i = 0; i < resolvedArgs.length; i++) { + var current = resolvedArgs[i]; + for (var key in current) { + merged[key] = current[key]; + } + } + return merged; + }, + _functionMax: function(resolvedArgs) { + if (resolvedArgs[0].length > 0) { + var typeName = this._getTypeName(resolvedArgs[0][0]); + if (typeName === TYPE_NUMBER) { + return Math.max.apply(Math, resolvedArgs[0]); + } else { + var elements = resolvedArgs[0]; + var maxElement = elements[0]; + for (var i = 1; i < elements.length; i++) { + if (maxElement.localeCompare(elements[i]) < 0) { + maxElement = elements[i]; + } + } + return maxElement; + } + } else { + return null; + } + }, + _functionMin: function(resolvedArgs) { + if (resolvedArgs[0].length > 0) { + var typeName = this._getTypeName(resolvedArgs[0][0]); + if (typeName === TYPE_NUMBER) { + return Math.min.apply(Math, resolvedArgs[0]); + } else { + var elements = resolvedArgs[0]; + var minElement = elements[0]; + for (var i = 1; i < elements.length; i++) { + if (elements[i].localeCompare(minElement) < 0) { + minElement = elements[i]; + } + } + return minElement; + } + } else { + return null; + } + }, + _functionSum: function(resolvedArgs) { + var sum = 0; + var listToSum = resolvedArgs[0]; + for (var i = 0; i < listToSum.length; i++) { + sum += listToSum[i]; + } + return sum; + }, + _functionType: function(resolvedArgs) { + switch (this._getTypeName(resolvedArgs[0])) { + case TYPE_NUMBER: + return "number"; + case TYPE_STRING: + return "string"; + case TYPE_ARRAY: + return "array"; + case TYPE_OBJECT: + return "object"; + case TYPE_BOOLEAN: + return "boolean"; + case TYPE_EXPREF: + return "expref"; + case TYPE_NULL: + return "null"; + } + }, + _functionKeys: function(resolvedArgs) { + return Object.keys(resolvedArgs[0]); + }, + _functionValues: function(resolvedArgs) { + var obj = resolvedArgs[0]; + var keys = Object.keys(obj); + var values = []; + for (var i = 0; i < keys.length; i++) { + values.push(obj[keys[i]]); + } + return values; + }, + _functionJoin: function(resolvedArgs) { + var joinChar = resolvedArgs[0]; + var listJoin = resolvedArgs[1]; + return listJoin.join(joinChar); + }, + _functionToArray: function(resolvedArgs) { + if (this._getTypeName(resolvedArgs[0]) === TYPE_ARRAY) { + return resolvedArgs[0]; + } else { + return [resolvedArgs[0]]; + } + }, + _functionToString: function(resolvedArgs) { + if (this._getTypeName(resolvedArgs[0]) === TYPE_STRING) { + return resolvedArgs[0]; + } else { + return JSON.stringify(resolvedArgs[0]); + } + }, + _functionToNumber: function(resolvedArgs) { + var typeName = this._getTypeName(resolvedArgs[0]); + var convertedValue; + if (typeName === TYPE_NUMBER) { + return resolvedArgs[0]; + } else if (typeName === TYPE_STRING) { + convertedValue = +resolvedArgs[0]; + if (!isNaN(convertedValue)) { + return convertedValue; + } + } + return null; + }, + _functionNotNull: function(resolvedArgs) { + for (var i = 0; i < resolvedArgs.length; i++) { + if (this._getTypeName(resolvedArgs[i]) !== TYPE_NULL) { + return resolvedArgs[i]; + } + } + return null; + }, + _functionSort: function(resolvedArgs) { + var sortedArray = resolvedArgs[0].slice(0); + sortedArray.sort(); + return sortedArray; + }, + _functionSortBy: function(resolvedArgs) { + var sortedArray = resolvedArgs[0].slice(0); + if (sortedArray.length === 0) { + return sortedArray; + } + var interpreter = this._interpreter; + var exprefNode = resolvedArgs[1]; + var requiredType = this._getTypeName( + interpreter.visit(exprefNode, sortedArray[0]) + ); + if ([TYPE_NUMBER, TYPE_STRING].indexOf(requiredType) < 0) { + throw new Error("TypeError"); + } + var that = this; + var decorated = []; + for (var i = 0; i < sortedArray.length; i++) { + decorated.push([i, sortedArray[i]]); + } + decorated.sort(function(a, b) { + var exprA = interpreter.visit(exprefNode, a[1]); + var exprB = interpreter.visit(exprefNode, b[1]); + if (that._getTypeName(exprA) !== requiredType) { + throw new Error( + "TypeError: expected " + requiredType + ", received " + that._getTypeName(exprA) + ); + } else if (that._getTypeName(exprB) !== requiredType) { + throw new Error( + "TypeError: expected " + requiredType + ", received " + that._getTypeName(exprB) + ); + } + if (exprA > exprB) { + return 1; + } else if (exprA < exprB) { + return -1; + } else { + return a[0] - b[0]; + } + }); + for (var j = 0; j < decorated.length; j++) { + sortedArray[j] = decorated[j][1]; + } + return sortedArray; + }, + _functionMaxBy: function(resolvedArgs) { + var exprefNode = resolvedArgs[1]; + var resolvedArray = resolvedArgs[0]; + var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); + var maxNumber = -Infinity; + var maxRecord; + var current; + for (var i = 0; i < resolvedArray.length; i++) { + current = keyFunction(resolvedArray[i]); + if (current > maxNumber) { + maxNumber = current; + maxRecord = resolvedArray[i]; + } + } + return maxRecord; + }, + _functionMinBy: function(resolvedArgs) { + var exprefNode = resolvedArgs[1]; + var resolvedArray = resolvedArgs[0]; + var keyFunction = this.createKeyFunction(exprefNode, [TYPE_NUMBER, TYPE_STRING]); + var minNumber = Infinity; + var minRecord; + var current; + for (var i = 0; i < resolvedArray.length; i++) { + current = keyFunction(resolvedArray[i]); + if (current < minNumber) { + minNumber = current; + minRecord = resolvedArray[i]; + } + } + return minRecord; + }, + createKeyFunction: function(exprefNode, allowedTypes) { + var that = this; + var interpreter = this._interpreter; + var keyFunc = function(x) { + var current = interpreter.visit(exprefNode, x); + if (allowedTypes.indexOf(that._getTypeName(current)) < 0) { + var msg = "TypeError: expected one of " + allowedTypes + ", received " + that._getTypeName(current); + throw new Error(msg); + } + return current; + }; + return keyFunc; + } + }; + function compile(stream) { + var parser2 = new Parser(); + var ast = parser2.parse(stream); + return ast; + } + function tokenize(stream) { + var lexer = new Lexer(); + return lexer.tokenize(stream); + } + function search(data, expression) { + var parser2 = new Parser(); + var runtime = new Runtime(); + var interpreter = new TreeInterpreter(runtime); + runtime._interpreter = interpreter; + var node2 = parser2.parse(expression); + return interpreter.search(node2, data); + } + exports3.tokenize = tokenize; + exports3.compile = compile; + exports3.search = search; + exports3.strictDeepEqual = strictDeepEqual; + })(typeof exports2 === "undefined" ? exports2.jmespath = {} : exports2); } - return response; -} +}); -// pkg/dist-src/index.js -var VERSION = "6.0.1"; -function retry(octokit, octokitOptions) { - const state = Object.assign( - { - enabled: true, - retryAfterBaseValue: 1e3, - doNotRetry: [400, 401, 403, 404, 422, 451], - retries: 3 - }, - octokitOptions.retry - ); - if (state.enabled) { - octokit.hook.error("request", errorRequest.bind(null, state, octokit)); - octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit)); +// node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/constants.js +var require_constants2 = __commonJS({ + "node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + DATE_FORMAT: "yyyy-mm-dd HH:MM:ss.l o", + ERROR_LIKE_KEYS: ["err", "error"], + MESSAGE_KEY: "msg", + LEVEL_KEY: "level", + LEVEL_LABEL: "levelLabel", + TIMESTAMP_KEY: "time", + LEVELS: { + default: "USERLVL", + 60: "FATAL", + 50: "ERROR", + 40: "WARN", + 30: "INFO", + 20: "DEBUG", + 10: "TRACE" + }, + LEVEL_NAMES: { + fatal: 60, + error: 50, + warn: 40, + info: 30, + debug: 20, + trace: 10 + }, + // Object keys that probably came from a logger like Pino or Bunyan. + LOGGER_KEYS: [ + "pid", + "hostname", + "name", + "level", + "time", + "timestamp", + "caller" + ] + }; } - return { - retry: { - retryRequest: (error, retries, retryAfter) => { - error.request.request = Object.assign({}, error.request.request, { - retries, - retryAfter - }); - return error; +}); + +// node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/colors.js +var require_colors = __commonJS({ + "node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/colors.js"(exports2, module2) { + "use strict"; + var { LEVELS, LEVEL_NAMES } = require_constants2(); + var nocolor = (input) => input; + var plain = { + default: nocolor, + 60: nocolor, + 50: nocolor, + 40: nocolor, + 30: nocolor, + 20: nocolor, + 10: nocolor, + message: nocolor, + greyMessage: nocolor + }; + var colorette = require_colorette(); + var colored = { + default: colorette.white, + 60: colorette.bgRed, + 50: colorette.red, + 40: colorette.yellow, + 30: colorette.green, + 20: colorette.blue, + 10: colorette.gray, + message: colorette.cyan, + greyMessage: colorette.gray + }; + function colorizeLevel(level, colorizer) { + if (Number.isInteger(+level)) { + return Object.prototype.hasOwnProperty.call(LEVELS, level) ? colorizer[level](LEVELS[level]) : colorizer.default(LEVELS.default); } + const levelNum = LEVEL_NAMES[level.toLowerCase()] || "default"; + return colorizer[levelNum](LEVELS[levelNum]); } - }; -} -retry.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 23867: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + function plainColorizer(level) { + return colorizeLevel(level, plain); + } + plainColorizer.message = plain.message; + plainColorizer.greyMessage = plain.greyMessage; + function coloredColorizer(level) { + return colorizeLevel(level, colored); + } + coloredColorizer.message = colored.message; + coloredColorizer.greyMessage = colored.greyMessage; + module2.exports = function getColorizer(useColors = false) { + return useColors ? coloredColorizer : plainColorizer; + }; } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - throttling: () => throttling }); -module.exports = __toCommonJS(dist_src_exports); -var import_light = __toESM(__nccwpck_require__(27447)); -var import_core = __nccwpck_require__(76407); - -// pkg/dist-src/version.js -var VERSION = "8.2.0"; -// pkg/dist-src/wrap-request.js -var noop = () => Promise.resolve(); -function wrapRequest(state, request, options) { - return state.retryLimiter.schedule(doRequest, state, request, options); -} -async function doRequest(state, request, options) { - const isWrite = options.method !== "GET" && options.method !== "HEAD"; - const { pathname } = new URL(options.url, "http://github.test"); - const isSearch = options.method === "GET" && pathname.startsWith("/search/"); - const isGraphQL = pathname.startsWith("/graphql"); - const retryCount = ~~request.retryCount; - const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; - if (state.clustering) { - jobOptions.expiration = 1e3 * 60; - } - if (isWrite || isGraphQL) { - await state.write.key(state.id).schedule(jobOptions, noop); - } - if (isWrite && state.triggersNotification(pathname)) { - await state.notifications.key(state.id).schedule(jobOptions, noop); - } - if (isSearch) { - await state.search.key(state.id).schedule(jobOptions, noop); - } - const req = state.global.key(state.id).schedule(jobOptions, request, options); - if (isGraphQL) { - const res = await req; - if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) { - const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { - response: res, - data: res.data - }); - throw error; +// node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js +var require_rfdc = __commonJS({ + "node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports2, module2) { + "use strict"; + module2.exports = rfdc; + function copyBuffer(cur) { + if (cur instanceof Buffer) { + return Buffer.from(cur); + } + return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length); + } + function rfdc(opts) { + opts = opts || {}; + if (opts.circles) return rfdcCircles(opts); + const constructorHandlers = /* @__PURE__ */ new Map(); + constructorHandlers.set(Date, (o) => new Date(o)); + constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))); + constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))); + if (opts.constructorHandlers) { + for (const handler3 of opts.constructorHandlers) { + constructorHandlers.set(handler3[0], handler3[1]); + } + } + let handler2 = null; + return opts.proto ? cloneProto : clone; + function cloneArray(a, fn) { + const keys = Object.keys(a); + const a2 = new Array(keys.length); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + const cur = a[k]; + if (typeof cur !== "object" || cur === null) { + a2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + a2[k] = handler2(cur, fn); + } else if (ArrayBuffer.isView(cur)) { + a2[k] = copyBuffer(cur); + } else { + a2[k] = fn(cur); + } + } + return a2; + } + function clone(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, clone); + if (o.constructor !== Object && (handler2 = constructorHandlers.get(o.constructor))) { + return handler2(o, clone); + } + const o2 = {}; + for (const k in o) { + if (Object.hasOwnProperty.call(o, k) === false) continue; + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + o2[k] = handler2(cur, clone); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + o2[k] = clone(cur); + } + } + return o2; + } + function cloneProto(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, cloneProto); + if (o.constructor !== Object && (handler2 = constructorHandlers.get(o.constructor))) { + return handler2(o, cloneProto); + } + const o2 = {}; + for (const k in o) { + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + o2[k] = handler2(cur, cloneProto); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + o2[k] = cloneProto(cur); + } + } + return o2; + } + } + function rfdcCircles(opts) { + const refs = []; + const refsNew = []; + const constructorHandlers = /* @__PURE__ */ new Map(); + constructorHandlers.set(Date, (o) => new Date(o)); + constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))); + constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))); + if (opts.constructorHandlers) { + for (const handler3 of opts.constructorHandlers) { + constructorHandlers.set(handler3[0], handler3[1]); + } + } + let handler2 = null; + return opts.proto ? cloneProto : clone; + function cloneArray(a, fn) { + const keys = Object.keys(a); + const a2 = new Array(keys.length); + for (let i = 0; i < keys.length; i++) { + const k = keys[i]; + const cur = a[k]; + if (typeof cur !== "object" || cur === null) { + a2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + a2[k] = handler2(cur, fn); + } else if (ArrayBuffer.isView(cur)) { + a2[k] = copyBuffer(cur); + } else { + const index = refs.indexOf(cur); + if (index !== -1) { + a2[k] = refsNew[index]; + } else { + a2[k] = fn(cur); + } + } + } + return a2; + } + function clone(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, clone); + if (o.constructor !== Object && (handler2 = constructorHandlers.get(o.constructor))) { + return handler2(o, clone); + } + const o2 = {}; + refs.push(o); + refsNew.push(o2); + for (const k in o) { + if (Object.hasOwnProperty.call(o, k) === false) continue; + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + o2[k] = handler2(cur, clone); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + const i = refs.indexOf(cur); + if (i !== -1) { + o2[k] = refsNew[i]; + } else { + o2[k] = clone(cur); + } + } + } + refs.pop(); + refsNew.pop(); + return o2; + } + function cloneProto(o) { + if (typeof o !== "object" || o === null) return o; + if (Array.isArray(o)) return cloneArray(o, cloneProto); + if (o.constructor !== Object && (handler2 = constructorHandlers.get(o.constructor))) { + return handler2(o, cloneProto); + } + const o2 = {}; + refs.push(o); + refsNew.push(o2); + for (const k in o) { + const cur = o[k]; + if (typeof cur !== "object" || cur === null) { + o2[k] = cur; + } else if (cur.constructor !== Object && (handler2 = constructorHandlers.get(cur.constructor))) { + o2[k] = handler2(cur, cloneProto); + } else if (ArrayBuffer.isView(cur)) { + o2[k] = copyBuffer(cur); + } else { + const i = refs.indexOf(cur); + if (i !== -1) { + o2[k] = refsNew[i]; + } else { + o2[k] = cloneProto(cur); + } + } + } + refs.pop(); + refsNew.pop(); + return o2; + } } } - return req; -} - -// pkg/dist-src/generated/triggers-notification-paths.js -var triggers_notification_paths_default = [ - "/orgs/{org}/invitations", - "/orgs/{org}/invitations/{invitation_id}", - "/orgs/{org}/teams/{team_slug}/discussions", - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", - "/repos/{owner}/{repo}/collaborators/{username}", - "/repos/{owner}/{repo}/commits/{commit_sha}/comments", - "/repos/{owner}/{repo}/issues", - "/repos/{owner}/{repo}/issues/{issue_number}/comments", - "/repos/{owner}/{repo}/pulls", - "/repos/{owner}/{repo}/pulls/{pull_number}/comments", - "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", - "/repos/{owner}/{repo}/pulls/{pull_number}/merge", - "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", - "/repos/{owner}/{repo}/releases", - "/teams/{team_id}/discussions", - "/teams/{team_id}/discussions/{discussion_number}/comments" -]; - -// pkg/dist-src/route-matcher.js -function routeMatcher(paths) { - const regexes = paths.map( - (path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") - ); - const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; - return new RegExp(regex2, "i"); -} - -// pkg/dist-src/index.js -var regex = routeMatcher(triggers_notification_paths_default); -var triggersNotification = regex.test.bind(regex); -var groups = {}; -var createGroups = function(Bottleneck, common) { - groups.global = new Bottleneck.Group({ - id: "octokit-global", - maxConcurrent: 10, - ...common - }); - groups.search = new Bottleneck.Group({ - id: "octokit-search", - maxConcurrent: 1, - minTime: 2e3, - ...common - }); - groups.write = new Bottleneck.Group({ - id: "octokit-write", - maxConcurrent: 1, - minTime: 1e3, - ...common - }); - groups.notifications = new Bottleneck.Group({ - id: "octokit-notifications", - maxConcurrent: 1, - minTime: 3e3, - ...common - }); -}; -function throttling(octokit, octokitOptions) { - const { - enabled = true, - Bottleneck = import_light.default, - id = "no-id", - timeout = 1e3 * 60 * 2, - // Redis TTL: 2 minutes - connection - } = octokitOptions.throttle || {}; - if (!enabled) { - return {}; - } - const common = { connection, timeout }; - if (groups.global == null) { - createGroups(Bottleneck, common); - } - const state = Object.assign( - { - clustering: connection != null, - triggersNotification, - fallbackSecondaryRateRetryAfter: 60, - retryAfterBaseValue: 1e3, - retryLimiter: new Bottleneck(), - id, - ...groups - }, - octokitOptions.throttle - ); - if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { - throw new Error(`octokit/plugin-throttling error: - You must pass the onSecondaryRateLimit and onRateLimit error handlers. - See https://octokit.github.io/rest.js/#throttling +}); - const octokit = new Octokit({ - throttle: { - onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, - onRateLimit: (retryAfter, options) => {/* ... */} +// node_modules/.pnpm/dateformat@4.6.3/node_modules/dateformat/lib/dateformat.js +var require_dateformat = __commonJS({ + "node_modules/.pnpm/dateformat@4.6.3/node_modules/dateformat/lib/dateformat.js"(exports2, module2) { + "use strict"; + function _typeof(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof = function _typeof2(obj2) { + return typeof obj2; + }; + } else { + _typeof = function _typeof2(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof(obj); + } + (function(global2) { + var _arguments = arguments; + var dateFormat = /* @__PURE__ */ function() { + var token = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; + var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g; + var timezoneClip = /[^-+\dA-Z]/g; + return function(date, mask, utc, gmt) { + if (_arguments.length === 1 && kindOf(date) === "string" && !/\d/.test(date)) { + mask = date; + date = void 0; } - }) - `); + date = date || date === 0 ? date : /* @__PURE__ */ new Date(); + if (!(date instanceof Date)) { + date = new Date(date); + } + if (isNaN(date)) { + throw TypeError("Invalid date"); + } + mask = String(dateFormat.masks[mask] || mask || dateFormat.masks["default"]); + var maskSlice = mask.slice(0, 4); + if (maskSlice === "UTC:" || maskSlice === "GMT:") { + mask = mask.slice(4); + utc = true; + if (maskSlice === "GMT:") { + gmt = true; + } + } + var _ = function _2() { + return utc ? "getUTC" : "get"; + }; + var _d = function d() { + return date[_() + "Date"](); + }; + var D = function D2() { + return date[_() + "Day"](); + }; + var _m = function m() { + return date[_() + "Month"](); + }; + var y = function y2() { + return date[_() + "FullYear"](); + }; + var _H = function H() { + return date[_() + "Hours"](); + }; + var _M = function M() { + return date[_() + "Minutes"](); + }; + var _s = function s() { + return date[_() + "Seconds"](); + }; + var _L = function L() { + return date[_() + "Milliseconds"](); + }; + var _o = function o() { + return utc ? 0 : date.getTimezoneOffset(); + }; + var _W = function W() { + return getWeek(date); + }; + var _N = function N() { + return getDayOfWeek(date); + }; + var flags = { d: function d() { + return _d(); + }, dd: function dd() { + return pad(_d()); + }, ddd: function ddd() { + return dateFormat.i18n.dayNames[D()]; + }, DDD: function DDD() { + return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D()], short: true }); + }, dddd: function dddd() { + return dateFormat.i18n.dayNames[D() + 7]; + }, DDDD: function DDDD() { + return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D() + 7] }); + }, m: function m() { + return _m() + 1; + }, mm: function mm() { + return pad(_m() + 1); + }, mmm: function mmm() { + return dateFormat.i18n.monthNames[_m()]; + }, mmmm: function mmmm() { + return dateFormat.i18n.monthNames[_m() + 12]; + }, yy: function yy() { + return String(y()).slice(2); + }, yyyy: function yyyy() { + return pad(y(), 4); + }, h: function h() { + return _H() % 12 || 12; + }, hh: function hh() { + return pad(_H() % 12 || 12); + }, H: function H() { + return _H(); + }, HH: function HH() { + return pad(_H()); + }, M: function M() { + return _M(); + }, MM: function MM() { + return pad(_M()); + }, s: function s() { + return _s(); + }, ss: function ss() { + return pad(_s()); + }, l: function l() { + return pad(_L(), 3); + }, L: function L() { + return pad(Math.floor(_L() / 10)); + }, t: function t() { + return _H() < 12 ? dateFormat.i18n.timeNames[0] : dateFormat.i18n.timeNames[1]; + }, tt: function tt() { + return _H() < 12 ? dateFormat.i18n.timeNames[2] : dateFormat.i18n.timeNames[3]; + }, T: function T() { + return _H() < 12 ? dateFormat.i18n.timeNames[4] : dateFormat.i18n.timeNames[5]; + }, TT: function TT() { + return _H() < 12 ? dateFormat.i18n.timeNames[6] : dateFormat.i18n.timeNames[7]; + }, Z: function Z() { + return gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, "").replace(/GMT\+0000/g, "UTC"); + }, o: function o() { + return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60) * 100 + Math.abs(_o()) % 60, 4); + }, p: function p() { + return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60), 2) + ":" + pad(Math.floor(Math.abs(_o()) % 60), 2); + }, S: function S() { + return ["th", "st", "nd", "rd"][_d() % 10 > 3 ? 0 : (_d() % 100 - _d() % 10 != 10) * _d() % 10]; + }, W: function W() { + return _W(); + }, WW: function WW() { + return pad(_W()); + }, N: function N() { + return _N(); + } }; + return mask.replace(token, function(match) { + if (match in flags) { + return flags[match](); + } + return match.slice(1, match.length - 1); + }); + }; + }(); + dateFormat.masks = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" }; + dateFormat.i18n = { dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"] }; + var pad = function pad2(val, len) { + val = String(val); + len = len || 2; + while (val.length < len) { + val = "0" + val; + } + return val; + }; + var getDayName = function getDayName2(_ref) { + var y = _ref.y, m = _ref.m, d = _ref.d, _ = _ref._, dayName = _ref.dayName, _ref$short = _ref["short"], _short = _ref$short === void 0 ? false : _ref$short; + var today = /* @__PURE__ */ new Date(); + var yesterday = /* @__PURE__ */ new Date(); + yesterday.setDate(yesterday[_ + "Date"]() - 1); + var tomorrow = /* @__PURE__ */ new Date(); + tomorrow.setDate(tomorrow[_ + "Date"]() + 1); + var today_d = function today_d2() { + return today[_ + "Date"](); + }; + var today_m = function today_m2() { + return today[_ + "Month"](); + }; + var today_y = function today_y2() { + return today[_ + "FullYear"](); + }; + var yesterday_d = function yesterday_d2() { + return yesterday[_ + "Date"](); + }; + var yesterday_m = function yesterday_m2() { + return yesterday[_ + "Month"](); + }; + var yesterday_y = function yesterday_y2() { + return yesterday[_ + "FullYear"](); + }; + var tomorrow_d = function tomorrow_d2() { + return tomorrow[_ + "Date"](); + }; + var tomorrow_m = function tomorrow_m2() { + return tomorrow[_ + "Month"](); + }; + var tomorrow_y = function tomorrow_y2() { + return tomorrow[_ + "FullYear"](); + }; + if (today_y() === y && today_m() === m && today_d() === d) { + return _short ? "Tdy" : "Today"; + } else if (yesterday_y() === y && yesterday_m() === m && yesterday_d() === d) { + return _short ? "Ysd" : "Yesterday"; + } else if (tomorrow_y() === y && tomorrow_m() === m && tomorrow_d() === d) { + return _short ? "Tmw" : "Tomorrow"; + } + return dayName; + }; + var getWeek = function getWeek2(date) { + var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); + targetThursday.setDate(targetThursday.getDate() - (targetThursday.getDay() + 6) % 7 + 3); + var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); + firstThursday.setDate(firstThursday.getDate() - (firstThursday.getDay() + 6) % 7 + 3); + var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); + targetThursday.setHours(targetThursday.getHours() - ds); + var weekDiff = (targetThursday - firstThursday) / (864e5 * 7); + return 1 + Math.floor(weekDiff); + }; + var getDayOfWeek = function getDayOfWeek2(date) { + var dow = date.getDay(); + if (dow === 0) { + dow = 7; + } + return dow; + }; + var kindOf = function kindOf2(val) { + if (val === null) { + return "null"; + } + if (val === void 0) { + return "undefined"; + } + if (_typeof(val) !== "object") { + return _typeof(val); + } + if (Array.isArray(val)) { + return "array"; + } + return {}.toString.call(val).slice(8, -1).toLowerCase(); + }; + if (typeof define === "function" && define.amd) { + define(function() { + return dateFormat; + }); + } else if ((typeof exports2 === "undefined" ? "undefined" : _typeof(exports2)) === "object") { + module2.exports = dateFormat; + } else { + global2.dateFormat = dateFormat; + } + })(void 0); } - const events = {}; - const emitter = new Bottleneck.Events(events); - events.on("secondary-limit", state.onSecondaryRateLimit); - events.on("rate-limit", state.onRateLimit); - events.on( - "error", - (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) - ); - state.retryLimiter.on("failed", async function(error, info) { - const [state2, request, options] = info.args; - const { pathname } = new URL(options.url, "http://github.test"); - const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; - if (!(shouldRetryGraphQL || error.status === 403)) { - return; +}); + +// node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js +var require_fast_safe_stringify = __commonJS({ + "node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports2, module2) { + module2.exports = stringify; + stringify.default = stringify; + stringify.stable = deterministicStringify; + stringify.stableStringify = deterministicStringify; + var LIMIT_REPLACE_NODE = "[...]"; + var CIRCULAR_REPLACE_NODE = "[Circular]"; + var arr = []; + var replacerStack = []; + function defaultOptions() { + return { + depthLimit: Number.MAX_SAFE_INTEGER, + edgesLimit: Number.MAX_SAFE_INTEGER + }; } - const retryCount = ~~request.retryCount; - request.retryCount = retryCount; - options.request.retryCount = retryCount; - const { wantRetry, retryAfter = 0 } = await async function() { - if (/\bsecondary rate\b/i.test(error.message)) { - const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; - const wantRetry2 = await emitter.trigger( - "secondary-limit", - retryAfter2, - options, - octokit, - retryCount - ); - return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + function stringify(obj, replacer, spacer, options2) { + if (typeof options2 === "undefined") { + options2 = defaultOptions(); } - if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0" || (error.response.data?.errors ?? []).some( - (error2) => error2.type === "RATE_LIMITED" - )) { - const rateLimitReset = new Date( - ~~error.response.headers["x-ratelimit-reset"] * 1e3 - ).getTime(); - const retryAfter2 = Math.max( - // Add one second so we retry _after_ the reset time - // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit - Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, - 0 - ); - const wantRetry2 = await emitter.trigger( - "rate-limit", - retryAfter2, - options, - octokit, - retryCount - ); - return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + decirc(obj, "", 0, [], void 0, 0, options2); + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(obj, replacer, spacer); + } else { + res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } } - return {}; - }(); - if (wantRetry) { - request.retryCount++; - return retryAfter * state2.retryAfterBaseValue; + return res; } - }); - octokit.hook.wrap("request", wrapRequest.bind(null, state)); - return {}; -} -throttling.VERSION = VERSION; -throttling.triggersNotification = triggersNotification; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 2534: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - RequestError: () => RequestError -}); -module.exports = __toCommonJS(dist_src_exports); -var import_deprecation = __nccwpck_require__(45546); -var import_once = __toESM(__nccwpck_require__(98068)); -var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); -var RequestError = class extends Error { - constructor(message, statusCode, options) { - super(message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); + function setReplace(replace, val, k, parent) { + var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); + if (propertyDescriptor.get !== void 0) { + if (propertyDescriptor.configurable) { + Object.defineProperty(parent, k, { value: replace }); + arr.push([parent, k, val, propertyDescriptor]); + } else { + replacerStack.push([val, k, replace]); + } + } else { + parent[k] = replace; + arr.push([parent, k, val]); + } } - this.name = "HttpError"; - this.status = statusCode; - let headers; - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } - const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace( - / .*$/, - " [REDACTED]" - ) - }); + function decirc(val, k, edgeIndex, stack, parent, depth, options2) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + if (typeof options2.depthLimit !== "undefined" && depth > options2.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options2.edgesLimit !== "undefined" && edgeIndex + 1 > options2.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + decirc(val[i], i, i, stack, val, depth, options2); + } + } else { + var keys = Object.keys(val); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + decirc(val[key], key, i, stack, val, depth, options2); + } + } + stack.pop(); + } } - requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; - Object.defineProperty(this, "code", { - get() { - logOnceCode( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.code` is deprecated, use `error.status`." - ) - ); - return statusCode; + function compareFunction(a, b) { + if (a < b) { + return -1; } - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders( - new import_deprecation.Deprecation( - "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." - ) - ); - return headers || {}; + if (a > b) { + return 1; } - }); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 27382: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - request: () => request + return 0; + } + function deterministicStringify(obj, replacer, spacer, options2) { + if (typeof options2 === "undefined") { + options2 = defaultOptions(); + } + var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options2) || obj; + var res; + try { + if (replacerStack.length === 0) { + res = JSON.stringify(tmp, replacer, spacer); + } else { + res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); + } + } catch (_) { + return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); + } finally { + while (arr.length !== 0) { + var part = arr.pop(); + if (part.length === 4) { + Object.defineProperty(part[0], part[1], part[3]); + } else { + part[0][part[1]] = part[2]; + } + } + } + return res; + } + function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options2) { + depth += 1; + var i; + if (typeof val === "object" && val !== null) { + for (i = 0; i < stack.length; i++) { + if (stack[i] === val) { + setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); + return; + } + } + try { + if (typeof val.toJSON === "function") { + return; + } + } catch (_) { + return; + } + if (typeof options2.depthLimit !== "undefined" && depth > options2.depthLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + if (typeof options2.edgesLimit !== "undefined" && edgeIndex + 1 > options2.edgesLimit) { + setReplace(LIMIT_REPLACE_NODE, val, k, parent); + return; + } + stack.push(val); + if (Array.isArray(val)) { + for (i = 0; i < val.length; i++) { + deterministicDecirc(val[i], i, i, stack, val, depth, options2); + } + } else { + var tmp = {}; + var keys = Object.keys(val).sort(compareFunction); + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + deterministicDecirc(val[key], key, i, stack, val, depth, options2); + tmp[key] = val[key]; + } + if (typeof parent !== "undefined") { + arr.push([parent, k, val]); + parent[k] = tmp; + } else { + return tmp; + } + } + stack.pop(); + } + } + function replaceGetterValues(replacer) { + replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { + return v; + }; + return function(key, val) { + if (replacerStack.length > 0) { + for (var i = 0; i < replacerStack.length; i++) { + var part = replacerStack[i]; + if (part[1] === key && part[0] === val) { + val = part[2]; + replacerStack.splice(i, 1); + break; + } + } + } + return replacer.call(this, key, val); + }; + } + } }); -module.exports = __toCommonJS(dist_src_exports); -var import_endpoint = __nccwpck_require__(69284); -var import_universal_user_agent = __nccwpck_require__(59279); - -// pkg/dist-src/version.js -var VERSION = "8.4.0"; - -// pkg/dist-src/is-plain-object.js -function isPlainObject(value) { - if (typeof value !== "object" || value === null) - return false; - if (Object.prototype.toString.call(value) !== "[object Object]") - return false; - const proto = Object.getPrototypeOf(value); - if (proto === null) - return true; - const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); -} - -// pkg/dist-src/fetch-wrapper.js -var import_request_error = __nccwpck_require__(2534); - -// pkg/dist-src/get-buffer-response.js -function getBufferResponse(response) { - return response.arrayBuffer(); -} -// pkg/dist-src/fetch-wrapper.js -function fetchWrapper(requestOptions) { - var _a, _b, _c, _d; - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; - if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - let headers = {}; - let status; - let url; - let { fetch } = globalThis; - if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { - fetch = requestOptions.request.fetch; - } - if (!fetch) { - throw new Error( - "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" - ); - } - return fetch(requestOptions.url, { - method: requestOptions.method, - body: requestOptions.body, - redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, - headers: requestOptions.headers, - signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, - // duplex must be set if request.body is ReadableStream or Async Iterables. - // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. - ...requestOptions.body && { duplex: "half" } - }).then(async (response) => { - url = response.url; - status = response.status; - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; +// node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/utils.js +var require_utils = __commonJS({ + "node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/lib/utils.js"(exports2, module2) { + "use strict"; + var clone = require_rfdc()({ circles: true }); + var dateformat = require_dateformat(); + var stringifySafe = require_fast_safe_stringify(); + var defaultColorizer = require_colors()(); + var { + DATE_FORMAT, + ERROR_LIKE_KEYS, + MESSAGE_KEY, + LEVEL_KEY, + LEVEL_LABEL, + TIMESTAMP_KEY, + LOGGER_KEYS, + LEVELS + } = require_constants2(); + module2.exports = { + isObject: isObject2, + prettifyErrorLog, + prettifyLevel, + prettifyMessage, + prettifyMetadata, + prettifyObject, + prettifyTime, + filterLog + }; + module2.exports.internals = { + formatTime, + joinLinesWithIndentation, + prettifyError, + deleteLogProperty, + splitIgnoreKey, + createDate, + isValidDate + }; + function formatTime(epoch, translateTime = false) { + if (translateTime === false) { + return epoch; + } + const instant = createDate(epoch); + if (!isValidDate(instant)) { + return epoch; + } + if (translateTime === true) { + return dateformat(instant, "UTC:" + DATE_FORMAT); + } + const upperFormat = translateTime.toUpperCase(); + if (upperFormat === "SYS:STANDARD") { + return dateformat(instant, DATE_FORMAT); + } + const prefix = upperFormat.substr(0, 4); + if (prefix === "SYS:" || prefix === "UTC:") { + if (prefix === "UTC:") { + return dateformat(instant, translateTime); + } + return dateformat(instant, translateTime.slice(4)); + } + return dateformat(instant, `UTC:${translateTime}`); + } + function createDate(epoch) { + let date = new Date(epoch); + if (isValidDate(date)) { + return date; + } + date = /* @__PURE__ */ new Date(+epoch); + return date; + } + function isValidDate(date) { + return date instanceof Date && !Number.isNaN(date.getTime()); + } + function isObject2(input) { + return Object.prototype.toString.apply(input) === "[object Object]"; + } + function joinLinesWithIndentation({ input, ident = " ", eol = "\n" }) { + const lines = input.split(/\r?\n/); + for (let i = 1; i < lines.length; i += 1) { + lines[i] = ident + lines[i]; + } + return lines.join(eol); + } + function prettifyErrorLog({ + log: log2, + messageKey = MESSAGE_KEY, + ident = " ", + eol = "\n", + errorLikeKeys = ERROR_LIKE_KEYS, + errorProperties = [] + }) { + const stack = log2.stack; + const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol }); + let result = `${ident}${joinedLines}${eol}`; + if (errorProperties.length > 0) { + const excludeProperties = LOGGER_KEYS.concat(messageKey, "type", "stack"); + let propertiesToPrint; + if (errorProperties[0] === "*") { + propertiesToPrint = Object.keys(log2).filter((k) => excludeProperties.includes(k) === false); + } else { + propertiesToPrint = errorProperties.filter((k) => excludeProperties.includes(k) === false); + } + for (let i = 0; i < propertiesToPrint.length; i += 1) { + const key = propertiesToPrint[i]; + if (key in log2 === false) continue; + if (isObject2(log2[key])) { + const prettifiedObject = prettifyObject({ input: log2[key], errorLikeKeys, excludeLoggerKeys: false, eol, ident }); + result = `${result}${key}: {${eol}${prettifiedObject}}${eol}`; + continue; + } + result = `${result}${key}: ${log2[key]}${eol}`; + } + } + return result; } - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn( - `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` - ); + function prettifyLevel({ log: log2, colorizer = defaultColorizer, levelKey = LEVEL_KEY }) { + if (levelKey in log2 === false) return void 0; + return colorizer(log2[levelKey]); } - if (status === 204 || status === 205) { - return; + function prettifyMessage({ log: log2, messageFormat, messageKey = MESSAGE_KEY, colorizer = defaultColorizer, levelLabel = LEVEL_LABEL }) { + if (messageFormat && typeof messageFormat === "string") { + const message = String(messageFormat).replace(/{([^{}]+)}/g, function(match, p1) { + if (p1 === levelLabel && log2[LEVEL_KEY]) { + return LEVELS[log2[LEVEL_KEY]]; + } + return p1.split(".").reduce(function(prev, curr) { + if (prev && prev[curr]) { + return prev[curr]; + } + return ""; + }, log2); + }); + return colorizer.message(message); + } + if (messageFormat && typeof messageFormat === "function") { + const msg = messageFormat(log2, messageKey, levelLabel); + return colorizer.message(msg); + } + if (messageKey in log2 === false) return void 0; + if (typeof log2[messageKey] !== "string") return void 0; + return colorizer.message(log2[messageKey]); } - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; + function prettifyMetadata({ log: log2 }) { + let line = ""; + if (log2.name || log2.pid || log2.hostname) { + line += "("; + if (log2.name) { + line += log2.name; + } + if (log2.name && log2.pid) { + line += "/" + log2.pid; + } else if (log2.pid) { + line += log2.pid; + } + if (log2.hostname) { + line += `${line === "(" ? "on" : " on"} ${log2.hostname}`; + } + line += ")"; } - throw new import_request_error.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: void 0 - }, - request: requestOptions + if (log2.caller) { + line += `${line === "" ? "" : " "}<${log2.caller}>`; + } + if (line === "") { + return void 0; + } else { + return line; + } + } + function prettifyObject({ + input, + ident = " ", + eol = "\n", + skipKeys = [], + customPrettifiers = {}, + errorLikeKeys = ERROR_LIKE_KEYS, + excludeLoggerKeys = true, + singleLine = false, + colorizer = defaultColorizer + }) { + const keysToIgnore = [].concat(skipKeys); + if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS); + let result = ""; + const { plain, errors } = Object.entries(input).reduce(({ plain: plain2, errors: errors2 }, [k, v]) => { + if (keysToIgnore.includes(k) === false) { + const pretty = typeof customPrettifiers[k] === "function" ? customPrettifiers[k](v, k, input) : v; + if (errorLikeKeys.includes(k)) { + errors2[k] = pretty; + } else { + plain2[k] = pretty; + } + } + return { plain: plain2, errors: errors2 }; + }, { plain: {}, errors: {} }); + if (singleLine) { + if (Object.keys(plain).length > 0) { + result += colorizer.greyMessage(stringifySafe(plain)); + } + result += eol; + } else { + Object.entries(plain).forEach(([keyName, keyValue]) => { + const lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2); + if (lines === void 0) return; + const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }); + result += `${ident}${keyName}: ${joinedLines}${eol}`; + }); + } + Object.entries(errors).forEach(([keyName, keyValue]) => { + const lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2); + if (lines === void 0) return; + result += prettifyError({ keyName, lines, eol, ident }); }); + return result; } - if (status === 304) { - throw new import_request_error.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions + function prettifyTime({ log: log2, timestampKey = TIMESTAMP_KEY, translateFormat = void 0 }) { + let time = null; + if (timestampKey in log2) { + time = log2[timestampKey]; + } else if ("timestamp" in log2) { + time = log2.timestamp; + } + if (time === null) return void 0; + if (translateFormat) { + return "[" + formatTime(time, translateFormat) + "]"; + } + return `[${time}]`; + } + function prettifyError({ keyName, lines, eol, ident }) { + let result = ""; + const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }); + const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol); + for (let j = 0; j < splitLines.length; j += 1) { + if (j !== 0) result += eol; + const line = splitLines[j]; + if (/^\s*"stack"/.test(line)) { + const matches = /^(\s*"stack":)\s*(".*"),?$/.exec(line); + if (matches && matches.length === 3) { + const indentSize = /^\s*/.exec(line)[0].length + 4; + const indentation = " ".repeat(indentSize); + const stackMessage = matches[2]; + result += matches[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation); + } + } else { + result += line; + } + } + return result; + } + function splitIgnoreKey(key) { + const result = []; + let backslash = false; + let segment = ""; + for (let i = 0; i < key.length; i++) { + const c = key.charAt(i); + if (c === "\\") { + backslash = true; + continue; + } + if (backslash) { + backslash = false; + segment += c; + continue; + } + if (c === ".") { + result.push(segment); + segment = ""; + continue; + } + segment += c; + } + if (segment.length) { + result.push(segment); + } + return result; + } + function deleteLogProperty(log2, property) { + const props = splitIgnoreKey(property); + const propToDelete = props.pop(); + props.forEach((prop) => { + if (!Object.prototype.hasOwnProperty.call(log2, prop)) { + return; + } + log2 = log2[prop]; }); + delete log2[propToDelete]; } - if (status >= 400) { - const data = await getResponseData(response); - const error = new import_request_error.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions + function filterLog(log2, ignoreKeys) { + const logCopy = clone(log2); + ignoreKeys.forEach((ignoreKey) => { + deleteLogProperty(logCopy, ignoreKey); }); - throw error; + return logCopy; } - return parseSuccessResponseBody ? await getResponseData(response) : response.body; - }).then((data) => { - return { - status, - url, - headers, - data + } +}); + +// node_modules/.pnpm/@hapi+bourne@2.1.0/node_modules/@hapi/bourne/lib/index.js +var require_lib = __commonJS({ + "node_modules/.pnpm/@hapi+bourne@2.1.0/node_modules/@hapi/bourne/lib/index.js"(exports2) { + "use strict"; + var internals = { + suspectRx: /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*\:/ }; - }).catch((error) => { - if (error instanceof import_request_error.RequestError) - throw error; - else if (error.name === "AbortError") - throw error; - let message = error.message; - if (error.name === "TypeError" && "cause" in error) { - if (error.cause instanceof Error) { - message = error.cause.message; - } else if (typeof error.cause === "string") { - message = error.cause; + exports2.parse = function(text, ...args) { + const firstOptions = typeof args[0] === "object" && args[0]; + const reviver = args.length > 1 || !firstOptions ? args[0] : void 0; + const options2 = args.length > 1 && args[1] || firstOptions || {}; + const obj = JSON.parse(text, reviver); + if (options2.protoAction === "ignore") { + return obj; + } + if (!obj || typeof obj !== "object") { + return obj; + } + if (!text.match(internals.suspectRx)) { + return obj; + } + exports2.scan(obj, options2); + return obj; + }; + exports2.scan = function(obj, options2 = {}) { + let next = [obj]; + while (next.length) { + const nodes = next; + next = []; + for (const node2 of nodes) { + if (Object.prototype.hasOwnProperty.call(node2, "__proto__")) { + if (options2.protoAction !== "remove") { + throw new SyntaxError("Object contains forbidden prototype property"); + } + delete node2.__proto__; + } + for (const key in node2) { + const value = node2[key]; + if (value && typeof value === "object") { + next.push(node2[key]); + } + } + } + } + }; + exports2.safeParse = function(text, reviver) { + try { + return exports2.parse(text, reviver); + } catch (ignoreError) { + return null; + } + }; + } +}); + +// node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/index.js +var require_pino_pretty = __commonJS({ + "node_modules/.pnpm/pino-pretty@6.0.0/node_modules/pino-pretty/index.js"(exports2, module2) { + "use strict"; + var { options: coloretteOptions } = require_colorette(); + var jmespath = require_jmespath(); + var colors = require_colors(); + var { ERROR_LIKE_KEYS, MESSAGE_KEY, TIMESTAMP_KEY } = require_constants2(); + var { + isObject: isObject2, + prettifyErrorLog, + prettifyLevel, + prettifyMessage, + prettifyMetadata, + prettifyObject, + prettifyTime, + filterLog + } = require_utils(); + var bourne = require_lib(); + var jsonParser = (input) => { + try { + return { value: bourne.parse(input, { protoAction: "remove" }) }; + } catch (err) { + return { err }; + } + }; + var defaultOptions = { + colorize: coloretteOptions.enabled, + crlf: false, + errorLikeObjectKeys: ERROR_LIKE_KEYS, + errorProps: "", + levelFirst: false, + messageKey: MESSAGE_KEY, + messageFormat: false, + timestampKey: TIMESTAMP_KEY, + translateTime: false, + useMetadata: false, + outputStream: process.stdout, + customPrettifiers: {}, + hideObject: false, + singleLine: false + }; + function prettyFactory(options2) { + const opts = Object.assign({}, defaultOptions, options2); + const EOL = opts.crlf ? "\r\n" : "\n"; + const IDENT = " "; + const messageKey = opts.messageKey; + const levelKey = opts.levelKey; + const levelLabel = opts.levelLabel; + const messageFormat = opts.messageFormat; + const timestampKey = opts.timestampKey; + const errorLikeObjectKeys = opts.errorLikeObjectKeys; + const errorProps = opts.errorProps.split(","); + const customPrettifiers = opts.customPrettifiers; + const ignoreKeys = opts.ignore ? new Set(opts.ignore.split(",")) : void 0; + const hideObject = opts.hideObject; + const singleLine = opts.singleLine; + const colorizer = colors(opts.colorize); + const search = opts.search; + return pretty; + function pretty(inputData) { + let log2; + if (!isObject2(inputData)) { + const parsed = jsonParser(inputData); + if (parsed.err || !isObject2(parsed.value)) { + return inputData + EOL; + } + log2 = parsed.value; + } else { + log2 = inputData; + } + if (search && !jmespath.search(log2, search)) { + return; + } + const prettifiedMessage = prettifyMessage({ log: log2, messageKey, colorizer, messageFormat, levelLabel }); + if (ignoreKeys) { + log2 = filterLog(log2, ignoreKeys); + } + const prettifiedLevel = prettifyLevel({ log: log2, colorizer, levelKey }); + const prettifiedMetadata = prettifyMetadata({ log: log2 }); + const prettifiedTime = prettifyTime({ log: log2, translateFormat: opts.translateTime, timestampKey }); + let line = ""; + if (opts.levelFirst && prettifiedLevel) { + line = `${prettifiedLevel}`; + } + if (prettifiedTime && line === "") { + line = `${prettifiedTime}`; + } else if (prettifiedTime) { + line = `${line} ${prettifiedTime}`; + } + if (!opts.levelFirst && prettifiedLevel) { + if (line.length > 0) { + line = `${line} ${prettifiedLevel}`; + } else { + line = prettifiedLevel; + } + } + if (prettifiedMetadata) { + if (line.length > 0) { + line = `${line} ${prettifiedMetadata}:`; + } else { + line = prettifiedMetadata; + } + } + if (line.endsWith(":") === false && line !== "") { + line += ":"; + } + if (prettifiedMessage) { + if (line.length > 0) { + line = `${line} ${prettifiedMessage}`; + } else { + line = prettifiedMessage; + } + } + if (line.length > 0 && !singleLine) { + line += EOL; + } + if (log2.type === "Error" && log2.stack) { + const prettifiedErrorLog = prettifyErrorLog({ + log: log2, + errorLikeKeys: errorLikeObjectKeys, + errorProperties: errorProps, + ident: IDENT, + eol: EOL + }); + line += prettifiedErrorLog; + } else if (!hideObject) { + const skipKeys = [messageKey, levelKey, timestampKey].filter((key) => typeof log2[key] === "string" || typeof log2[key] === "number"); + const prettifiedObject = prettifyObject({ + input: log2, + skipKeys, + customPrettifiers, + errorLikeKeys: errorLikeObjectKeys, + eol: EOL, + ident: IDENT, + singleLine, + colorizer + }); + if (singleLine && !/^\s$/.test(prettifiedObject)) { + line += " "; + } + line += prettifiedObject; + } + return line; } } - throw new import_request_error.RequestError(message, 500, { - request: requestOptions - }); - }); -} -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json().catch(() => response.text()).catch(() => ""); + prettyFactory.prettyFactory = prettyFactory; + prettyFactory.default = prettyFactory; + module2.exports = prettyFactory; } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); +}); + +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/is.js +function isError(wat) { + switch (objectToString.call(wat)) { + case "[object Error]": + case "[object Exception]": + case "[object DOMException]": + return true; + default: + return isInstanceOf(wat, Error); } - return getBufferResponse(response); } -function toErrorMessage(data) { - if (typeof data === "string") - return data; - let suffix; - if ("documentation_url" in data) { - suffix = ` - ${data.documentation_url}`; - } else { - suffix = ""; - } - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; - } - return `${data.message}${suffix}`; +function isBuiltin(wat, className) { + return objectToString.call(wat) === `[object ${className}]`; +} +function isString(wat) { + return isBuiltin(wat, "String"); +} +function isParameterizedString(wat) { + return typeof wat === "object" && wat !== null && "__sentry_template_string__" in wat && "__sentry_template_values__" in wat; +} +function isPrimitive(wat) { + return wat === null || isParameterizedString(wat) || typeof wat !== "object" && typeof wat !== "function"; +} +function isPlainObject(wat) { + return isBuiltin(wat, "Object"); +} +function isEvent(wat) { + return typeof Event !== "undefined" && isInstanceOf(wat, Event); +} +function isElement(wat) { + return typeof Element !== "undefined" && isInstanceOf(wat, Element); +} +function isRegExp(wat) { + return isBuiltin(wat, "RegExp"); +} +function isThenable(wat) { + return Boolean(wat && wat.then && typeof wat.then === "function"); +} +function isSyntheticEvent(wat) { + return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat; +} +function isNaN2(wat) { + return typeof wat === "number" && wat !== wat; +} +function isInstanceOf(wat, base) { + try { + return wat instanceof base; + } catch (_e) { + return false; } - return `Unknown error: ${JSON.stringify(data)}`; } - -// pkg/dist-src/with-defaults.js -function withDefaults(oldEndpoint, newDefaults) { - const endpoint2 = oldEndpoint.defaults(newDefaults); - const newApi = function(route, parameters) { - const endpointOptions = endpoint2.merge(route, parameters); - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint2.parse(endpointOptions)); - } - const request2 = (route2, parameters2) => { - return fetchWrapper( - endpoint2.parse(endpoint2.merge(route2, parameters2)) - ); - }; - Object.assign(request2, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); - return endpointOptions.request.hook(request2, endpointOptions); - }; - return Object.assign(newApi, { - endpoint: endpoint2, - defaults: withDefaults.bind(null, endpoint2) - }); +function isVueViewModel(wat) { + return !!(typeof wat === "object" && wat !== null && (wat.__isVue || wat._isVue)); } - -// pkg/dist-src/index.js -var request = withDefaults(import_endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` +var objectToString; +var init_is = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/is.js"() { + objectToString = Object.prototype.toString; } }); -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - -/***/ }), - -/***/ 8365: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/string.js +function truncate(str2, max = 0) { + if (typeof str2 !== "string" || max === 0) { + return str2; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - sign: () => sign, - verify: () => verify, - verifyWithFallback: () => verifyWithFallback -}); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/node/sign.js -var import_node_crypto = __nccwpck_require__(77598); - -// pkg/dist-src/types.js -var Algorithm = /* @__PURE__ */ ((Algorithm2) => { - Algorithm2["SHA1"] = "sha1"; - Algorithm2["SHA256"] = "sha256"; - return Algorithm2; -})(Algorithm || {}); - -// pkg/dist-src/version.js -var VERSION = "4.1.0"; - -// pkg/dist-src/node/sign.js -async function sign(options, payload) { - const { secret, algorithm } = typeof options === "object" ? { - secret: options.secret, - algorithm: options.algorithm || Algorithm.SHA256 - } : { secret: options, algorithm: Algorithm.SHA256 }; - if (!secret || !payload) { - throw new TypeError( - "[@octokit/webhooks-methods] secret & payload required for sign()" - ); + return str2.length <= max ? str2 : `${str2.slice(0, max)}...`; +} +function snipLine(line, colno) { + let newLine = line; + const lineLength = newLine.length; + if (lineLength <= 150) { + return newLine; } - if (typeof payload !== "string") { - throw new TypeError("[@octokit/webhooks-methods] payload must be a string"); + if (colno > lineLength) { + colno = lineLength; } - if (!Object.values(Algorithm).includes(algorithm)) { - throw new TypeError( - `[@octokit/webhooks] Algorithm ${algorithm} is not supported. Must be 'sha1' or 'sha256'` - ); + let start = Math.max(colno - 60, 0); + if (start < 5) { + start = 0; } - return `${algorithm}=${(0, import_node_crypto.createHmac)(algorithm, secret).update(payload).digest("hex")}`; -} -sign.VERSION = VERSION; - -// pkg/dist-src/node/verify.js -var import_node_crypto2 = __nccwpck_require__(77598); -var import_node_buffer = __nccwpck_require__(4573); - -// pkg/dist-src/utils.js -var getAlgorithm = (signature) => { - return signature.startsWith("sha256=") ? "sha256" : "sha1"; -}; - -// pkg/dist-src/node/verify.js -async function verify(secret, eventPayload, signature) { - if (!secret || !eventPayload || !signature) { - throw new TypeError( - "[@octokit/webhooks-methods] secret, eventPayload & signature required" - ); + let end2 = Math.min(start + 140, lineLength); + if (end2 > lineLength - 5) { + end2 = lineLength; } - if (typeof eventPayload !== "string") { - throw new TypeError( - "[@octokit/webhooks-methods] eventPayload must be a string" - ); + if (end2 === lineLength) { + start = Math.max(end2 - 140, 0); } - const signatureBuffer = import_node_buffer.Buffer.from(signature); - const algorithm = getAlgorithm(signature); - const verificationBuffer = import_node_buffer.Buffer.from( - await sign({ secret, algorithm }, eventPayload) - ); - if (signatureBuffer.length !== verificationBuffer.length) { - return false; + newLine = newLine.slice(start, end2); + if (start > 0) { + newLine = `'{snip} ${newLine}`; } - return (0, import_node_crypto2.timingSafeEqual)(signatureBuffer, verificationBuffer); + if (end2 < lineLength) { + newLine += " {snip}"; + } + return newLine; } -verify.VERSION = VERSION; - -// pkg/dist-src/index.js -async function verifyWithFallback(secret, payload, signature, additionalSecrets) { - const firstPass = await verify(secret, payload, signature); - if (firstPass) { - return true; +function safeJoin(input, delimiter) { + if (!Array.isArray(input)) { + return ""; } - if (additionalSecrets !== void 0) { - for (const s of additionalSecrets) { - const v = await verify(s, payload, signature); - if (v) { - return v; + const output = []; + for (let i = 0; i < input.length; i++) { + const value = input[i]; + try { + if (isVueViewModel(value)) { + output.push("[VueViewModel]"); + } else { + output.push(String(value)); } + } catch (e) { + output.push("[value cannot be serialized]"); } } + return output.join(delimiter); +} +function isMatchingPattern(value, pattern, requireExactStringMatch = false) { + if (!isString(value)) { + return false; + } + if (isRegExp(pattern)) { + return pattern.test(value); + } + if (isString(pattern)) { + return requireExactStringMatch ? value === pattern : value.includes(pattern); + } return false; } -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 73029: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +function stringMatchesSomePattern(testString, patterns = [], requireExactStringMatch = false) { + return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch)); +} +var init_string = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/string.js"() { + init_is(); } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - Webhooks: () => Webhooks, - createEventHandler: () => createEventHandler, - createNodeMiddleware: () => createNodeMiddleware, - emitterEventNames: () => emitterEventNames }); -module.exports = __toCommonJS(dist_src_exports); - -// pkg/dist-src/createLogger.js -var createLogger = (logger) => ({ - debug: () => { - }, - info: () => { - }, - warn: console.warn.bind(console), - error: console.error.bind(console), - ...logger -}); - -// pkg/dist-src/generated/webhook-names.js -var emitterEventNames = [ - "branch_protection_configuration", - "branch_protection_configuration.disabled", - "branch_protection_configuration.enabled", - "branch_protection_rule", - "branch_protection_rule.created", - "branch_protection_rule.deleted", - "branch_protection_rule.edited", - "check_run", - "check_run.completed", - "check_run.created", - "check_run.requested_action", - "check_run.rerequested", - "check_suite", - "check_suite.completed", - "check_suite.requested", - "check_suite.rerequested", - "code_scanning_alert", - "code_scanning_alert.appeared_in_branch", - "code_scanning_alert.closed_by_user", - "code_scanning_alert.created", - "code_scanning_alert.fixed", - "code_scanning_alert.reopened", - "code_scanning_alert.reopened_by_user", - "commit_comment", - "commit_comment.created", - "create", - "custom_property", - "custom_property.created", - "custom_property.deleted", - "custom_property_values", - "custom_property_values.updated", - "delete", - "dependabot_alert", - "dependabot_alert.created", - "dependabot_alert.dismissed", - "dependabot_alert.fixed", - "dependabot_alert.reintroduced", - "dependabot_alert.reopened", - "deploy_key", - "deploy_key.created", - "deploy_key.deleted", - "deployment", - "deployment.created", - "deployment_protection_rule", - "deployment_protection_rule.requested", - "deployment_review", - "deployment_review.approved", - "deployment_review.rejected", - "deployment_review.requested", - "deployment_status", - "deployment_status.created", - "discussion", - "discussion.answered", - "discussion.category_changed", - "discussion.created", - "discussion.deleted", - "discussion.edited", - "discussion.labeled", - "discussion.locked", - "discussion.pinned", - "discussion.transferred", - "discussion.unanswered", - "discussion.unlabeled", - "discussion.unlocked", - "discussion.unpinned", - "discussion_comment", - "discussion_comment.created", - "discussion_comment.deleted", - "discussion_comment.edited", - "fork", - "github_app_authorization", - "github_app_authorization.revoked", - "gollum", - "installation", - "installation.created", - "installation.deleted", - "installation.new_permissions_accepted", - "installation.suspend", - "installation.unsuspend", - "installation_repositories", - "installation_repositories.added", - "installation_repositories.removed", - "installation_target", - "installation_target.renamed", - "issue_comment", - "issue_comment.created", - "issue_comment.deleted", - "issue_comment.edited", - "issues", - "issues.assigned", - "issues.closed", - "issues.deleted", - "issues.demilestoned", - "issues.edited", - "issues.labeled", - "issues.locked", - "issues.milestoned", - "issues.opened", - "issues.pinned", - "issues.reopened", - "issues.transferred", - "issues.unassigned", - "issues.unlabeled", - "issues.unlocked", - "issues.unpinned", - "label", - "label.created", - "label.deleted", - "label.edited", - "marketplace_purchase", - "marketplace_purchase.cancelled", - "marketplace_purchase.changed", - "marketplace_purchase.pending_change", - "marketplace_purchase.pending_change_cancelled", - "marketplace_purchase.purchased", - "member", - "member.added", - "member.edited", - "member.removed", - "membership", - "membership.added", - "membership.removed", - "merge_group", - "merge_group.checks_requested", - "merge_group.destroyed", - "meta", - "meta.deleted", - "milestone", - "milestone.closed", - "milestone.created", - "milestone.deleted", - "milestone.edited", - "milestone.opened", - "org_block", - "org_block.blocked", - "org_block.unblocked", - "organization", - "organization.deleted", - "organization.member_added", - "organization.member_invited", - "organization.member_removed", - "organization.renamed", - "package", - "package.published", - "package.updated", - "page_build", - "ping", - "project", - "project.closed", - "project.created", - "project.deleted", - "project.edited", - "project.reopened", - "project_card", - "project_card.converted", - "project_card.created", - "project_card.deleted", - "project_card.edited", - "project_card.moved", - "project_column", - "project_column.created", - "project_column.deleted", - "project_column.edited", - "project_column.moved", - "projects_v2_item", - "projects_v2_item.archived", - "projects_v2_item.converted", - "projects_v2_item.created", - "projects_v2_item.deleted", - "projects_v2_item.edited", - "projects_v2_item.reordered", - "projects_v2_item.restored", - "public", - "pull_request", - "pull_request.assigned", - "pull_request.auto_merge_disabled", - "pull_request.auto_merge_enabled", - "pull_request.closed", - "pull_request.converted_to_draft", - "pull_request.demilestoned", - "pull_request.dequeued", - "pull_request.edited", - "pull_request.enqueued", - "pull_request.labeled", - "pull_request.locked", - "pull_request.milestoned", - "pull_request.opened", - "pull_request.ready_for_review", - "pull_request.reopened", - "pull_request.review_request_removed", - "pull_request.review_requested", - "pull_request.synchronize", - "pull_request.unassigned", - "pull_request.unlabeled", - "pull_request.unlocked", - "pull_request_review", - "pull_request_review.dismissed", - "pull_request_review.edited", - "pull_request_review.submitted", - "pull_request_review_comment", - "pull_request_review_comment.created", - "pull_request_review_comment.deleted", - "pull_request_review_comment.edited", - "pull_request_review_thread", - "pull_request_review_thread.resolved", - "pull_request_review_thread.unresolved", - "push", - "registry_package", - "registry_package.published", - "registry_package.updated", - "release", - "release.created", - "release.deleted", - "release.edited", - "release.prereleased", - "release.published", - "release.released", - "release.unpublished", - "repository", - "repository.archived", - "repository.created", - "repository.deleted", - "repository.edited", - "repository.privatized", - "repository.publicized", - "repository.renamed", - "repository.transferred", - "repository.unarchived", - "repository_dispatch", - "repository_import", - "repository_vulnerability_alert", - "repository_vulnerability_alert.create", - "repository_vulnerability_alert.dismiss", - "repository_vulnerability_alert.reopen", - "repository_vulnerability_alert.resolve", - "secret_scanning_alert", - "secret_scanning_alert.created", - "secret_scanning_alert.reopened", - "secret_scanning_alert.resolved", - "secret_scanning_alert.revoked", - "secret_scanning_alert_location", - "secret_scanning_alert_location.created", - "security_advisory", - "security_advisory.performed", - "security_advisory.published", - "security_advisory.updated", - "security_advisory.withdrawn", - "sponsorship", - "sponsorship.cancelled", - "sponsorship.created", - "sponsorship.edited", - "sponsorship.pending_cancellation", - "sponsorship.pending_tier_change", - "sponsorship.tier_changed", - "star", - "star.created", - "star.deleted", - "status", - "team", - "team.added_to_repository", - "team.created", - "team.deleted", - "team.edited", - "team.removed_from_repository", - "team_add", - "watch", - "watch.started", - "workflow_dispatch", - "workflow_job", - "workflow_job.completed", - "workflow_job.in_progress", - "workflow_job.queued", - "workflow_job.waiting", - "workflow_run", - "workflow_run.completed", - "workflow_run.in_progress", - "workflow_run.requested" -]; - -// pkg/dist-src/event-handler/on.js -function handleEventHandlers(state, webhookName, handler) { - if (!state.hooks[webhookName]) { - state.hooks[webhookName] = []; + +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/aggregate-errors.js +function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser2, maxValueLimit = 250, key, limit, event, hint) { + if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) { + return; } - state.hooks[webhookName].push(handler); -} -function receiverOn(state, webhookNameOrNames, handler) { - if (Array.isArray(webhookNameOrNames)) { - webhookNameOrNames.forEach( - (webhookName) => receiverOn(state, webhookName, handler) + const originalException = event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : void 0; + if (originalException) { + event.exception.values = truncateAggregateExceptions( + aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser2, + limit, + hint.originalException, + key, + event.exception.values, + originalException, + 0 + ), + maxValueLimit ); - return; } - if (["*", "error"].includes(webhookNameOrNames)) { - const webhookName = webhookNameOrNames === "*" ? "any" : webhookNameOrNames; - const message = `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`; - throw new Error(message); +} +function aggregateExceptionsFromError(exceptionFromErrorImplementation, parser2, limit, error, key, prevExceptions, exception2, exceptionId) { + if (prevExceptions.length >= limit + 1) { + return prevExceptions; } - if (!emitterEventNames.includes(webhookNameOrNames)) { - state.log.warn( - `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)` + let newExceptions = [...prevExceptions]; + if (isInstanceOf(error[key], Error)) { + applyExceptionGroupFieldsForParentException(exception2, exceptionId); + const newException = exceptionFromErrorImplementation(parser2, error[key]); + const newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId); + newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser2, + limit, + error[key], + key, + [newException, ...newExceptions], + newException, + newExceptionId ); } - handleEventHandlers(state, webhookNameOrNames, handler); + if (Array.isArray(error.errors)) { + error.errors.forEach((childError, i) => { + if (isInstanceOf(childError, Error)) { + applyExceptionGroupFieldsForParentException(exception2, exceptionId); + const newException = exceptionFromErrorImplementation(parser2, childError); + const newExceptionId = newExceptions.length; + applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId); + newExceptions = aggregateExceptionsFromError( + exceptionFromErrorImplementation, + parser2, + limit, + childError, + key, + [newException, ...newExceptions], + newException, + newExceptionId + ); + } + }); + } + return newExceptions; } -function receiverOnAny(state, handler) { - handleEventHandlers(state, "*", handler); +function applyExceptionGroupFieldsForParentException(exception2, exceptionId) { + exception2.mechanism = exception2.mechanism || { type: "generic", handled: true }; + exception2.mechanism = { + ...exception2.mechanism, + ...exception2.type === "AggregateError" && { is_exception_group: true }, + exception_id: exceptionId + }; } -function receiverOnError(state, handler) { - handleEventHandlers(state, "error", handler); +function applyExceptionGroupFieldsForChildException(exception2, source, exceptionId, parentId) { + exception2.mechanism = exception2.mechanism || { type: "generic", handled: true }; + exception2.mechanism = { + ...exception2.mechanism, + type: "chained", + source, + exception_id: exceptionId, + parent_id: parentId + }; } - -// pkg/dist-src/event-handler/receive.js -var import_aggregate_error = __toESM(__nccwpck_require__(79572)); - -// pkg/dist-src/event-handler/wrap-error-handler.js -function wrapErrorHandler(handler, error) { - let returnValue; - try { - returnValue = handler(error); - } catch (error2) { - console.log('FATAL: Error occurred in "error" event handler'); - console.log(error2); - } - if (returnValue && returnValue.catch) { - returnValue.catch((error2) => { - console.log('FATAL: Error occurred in "error" event handler'); - console.log(error2); - }); - } +function truncateAggregateExceptions(exceptions, maxValueLength) { + return exceptions.map((exception2) => { + if (exception2.value) { + exception2.value = truncate(exception2.value, maxValueLength); + } + return exception2; + }); } - -// pkg/dist-src/event-handler/receive.js -function getHooks(state, eventPayloadAction, eventName) { - const hooks = [state.hooks[eventName], state.hooks["*"]]; - if (eventPayloadAction) { - hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]); +var init_aggregate_errors = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/aggregate-errors.js"() { + init_is(); + init_string(); } - return [].concat(...hooks.filter(Boolean)); +}); + +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/worldwide.js +function isGlobalObj(obj) { + return obj && obj.Math == Math ? obj : void 0; } -function receiverHandle(state, event) { - const errorHandlers = state.hooks.error || []; - if (event instanceof Error) { - const error = Object.assign(new import_aggregate_error.default([event]), { - event, - errors: [event] - }); - errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); - return Promise.reject(error); +function getGlobalObject() { + return GLOBAL_OBJ; +} +function getGlobalSingleton(name, creator, obj) { + const gbl = obj || GLOBAL_OBJ; + const __SENTRY__ = gbl.__SENTRY__ = gbl.__SENTRY__ || {}; + const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator()); + return singleton; +} +var GLOBAL_OBJ; +var init_worldwide = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/worldwide.js"() { + GLOBAL_OBJ = typeof globalThis == "object" && isGlobalObj(globalThis) || // eslint-disable-next-line no-restricted-globals + typeof window == "object" && isGlobalObj(window) || typeof self == "object" && isGlobalObj(self) || typeof global == "object" && isGlobalObj(global) || /* @__PURE__ */ function() { + return this; + }() || {}; } - if (!event || !event.name) { - throw new import_aggregate_error.default(["Event name not passed"]); +}); + +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/browser.js +function htmlTreeAsString(elem, options2 = {}) { + if (!elem) { + return ""; } - if (!event.payload) { - throw new import_aggregate_error.default(["Event payload not passed"]); + try { + let currentElem = elem; + const MAX_TRAVERSE_HEIGHT = 5; + const out = []; + let height = 0; + let len = 0; + const separator = " > "; + const sepLength = separator.length; + let nextStr; + const keyAttrs = Array.isArray(options2) ? options2 : options2.keyAttrs; + const maxStringLength = !Array.isArray(options2) && options2.maxStringLength || DEFAULT_MAX_STRING_LENGTH; + while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { + nextStr = _htmlElementAsString(currentElem, keyAttrs); + if (nextStr === "html" || height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength) { + break; + } + out.push(nextStr); + len += nextStr.length; + currentElem = currentElem.parentNode; + } + return out.reverse().join(separator); + } catch (_oO) { + return ""; } - const hooks = getHooks( - state, - "action" in event.payload ? event.payload.action : null, - event.name - ); - if (hooks.length === 0) { - return Promise.resolve(); +} +function _htmlElementAsString(el, keyAttrs) { + const elem = el; + const out = []; + let className; + let classes; + let key; + let attr; + let i; + if (!elem || !elem.tagName) { + return ""; } - const errors = []; - const promises = hooks.map((handler) => { - let promise = Promise.resolve(event); - if (state.transform) { - promise = promise.then(state.transform); - } - return promise.then((event2) => { - return handler(event2); - }).catch((error) => errors.push(Object.assign(error, { event }))); - }); - return Promise.all(promises).then(() => { - if (errors.length === 0) { - return; + if (WINDOW.HTMLElement) { + if (elem instanceof HTMLElement && elem.dataset && elem.dataset["sentryComponent"]) { + return elem.dataset["sentryComponent"]; } - const error = new import_aggregate_error.default(errors); - Object.assign(error, { - event, - errors - }); - errorHandlers.forEach((handler) => wrapErrorHandler(handler, error)); - throw error; - }); -} - -// pkg/dist-src/event-handler/remove-listener.js -function removeListener(state, webhookNameOrNames, handler) { - if (Array.isArray(webhookNameOrNames)) { - webhookNameOrNames.forEach( - (webhookName) => removeListener(state, webhookName, handler) - ); - return; } - if (!state.hooks[webhookNameOrNames]) { - return; + out.push(elem.tagName.toLowerCase()); + const keyAttrPairs = keyAttrs && keyAttrs.length ? keyAttrs.filter((keyAttr) => elem.getAttribute(keyAttr)).map((keyAttr) => [keyAttr, elem.getAttribute(keyAttr)]) : null; + if (keyAttrPairs && keyAttrPairs.length) { + keyAttrPairs.forEach((keyAttrPair) => { + out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); + }); + } else { + if (elem.id) { + out.push(`#${elem.id}`); + } + className = elem.className; + if (className && isString(className)) { + classes = className.split(/\s+/); + for (i = 0; i < classes.length; i++) { + out.push(`.${classes[i]}`); + } + } } - for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) { - if (state.hooks[webhookNameOrNames][i] === handler) { - state.hooks[webhookNameOrNames].splice(i, 1); - return; + const allowedAttrs = ["aria-label", "type", "name", "title", "alt"]; + for (i = 0; i < allowedAttrs.length; i++) { + key = allowedAttrs[i]; + attr = elem.getAttribute(key); + if (attr) { + out.push(`[${key}="${attr}"]`); } } + return out.join(""); } - -// pkg/dist-src/event-handler/index.js -function createEventHandler(options) { - const state = { - hooks: {}, - log: createLogger(options && options.log) - }; - if (options && options.transform) { - state.transform = options.transform; +var WINDOW, DEFAULT_MAX_STRING_LENGTH; +var init_browser = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/browser.js"() { + init_is(); + init_worldwide(); + WINDOW = getGlobalObject(); + DEFAULT_MAX_STRING_LENGTH = 80; } - return { - on: receiverOn.bind(null, state), - onAny: receiverOnAny.bind(null, state), - onError: receiverOnError.bind(null, state), - removeListener: removeListener.bind(null, state), - receive: receiverHandle.bind(null, state) - }; -} +}); -// pkg/dist-src/index.js -var import_webhooks_methods2 = __nccwpck_require__(8365); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/debug-build.js +var DEBUG_BUILD; +var init_debug_build = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/debug-build.js"() { + DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; + } +}); -// pkg/dist-src/verify-and-receive.js -var import_aggregate_error2 = __toESM(__nccwpck_require__(79572)); -var import_webhooks_methods = __nccwpck_require__(8365); -async function verifyAndReceive(state, event) { - const matchesSignature = await (0, import_webhooks_methods.verify)( - state.secret, - event.payload, - event.signature - ).catch(() => false); - if (!matchesSignature) { - const error = new Error( - "[@octokit/webhooks] signature does not match event payload and secret" - ); - return state.eventHandler.receive( - Object.assign(error, { event, status: 400 }) - ); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/logger.js +function consoleSandbox(callback) { + if (!("console" in GLOBAL_OBJ)) { + return callback(); } - let payload; + const console2 = GLOBAL_OBJ.console; + const wrappedFuncs = {}; + const wrappedLevels = Object.keys(originalConsoleMethods); + wrappedLevels.forEach((level) => { + const originalConsoleMethod = originalConsoleMethods[level]; + wrappedFuncs[level] = console2[level]; + console2[level] = originalConsoleMethod; + }); try { - payload = JSON.parse(event.payload); - } catch (error) { - error.message = "Invalid JSON"; - error.status = 400; - throw new import_aggregate_error2.default([error]); + return callback(); + } finally { + wrappedLevels.forEach((level) => { + console2[level] = wrappedFuncs[level]; + }); } - return state.eventHandler.receive({ - id: event.id, - name: event.name, - payload - }); } +function makeLogger() { + let enabled = false; + const logger2 = { + enable: () => { + enabled = true; + }, + disable: () => { + enabled = false; + }, + isEnabled: () => enabled + }; + if (DEBUG_BUILD) { + CONSOLE_LEVELS.forEach((name) => { + logger2[name] = (...args) => { + if (enabled) { + consoleSandbox(() => { + GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); + }); + } + }; + }); + } else { + CONSOLE_LEVELS.forEach((name) => { + logger2[name] = () => void 0; + }); + } + return logger2; +} +var PREFIX, CONSOLE_LEVELS, originalConsoleMethods, logger; +var init_logger = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/logger.js"() { + init_debug_build(); + init_worldwide(); + PREFIX = "Sentry Logger "; + CONSOLE_LEVELS = [ + "debug", + "info", + "warn", + "error", + "log", + "assert", + "trace" + ]; + originalConsoleMethods = {}; + logger = makeLogger(); + } +}); -// pkg/dist-src/middleware/node/get-missing-headers.js -var WEBHOOK_HEADERS = [ - "x-github-event", - "x-hub-signature-256", - "x-github-delivery" -]; -function getMissingHeaders(request) { - return WEBHOOK_HEADERS.filter((header) => !(header in request.headers)); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/dsn.js +function isValidProtocol(protocol) { + return protocol === "http" || protocol === "https"; } - -// pkg/dist-src/middleware/node/get-payload.js -var import_aggregate_error3 = __toESM(__nccwpck_require__(79572)); -function getPayload(request) { - if ("body" in request) { - if (typeof request.body === "object" && "rawBody" in request && request.rawBody instanceof Buffer) { - return Promise.resolve(request.rawBody.toString("utf8")); - } else { - return Promise.resolve(request.body); +function dsnToString(dsn, withPassword = false) { + const { host, path: path2, pass, port, projectId, protocol, publicKey } = dsn; + return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path2 ? `${path2}/` : path2}${projectId}`; +} +function dsnFromString(str2) { + const match = DSN_REGEX.exec(str2); + if (!match) { + consoleSandbox(() => { + console.error(`Invalid Sentry Dsn: ${str2}`); + }); + return void 0; + } + const [protocol, publicKey, pass = "", host, port = "", lastPath] = match.slice(1); + let path2 = ""; + let projectId = lastPath; + const split = projectId.split("/"); + if (split.length > 1) { + path2 = split.slice(0, -1).join("/"); + projectId = split.pop(); + } + if (projectId) { + const projectMatch = projectId.match(/^\d+/); + if (projectMatch) { + projectId = projectMatch[0]; } } - return new Promise((resolve, reject) => { - let data = []; - request.on("error", (error) => reject(new import_aggregate_error3.default([error]))); - request.on("data", (chunk) => data.push(chunk)); - request.on( - "end", - () => ( - // setImmediate improves the throughput by reducing the pressure from - // the event loop - setImmediate( - resolve, - data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") - ) - ) - ); - }); + return dsnFromComponents({ host, pass, path: path2, projectId, port, protocol, publicKey }); } - -// pkg/dist-src/middleware/node/on-unhandled-request-default.js -function onUnhandledRequestDefault(request, response) { - response.writeHead(404, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Unknown route: ${request.method} ${request.url}` - }) - ); +function dsnFromComponents(components) { + return { + protocol: components.protocol, + publicKey: components.publicKey || "", + pass: components.pass || "", + host: components.host, + port: components.port || "", + path: components.path || "", + projectId: components.projectId + }; } - -// pkg/dist-src/middleware/node/middleware.js -async function middleware(webhooks, options, request, response, next) { - let pathname; - try { - pathname = new URL(request.url, "http://localhost").pathname; - } catch (error) { - response.writeHead(422, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Request URL could not be parsed: ${request.url}` - }) - ); +function validateDsn(dsn) { + if (!DEBUG_BUILD) { return true; } - if (pathname !== options.path) { - next?.(); + const { port, projectId, protocol } = dsn; + const requiredComponents = ["protocol", "publicKey", "host", "projectId"]; + const hasMissingRequiredComponent = requiredComponents.find((component) => { + if (!dsn[component]) { + logger.error(`Invalid Sentry Dsn: ${component} missing`); + return true; + } + return false; + }); + if (hasMissingRequiredComponent) { return false; - } else if (request.method !== "POST") { - onUnhandledRequestDefault(request, response); - return true; } - if (!request.headers["content-type"] || !request.headers["content-type"].startsWith("application/json")) { - response.writeHead(415, { - "content-type": "application/json", - accept: "application/json" - }); - response.end( - JSON.stringify({ - error: `Unsupported "Content-Type" header value. Must be "application/json"` - }) - ); - return true; + if (!projectId.match(/^\d+$/)) { + logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`); + return false; } - const missingHeaders = getMissingHeaders(request).join(", "); - if (missingHeaders) { - response.writeHead(400, { - "content-type": "application/json" - }); - response.end( - JSON.stringify({ - error: `Required headers missing: ${missingHeaders}` - }) - ); - return true; + if (!isValidProtocol(protocol)) { + logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`); + return false; } - const eventName = request.headers["x-github-event"]; - const signatureSHA256 = request.headers["x-hub-signature-256"]; - const id = request.headers["x-github-delivery"]; - options.log.debug(`${eventName} event received (id: ${id})`); - let didTimeout = false; - const timeout = setTimeout(() => { - didTimeout = true; - response.statusCode = 202; - response.end("still processing\n"); - }, 9e3).unref(); - try { - const payload = await getPayload(request); - await webhooks.verifyAndReceive({ - id, - name: eventName, - payload, - signature: signatureSHA256 - }); - clearTimeout(timeout); - if (didTimeout) - return true; - response.end("ok\n"); - return true; - } catch (error) { - clearTimeout(timeout); - if (didTimeout) - return true; - const err = Array.from(error)[0]; - const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; - response.statusCode = typeof err.status !== "undefined" ? err.status : 500; - options.log.error(error); - response.end( - JSON.stringify({ - error: errorMessage - }) - ); - return true; + if (port && isNaN(parseInt(port, 10))) { + logger.error(`Invalid Sentry Dsn: Invalid port ${port}`); + return false; } + return true; } - -// pkg/dist-src/middleware/node/index.js -function createNodeMiddleware(webhooks, { - path = "/api/github/webhooks", - log = createLogger() -} = {}) { - return middleware.bind(null, webhooks, { - path, - log - }); +function makeDsn(from) { + const components = typeof from === "string" ? dsnFromString(from) : dsnFromComponents(from); + if (!components || !validateDsn(components)) { + return void 0; + } + return components; } - -// pkg/dist-src/index.js -var Webhooks = class { - constructor(options) { - if (!options || !options.secret) { - throw new Error("[@octokit/webhooks] options.secret required"); - } - const state = { - eventHandler: createEventHandler(options), - secret: options.secret, - hooks: {}, - log: createLogger(options.log) - }; - this.sign = import_webhooks_methods2.sign.bind(null, options.secret); - this.verify = import_webhooks_methods2.verify.bind(null, options.secret); - this.on = state.eventHandler.on; - this.onAny = state.eventHandler.onAny; - this.onError = state.eventHandler.onError; - this.removeListener = state.eventHandler.removeListener; - this.receive = state.eventHandler.receive; - this.verifyAndReceive = verifyAndReceive.bind(null, state); +var DSN_REGEX; +var init_dsn = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/dsn.js"() { + init_debug_build(); + init_logger(); + DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 66154: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +}); -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/error.js +var SentryError; +var init_error = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/error.js"() { + SentryError = class extends Error { + /** Display name of this error instance. */ + constructor(message, logLevel = "warn") { + super(message); + this.message = message; + this.name = new.target.prototype.constructor.name; + Object.setPrototypeOf(this, new.target.prototype); + this.logLevel = logLevel; + } + }; } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - getPrivateKey: () => getPrivateKey }); -module.exports = __toCommonJS(dist_src_exports); -var import_path = __nccwpck_require__(16928); -var import_fs = __nccwpck_require__(79896); - -// pkg/dist-src/version.js -var VERSION = "1.1.2"; -// pkg/dist-src/index.js -var begin = "-----BEGIN RSA PRIVATE KEY-----"; -var end = "-----END RSA PRIVATE KEY-----"; -function getPrivateKey(options = {}) { - const env = options.env || process.env; - const cwd = options.cwd || process.cwd(); - if (options.filepath) { - return (0, import_fs.readFileSync)((0, import_path.resolve)(cwd, options.filepath), "utf-8"); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/object.js +function fill(source, name, replacementFactory) { + if (!(name in source)) { + return; } - if (env.PRIVATE_KEY) { - let privateKey = env.PRIVATE_KEY; - if (isBase64(privateKey)) { - privateKey = Buffer.from(privateKey, "base64").toString(); + const original = source[name]; + const wrapped = replacementFactory(original); + if (typeof wrapped === "function") { + markFunctionWrapped(wrapped, original); + } + source[name] = wrapped; +} +function addNonEnumerableProperty(obj, name, value) { + try { + Object.defineProperty(obj, name, { + // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it + value, + writable: true, + configurable: true + }); + } catch (o_O) { + DEBUG_BUILD && logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); + } +} +function markFunctionWrapped(wrapped, original) { + try { + const proto = original.prototype || {}; + wrapped.prototype = original.prototype = proto; + addNonEnumerableProperty(wrapped, "__sentry_original__", original); + } catch (o_O) { + } +} +function getOriginalFunction(func) { + return func.__sentry_original__; +} +function urlEncode(object) { + return Object.keys(object).map((key) => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`).join("&"); +} +function convertToPlainObject(value) { + if (isError(value)) { + return { + message: value.message, + name: value.name, + stack: value.stack, + ...getOwnProperties(value) + }; + } else if (isEvent(value)) { + const newObj = { + type: value.type, + target: serializeEventTarget(value.target), + currentTarget: serializeEventTarget(value.currentTarget), + ...getOwnProperties(value) + }; + if (typeof CustomEvent !== "undefined" && isInstanceOf(value, CustomEvent)) { + newObj.detail = value.detail; } - if (privateKey.includes(begin) && privateKey.includes(end)) { - if (privateKey.indexOf("\\n") !== -1) { - privateKey = privateKey.replace(/\\n/g, "\n"); - } - if (privateKey.indexOf("\n") === -1) { - privateKey = addNewlines(privateKey); + return newObj; + } else { + return value; + } +} +function serializeEventTarget(target) { + try { + return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target); + } catch (_oO) { + return ""; + } +} +function getOwnProperties(obj) { + if (typeof obj === "object" && obj !== null) { + const extractedProps = {}; + for (const property in obj) { + if (Object.prototype.hasOwnProperty.call(obj, property)) { + extractedProps[property] = obj[property]; } - return privateKey; } - throw new Error( - `[@probot/get-private-key] The contents of "env.PRIVATE_KEY" could not be validated. Please check to ensure you have copied the contents of the .pem file correctly.` - ); + return extractedProps; + } else { + return {}; } - if (env.PRIVATE_KEY_PATH) { - const filepath = (0, import_path.resolve)(cwd, env.PRIVATE_KEY_PATH); - if ((0, import_fs.existsSync)(filepath)) { - return (0, import_fs.readFileSync)(filepath, "utf-8"); - } else { - throw new Error( - `[@probot/get-private-key] Private key does not exists at path: "${env.PRIVATE_KEY_PATH}". Please check to ensure that "env.PRIVATE_KEY_PATH" is correct.` - ); - } +} +function extractExceptionKeysForMessage(exception2, maxLength = 40) { + const keys = Object.keys(convertToPlainObject(exception2)); + keys.sort(); + if (!keys.length) { + return "[object has no keys]"; } - const pemFiles = (0, import_fs.readdirSync)(cwd).filter((path) => path.endsWith(".pem")); - if (pemFiles.length > 1) { - const paths = pemFiles.join(", "); - throw new Error( - `[@probot/get-private-key] More than one file found: "${paths}". Set { filepath } option or set one of the environment variables: PRIVATE_KEY, PRIVATE_KEY_PATH` - ); - } else if (pemFiles[0]) { - return getPrivateKey({ filepath: pemFiles[0], cwd }); + if (keys[0].length >= maxLength) { + return truncate(keys[0], maxLength); } - return null; + for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { + const serialized = keys.slice(0, includedKeys).join(", "); + if (serialized.length > maxLength) { + continue; + } + if (includedKeys === keys.length) { + return serialized; + } + return truncate(serialized, maxLength); + } + return ""; } -function isBase64(str) { - return Buffer.from(str, "base64").toString("base64") === str; +function dropUndefinedKeys(inputValue) { + const memoizationMap = /* @__PURE__ */ new Map(); + return _dropUndefinedKeys(inputValue, memoizationMap); } -function addNewlines(privateKey) { - const middleLength = privateKey.length - begin.length - end.length - 2; - const middle = privateKey.substr(begin.length + 1, middleLength); - return `${begin} -${middle.trim().replace(/\s+/g, "\n")} -${end}`; +function _dropUndefinedKeys(inputValue, memoizationMap) { + if (isPojo(inputValue)) { + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) { + return memoVal; + } + const returnValue = {}; + memoizationMap.set(inputValue, returnValue); + for (const key of Object.keys(inputValue)) { + if (typeof inputValue[key] !== "undefined") { + returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); + } + } + return returnValue; + } + if (Array.isArray(inputValue)) { + const memoVal = memoizationMap.get(inputValue); + if (memoVal !== void 0) { + return memoVal; + } + const returnValue = []; + memoizationMap.set(inputValue, returnValue); + inputValue.forEach((item) => { + returnValue.push(_dropUndefinedKeys(item, memoizationMap)); + }); + return returnValue; + } + return inputValue; } -getPrivateKey.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 49254: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +function isPojo(input) { + if (!isPlainObject(input)) { + return false; + } + try { + const name = Object.getPrototypeOf(input).constructor.name; + return !name || name === "Object"; + } catch (e) { + return true; + } +} +var init_object = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/object.js"() { + init_browser(); + init_debug_build(); + init_is(); + init_logger(); + init_string(); } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// pkg/dist-src/index.js -var dist_src_exports = {}; -__export(dist_src_exports, { - composeConfigGet: () => composeConfigGet, - config: () => config }); -module.exports = __toCommonJS(dist_src_exports); -var import_core4 = __nccwpck_require__(76407); - -// pkg/dist-src/version.js -var VERSION = "2.0.1"; - -// pkg/dist-src/compose-config-get.js -var import_core3 = __nccwpck_require__(76407); - -// pkg/dist-src/util/get-config-files.js -var import_core2 = __nccwpck_require__(76407); -// pkg/dist-src/util/get-config-file.js -var import_core = __nccwpck_require__(76407); -var import_js_yaml = __toESM(__nccwpck_require__(39885)); -var SUPPORTED_FILE_EXTENSIONS = ["json", "yml", "yaml"]; -async function getConfigFile(octokit, { owner, repo, path, ref }) { - const fileExtension = path.split(".").pop().toLowerCase(); - if (!SUPPORTED_FILE_EXTENSIONS.includes(fileExtension)) { - throw new Error( - `[@probot/octokit-plugin-config] .${fileExtension} extension is not support for configuration (path: "${path}")` - ); - } - const endpoint = { - method: "GET", - url: "/repos/{owner}/{repo}/contents/{path}", - owner, - repo, - path, - mediaType: { - format: "raw" - }, - // this can be just `ref` once https://github.com/octokit/endpoint.js/issues/206 is resolved - ...ref ? { ref } : {} - }; - const { url } = await octokit.request.endpoint(endpoint); - const emptyConfigResult = { - owner, - repo, - path, - url, - config: null - }; - try { - const { data, headers } = await octokit.request(endpoint); - if (headers["content-type"] === "application/json; charset=utf-8") { - throw new Error( - `[@probot/octokit-plugin-config] ${url} exists, but is either a directory or a submodule. Ignoring.` - ); - } - if (fileExtension === "json") { - if (typeof data === "string") { - throw new Error( - `[@probot/octokit-plugin-config] Configuration could not be parsed from ${url} (invalid JSON)` - ); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/node-stack-trace.js +function filenameIsInApp(filename, isNative = false) { + const isInternal = isNative || filename && // It's not internal if it's an absolute linux path + !filename.startsWith("/") && // It's not internal if it's an absolute windows path + !filename.match(/^[A-Z]:/) && // It's not internal if the path is starting with a dot + !filename.startsWith(".") && // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack + !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//); + return !isInternal && filename !== void 0 && !filename.includes("node_modules/"); +} +function node(getModule) { + const FILENAME_MATCH = /^\s*[-]{4,}$/; + const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; + return (line) => { + const lineMatch = line.match(FULL_MATCH); + if (lineMatch) { + let object; + let method; + let functionName; + let typeName; + let methodName; + if (lineMatch[1]) { + functionName = lineMatch[1]; + let methodStart = functionName.lastIndexOf("."); + if (functionName[methodStart - 1] === ".") { + methodStart--; + } + if (methodStart > 0) { + object = functionName.slice(0, methodStart); + method = functionName.slice(methodStart + 1); + const objectEnd = object.indexOf(".Module"); + if (objectEnd > 0) { + functionName = functionName.slice(objectEnd + 1); + object = object.slice(0, objectEnd); + } + } + typeName = void 0; + } + if (method) { + typeName = object; + methodName = method; + } + if (method === "") { + methodName = void 0; + functionName = void 0; + } + if (functionName === void 0) { + methodName = methodName || ""; + functionName = typeName ? `${typeName}.${methodName}` : methodName; + } + let filename = lineMatch[2] && lineMatch[2].startsWith("file://") ? lineMatch[2].slice(7) : lineMatch[2]; + const isNative = lineMatch[5] === "native"; + if (filename && filename.match(/\/[A-Z]:/)) { + filename = filename.slice(1); + } + if (!filename && lineMatch[5] && !isNative) { + filename = lineMatch[5]; } return { - ...emptyConfigResult, - config: data + filename, + module: getModule ? getModule(filename) : void 0, + function: functionName, + lineno: parseInt(lineMatch[3], 10) || void 0, + colno: parseInt(lineMatch[4], 10) || void 0, + in_app: filenameIsInApp(filename, isNative) }; } - const config2 = import_js_yaml.default.load(data) || {}; - if (typeof config2 === "string") { - throw new Error( - `[@probot/octokit-plugin-config] Configuration could not be parsed from ${url} (YAML is not an object)` - ); - } - return { - ...emptyConfigResult, - config: config2 - }; - } catch (error) { - if (error.status === 404) { - return emptyConfigResult; - } - if (error.name === "YAMLException") { - const reason = /unknown tag/.test(error.message) ? "unsafe YAML" : "invalid YAML"; - throw new Error( - `[@probot/octokit-plugin-config] Configuration could not be parsed from ${url} (${reason})` - ); + if (line.match(FILENAME_MATCH)) { + return { + filename: line + }; } - throw error; - } -} - -// pkg/dist-src/util/extends-to-get-content-params.js -var EXTENDS_REGEX = new RegExp( - "^(?:([a-z\\d](?:[a-z\\d]|-(?=[a-z\\d])){0,38})/)?([-_.\\w\\d]+)(?::([-_./\\w\\d]+\\.ya?ml))?$", - "i" -); -function extendsToGetContentParams({ - owner, - path, - url, - extendsValue -}) { - if (typeof extendsValue !== "string") { - throw new Error( - `[@probot/octokit-plugin-config] Invalid value ${JSON.stringify( - extendsValue - )} for _extends in ${url}` - ); - } - const match = extendsValue.match(EXTENDS_REGEX); - if (match === null) { - throw new Error( - `[@probot/octokit-plugin-config] Invalid value "${extendsValue}" for _extends in ${url}` - ); - } - return { - owner: match[1] || owner, - repo: match[2], - path: match[3] || path + return void 0; }; } - -// pkg/dist-src/util/get-config-files.js -async function getConfigFiles(octokit, { owner, repo, path, branch }) { - const requestedRepoFile = await getConfigFile(octokit, { - owner, - repo, - path, - ref: branch - }); - const files = [requestedRepoFile]; - if (!requestedRepoFile.config) { - if (repo === ".github") { - return files; - } - const defaultRepoConfig = await getConfigFile(octokit, { - owner, - repo: ".github", - path - }); - files.push(defaultRepoConfig); +var init_node_stack_trace = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/node-stack-trace.js"() { } - const file = files[files.length - 1]; - if (!file.config || !file.config._extends) { - return files; - } - let extendConfigOptions = extendsToGetContentParams({ - owner, - path, - url: file.url, - extendsValue: file.config._extends - }); - delete file.config._extends; - do { - const extendRepoConfig = await getConfigFile(octokit, extendConfigOptions); - files.push(extendRepoConfig); - if (!extendRepoConfig.config || !extendRepoConfig.config._extends) { - return files; - } - extendConfigOptions = extendsToGetContentParams({ - owner, - path, - url: extendRepoConfig.url, - extendsValue: extendRepoConfig.config._extends - }); - delete extendRepoConfig.config._extends; - const alreadyLoaded = files.find( - (file2) => file2.owner === extendConfigOptions.owner && file2.repo === extendConfigOptions.repo && file2.path === extendConfigOptions.path - ); - if (alreadyLoaded) { - throw new Error( - `[@probot/octokit-plugin-config] Recursion detected. Ignoring "_extends: ${extendRepoConfig.config._extends}" from ${extendRepoConfig.url} because ${alreadyLoaded.url} was already loaded.` - ); - } - } while (true); -} - -// pkg/dist-src/compose-config-get.js -async function composeConfigGet(octokit, { owner, repo, defaults, path, branch }) { - const files = await getConfigFiles(octokit, { - owner, - repo, - path, - branch - }); - const configs = files.map((file) => file.config).reverse().filter(Boolean); - return { - files, - config: typeof defaults === "function" ? defaults(configs) : Object.assign({}, defaults, ...configs) - }; -} +}); -// pkg/dist-src/index.js -function config(octokit) { - return { - config: { - async get(options) { - return composeConfigGet(octokit, options); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/stacktrace.js +function createStackParser(...parsers) { + const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map((p) => p[1]); + return (stack, skipFirst = 0) => { + const frames = []; + const lines = stack.split("\n"); + for (let i = skipFirst; i < lines.length; i++) { + const line = lines[i]; + if (line.length > 1024) { + continue; + } + const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, "$1") : line; + if (cleanedLine.match(/\S*Error: /)) { + continue; + } + for (const parser2 of sortedParsers) { + const frame = parser2(cleanedLine); + if (frame) { + frames.push(frame); + break; + } + } + if (frames.length >= STACKTRACE_FRAME_LIMIT) { + break; } } + return stripSentryFramesAndReverse(frames); }; } -config.VERSION = VERSION; -// Annotate the CommonJS export names for ESM import in node: -0 && (0); - - -/***/ }), - -/***/ 28635: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = { getTransformStream }; - -const { Transform } = __nccwpck_require__(81643); - -const prettyFactory = __nccwpck_require__(11787); -const Sentry = __nccwpck_require__(12427); - -const LEVEL_MAP = { - 10: "trace", - 20: "debug", - 30: "info", - 40: "warn", - 50: "error", - 60: "fatal", -}; - -/** - * Implements Probot's default logging formatting and error captionaing using Sentry. - * - * @param {import("./").Options} options - * @returns Transform - * @see https://getpino.io/#/docs/transports - */ -function getTransformStream(options = {}) { - const formattingEnabled = options.logFormat !== "json"; - - const levelAsString = options.logLevelInString; - const sentryEnabled = !!options.sentryDsn; - - if (sentryEnabled) { - Sentry.init({ - dsn: options.sentryDsn, - // See https://github.com/getsentry/sentry-javascript/issues/1964#issuecomment-688482615 - // 6 is enough to serialize the deepest property across all GitHub Event payloads - normalizeDepth: 6, - }); +function stackParserFromStackParserOptions(stackParser) { + if (Array.isArray(stackParser)) { + return createStackParser(...stackParser); } - - const pretty = prettyFactory({ - ignore: [ - // default pino keys - "time", - "pid", - "hostname", - // remove keys from pino-http - "req", - "res", - "responseTime", - ].join(","), - errorProps: ["event", "status", "headers", "request", "sentryEventId"].join( - "," - ), - }); - - return new Transform({ - objectMode: true, - transform(chunk, enc, cb) { - const line = chunk.toString().trim(); - - /* istanbul ignore if */ - if (line === undefined) return cb(); - - const data = sentryEnabled ? JSON.parse(line) : null; - - if (!sentryEnabled || data.level < 50) { - if (formattingEnabled) { - return cb(null, pretty(line)); - } - - if (levelAsString) { - return cb(null, stringifyLogLevel(JSON.parse(line))); - } - - cb(null, line + "\n"); - return; - } - - Sentry.withScope(function (scope) { - const sentryLevelName = data.level === 50 ? "error" : "fatal"; - scope.setLevel(sentryLevelName); - - for (const extra of ["event", "headers", "request", "status"]) { - if (!data[extra]) continue; - - scope.setExtra(extra, data[extra]); - } - - // set user id and username to installation ID and account login - if (data.event && data.event.payload) { - const { - // When GitHub App is installed organization wide - installation: { id, account: { login: account } = {} } = {}, - - // When the repository belongs to an organization - organization: { login: organization } = {}, - // When the repository belongs to a user - repository: { owner: { login: owner } = {} } = {}, - } = data.event.payload; - - scope.setUser({ - id: id, - username: account || organization || owner, - }); - } - - const sentryEventId = Sentry.captureException(toSentryError(data)); - - // reduce logging data and add reference to sentry event instead - if (data.event) { - data.event = { id: data.event.id }; - } - if (data.request) { - data.request = { - method: data.request.method, - url: data.request.url, - }; - } - data.sentryEventId = sentryEventId; - - if (formattingEnabled) { - return cb(null, pretty(data)); - } - - // istanbul ignore if - if (levelAsString) { - return cb(null, stringifyLogLevel(data)); - } - - cb(null, JSON.stringify(data) + "\n"); - }); - }, - }); -} - -function stringifyLogLevel(data) { - data.level = LEVEL_MAP[data.level]; - return JSON.stringify(data) + "\n"; + return stackParser; } - -function toSentryError(data) { - const error = new Error(data.msg); - error.name = data.type; - error.stack = data.stack; - return error; +function stripSentryFramesAndReverse(stack) { + if (!stack.length) { + return []; + } + const localStack = Array.from(stack); + if (/sentryWrapped/.test(localStack[localStack.length - 1].function || "")) { + localStack.pop(); + } + localStack.reverse(); + if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "")) { + localStack.pop(); + if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || "")) { + localStack.pop(); + } + } + return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map((frame) => ({ + ...frame, + filename: frame.filename || localStack[localStack.length - 1].filename, + function: frame.function || "?" + })); } - - -/***/ }), - -/***/ 84191: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -const SENTRY_API_VERSION = '7'; - -/** Returns the prefix to construct Sentry ingestion API endpoints. */ -function getBaseApiEndpoint(dsn) { - const protocol = dsn.protocol ? `${dsn.protocol}:` : ''; - const port = dsn.port ? `:${dsn.port}` : ''; - return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`; +function getFunctionName(fn) { + try { + if (!fn || typeof fn !== "function") { + return defaultFunctionName; + } + return fn.name || defaultFunctionName; + } catch (e) { + return defaultFunctionName; + } } - -/** Returns the ingest API endpoint for target. */ -function _getIngestEndpoint(dsn) { - return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; +function nodeStackLineParser(getModule) { + return [90, node(getModule)]; } +var STACKTRACE_FRAME_LIMIT, WEBPACK_ERROR_REGEXP, STRIP_FRAME_REGEXP, defaultFunctionName; +var init_stacktrace = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/stacktrace.js"() { + init_node_stack_trace(); + STACKTRACE_FRAME_LIMIT = 50; + WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/; + STRIP_FRAME_REGEXP = /captureMessage|captureException/; + defaultFunctionName = ""; + } +}); -/** Returns a URL-encoded string with auth config suitable for a query string. */ -function _encodedAuth(dsn, sdkInfo) { - return utils.urlEncode({ - // We send only the minimum set of required information. See - // https://github.com/getsentry/sentry-javascript/issues/2572. - sentry_key: dsn.publicKey, - sentry_version: SENTRY_API_VERSION, - ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }), - }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/_handlers.js +function addHandler(type2, handler2) { + handlers[type2] = handlers[type2] || []; + handlers[type2].push(handler2); } - -/** - * Returns the envelope endpoint URL with auth in the query string. - * - * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests. - */ -function getEnvelopeEndpointWithUrlEncodedAuth( - dsn, - // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below - // options: ClientOptions = {} as ClientOptions, - tunnelOrOptions = {} , -) { - // TODO (v8): Use this code instead - // const { tunnel, _metadata = {} } = options; - // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`; - - const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel; - const sdkInfo = - typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk; - - return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; +function maybeInstrument(type2, instrumentFn) { + if (!instrumented[type2]) { + instrumentFn(); + instrumented[type2] = true; + } } - -/** Returns the url to the report dialog endpoint. */ -function getReportDialogEndpoint( - dsnLike, - dialogOptions - -, -) { - const dsn = utils.makeDsn(dsnLike); - if (!dsn) { - return ''; +function triggerHandlers(type2, data) { + const typeHandlers = type2 && handlers[type2]; + if (!typeHandlers) { + return; } - - const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`; - - let encodedOptions = `dsn=${utils.dsnToString(dsn)}`; - for (const key in dialogOptions) { - if (key === 'dsn') { - continue; - } - - if (key === 'onClose') { - continue; - } - - if (key === 'user') { - const user = dialogOptions.user; - if (!user) { - continue; - } - if (user.name) { - encodedOptions += `&name=${encodeURIComponent(user.name)}`; - } - if (user.email) { - encodedOptions += `&email=${encodeURIComponent(user.email)}`; - } - } else { - encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`; - } - } - - return `${endpoint}?${encodedOptions}`; -} - -exports.getEnvelopeEndpointWithUrlEncodedAuth = getEnvelopeEndpointWithUrlEncodedAuth; -exports.getReportDialogEndpoint = getReportDialogEndpoint; -//# sourceMappingURL=api.js.map - - -/***/ }), - -/***/ 38009: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const api = __nccwpck_require__(84191); -const debugBuild = __nccwpck_require__(68145); -const envelope = __nccwpck_require__(51715); -const exports$1 = __nccwpck_require__(78820); -const hub = __nccwpck_require__(54724); -const integration = __nccwpck_require__(65869); -const envelope$1 = __nccwpck_require__(5745); -const session = __nccwpck_require__(88939); -const dynamicSamplingContext = __nccwpck_require__(18359); -const prepareEvent = __nccwpck_require__(38060); - -const ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; - -/** - * Base implementation for all JavaScript SDK clients. - * - * Call the constructor with the corresponding options - * specific to the client subclass. To access these options later, use - * {@link Client.getOptions}. - * - * If a Dsn is specified in the options, it will be parsed and stored. Use - * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is - * invalid, the constructor will throw a {@link SentryException}. Note that - * without a valid Dsn, the SDK will not send any events to Sentry. - * - * Before sending an event, it is passed through - * {@link BaseClient._prepareEvent} to add SDK information and scope data - * (breadcrumbs and context). To add more custom information, override this - * method and extend the resulting prepared event. - * - * To issue automatically created events (e.g. via instrumentation), use - * {@link Client.captureEvent}. It will prepare the event and pass it through - * the callback lifecycle. To issue auto-breadcrumbs, use - * {@link Client.addBreadcrumb}. - * - * @example - * class NodeClient extends BaseClient { - * public constructor(options: NodeOptions) { - * super(options); - * } - * - * // ... - * } - */ -class BaseClient { - /** - * A reference to a metrics aggregator - * - * @experimental Note this is alpha API. It may experience breaking changes in the future. - */ - - /** Options passed to the SDK. */ - - /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ - - /** Array of set up integrations. */ - - /** Indicates whether this client's integrations have been set up. */ - - /** Number of calls being processed */ - - /** Holds flushable */ - - // eslint-disable-next-line @typescript-eslint/ban-types - - /** - * Initializes this client instance. - * - * @param options Options for the client. - */ - constructor(options) { - this._options = options; - this._integrations = {}; - this._integrationsInitialized = false; - this._numProcessing = 0; - this._outcomes = {}; - this._hooks = {}; - this._eventProcessors = []; - - if (options.dsn) { - this._dsn = utils.makeDsn(options.dsn); - } else { - debugBuild.DEBUG_BUILD && utils.logger.warn('No DSN provided, client will not send events.'); - } - - if (this._dsn) { - const url = api.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options); - this._transport = options.transport({ - tunnel: this._options.tunnel, - recordDroppedEvent: this.recordDroppedEvent.bind(this), - ...options.transportOptions, - url, - }); + for (const handler2 of typeHandlers) { + try { + handler2(data); + } catch (e) { + DEBUG_BUILD && logger.error( + `Error while triggering instrumentation handler. +Type: ${type2} +Name: ${getFunctionName(handler2)} +Error:`, + e + ); } } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - captureException(exception, hint, scope) { - // ensure we haven't captured this very object before - if (utils.checkOrSetAlreadyCaught(exception)) { - debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR); - return; - } - - let eventId = hint && hint.event_id; - - this._process( - this.eventFromException(exception, hint) - .then(event => this._captureEvent(event, hint, scope)) - .then(result => { - eventId = result; - }), - ); - - return eventId; +} +var handlers, instrumented; +var init_handlers = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/_handlers.js"() { + init_debug_build(); + init_logger(); + init_stacktrace(); + handlers = {}; + instrumented = {}; } +}); - /** - * @inheritDoc - */ - captureMessage( - message, - // eslint-disable-next-line deprecation/deprecation - level, - hint, - scope, - ) { - let eventId = hint && hint.event_id; - - const eventMessage = utils.isParameterizedString(message) ? message : String(message); - - const promisedEvent = utils.isPrimitive(message) - ? this.eventFromMessage(eventMessage, level, hint) - : this.eventFromException(message, hint); - - this._process( - promisedEvent - .then(event => this._captureEvent(event, hint, scope)) - .then(result => { - eventId = result; - }), - ); - - return eventId; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/console.js +function addConsoleInstrumentationHandler(handler2) { + const type2 = "console"; + addHandler(type2, handler2); + maybeInstrument(type2, instrumentConsole); +} +function instrumentConsole() { + if (!("console" in GLOBAL_OBJ)) { + return; } - - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - // ensure we haven't captured this very object before - if (hint && hint.originalException && utils.checkOrSetAlreadyCaught(hint.originalException)) { - debugBuild.DEBUG_BUILD && utils.logger.log(ALREADY_SEEN_ERROR); + CONSOLE_LEVELS.forEach(function(level) { + if (!(level in GLOBAL_OBJ.console)) { return; } - - let eventId = hint && hint.event_id; - - const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; - const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope; - - this._process( - this._captureEvent(event, hint, capturedSpanScope || scope).then(result => { - eventId = result; - }), - ); - - return eventId; + fill(GLOBAL_OBJ.console, level, function(originalConsoleMethod) { + originalConsoleMethods[level] = originalConsoleMethod; + return function(...args) { + const handlerData = { args, level }; + triggerHandlers("console", handlerData); + const log2 = originalConsoleMethods[level]; + log2 && log2.apply(GLOBAL_OBJ.console, args); + }; + }); + }); +} +var init_console = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/console.js"() { + init_logger(); + init_object(); + init_worldwide(); + init_handlers(); } +}); - /** - * @inheritDoc - */ - captureSession(session$1) { - if (!(typeof session$1.release === 'string')) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Discarded session because of missing or non-string release'); - } else { - this.sendSession(session$1); - // After sending, we set init false to indicate it's not the first occurrence - session.updateSession(session$1, { init: false }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/misc.js +function uuid4() { + const gbl = GLOBAL_OBJ; + const crypto2 = gbl.crypto || gbl.msCrypto; + let getRandomByte = () => Math.random() * 16; + try { + if (crypto2 && crypto2.randomUUID) { + return crypto2.randomUUID().replace(/-/g, ""); } + if (crypto2 && crypto2.getRandomValues) { + getRandomByte = () => { + const typedArray = new Uint8Array(1); + crypto2.getRandomValues(typedArray); + return typedArray[0]; + }; + } + } catch (_) { } - - /** - * @inheritDoc - */ - getDsn() { - return this._dsn; - } - - /** - * @inheritDoc - */ - getOptions() { - return this._options; + return ("10000000100040008000" + 1e11).replace( + /[018]/g, + (c) => ( + // eslint-disable-next-line no-bitwise + (c ^ (getRandomByte() & 15) >> c / 4).toString(16) + ) + ); +} +function getFirstException(event) { + return event.exception && event.exception.values ? event.exception.values[0] : void 0; +} +function getEventDescription(event) { + const { message, event_id: eventId } = event; + if (message) { + return message; } - - /** - * @see SdkMetadata in @sentry/types - * - * @return The metadata of the SDK - */ - getSdkMetadata() { - return this._options._metadata; + const firstException = getFirstException(event); + if (firstException) { + if (firstException.type && firstException.value) { + return `${firstException.type}: ${firstException.value}`; + } + return firstException.type || firstException.value || eventId || ""; } - - /** - * @inheritDoc - */ - getTransport() { - return this._transport; + return eventId || ""; +} +function addExceptionTypeValue(event, value, type2) { + const exception2 = event.exception = event.exception || {}; + const values = exception2.values = exception2.values || []; + const firstException = values[0] = values[0] || {}; + if (!firstException.value) { + firstException.value = value || ""; } - - /** - * @inheritDoc - */ - flush(timeout) { - const transport = this._transport; - if (transport) { - if (this.metricsAggregator) { - this.metricsAggregator.flush(); - } - return this._isClientDoneProcessing(timeout).then(clientFinished => { - return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed); - }); - } else { - return utils.resolvedSyncPromise(true); - } + if (!firstException.type) { + firstException.type = type2 || "Error"; } - - /** - * @inheritDoc - */ - close(timeout) { - return this.flush(timeout).then(result => { - this.getOptions().enabled = false; - if (this.metricsAggregator) { - this.metricsAggregator.close(); - } - return result; - }); +} +function addExceptionMechanism(event, newMechanism) { + const firstException = getFirstException(event); + if (!firstException) { + return; } - - /** Get all installed event processors. */ - getEventProcessors() { - return this._eventProcessors; + const defaultMechanism = { type: "generic", handled: true }; + const currentMechanism = firstException.mechanism; + firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; + if (newMechanism && "data" in newMechanism) { + const mergedData = { ...currentMechanism && currentMechanism.data, ...newMechanism.data }; + firstException.mechanism.data = mergedData; } - - /** @inheritDoc */ - addEventProcessor(eventProcessor) { - this._eventProcessors.push(eventProcessor); +} +function parseSemver(input) { + const match = input.match(SEMVER_REGEXP) || []; + const major = parseInt(match[1], 10); + const minor = parseInt(match[2], 10); + const patch = parseInt(match[3], 10); + return { + buildmetadata: match[5], + major: isNaN(major) ? void 0 : major, + minor: isNaN(minor) ? void 0 : minor, + patch: isNaN(patch) ? void 0 : patch, + prerelease: match[4] + }; +} +function addContextToFrame(lines, frame, linesOfContext = 5) { + if (frame.lineno === void 0) { + return; } - - /** - * This is an internal function to setup all integrations that should run on the client. - * @deprecated Use `client.init()` instead. - */ - setupIntegrations(forceInitialize) { - if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) { - this._setupIntegrations(); - } + const maxLines = lines.length; + const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); + frame.pre_context = lines.slice(Math.max(0, sourceLine - linesOfContext), sourceLine).map((line) => snipLine(line, 0)); + frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); + frame.post_context = lines.slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext).map((line) => snipLine(line, 0)); +} +function checkOrSetAlreadyCaught(exception2) { + if (exception2 && exception2.__sentry_captured__) { + return true; } - - /** @inheritdoc */ - init() { - if (this._isEnabled()) { - this._setupIntegrations(); - } + try { + addNonEnumerableProperty(exception2, "__sentry_captured__", true); + } catch (err) { } - - /** - * Gets an installed integration by its `id`. - * - * @returns The installed integration or `undefined` if no integration with that `id` was installed. - * @deprecated Use `getIntegrationByName()` instead. - */ - getIntegrationById(integrationId) { - return this.getIntegrationByName(integrationId); + return false; +} +function arrayify(maybeArray) { + return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; +} +var SEMVER_REGEXP; +var init_misc = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/misc.js"() { + init_object(); + init_string(); + init_worldwide(); + SEMVER_REGEXP = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; } +}); - /** - * Gets an installed integration by its name. - * - * @returns The installed integration or `undefined` if no integration with that `name` was installed. - */ - getIntegrationByName(integrationName) { - return this._integrations[integrationName] ; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/supports.js +function supportsFetch() { + if (!("fetch" in WINDOW2)) { + return false; } - - /** - * Returns the client's instance of the given integration class, it any. - * @deprecated Use `getIntegrationByName()` instead. - */ - getIntegration(integration) { - try { - return (this._integrations[integration.id] ) || null; - } catch (_oO) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`); - return null; - } + try { + new Headers(); + new Request("http://www.example.com"); + new Response(); + return true; + } catch (e) { + return false; } - - /** - * @inheritDoc - */ - addIntegration(integration$1) { - const isAlreadyInstalled = this._integrations[integration$1.name]; - - // This hook takes care of only installing if not already installed - integration.setupIntegration(this, integration$1, this._integrations); - // Here we need to check manually to make sure to not run this multiple times - if (!isAlreadyInstalled) { - integration.afterSetupIntegrations(this, [integration$1]); - } +} +function isNativeFetch(func) { + return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); +} +function supportsNativeFetch() { + if (typeof EdgeRuntime === "string") { + return true; } - - /** - * @inheritDoc - */ - sendEvent(event, hint = {}) { - this.emit('beforeSendEvent', event, hint); - - let env = envelope.createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); - - for (const attachment of hint.attachments || []) { - env = utils.addItemToEnvelope( - env, - utils.createAttachmentEnvelopeItem( - attachment, - this._options.transportOptions && this._options.transportOptions.textEncoder, - ), - ); - } - - const promise = this._sendEnvelope(env); - if (promise) { - promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null); - } + if (!supportsFetch()) { + return false; } - - /** - * @inheritDoc - */ - sendSession(session) { - const env = envelope.createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); - - // _sendEnvelope should not throw - // eslint-disable-next-line @typescript-eslint/no-floating-promises - this._sendEnvelope(env); + if (isNativeFetch(WINDOW2.fetch)) { + return true; } - - /** - * @inheritDoc - */ - recordDroppedEvent(reason, category, eventOrCount) { - if (this._options.sendClientReports) { - // TODO v9: We do not need the `event` passed as third argument anymore, and can possibly remove this overload - // If event is passed as third argument, we assume this is a count of 1 - const count = typeof eventOrCount === 'number' ? eventOrCount : 1; - - // We want to track each category (error, transaction, session, replay_event) separately - // but still keep the distinction between different type of outcomes. - // We could use nested maps, but it's much easier to read and type this way. - // A correct type for map-based implementation if we want to go that route - // would be `Partial>>>` - // With typescript 4.1 we could even use template literal types - const key = `${reason}:${category}`; - debugBuild.DEBUG_BUILD && utils.logger.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ''}`); - this._outcomes[key] = (this._outcomes[key] || 0) + count; + let result = false; + const doc = WINDOW2.document; + if (doc && typeof doc.createElement === "function") { + try { + const sandbox = doc.createElement("iframe"); + sandbox.hidden = true; + doc.head.appendChild(sandbox); + if (sandbox.contentWindow && sandbox.contentWindow.fetch) { + result = isNativeFetch(sandbox.contentWindow.fetch); + } + doc.head.removeChild(sandbox); + } catch (err) { + DEBUG_BUILD && logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", err); } } - - /** - * @inheritDoc - */ - captureAggregateMetrics(metricBucketItems) { - debugBuild.DEBUG_BUILD && utils.logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); - const metricsEnvelope = envelope$1.createMetricEnvelope( - metricBucketItems, - this._dsn, - this._options._metadata, - this._options.tunnel, - ); - - // _sendEnvelope should not throw - // eslint-disable-next-line @typescript-eslint/no-floating-promises - this._sendEnvelope(metricsEnvelope); + return result; +} +function supportsReportingObserver() { + return "ReportingObserver" in WINDOW2; +} +var WINDOW2; +var init_supports = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/supports.js"() { + init_debug_build(); + init_logger(); + init_worldwide(); + WINDOW2 = getGlobalObject(); } +}); - // Keep on() & emit() signatures in sync with types' client.ts interface - /* eslint-disable @typescript-eslint/unified-signatures */ - - /** @inheritdoc */ - - /** @inheritdoc */ - on(hook, callback) { - if (!this._hooks[hook]) { - this._hooks[hook] = []; - } - - // @ts-expect-error We assue the types are correct - this._hooks[hook].push(callback); - } - - /** @inheritdoc */ - - /** @inheritdoc */ - emit(hook, ...rest) { - if (this._hooks[hook]) { - this._hooks[hook].forEach(callback => callback(...rest)); - } - } - - /* eslint-enable @typescript-eslint/unified-signatures */ - - /** Setup integrations for this client. */ - _setupIntegrations() { - const { integrations } = this._options; - this._integrations = integration.setupIntegrations(this, integrations); - integration.afterSetupIntegrations(this, integrations); - - // TODO v8: We don't need this flag anymore - this._integrationsInitialized = true; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/fetch.js +function addFetchInstrumentationHandler(handler2) { + const type2 = "fetch"; + addHandler(type2, handler2); + maybeInstrument(type2, instrumentFetch); +} +function instrumentFetch() { + if (!supportsNativeFetch()) { + return; } - - /** Updates existing session based on the provided event */ - _updateSessionFromEvent(session$1, event) { - let crashed = false; - let errored = false; - const exceptions = event.exception && event.exception.values; - - if (exceptions) { - errored = true; - - for (const ex of exceptions) { - const mechanism = ex.mechanism; - if (mechanism && mechanism.handled === false) { - crashed = true; - break; - } - } - } - - // A session is updated and that session update is sent in only one of the two following scenarios: - // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update - // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update - const sessionNonTerminal = session$1.status === 'ok'; - const shouldUpdateAndSend = (sessionNonTerminal && session$1.errors === 0) || (sessionNonTerminal && crashed); - - if (shouldUpdateAndSend) { - session.updateSession(session$1, { - ...(crashed && { status: 'crashed' }), - errors: session$1.errors || Number(errored || crashed), + fill(GLOBAL_OBJ, "fetch", function(originalFetch) { + return function(...args) { + const { method, url } = parseFetchArgs(args); + const handlerData = { + args, + fetchData: { + method, + url + }, + startTimestamp: Date.now() + }; + triggerHandlers("fetch", { + ...handlerData }); - this.captureSession(session$1); - } - } - - /** - * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying - * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. - * - * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not - * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to - * `true`. - * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and - * `false` otherwise - */ - _isClientDoneProcessing(timeout) { - return new utils.SyncPromise(resolve => { - let ticked = 0; - const tick = 1; - - const interval = setInterval(() => { - if (this._numProcessing == 0) { - clearInterval(interval); - resolve(true); - } else { - ticked += tick; - if (timeout && ticked >= timeout) { - clearInterval(interval); - resolve(false); - } + return originalFetch.apply(GLOBAL_OBJ, args).then( + (response) => { + const finishedHandlerData = { + ...handlerData, + endTimestamp: Date.now(), + response + }; + triggerHandlers("fetch", finishedHandlerData); + return response; + }, + (error) => { + const erroredHandlerData = { + ...handlerData, + endTimestamp: Date.now(), + error + }; + triggerHandlers("fetch", erroredHandlerData); + throw error; } - }, tick); - }); + ); + }; + }); +} +function hasProp(obj, prop) { + return !!obj && typeof obj === "object" && !!obj[prop]; +} +function getUrlFromResource(resource) { + if (typeof resource === "string") { + return resource; } - - /** Determines whether this SDK is enabled and a transport is present. */ - _isEnabled() { - return this.getOptions().enabled !== false && this._transport !== undefined; - } - - /** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * @param event The original event. - * @param hint May contain additional information about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - */ - _prepareEvent( - event, - hint, - scope, - isolationScope = hub.getIsolationScope(), - ) { - const options = this.getOptions(); - const integrations = Object.keys(this._integrations); - if (!hint.integrations && integrations.length > 0) { - hint.integrations = integrations; - } - - this.emit('preprocessEvent', event, hint); - - return prepareEvent.prepareEvent(options, event, hint, scope, this, isolationScope).then(evt => { - if (evt === null) { - return evt; - } - - const propagationContext = { - ...isolationScope.getPropagationContext(), - ...(scope ? scope.getPropagationContext() : undefined), - }; - - const trace = evt.contexts && evt.contexts.trace; - if (!trace && propagationContext) { - const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; - evt.contexts = { - trace: { - trace_id, - span_id: spanId, - parent_span_id: parentSpanId, - }, - ...evt.contexts, - }; - - const dynamicSamplingContext$1 = dsc ? dsc : dynamicSamplingContext.getDynamicSamplingContextFromClient(trace_id, this, scope); - - evt.sdkProcessingMetadata = { - dynamicSamplingContext: dynamicSamplingContext$1, - ...evt.sdkProcessingMetadata, - }; - } - return evt; - }); + if (!resource) { + return ""; } - - /** - * Processes the event and logs an error in case of rejection - * @param event - * @param hint - * @param scope - */ - _captureEvent(event, hint = {}, scope) { - return this._processEvent(event, hint, scope).then( - finalEvent => { - return finalEvent.event_id; - }, - reason => { - if (debugBuild.DEBUG_BUILD) { - // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for - // control flow, log just the message (no stack) as a log-level log. - const sentryError = reason ; - if (sentryError.logLevel === 'log') { - utils.logger.log(sentryError.message); - } else { - utils.logger.warn(sentryError); - } - } - return undefined; - }, - ); + if (hasProp(resource, "url")) { + return resource.url; + } + if (resource.toString) { + return resource.toString(); + } + return ""; +} +function parseFetchArgs(fetchArgs) { + if (fetchArgs.length === 0) { + return { method: "GET", url: "" }; + } + if (fetchArgs.length === 2) { + const [url, options2] = fetchArgs; + return { + url: getUrlFromResource(url), + method: hasProp(options2, "method") ? String(options2.method).toUpperCase() : "GET" + }; + } + const arg = fetchArgs[0]; + return { + url: getUrlFromResource(arg), + method: hasProp(arg, "method") ? String(arg.method).toUpperCase() : "GET" + }; +} +var init_fetch = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/fetch.js"() { + init_object(); + init_supports(); + init_worldwide(); + init_handlers(); } +}); - /** - * Processes an event (either error or message) and sends it to Sentry. - * - * This also adds breadcrumbs and context information to the event. However, - * platform specific meta data (such as the User's IP address) must be added - * by the SDK implementor. - * - * - * @param event The event to send to Sentry. - * @param hint May contain additional information about the original exception. - * @param scope A scope containing event metadata. - * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. - */ - _processEvent(event, hint, scope) { - const options = this.getOptions(); - const { sampleRate } = options; - - const isTransaction = isTransactionEvent(event); - const isError = isErrorEvent(event); - const eventType = event.type || 'error'; - const beforeSendLabel = `before send for type \`${eventType}\``; - - // 1.0 === 100% events are sent - // 0.0 === 0% events are sent - // Sampling for transaction happens somewhere else - if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) { - this.recordDroppedEvent('sample_rate', 'error', event); - return utils.rejectedSyncPromise( - new utils.SentryError( - `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, - 'log', - ), - ); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/globalError.js +function addGlobalErrorInstrumentationHandler(handler2) { + const type2 = "error"; + addHandler(type2, handler2); + maybeInstrument(type2, instrumentError); +} +function instrumentError() { + _oldOnErrorHandler = GLOBAL_OBJ.onerror; + GLOBAL_OBJ.onerror = function(msg, url, line, column, error) { + const handlerData = { + column, + error, + line, + msg, + url + }; + triggerHandlers("error", handlerData); + if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) { + return _oldOnErrorHandler.apply(this, arguments); } + return false; + }; + GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true; +} +var _oldOnErrorHandler; +var init_globalError = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/globalError.js"() { + init_worldwide(); + init_handlers(); + _oldOnErrorHandler = null; + } +}); - const dataCategory = eventType === 'replay_event' ? 'replay' : eventType; - - const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; - const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope; - - return this._prepareEvent(event, hint, scope, capturedSpanIsolationScope) - .then(prepared => { - if (prepared === null) { - this.recordDroppedEvent('event_processor', dataCategory, event); - throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log'); - } - - const isInternalException = hint.data && (hint.data ).__sentry__ === true; - if (isInternalException) { - return prepared; - } - - const result = processBeforeSend(options, prepared, hint); - return _validateBeforeSendResult(result, beforeSendLabel); - }) - .then(processedEvent => { - if (processedEvent === null) { - this.recordDroppedEvent('before_send', dataCategory, event); - if (isTransaction) { - const spans = event.spans || []; - // the transaction itself counts as one span, plus all the child spans that are added - const spanCount = 1 + spans.length; - this.recordDroppedEvent('before_send', 'span', spanCount); - } - throw new utils.SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, 'log'); - } +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js +function addGlobalUnhandledRejectionInstrumentationHandler(handler2) { + const type2 = "unhandledrejection"; + addHandler(type2, handler2); + maybeInstrument(type2, instrumentUnhandledRejection); +} +function instrumentUnhandledRejection() { + _oldOnUnhandledRejectionHandler = GLOBAL_OBJ.onunhandledrejection; + GLOBAL_OBJ.onunhandledrejection = function(e) { + const handlerData = e; + triggerHandlers("unhandledrejection", handlerData); + if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) { + return _oldOnUnhandledRejectionHandler.apply(this, arguments); + } + return true; + }; + GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true; +} +var _oldOnUnhandledRejectionHandler; +var init_globalUnhandledRejection = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/globalUnhandledRejection.js"() { + init_worldwide(); + init_handlers(); + _oldOnUnhandledRejectionHandler = null; + } +}); - const session = scope && scope.getSession(); - if (!isTransaction && session) { - this._updateSessionFromEvent(session, processedEvent); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/xhr.js +function addXhrInstrumentationHandler(handler2) { + const type2 = "xhr"; + addHandler(type2, handler2); + maybeInstrument(type2, instrumentXHR); +} +function instrumentXHR() { + if (!WINDOW3.XMLHttpRequest) { + return; + } + const xhrproto = XMLHttpRequest.prototype; + fill(xhrproto, "open", function(originalOpen) { + return function(...args) { + const startTimestamp = Date.now(); + const method = isString(args[0]) ? args[0].toUpperCase() : void 0; + const url = parseUrl(args[1]); + if (!method || !url) { + return originalOpen.apply(this, args); + } + this[SENTRY_XHR_DATA_KEY] = { + method, + url, + request_headers: {} + }; + if (method === "POST" && url.match(/sentry_key/)) { + this.__sentry_own_request__ = true; + } + const onreadystatechangeHandler = () => { + const xhrInfo = this[SENTRY_XHR_DATA_KEY]; + if (!xhrInfo) { + return; } - - if (isTransaction) { - const spanCountBefore = - (processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing) || - 0; - const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0; - - const droppedSpanCount = spanCountBefore - spanCountAfter; - if (droppedSpanCount > 0) { - this.recordDroppedEvent('before_send', 'span', droppedSpanCount); + if (this.readyState === 4) { + try { + xhrInfo.status_code = this.status; + } catch (e) { } - } - - // None of the Sentry built event processor will update transaction name, - // so if the transaction name has been changed by an event processor, we know - // it has to come from custom event processor added by a user - const transactionInfo = processedEvent.transaction_info; - if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { - const source = 'custom'; - processedEvent.transaction_info = { - ...transactionInfo, - source, + const handlerData = { + args: [method, url], + endTimestamp: Date.now(), + startTimestamp, + xhr: this }; + triggerHandlers("xhr", handlerData); } - - this.sendEvent(processedEvent, hint); - return processedEvent; - }) - .then(null, reason => { - if (reason instanceof utils.SentryError) { - throw reason; - } - - this.captureException(reason, { - data: { - __sentry__: true, - }, - originalException: reason, + }; + if ("onreadystatechange" in this && typeof this.onreadystatechange === "function") { + fill(this, "onreadystatechange", function(original) { + return function(...readyStateArgs) { + onreadystatechangeHandler(); + return original.apply(this, readyStateArgs); + }; }); - throw new utils.SentryError( - `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`, - ); + } else { + this.addEventListener("readystatechange", onreadystatechangeHandler); + } + fill(this, "setRequestHeader", function(original) { + return function(...setRequestHeaderArgs) { + const [header, value] = setRequestHeaderArgs; + const xhrInfo = this[SENTRY_XHR_DATA_KEY]; + if (xhrInfo && isString(header) && isString(value)) { + xhrInfo.request_headers[header.toLowerCase()] = value; + } + return original.apply(this, setRequestHeaderArgs); + }; }); + return originalOpen.apply(this, args); + }; + }); + fill(xhrproto, "send", function(originalSend) { + return function(...args) { + const sentryXhrData = this[SENTRY_XHR_DATA_KEY]; + if (!sentryXhrData) { + return originalSend.apply(this, args); + } + if (args[0] !== void 0) { + sentryXhrData.body = args[0]; + } + const handlerData = { + args: [sentryXhrData.method, sentryXhrData.url], + startTimestamp: Date.now(), + xhr: this + }; + triggerHandlers("xhr", handlerData); + return originalSend.apply(this, args); + }; + }); +} +function parseUrl(url) { + if (isString(url)) { + return url; } - - /** - * Occupies the client with processing and event - */ - _process(promise) { - this._numProcessing++; - void promise.then( - value => { - this._numProcessing--; - return value; - }, - reason => { - this._numProcessing--; - return reason; - }, - ); + try { + return url.toString(); + } catch (e2) { } + return void 0; +} +var WINDOW3, SENTRY_XHR_DATA_KEY; +var init_xhr = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/instrument/xhr.js"() { + init_is(); + init_object(); + init_worldwide(); + init_handlers(); + WINDOW3 = GLOBAL_OBJ; + SENTRY_XHR_DATA_KEY = "__sentry_xhr_v3__"; + } +}); - /** - * @inheritdoc - */ - _sendEnvelope(envelope) { - this.emit('beforeEnvelope', envelope); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/node.js +function dynamicRequire(mod, request2) { + return mod.require(request2); +} +function loadModule(moduleName) { + let mod; + try { + mod = dynamicRequire(module, moduleName); + } catch (e) { + } + try { + const { cwd } = dynamicRequire(module, "process"); + mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`); + } catch (e) { + } + return mod; +} +var init_node = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/node.js"() { + } +}); - if (this._isEnabled() && this._transport) { - return this._transport.send(envelope).then(null, reason => { - debugBuild.DEBUG_BUILD && utils.logger.error('Error while sending event:', reason); - }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/memo.js +function memoBuilder() { + const hasWeakSet = typeof WeakSet === "function"; + const inner = hasWeakSet ? /* @__PURE__ */ new WeakSet() : []; + function memoize(obj) { + if (hasWeakSet) { + if (inner.has(obj)) { + return true; + } + inner.add(obj); + return false; + } + for (let i = 0; i < inner.length; i++) { + const value = inner[i]; + if (value === obj) { + return true; + } + } + inner.push(obj); + return false; + } + function unmemoize(obj) { + if (hasWeakSet) { + inner.delete(obj); } else { - debugBuild.DEBUG_BUILD && utils.logger.error('Transport disabled'); + for (let i = 0; i < inner.length; i++) { + if (inner[i] === obj) { + inner.splice(i, 1); + break; + } + } } } - - /** - * Clears outcomes on this client and returns them. - */ - _clearOutcomes() { - const outcomes = this._outcomes; - this._outcomes = {}; - return Object.keys(outcomes).map(key => { - const [reason, category] = key.split(':') ; - return { - reason, - category, - quantity: outcomes[key], - }; - }); + return [memoize, unmemoize]; +} +var init_memo = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/memo.js"() { } +}); - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/normalize.js +function normalize(input, depth = 100, maxProperties = Infinity) { + try { + return visit("", input, depth, maxProperties); + } catch (err) { + return { ERROR: `**non-serializable** (${err})` }; + } } - -/** - * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so. - */ -function _validateBeforeSendResult( - beforeSendResult, - beforeSendLabel, -) { - const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; - if (utils.isThenable(beforeSendResult)) { - return beforeSendResult.then( - event => { - if (!utils.isPlainObject(event) && event !== null) { - throw new utils.SentryError(invalidValueError); - } - return event; - }, - e => { - throw new utils.SentryError(`${beforeSendLabel} rejected with ${e}`); - }, - ); - } else if (!utils.isPlainObject(beforeSendResult) && beforeSendResult !== null) { - throw new utils.SentryError(invalidValueError); +function normalizeToSize(object, depth = 3, maxSize = 100 * 1024) { + const normalized = normalize(object, depth); + if (jsonSize(normalized) > maxSize) { + return normalizeToSize(object, depth - 1, maxSize); } - return beforeSendResult; + return normalized; } - -/** - * Process the matching `beforeSendXXX` callback. - */ -function processBeforeSend( - options, - event, - hint, -) { - const { beforeSend, beforeSendTransaction } = options; - - if (isErrorEvent(event) && beforeSend) { - return beforeSend(event, hint); +function visit(key, value, depth = Infinity, maxProperties = Infinity, memo = memoBuilder()) { + const [memoize, unmemoize] = memo; + if (value == null || // this matches null and undefined -> eqeq not eqeqeq + ["number", "boolean", "string"].includes(typeof value) && !isNaN2(value)) { + return value; } - - if (isTransactionEvent(event) && beforeSendTransaction) { - if (event.spans) { - // We store the # of spans before processing in SDK metadata, - // so we can compare it afterwards to determine how many spans were dropped - const spanCountBefore = event.spans.length; - event.sdkProcessingMetadata = { - ...event.sdkProcessingMetadata, - spanCountBeforeProcessing: spanCountBefore, - }; + const stringified = stringifyValue(key, value); + if (!stringified.startsWith("[object ")) { + return stringified; + } + if (value["__sentry_skip_normalization__"]) { + return value; + } + const remainingDepth = typeof value["__sentry_override_normalization_depth__"] === "number" ? value["__sentry_override_normalization_depth__"] : depth; + if (remainingDepth === 0) { + return stringified.replace("object ", ""); + } + if (memoize(value)) { + return "[Circular ~]"; + } + const valueWithToJSON = value; + if (valueWithToJSON && typeof valueWithToJSON.toJSON === "function") { + try { + const jsonValue = valueWithToJSON.toJSON(); + return visit("", jsonValue, remainingDepth - 1, maxProperties, memo); + } catch (err) { } - return beforeSendTransaction(event, hint); } - - return event; + const normalized = Array.isArray(value) ? [] : {}; + let numAdded = 0; + const visitable = convertToPlainObject(value); + for (const visitKey in visitable) { + if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) { + continue; + } + if (numAdded >= maxProperties) { + normalized[visitKey] = "[MaxProperties ~]"; + break; + } + const visitValue = visitable[visitKey]; + normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo); + numAdded++; + } + unmemoize(value); + return normalized; } - -function isErrorEvent(event) { - return event.type === undefined; +function stringifyValue(key, value) { + try { + if (key === "domain" && value && typeof value === "object" && value._events) { + return "[Domain]"; + } + if (key === "domainEmitter") { + return "[DomainEmitter]"; + } + if (typeof global !== "undefined" && value === global) { + return "[Global]"; + } + if (typeof window !== "undefined" && value === window) { + return "[Window]"; + } + if (typeof document !== "undefined" && value === document) { + return "[Document]"; + } + if (isVueViewModel(value)) { + return "[VueViewModel]"; + } + if (isSyntheticEvent(value)) { + return "[SyntheticEvent]"; + } + if (typeof value === "number" && value !== value) { + return "[NaN]"; + } + if (typeof value === "function") { + return `[Function: ${getFunctionName(value)}]`; + } + if (typeof value === "symbol") { + return `[${String(value)}]`; + } + if (typeof value === "bigint") { + return `[BigInt: ${String(value)}]`; + } + const objName = getConstructorName(value); + if (/^HTML(\w*)Element$/.test(objName)) { + return `[HTMLElement: ${objName}]`; + } + return `[object ${objName}]`; + } catch (err) { + return `**non-serializable** (${err})`; + } } - -function isTransactionEvent(event) { - return event.type === 'transaction'; +function getConstructorName(value) { + const prototype = Object.getPrototypeOf(value); + return prototype ? prototype.constructor.name : "null prototype"; } - -/** - * Add an event processor to the current client. - * This event processor will run for all events processed by this client. - */ -function addEventProcessor(callback) { - const client = exports$1.getClient(); - - if (!client || !client.addEventProcessor) { - return; - } - - client.addEventProcessor(callback); +function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; } - -exports.BaseClient = BaseClient; -exports.addEventProcessor = addEventProcessor; -//# sourceMappingURL=baseclient.js.map - - -/***/ }), - -/***/ 6036: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Create envelope from check in item. - */ -function createCheckInEnvelope( - checkIn, - dynamicSamplingContext, - metadata, - tunnel, - dsn, -) { - const headers = { - sent_at: new Date().toISOString(), - }; - - if (metadata && metadata.sdk) { - headers.sdk = { - name: metadata.sdk.name, - version: metadata.sdk.version, - }; +function jsonSize(value) { + return utf8Length(JSON.stringify(value)); +} +var init_normalize = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/normalize.js"() { + init_is(); + init_memo(); + init_object(); + init_stacktrace(); } +}); - if (!!tunnel && !!dsn) { - headers.dsn = utils.dsnToString(dsn); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/path.js +function normalizeArray(parts, allowAboveRoot) { + let up = 0; + for (let i = parts.length - 1; i >= 0; i--) { + const last = parts[i]; + if (last === ".") { + parts.splice(i, 1); + } else if (last === "..") { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } } - - if (dynamicSamplingContext) { - headers.trace = utils.dropUndefinedKeys(dynamicSamplingContext) ; + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift(".."); + } } - - const item = createCheckInEnvelopeItem(checkIn); - return utils.createEnvelope(headers, [item]); + return parts; } - -function createCheckInEnvelopeItem(checkIn) { - const checkInHeaders = { - type: 'check_in', - }; - return [checkInHeaders, checkIn]; +function splitPath(filename) { + const truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename; + const parts = splitPathRe.exec(truncated); + return parts ? parts.slice(1) : []; } - -exports.createCheckInEnvelope = createCheckInEnvelope; -//# sourceMappingURL=checkin.js.map - - -/***/ }), - -/***/ 74894: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const DEFAULT_ENVIRONMENT = 'production'; - -exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT; -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ 68145: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code. - * - * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking. - */ -const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__); - -exports.DEBUG_BUILD = DEBUG_BUILD; -//# sourceMappingURL=debug-build.js.map - - -/***/ }), - -/***/ 51715: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key. - * Merge with existing data if any. - **/ -function enhanceEventWithSdkInfo(event, sdkInfo) { - if (!sdkInfo) { - return event; +function resolve(...args) { + let resolvedPath = ""; + let resolvedAbsolute = false; + for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { + const path2 = i >= 0 ? args[i] : "/"; + if (!path2) { + continue; + } + resolvedPath = `${path2}/${resolvedPath}`; + resolvedAbsolute = path2.charAt(0) === "/"; } - event.sdk = event.sdk || {}; - event.sdk.name = event.sdk.name || sdkInfo.name; - event.sdk.version = event.sdk.version || sdkInfo.version; - event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])]; - event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])]; - return event; + resolvedPath = normalizeArray( + resolvedPath.split("/").filter((p) => !!p), + !resolvedAbsolute + ).join("/"); + return (resolvedAbsolute ? "/" : "") + resolvedPath || "."; } - -/** Creates an envelope from a Session */ -function createSessionEnvelope( - session, - dsn, - metadata, - tunnel, -) { - const sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata); - const envelopeHeaders = { - sent_at: new Date().toISOString(), - ...(sdkInfo && { sdk: sdkInfo }), - ...(!!tunnel && dsn && { dsn: utils.dsnToString(dsn) }), - }; - - const envelopeItem = - 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()]; - - return utils.createEnvelope(envelopeHeaders, [envelopeItem]); +function trim(arr) { + let start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== "") { + break; + } + } + let end2 = arr.length - 1; + for (; end2 >= 0; end2--) { + if (arr[end2] !== "") { + break; + } + } + if (start > end2) { + return []; + } + return arr.slice(start, end2 - start + 1); } - -/** - * Create an Envelope from an event. - */ -function createEventEnvelope( - event, - dsn, - metadata, - tunnel, -) { - const sdkInfo = utils.getSdkMetadataForEnvelopeHeader(metadata); - - /* - Note: Due to TS, event.type may be `replay_event`, theoretically. - In practice, we never call `createEventEnvelope` with `replay_event` type, - and we'd have to adjut a looot of types to make this work properly. - We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type) - So the safe choice is to really guard against the replay_event type here. - */ - const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event'; - - enhanceEventWithSdkInfo(event, metadata && metadata.sdk); - - const envelopeHeaders = utils.createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); - - // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to - // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may - // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid - // of this `delete`, lest we miss putting it back in the next time the property is in use.) - delete event.sdkProcessingMetadata; - - const eventItem = [{ type: eventType }, event]; - return utils.createEnvelope(envelopeHeaders, [eventItem]); +function relative(from, to) { + from = resolve(from).slice(1); + to = resolve(to).slice(1); + const fromParts = trim(from.split("/")); + const toParts = trim(to.split("/")); + const length = Math.min(fromParts.length, toParts.length); + let samePartsLength = length; + for (let i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + let outputParts = []; + for (let i = samePartsLength; i < fromParts.length; i++) { + outputParts.push(".."); + } + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + return outputParts.join("/"); } - -exports.createEventEnvelope = createEventEnvelope; -exports.createSessionEnvelope = createSessionEnvelope; -//# sourceMappingURL=envelope.js.map - - -/***/ }), - -/***/ 76742: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); - -/** - * Returns the global event processors. - * @deprecated Global event processors will be removed in v8. - */ -function getGlobalEventProcessors() { - return utils.getGlobalSingleton('globalEventProcessors', () => []); +function dirname(path2) { + const result = splitPath(path2); + const root = result[0]; + let dir = result[1]; + if (!root && !dir) { + return "."; + } + if (dir) { + dir = dir.slice(0, dir.length - 1); + } + return root + dir; } - -/** - * Add a EventProcessor to be kept globally. - * @deprecated Use `addEventProcessor` instead. Global event processors will be removed in v8. - */ -function addGlobalEventProcessor(callback) { - // eslint-disable-next-line deprecation/deprecation - getGlobalEventProcessors().push(callback); +function basename(path2, ext) { + let f = splitPath(path2)[2]; + if (ext && f.slice(ext.length * -1) === ext) { + f = f.slice(0, f.length - ext.length); + } + return f; } +var splitPathRe; +var init_path = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/path.js"() { + splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; + } +}); -/** - * Process an array of event processors, returning the processed event (or `null` if the event was dropped). - */ -function notifyEventProcessors( - processors, - event, - hint, - index = 0, -) { - return new utils.SyncPromise((resolve, reject) => { - const processor = processors[index]; - if (event === null || typeof processor !== 'function') { - resolve(event); - } else { - const result = processor({ ...event }, hint) ; - - debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`); - - if (utils.isThenable(result)) { - void result - .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve)) - .then(null, reject); - } else { - void notifyEventProcessors(processors, result, hint, index + 1) - .then(resolve) - .then(null, reject); - } - } +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/syncpromise.js +function resolvedSyncPromise(value) { + return new SyncPromise((resolve4) => { + resolve4(value); }); } - -exports.addGlobalEventProcessor = addGlobalEventProcessor; -exports.getGlobalEventProcessors = getGlobalEventProcessors; -exports.notifyEventProcessors = notifyEventProcessors; -//# sourceMappingURL=eventProcessors.js.map - - -/***/ }), - -/***/ 78820: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const constants = __nccwpck_require__(74894); -const debugBuild = __nccwpck_require__(68145); -const hub = __nccwpck_require__(54724); -const session = __nccwpck_require__(88939); -const prepareEvent = __nccwpck_require__(38060); - -/** - * Captures an exception event and sends it to Sentry. - * - * @param exception The exception to capture. - * @param hint Optional additional data to attach to the Sentry event. - * @returns the id of the captured Sentry event. - */ -function captureException( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - exception, - hint, -) { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint)); -} - -/** - * Captures a message event and sends it to Sentry. - * - * @param exception The exception to capture. - * @param captureContext Define the level of the message or pass in additional data to attach to the message. - * @returns the id of the captured message. - */ -function captureMessage( - message, - // eslint-disable-next-line deprecation/deprecation - captureContext, -) { - // This is necessary to provide explicit scopes upgrade, without changing the original - // arity of the `captureMessage(message, level)` method. - const level = typeof captureContext === 'string' ? captureContext : undefined; - const context = typeof captureContext !== 'string' ? { captureContext } : undefined; - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().captureMessage(message, level, context); -} - -/** - * Captures a manually created event and sends it to Sentry. - * - * @param exception The event to send to Sentry. - * @param hint Optional additional data to attach to the Sentry event. - * @returns the id of the captured event. - */ -function captureEvent(event, hint) { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().captureEvent(event, hint); -} - -/** - * Callback to set context information onto the scope. - * @param callback Callback function that receives Scope. - * - * @deprecated Use getCurrentScope() directly. - */ -// eslint-disable-next-line deprecation/deprecation -function configureScope(callback) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().configureScope(callback); -} - -/** - * Records a new breadcrumb which will be attached to future events. - * - * Breadcrumbs will be added to subsequent events to provide more context on - * user's actions prior to an error or crash. - * - * @param breadcrumb The breadcrumb to record. - */ -// eslint-disable-next-line deprecation/deprecation -function addBreadcrumb(breadcrumb, hint) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().addBreadcrumb(breadcrumb, hint); +function rejectedSyncPromise(reason) { + return new SyncPromise((_, reject) => { + reject(reason); + }); } - -/** - * Sets context data with the given name. - * @param name of the context - * @param context Any kind of data. This data will be normalized. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any, deprecation/deprecation -function setContext(name, context) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setContext(name, context); -} - -/** - * Set an object that will be merged sent as extra data with the event. - * @param extras Extras object to merge into current context. - */ -// eslint-disable-next-line deprecation/deprecation -function setExtras(extras) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setExtras(extras); -} - -/** - * Set key:value that will be sent as extra data with the event. - * @param key String of extra - * @param extra Any kind of data. This data will be normalized. - */ -// eslint-disable-next-line deprecation/deprecation -function setExtra(key, extra) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setExtra(key, extra); -} - -/** - * Set an object that will be merged sent as tags data with the event. - * @param tags Tags context object to merge into current context. - */ -// eslint-disable-next-line deprecation/deprecation -function setTags(tags) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setTags(tags); -} - -/** - * Set key:value that will be sent as tags data with the event. - * - * Can also be used to unset a tag, by passing `undefined`. - * - * @param key String key of tag - * @param value Value of tag - */ -// eslint-disable-next-line deprecation/deprecation -function setTag(key, value) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setTag(key, value); -} - -/** - * Updates user context information for future events. - * - * @param user User context object to be set in the current context. Pass `null` to unset the user. - */ -// eslint-disable-next-line deprecation/deprecation -function setUser(user) { - // eslint-disable-next-line deprecation/deprecation - hub.getCurrentHub().setUser(user); -} - -/** - * Creates a new scope with and executes the given operation within. - * The scope is automatically removed once the operation - * finishes or throws. - * - * This is essentially a convenience function for: - * - * pushScope(); - * callback(); - * popScope(); - */ - -/** - * Either creates a new active scope, or sets the given scope as active scope in the given callback. - */ -function withScope( - ...rest -) { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - - // If a scope is defined, we want to make this the active scope instead of the default one - if (rest.length === 2) { - const [scope, callback] = rest; - if (!scope) { - // eslint-disable-next-line deprecation/deprecation - return hub$1.withScope(callback); - } - - // eslint-disable-next-line deprecation/deprecation - return hub$1.withScope(() => { - // eslint-disable-next-line deprecation/deprecation - hub$1.getStackTop().scope = scope ; - return callback(scope ); - }); - } - - // eslint-disable-next-line deprecation/deprecation - return hub$1.withScope(rest[0]); -} - -/** - * Attempts to fork the current isolation scope and the current scope based on the current async context strategy. If no - * async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the - * case, for example, in the browser). - * - * Usage of this function in environments without async context strategy is discouraged and may lead to unexpected behaviour. - * - * This function is intended for Sentry SDK and SDK integration development. It is not recommended to be used in "normal" - * applications directly because it comes with pitfalls. Use at your own risk! - * - * @param callback The callback in which the passed isolation scope is active. (Note: In environments without async - * context strategy, the currently active isolation scope may change within execution of the callback.) - * @returns The same value that `callback` returns. - */ -function withIsolationScope(callback) { - return hub.runWithAsyncContext(() => { - return callback(hub.getIsolationScope()); - }); -} - -/** - * Forks the current scope and sets the provided span as active span in the context of the provided callback. - * - * @param span Spans started in the context of the provided callback will be children of this span. - * @param callback Execution context in which the provided span will be active. Is passed the newly forked scope. - * @returns the value returned from the provided callback function. - */ -function withActiveSpan(span, callback) { - return withScope(scope => { - // eslint-disable-next-line deprecation/deprecation - scope.setSpan(span); - return callback(scope); - }); -} - -/** - * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. - * - * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a - * new child span within the transaction or any span, call the respective `.startChild()` method. - * - * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. - * - * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its - * finished child spans will be sent to Sentry. - * - * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call - * `startTransaction` directly on the hub. - * - * @param context Properties of the new `Transaction`. - * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent - * default values). See {@link Options.tracesSampler}. - * - * @returns The transaction which was just started - * - * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. - */ -function startTransaction( - context, - customSamplingContext, - // eslint-disable-next-line deprecation/deprecation -) { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().startTransaction({ ...context }, customSamplingContext); -} - -/** - * Create a cron monitor check in and send it to Sentry. - * - * @param checkIn An object that describes a check in. - * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want - * to create a monitor automatically when sending a check in. - */ -function captureCheckIn(checkIn, upsertMonitorConfig) { - const scope = getCurrentScope(); - const client = getClient(); - if (!client) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot capture check-in. No client defined.'); - } else if (!client.captureCheckIn) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot capture check-in. Client does not support sending check-ins.'); - } else { - return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); +var States, SyncPromise; +var init_syncpromise = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/syncpromise.js"() { + init_is(); + (function(States2) { + const PENDING = 0; + States2[States2["PENDING"] = PENDING] = "PENDING"; + const RESOLVED = 1; + States2[States2["RESOLVED"] = RESOLVED] = "RESOLVED"; + const REJECTED = 2; + States2[States2["REJECTED"] = REJECTED] = "REJECTED"; + })(States || (States = {})); + SyncPromise = class _SyncPromise { + constructor(executor) { + _SyncPromise.prototype.__init.call(this); + _SyncPromise.prototype.__init2.call(this); + _SyncPromise.prototype.__init3.call(this); + _SyncPromise.prototype.__init4.call(this); + this._state = States.PENDING; + this._handlers = []; + try { + executor(this._resolve, this._reject); + } catch (e) { + this._reject(e); + } + } + /** JSDoc */ + then(onfulfilled, onrejected) { + return new _SyncPromise((resolve4, reject) => { + this._handlers.push([ + false, + (result) => { + if (!onfulfilled) { + resolve4(result); + } else { + try { + resolve4(onfulfilled(result)); + } catch (e) { + reject(e); + } + } + }, + (reason) => { + if (!onrejected) { + reject(reason); + } else { + try { + resolve4(onrejected(reason)); + } catch (e) { + reject(e); + } + } + } + ]); + this._executeHandlers(); + }); + } + /** JSDoc */ + catch(onrejected) { + return this.then((val) => val, onrejected); + } + /** JSDoc */ + finally(onfinally) { + return new _SyncPromise((resolve4, reject) => { + let val; + let isRejected; + return this.then( + (value) => { + isRejected = false; + val = value; + if (onfinally) { + onfinally(); + } + }, + (reason) => { + isRejected = true; + val = reason; + if (onfinally) { + onfinally(); + } + } + ).then(() => { + if (isRejected) { + reject(val); + return; + } + resolve4(val); + }); + }); + } + /** JSDoc */ + __init() { + this._resolve = (value) => { + this._setResult(States.RESOLVED, value); + }; + } + /** JSDoc */ + __init2() { + this._reject = (reason) => { + this._setResult(States.REJECTED, reason); + }; + } + /** JSDoc */ + __init3() { + this._setResult = (state, value) => { + if (this._state !== States.PENDING) { + return; + } + if (isThenable(value)) { + void value.then(this._resolve, this._reject); + return; + } + this._state = state; + this._value = value; + this._executeHandlers(); + }; + } + /** JSDoc */ + __init4() { + this._executeHandlers = () => { + if (this._state === States.PENDING) { + return; + } + const cachedHandlers = this._handlers.slice(); + this._handlers = []; + cachedHandlers.forEach((handler2) => { + if (handler2[0]) { + return; + } + if (this._state === States.RESOLVED) { + handler2[1](this._value); + } + if (this._state === States.REJECTED) { + handler2[2](this._value); + } + handler2[0] = true; + }); + }; + } + }; } +}); - return utils.uuid4(); -} - -/** - * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes. - * - * @param monitorSlug The distinct slug of the monitor. - * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want - * to create a monitor automatically when sending a check in. - */ -function withMonitor( - monitorSlug, - callback, - upsertMonitorConfig, -) { - const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig); - const now = utils.timestampInSeconds(); - - function finishCheckIn(status) { - captureCheckIn({ monitorSlug, status, checkInId, duration: utils.timestampInSeconds() - now }); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/promisebuffer.js +function makePromiseBuffer(limit) { + const buffer = []; + function isReady() { + return limit === void 0 || buffer.length < limit; } - - let maybePromiseResult; - try { - maybePromiseResult = callback(); - } catch (e) { - finishCheckIn('error'); - throw e; + function remove(task) { + return buffer.splice(buffer.indexOf(task), 1)[0]; } - - if (utils.isThenable(maybePromiseResult)) { - Promise.resolve(maybePromiseResult).then( - () => { - finishCheckIn('ok'); - }, - () => { - finishCheckIn('error'); - }, + function add(taskProducer) { + if (!isReady()) { + return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached.")); + } + const task = taskProducer(); + if (buffer.indexOf(task) === -1) { + buffer.push(task); + } + void task.then(() => remove(task)).then( + null, + () => remove(task).then(null, () => { + }) ); - } else { - finishCheckIn('ok'); + return task; } - - return maybePromiseResult; -} - -/** - * Call `flush()` on the current client, if there is one. See {@link Client.flush}. - * - * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause - * the client to wait until all events are sent before resolving the promise. - * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it - * doesn't (or if there's no client defined). - */ -async function flush(timeout) { - const client = getClient(); - if (client) { - return client.flush(timeout); + function drain(timeout) { + return new SyncPromise((resolve4, reject) => { + let counter = buffer.length; + if (!counter) { + return resolve4(true); + } + const capturedSetTimeout = setTimeout(() => { + if (timeout && timeout > 0) { + resolve4(false); + } + }, timeout); + buffer.forEach((item) => { + void resolvedSyncPromise(item).then(() => { + if (!--counter) { + clearTimeout(capturedSetTimeout); + resolve4(true); + } + }, reject); + }); + }); } - debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot flush events. No client defined.'); - return Promise.resolve(false); + return { + $: buffer, + add, + drain + }; } +var init_promisebuffer = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/promisebuffer.js"() { + init_error(); + init_syncpromise(); + } +}); -/** - * Call `close()` on the current client, if there is one. See {@link Client.close}. - * - * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this - * parameter will cause the client to wait until all events are sent before disabling itself. - * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it - * doesn't (or if there's no client defined). - */ -async function close(timeout) { - const client = getClient(); - if (client) { - return client.close(timeout); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/cookie.js +function parseCookie(str2) { + const obj = {}; + let index = 0; + while (index < str2.length) { + const eqIdx = str2.indexOf("=", index); + if (eqIdx === -1) { + break; + } + let endIdx = str2.indexOf(";", index); + if (endIdx === -1) { + endIdx = str2.length; + } else if (endIdx < eqIdx) { + index = str2.lastIndexOf(";", eqIdx - 1) + 1; + continue; + } + const key = str2.slice(index, eqIdx).trim(); + if (void 0 === obj[key]) { + let val = str2.slice(eqIdx + 1, endIdx).trim(); + if (val.charCodeAt(0) === 34) { + val = val.slice(1, -1); + } + try { + obj[key] = val.indexOf("%") !== -1 ? decodeURIComponent(val) : val; + } catch (e) { + obj[key] = val; + } + } + index = endIdx + 1; } - debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot flush events and disable SDK. No client defined.'); - return Promise.resolve(false); + return obj; } +var init_cookie = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/cookie.js"() { + } +}); -/** - * This is the getter for lastEventId. - * - * @returns The last event id of a captured event. - */ -function lastEventId() { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().lastEventId(); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/url.js +function parseUrl2(url) { + if (!url) { + return {}; + } + const match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); + if (!match) { + return {}; + } + const query = match[6] || ""; + const fragment = match[8] || ""; + return { + host: match[4], + path: match[5], + protocol: match[2], + search: query, + hash: fragment, + relative: match[5] + query + fragment + // everything minus origin + }; } - -/** - * Get the currently active client. - */ -function getClient() { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().getClient(); +function stripUrlQueryAndFragment(urlPath) { + return urlPath.split(/[\?#]/, 1)[0]; } - -/** - * Returns true if Sentry has been properly initialized. - */ -function isInitialized() { - return !!getClient(); +function getNumberOfUrlSegments(url) { + return url.split(/\\?\//).filter((s) => s.length > 0 && s !== ",").length; } - -/** - * Get the currently active scope. - */ -function getCurrentScope() { - // eslint-disable-next-line deprecation/deprecation - return hub.getCurrentHub().getScope(); +function getSanitizedUrlString(url) { + const { protocol, host, path: path2 } = url; + const filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || ""; + return `${protocol ? `${protocol}://` : ""}${filteredHost}${path2}`; } - -/** - * Start a session on the current isolation scope. - * - * @param context (optional) additional properties to be applied to the returned session object - * - * @returns the new active session - */ -function startSession(context) { - const client = getClient(); - const isolationScope = hub.getIsolationScope(); - const currentScope = getCurrentScope(); - - const { release, environment = constants.DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {}; - - // Will fetch userAgent if called from browser sdk - const { userAgent } = utils.GLOBAL_OBJ.navigator || {}; - - const session$1 = session.makeSession({ - release, - environment, - user: currentScope.getUser() || isolationScope.getUser(), - ...(userAgent && { userAgent }), - ...context, - }); - - // End existing session if there's one - const currentSession = isolationScope.getSession(); - if (currentSession && currentSession.status === 'ok') { - session.updateSession(currentSession, { status: 'exited' }); +var init_url = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/url.js"() { } +}); - endSession(); - - // Afterwards we set the new session on the scope - isolationScope.setSession(session$1); - - // TODO (v8): Remove this and only use the isolation scope(?). - // For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession() - currentScope.setSession(session$1); - - return session$1; -} - -/** - * End the session on the current isolation scope. - */ -function endSession() { - const isolationScope = hub.getIsolationScope(); - const currentScope = getCurrentScope(); - - const session$1 = currentScope.getSession() || isolationScope.getSession(); - if (session$1) { - session.closeSession(session$1); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/requestdata.js +function addRequestDataToTransaction(transaction, req, deps) { + if (!transaction) return; + if (!transaction.metadata.source || transaction.metadata.source === "url") { + const [name, source] = extractPathForTransaction(req, { path: true, method: true }); + transaction.updateName(name); + transaction.setMetadata({ source }); } - _sendSessionUpdate(); - - // the session is over; take it off of the scope - isolationScope.setSession(); - - // TODO (v8): Remove this and only use the isolation scope(?). - // For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession() - currentScope.setSession(); -} - -/** - * Sends the current Session on the scope - */ -function _sendSessionUpdate() { - const isolationScope = hub.getIsolationScope(); - const currentScope = getCurrentScope(); - const client = getClient(); - // TODO (v8): Remove currentScope and only use the isolation scope(?). - // For v7 though, we can't "soft-break" people using getCurrentHub().getScope().setSession() - const session = currentScope.getSession() || isolationScope.getSession(); - if (session && client && client.captureSession) { - client.captureSession(session); + transaction.setAttribute("url", req.originalUrl || req.url); + if (req.baseUrl) { + transaction.setAttribute("baseUrl", req.baseUrl); } + transaction.setData("query", extractQueryParams(req, deps)); } - -/** - * Sends the current session on the scope to Sentry - * - * @param end If set the session will be marked as exited and removed from the scope. - * Defaults to `false`. - */ -function captureSession(end = false) { - // both send the update and pull the session from the scope - if (end) { - endSession(); - return; +function extractPathForTransaction(req, options2 = {}) { + const method = req.method && req.method.toUpperCase(); + let path2 = ""; + let source = "url"; + if (options2.customRoute || req.route) { + path2 = options2.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`; + source = "route"; + } else if (req.originalUrl || req.url) { + path2 = stripUrlQueryAndFragment(req.originalUrl || req.url || ""); + } + let name = ""; + if (options2.method && method) { + name += method; } - - // only send the update - _sendSessionUpdate(); + if (options2.method && options2.path) { + name += " "; + } + if (options2.path && path2) { + name += path2; + } + return [name, source]; } - -exports.addBreadcrumb = addBreadcrumb; -exports.captureCheckIn = captureCheckIn; -exports.captureEvent = captureEvent; -exports.captureException = captureException; -exports.captureMessage = captureMessage; -exports.captureSession = captureSession; -exports.close = close; -exports.configureScope = configureScope; -exports.endSession = endSession; -exports.flush = flush; -exports.getClient = getClient; -exports.getCurrentScope = getCurrentScope; -exports.isInitialized = isInitialized; -exports.lastEventId = lastEventId; -exports.setContext = setContext; -exports.setExtra = setExtra; -exports.setExtras = setExtras; -exports.setTag = setTag; -exports.setTags = setTags; -exports.setUser = setUser; -exports.startSession = startSession; -exports.startTransaction = startTransaction; -exports.withActiveSpan = withActiveSpan; -exports.withIsolationScope = withIsolationScope; -exports.withMonitor = withMonitor; -exports.withScope = withScope; -//# sourceMappingURL=exports.js.map - - -/***/ }), - -/***/ 54724: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const constants = __nccwpck_require__(74894); -const debugBuild = __nccwpck_require__(68145); -const scope = __nccwpck_require__(8747); -const session = __nccwpck_require__(88939); -const version = __nccwpck_require__(63491); - -/** - * API compatibility version of this hub. - * - * WARNING: This number should only be increased when the global interface - * changes and new methods are introduced. - * - * @hidden - */ -const API_VERSION = parseFloat(version.SDK_VERSION); - -/** - * Default maximum number of breadcrumbs added to an event. Can be overwritten - * with {@link Options.maxBreadcrumbs}. - */ -const DEFAULT_BREADCRUMBS = 100; - -/** - * @deprecated The `Hub` class will be removed in version 8 of the SDK in favour of `Scope` and `Client` objects. - * - * If you previously used the `Hub` class directly, replace it with `Scope` and `Client` objects. More information: - * - [Multiple Sentry Instances](https://docs.sentry.io/platforms/javascript/best-practices/multiple-sentry-instances/) - * - [Browser Extensions](https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/) - * - * Some of our APIs are typed with the Hub class instead of the interface (e.g. `getCurrentHub`). Most of them are deprecated - * themselves and will also be removed in version 8. More information: - * - [Migration Guide](https://github.com/getsentry/sentry-javascript/blob/develop/MIGRATION.md#deprecate-hub) - */ -// eslint-disable-next-line deprecation/deprecation -class Hub { - /** Is a {@link Layer}[] containing the client and scope */ - - /** Contains the last event id of a captured event. */ - - /** - * Creates a new instance of the hub, will push one {@link Layer} into the - * internal stack on creation. - * - * @param client bound to the hub. - * @param scope bound to the hub. - * @param version number, higher number means higher priority. - * - * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK. - * - * If you are currently using the Hub for multi-client use like so: - * - * ``` - * // OLD - * const hub = new Hub(); - * hub.bindClient(client); - * makeMain(hub) - * ``` - * - * instead initialize the client as follows: - * - * ``` - * // NEW - * Sentry.withIsolationScope(() => { - * Sentry.setCurrentClient(client); - * client.init(); - * }); - * ``` - * - * If you are using the Hub to capture events like so: - * - * ``` - * // OLD - * const client = new Client(); - * const hub = new Hub(client); - * hub.captureException() - * ``` - * - * instead capture isolated events as follows: - * - * ``` - * // NEW - * const client = new Client(); - * const scope = new Scope(); - * scope.setClient(client); - * scope.captureException(); - * ``` - */ - constructor( - client, - scope$1, - isolationScope, - _version = API_VERSION, - ) {this._version = _version; - let assignedScope; - if (!scope$1) { - assignedScope = new scope.Scope(); - assignedScope.setClient(client); - } else { - assignedScope = scope$1; +function extractTransaction(req, type2) { + switch (type2) { + case "path": { + return extractPathForTransaction(req, { path: true })[0]; } - - let assignedIsolationScope; - if (!isolationScope) { - assignedIsolationScope = new scope.Scope(); - assignedIsolationScope.setClient(client); - } else { - assignedIsolationScope = isolationScope; + case "handler": { + return req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name || ""; } - - this._stack = [{ scope: assignedScope }]; - - if (client) { - // eslint-disable-next-line deprecation/deprecation - this.bindClient(client); + case "methodPath": + default: { + const customRoute = req._reconstructedRoute ? req._reconstructedRoute : void 0; + return extractPathForTransaction(req, { path: true, method: true, customRoute })[0]; } - - this._isolationScope = assignedIsolationScope; } - - /** - * Checks if this hub's version is older than the given version. - * - * @param version A version number to compare to. - * @return True if the given version is newer; otherwise false. - * - * @deprecated This will be removed in v8. - */ - isOlderThan(version) { - return this._version < version; - } - - /** - * This binds the given client to the current scope. - * @param client An SDK client (client) instance. - * - * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead. - */ - bindClient(client) { - // eslint-disable-next-line deprecation/deprecation - const top = this.getStackTop(); - top.client = client; - top.scope.setClient(client); - // eslint-disable-next-line deprecation/deprecation - if (client && client.setupIntegrations) { - // eslint-disable-next-line deprecation/deprecation - client.setupIntegrations(); +} +function extractUserData(user, keys) { + const extractedUser = {}; + const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES; + attributes.forEach((key) => { + if (user && key in user) { + extractedUser[key] = user[key]; } + }); + return extractedUser; +} +function extractRequestData(req, options2) { + const { include = DEFAULT_REQUEST_INCLUDES, deps } = options2 || {}; + const requestData = {}; + const headers = req.headers || {}; + const method = req.method; + const host = headers.host || req.hostname || req.host || ""; + const protocol = req.protocol === "https" || req.socket && req.socket.encrypted ? "https" : "http"; + const originalUrl = req.originalUrl || req.url || ""; + const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; + include.forEach((key) => { + switch (key) { + case "headers": { + requestData.headers = headers; + if (!include.includes("cookies")) { + delete requestData.headers.cookie; + } + break; + } + case "method": { + requestData.method = method; + break; + } + case "url": { + requestData.url = absoluteUrl; + break; + } + case "cookies": { + requestData.cookies = // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can + // come off in v8 + req.cookies || headers.cookie && parseCookie(headers.cookie) || {}; + break; + } + case "query_string": { + requestData.query_string = extractQueryParams(req, deps); + break; + } + case "data": { + if (method === "GET" || method === "HEAD") { + break; + } + if (req.body !== void 0) { + requestData.data = isString(req.body) ? req.body : JSON.stringify(normalize(req.body)); + } + break; + } + default: { + if ({}.hasOwnProperty.call(req, key)) { + requestData[key] = req[key]; + } + } + } + }); + return requestData; +} +function addRequestDataToEvent(event, req, options2) { + const include = { + ...DEFAULT_INCLUDES, + ...options2 && options2.include + }; + if (include.request) { + const extractedRequestData = Array.isArray(include.request) ? extractRequestData(req, { include: include.request, deps: options2 && options2.deps }) : extractRequestData(req, { deps: options2 && options2.deps }); + event.request = { + ...event.request, + ...extractedRequestData + }; } - - /** - * @inheritDoc - * - * @deprecated Use `withScope` instead. - */ - pushScope() { - // We want to clone the content of prev scope - // eslint-disable-next-line deprecation/deprecation - const scope = this.getScope().clone(); - // eslint-disable-next-line deprecation/deprecation - this.getStack().push({ - // eslint-disable-next-line deprecation/deprecation - client: this.getClient(), - scope, - }); - return scope; - } - - /** - * @inheritDoc - * - * @deprecated Use `withScope` instead. - */ - popScope() { - // eslint-disable-next-line deprecation/deprecation - if (this.getStack().length <= 1) return false; - // eslint-disable-next-line deprecation/deprecation - return !!this.getStack().pop(); - } - - /** - * @inheritDoc - * - * @deprecated Use `Sentry.withScope()` instead. - */ - withScope(callback) { - // eslint-disable-next-line deprecation/deprecation - const scope = this.pushScope(); - - let maybePromiseResult; - try { - maybePromiseResult = callback(scope); - } catch (e) { - // eslint-disable-next-line deprecation/deprecation - this.popScope(); - throw e; + if (include.user) { + const extractedUser = req.user && isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; + if (Object.keys(extractedUser).length) { + event.user = { + ...event.user, + ...extractedUser + }; } - - if (utils.isThenable(maybePromiseResult)) { - // @ts-expect-error - isThenable returns the wrong type - return maybePromiseResult.then( - res => { - // eslint-disable-next-line deprecation/deprecation - this.popScope(); - return res; - }, - e => { - // eslint-disable-next-line deprecation/deprecation - this.popScope(); - throw e; - }, - ); + } + if (include.ip) { + const ip = req.ip || req.socket && req.socket.remoteAddress; + if (ip) { + event.user = { + ...event.user, + ip_address: ip + }; } - - // eslint-disable-next-line deprecation/deprecation - this.popScope(); - return maybePromiseResult; } - - /** - * @inheritDoc - * - * @deprecated Use `Sentry.getClient()` instead. - */ - getClient() { - // eslint-disable-next-line deprecation/deprecation - return this.getStackTop().client ; + if (include.transaction && !event.transaction) { + event.transaction = extractTransaction(req, include.transaction); } - - /** - * Returns the scope of the top stack. - * - * @deprecated Use `Sentry.getCurrentScope()` instead. - */ - getScope() { - // eslint-disable-next-line deprecation/deprecation - return this.getStackTop().scope; + return event; +} +function extractQueryParams(req, deps) { + let originalUrl = req.originalUrl || req.url || ""; + if (!originalUrl) { + return; } - - /** - * @deprecated Use `Sentry.getIsolationScope()` instead. - */ - getIsolationScope() { - return this._isolationScope; + if (originalUrl.startsWith("/")) { + originalUrl = `http://dogs.are.great${originalUrl}`; } - - /** - * Returns the scope stack for domains or the process. - * @deprecated This will be removed in v8. - */ - getStack() { - return this._stack; + try { + return req.query || typeof URL !== "undefined" && new URL(originalUrl).search.slice(1) || // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node + deps && deps.url && deps.url.parse(originalUrl).query || void 0; + } catch (e2) { + return void 0; } - - /** - * Returns the topmost scope layer in the order domain > local > process. - * @deprecated This will be removed in v8. - */ - getStackTop() { - return this._stack[this._stack.length - 1]; +} +var DEFAULT_INCLUDES, DEFAULT_REQUEST_INCLUDES, DEFAULT_USER_INCLUDES; +var init_requestdata = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/requestdata.js"() { + init_cookie(); + init_is(); + init_normalize(); + init_url(); + DEFAULT_INCLUDES = { + ip: false, + request: true, + transaction: true, + user: true + }; + DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_string", "url"]; + DEFAULT_USER_INCLUDES = ["id", "username", "email"]; } +}); - /** - * @inheritDoc - * - * @deprecated Use `Sentry.captureException()` instead. - */ - captureException(exception, hint) { - const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils.uuid4()); - const syntheticException = new Error('Sentry syntheticException'); - // eslint-disable-next-line deprecation/deprecation - this.getScope().captureException(exception, { - originalException: exception, - syntheticException, - ...hint, - event_id: eventId, - }); - - return eventId; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/severity.js +function severityLevelFromString(level) { + return level === "warn" ? "warning" : validSeverityLevels.includes(level) ? level : "log"; +} +var validSeverityLevels; +var init_severity = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/severity.js"() { + validSeverityLevels = ["fatal", "error", "warning", "log", "info", "debug"]; } +}); - /** - * @inheritDoc - * - * @deprecated Use `Sentry.captureMessage()` instead. - */ - captureMessage( - message, - // eslint-disable-next-line deprecation/deprecation - level, - hint, - ) { - const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : utils.uuid4()); - const syntheticException = new Error(message); - // eslint-disable-next-line deprecation/deprecation - this.getScope().captureMessage(message, level, { - originalException: message, - syntheticException, - ...hint, - event_id: eventId, - }); - - return eventId; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/time.js +function dateTimestampInSeconds() { + return Date.now() / ONE_SECOND_IN_MS; +} +function createUnixTimestampInSecondsFunc() { + const { performance: performance2 } = GLOBAL_OBJ; + if (!performance2 || !performance2.now) { + return dateTimestampInSeconds; } - - /** - * @inheritDoc - * - * @deprecated Use `Sentry.captureEvent()` instead. - */ - captureEvent(event, hint) { - const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); - if (!event.type) { - this._lastEventId = eventId; - } - // eslint-disable-next-line deprecation/deprecation - this.getScope().captureEvent(event, { ...hint, event_id: eventId }); - return eventId; + const approxStartingTimeOrigin = Date.now() - performance2.now(); + const timeOrigin = performance2.timeOrigin == void 0 ? approxStartingTimeOrigin : performance2.timeOrigin; + return () => { + return (timeOrigin + performance2.now()) / ONE_SECOND_IN_MS; + }; +} +var ONE_SECOND_IN_MS, timestampInSeconds, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin; +var init_time = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/time.js"() { + init_worldwide(); + ONE_SECOND_IN_MS = 1e3; + timestampInSeconds = createUnixTimestampInSecondsFunc(); + browserPerformanceTimeOrigin = (() => { + const { performance: performance2 } = GLOBAL_OBJ; + if (!performance2 || !performance2.now) { + _browserPerformanceTimeOriginMode = "none"; + return void 0; + } + const threshold = 3600 * 1e3; + const performanceNow = performance2.now(); + const dateNow = Date.now(); + const timeOriginDelta = performance2.timeOrigin ? Math.abs(performance2.timeOrigin + performanceNow - dateNow) : threshold; + const timeOriginIsReliable = timeOriginDelta < threshold; + const navigationStart = performance2.timing && performance2.timing.navigationStart; + const hasNavigationStart = typeof navigationStart === "number"; + const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold; + const navigationStartIsReliable = navigationStartDelta < threshold; + if (timeOriginIsReliable || navigationStartIsReliable) { + if (timeOriginDelta <= navigationStartDelta) { + _browserPerformanceTimeOriginMode = "timeOrigin"; + return performance2.timeOrigin; + } else { + _browserPerformanceTimeOriginMode = "navigationStart"; + return navigationStart; + } + } + _browserPerformanceTimeOriginMode = "dateNow"; + return dateNow; + })(); } +}); - /** - * @inheritDoc - * - * @deprecated This will be removed in v8. - */ - lastEventId() { - return this._lastEventId; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/baggage.js +function baggageHeaderToDynamicSamplingContext(baggageHeader) { + if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) { + return void 0; } - - /** - * @inheritDoc - * - * @deprecated Use `Sentry.addBreadcrumb()` instead. - */ - addBreadcrumb(breadcrumb, hint) { - // eslint-disable-next-line deprecation/deprecation - const { scope, client } = this.getStackTop(); - - if (!client) return; - - const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = - (client.getOptions && client.getOptions()) || {}; - - if (maxBreadcrumbs <= 0) return; - - const timestamp = utils.dateTimestampInSeconds(); - const mergedBreadcrumb = { timestamp, ...breadcrumb }; - const finalBreadcrumb = beforeBreadcrumb - ? (utils.consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) ) - : mergedBreadcrumb; - - if (finalBreadcrumb === null) return; - - if (client.emit) { - client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint); + let baggageObject = {}; + if (Array.isArray(baggageHeader)) { + baggageObject = baggageHeader.reduce((acc, curr) => { + const currBaggageObject = baggageHeaderToObject(curr); + for (const key of Object.keys(currBaggageObject)) { + acc[key] = currBaggageObject[key]; + } + return acc; + }, {}); + } else { + if (!baggageHeader) { + return void 0; } - - // TODO(v8): I know this comment doesn't make much sense because the hub will be deprecated but I still wanted to - // write it down. In theory, we would have to add the breadcrumbs to the isolation scope here, however, that would - // duplicate all of the breadcrumbs. There was the possibility of adding breadcrumbs to both, the isolation scope - // and the normal scope, and deduplicating it down the line in the event processing pipeline. However, that would - // have been very fragile, because the breadcrumb objects would have needed to keep their identity all throughout - // the event processing pipeline. - // In the new implementation, the top level `Sentry.addBreadcrumb()` should ONLY write to the isolation scope. - - scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs); - } - - /** - * @inheritDoc - * @deprecated Use `Sentry.setUser()` instead. - */ - setUser(user) { - // TODO(v8): The top level `Sentry.setUser()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setUser(user); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setUser(user); + baggageObject = baggageHeaderToObject(baggageHeader); } - - /** - * @inheritDoc - * @deprecated Use `Sentry.setTags()` instead. - */ - setTags(tags) { - // TODO(v8): The top level `Sentry.setTags()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setTags(tags); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setTags(tags); + const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { + if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { + const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); + acc[nonPrefixedKey] = value; + } + return acc; + }, {}); + if (Object.keys(dynamicSamplingContext).length > 0) { + return dynamicSamplingContext; + } else { + return void 0; } - - /** - * @inheritDoc - * @deprecated Use `Sentry.setExtras()` instead. - */ - setExtras(extras) { - // TODO(v8): The top level `Sentry.setExtras()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setExtras(extras); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setExtras(extras); +} +function dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext) { + if (!dynamicSamplingContext) { + return void 0; } - - /** - * @inheritDoc - * @deprecated Use `Sentry.setTag()` instead. - */ - setTag(key, value) { - // TODO(v8): The top level `Sentry.setTag()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setTag(key, value); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setTag(key, value); + const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( + (acc, [dscKey, dscValue]) => { + if (dscValue) { + acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue; + } + return acc; + }, + {} + ); + return objectToBaggageHeader(sentryPrefixedDSC); +} +function baggageHeaderToObject(baggageHeader) { + return baggageHeader.split(",").map((baggageEntry) => baggageEntry.split("=").map((keyOrValue) => decodeURIComponent(keyOrValue.trim()))).reduce((acc, [key, value]) => { + acc[key] = value; + return acc; + }, {}); +} +function objectToBaggageHeader(object) { + if (Object.keys(object).length === 0) { + return void 0; } - - /** - * @inheritDoc - * @deprecated Use `Sentry.setExtra()` instead. - */ - setExtra(key, extra) { - // TODO(v8): The top level `Sentry.setExtra()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setExtra(key, extra); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setExtra(key, extra); + return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { + const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`; + const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; + if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) { + DEBUG_BUILD && logger.warn( + `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.` + ); + return baggageHeader; + } else { + return newBaggageHeader; + } + }, ""); +} +var SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, MAX_BAGGAGE_STRING_LENGTH; +var init_baggage = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/baggage.js"() { + init_debug_build(); + init_is(); + init_logger(); + SENTRY_BAGGAGE_KEY_PREFIX = "sentry-"; + SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; + MAX_BAGGAGE_STRING_LENGTH = 8192; } +}); - /** - * @inheritDoc - * @deprecated Use `Sentry.setContext()` instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - setContext(name, context) { - // TODO(v8): The top level `Sentry.setContext()` function should write ONLY to the isolation scope. - // eslint-disable-next-line deprecation/deprecation - this.getScope().setContext(name, context); - // eslint-disable-next-line deprecation/deprecation - this.getIsolationScope().setContext(name, context); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/tracing.js +function extractTraceparentData(traceparent) { + if (!traceparent) { + return void 0; } - - /** - * @inheritDoc - * - * @deprecated Use `getScope()` directly. - */ - configureScope(callback) { - // eslint-disable-next-line deprecation/deprecation - const { scope, client } = this.getStackTop(); - if (client) { - callback(scope); - } + const matches = traceparent.match(TRACEPARENT_REGEXP); + if (!matches) { + return void 0; } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - run(callback) { - // eslint-disable-next-line deprecation/deprecation - const oldHub = makeMain(this); - try { - callback(this); - } finally { - // eslint-disable-next-line deprecation/deprecation - makeMain(oldHub); - } + let parentSampled; + if (matches[3] === "1") { + parentSampled = true; + } else if (matches[3] === "0") { + parentSampled = false; } - - /** - * @inheritDoc - * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead. - */ - getIntegration(integration) { - // eslint-disable-next-line deprecation/deprecation - const client = this.getClient(); - if (!client) return null; - try { - // eslint-disable-next-line deprecation/deprecation - return client.getIntegration(integration); - } catch (_oO) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`); - return null; - } - } - - /** - * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. - * - * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a - * new child span within the transaction or any span, call the respective `.startChild()` method. - * - * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. - * - * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its - * finished child spans will be sent to Sentry. - * - * @param context Properties of the new `Transaction`. - * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent - * default values). See {@link Options.tracesSampler}. - * - * @returns The transaction which was just started - * - * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. - */ - startTransaction(context, customSamplingContext) { - const result = this._callExtensionMethod('startTransaction', context, customSamplingContext); - - if (debugBuild.DEBUG_BUILD && !result) { - // eslint-disable-next-line deprecation/deprecation - const client = this.getClient(); - if (!client) { - utils.logger.warn( - "Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'", - ); - } else { - utils.logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': -Sentry.addTracingExtensions(); -Sentry.init({...}); -`); + return { + traceId: matches[1], + parentSampled, + parentSpanId: matches[2] + }; +} +function tracingContextFromHeaders(sentryTrace, baggage) { + const traceparentData = extractTraceparentData(sentryTrace); + const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage); + const { traceId, parentSpanId, parentSampled } = traceparentData || {}; + if (!traceparentData) { + return { + traceparentData, + dynamicSamplingContext: void 0, + propagationContext: { + traceId: traceId || uuid4(), + spanId: uuid4().substring(16) } - } - - return result; - } - - /** - * @inheritDoc - * @deprecated Use `spanToTraceHeader()` instead. - */ - traceHeaders() { - return this._callExtensionMethod('traceHeaders'); - } - - /** - * @inheritDoc - * - * @deprecated Use top level `captureSession` instead. - */ - captureSession(endSession = false) { - // both send the update and pull the session from the scope - if (endSession) { - // eslint-disable-next-line deprecation/deprecation - return this.endSession(); - } - - // only send the update - this._sendSessionUpdate(); - } - - /** - * @inheritDoc - * @deprecated Use top level `endSession` instead. - */ - endSession() { - // eslint-disable-next-line deprecation/deprecation - const layer = this.getStackTop(); - const scope = layer.scope; - const session$1 = scope.getSession(); - if (session$1) { - session.closeSession(session$1); - } - this._sendSessionUpdate(); - - // the session is over; take it off of the scope - scope.setSession(); - } - - /** - * @inheritDoc - * @deprecated Use top level `startSession` instead. - */ - startSession(context) { - // eslint-disable-next-line deprecation/deprecation - const { scope, client } = this.getStackTop(); - const { release, environment = constants.DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {}; - - // Will fetch userAgent if called from browser sdk - const { userAgent } = utils.GLOBAL_OBJ.navigator || {}; - - const session$1 = session.makeSession({ - release, - environment, - user: scope.getUser(), - ...(userAgent && { userAgent }), - ...context, - }); - - // End existing session if there's one - const currentSession = scope.getSession && scope.getSession(); - if (currentSession && currentSession.status === 'ok') { - session.updateSession(currentSession, { status: 'exited' }); - } - // eslint-disable-next-line deprecation/deprecation - this.endSession(); - - // Afterwards we set the new session on the scope - scope.setSession(session$1); - - return session$1; - } - - /** - * Returns if default PII should be sent to Sentry and propagated in ourgoing requests - * when Tracing is used. - * - * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function - * only unnecessarily increased API surface but only wrapped accessing the option. - */ - shouldSendDefaultPii() { - // eslint-disable-next-line deprecation/deprecation - const client = this.getClient(); - const options = client && client.getOptions(); - return Boolean(options && options.sendDefaultPii); + }; + } else { + return { + traceparentData, + dynamicSamplingContext: dynamicSamplingContext || {}, + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + propagationContext: { + traceId: traceId || uuid4(), + parentSpanId: parentSpanId || uuid4().substring(16), + spanId: uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + } + }; } - - /** - * Sends the current Session on the scope - */ - _sendSessionUpdate() { - // eslint-disable-next-line deprecation/deprecation - const { scope, client } = this.getStackTop(); - - const session = scope.getSession(); - if (session && client && client.captureSession) { - client.captureSession(session); - } +} +function propagationContextFromHeaders(sentryTrace, baggage) { + const traceparentData = extractTraceparentData(sentryTrace); + const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage); + const { traceId, parentSpanId, parentSampled } = traceparentData || {}; + if (!traceparentData) { + return { + traceId: traceId || uuid4(), + spanId: uuid4().substring(16) + }; + } else { + return { + traceId: traceId || uuid4(), + parentSpanId: parentSpanId || uuid4().substring(16), + spanId: uuid4().substring(16), + sampled: parentSampled, + dsc: dynamicSamplingContext || {} + // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it + }; } - - /** - * Calls global extension method and binding current instance to the function call - */ - // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366) - // eslint-disable-next-line @typescript-eslint/no-explicit-any - _callExtensionMethod(method, ...args) { - const carrier = getMainCarrier(); - const sentry = carrier.__SENTRY__; - if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') { - return sentry.extensions[method].apply(this, args); - } - debugBuild.DEBUG_BUILD && utils.logger.warn(`Extension method ${method} couldn't be found, doing nothing.`); +} +function generateSentryTraceHeader(traceId = uuid4(), spanId = uuid4().substring(16), sampled) { + let sampledString = ""; + if (sampled !== void 0) { + sampledString = sampled ? "-1" : "-0"; } + return `${traceId}-${spanId}${sampledString}`; } +var TRACEPARENT_REGEXP; +var init_tracing = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/tracing.js"() { + init_baggage(); + init_misc(); + TRACEPARENT_REGEXP = new RegExp( + "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$" + // whitespace + ); + } +}); -/** - * Returns the global shim registry. - * - * FIXME: This function is problematic, because despite always returning a valid Carrier, - * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check - * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there. - **/ -function getMainCarrier() { - utils.GLOBAL_OBJ.__SENTRY__ = utils.GLOBAL_OBJ.__SENTRY__ || { - extensions: {}, - hub: undefined, - }; - return utils.GLOBAL_OBJ; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/envelope.js +function createEnvelope(headers, items = []) { + return [headers, items]; } - -/** - * Replaces the current main hub with the passed one on the global object - * - * @returns The old replaced hub - * - * @deprecated Use `setCurrentClient()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -function makeMain(hub) { - const registry = getMainCarrier(); - const oldHub = getHubFromCarrier(registry); - setHubOnCarrier(registry, hub); - return oldHub; +function addItemToEnvelope(envelope, newItem) { + const [headers, items] = envelope; + return [headers, [...items, newItem]]; } - -/** - * Returns the default hub instance. - * - * If a hub is already registered in the global carrier but this module - * contains a more recent version, it replaces the registered version. - * Otherwise, the currently registered hub will be returned. - * - * @deprecated Use the respective replacement method directly instead. - */ -// eslint-disable-next-line deprecation/deprecation -function getCurrentHub() { - // Get main carrier (global for every environment) - const registry = getMainCarrier(); - - if (registry.__SENTRY__ && registry.__SENTRY__.acs) { - const hub = registry.__SENTRY__.acs.getCurrentHub(); - - if (hub) { - return hub; +function forEachEnvelopeItem(envelope, callback) { + const envelopeItems = envelope[1]; + for (const envelopeItem of envelopeItems) { + const envelopeItemType = envelopeItem[0].type; + const result = callback(envelopeItem, envelopeItemType); + if (result) { + return true; } } - - // Return hub that lives on a global object - return getGlobalHub(registry); + return false; } - -/** - * Get the currently active isolation scope. - * The isolation scope is active for the current exection context, - * meaning that it will remain stable for the same Hub. - */ -function getIsolationScope() { - // eslint-disable-next-line deprecation/deprecation - return getCurrentHub().getIsolationScope(); +function encodeUTF8(input, textEncoder) { + const utf8 = textEncoder || new TextEncoder(); + return utf8.encode(input); } - -// eslint-disable-next-line deprecation/deprecation -function getGlobalHub(registry = getMainCarrier()) { - // If there's no hub, or its an old API, assign a new one - - if ( - !hasHubOnCarrier(registry) || - // eslint-disable-next-line deprecation/deprecation - getHubFromCarrier(registry).isOlderThan(API_VERSION) - ) { - // eslint-disable-next-line deprecation/deprecation - setHubOnCarrier(registry, new Hub()); +function serializeEnvelope(envelope, textEncoder) { + const [envHeaders, items] = envelope; + let parts = JSON.stringify(envHeaders); + function append(next) { + if (typeof parts === "string") { + parts = typeof next === "string" ? parts + next : [encodeUTF8(parts, textEncoder), next]; + } else { + parts.push(typeof next === "string" ? encodeUTF8(next, textEncoder) : next); + } } - - // Return hub that lives on a global object - return getHubFromCarrier(registry); -} - -/** - * @private Private API with no semver guarantees! - * - * If the carrier does not contain a hub, a new hub is created with the global hub client and scope. - */ -// eslint-disable-next-line deprecation/deprecation -function ensureHubOnCarrier(carrier, parent = getGlobalHub()) { - // If there's no hub on current domain, or it's an old API, assign a new one - if ( - !hasHubOnCarrier(carrier) || - // eslint-disable-next-line deprecation/deprecation - getHubFromCarrier(carrier).isOlderThan(API_VERSION) - ) { - // eslint-disable-next-line deprecation/deprecation - const client = parent.getClient(); - // eslint-disable-next-line deprecation/deprecation - const scope = parent.getScope(); - // eslint-disable-next-line deprecation/deprecation - const isolationScope = parent.getIsolationScope(); - // eslint-disable-next-line deprecation/deprecation - setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone())); + for (const item of items) { + const [itemHeaders, payload] = item; + append(` +${JSON.stringify(itemHeaders)} +`); + if (typeof payload === "string" || payload instanceof Uint8Array) { + append(payload); + } else { + let stringifiedPayload; + try { + stringifiedPayload = JSON.stringify(payload); + } catch (e) { + stringifiedPayload = JSON.stringify(normalize(payload)); + } + append(stringifiedPayload); + } } + return typeof parts === "string" ? parts : concatBuffers(parts); } - -/** - * @private Private API with no semver guarantees! - * - * Sets the global async context strategy - */ -function setAsyncContextStrategy(strategy) { - // Get main carrier (global for every environment) - const registry = getMainCarrier(); - registry.__SENTRY__ = registry.__SENTRY__ || {}; - registry.__SENTRY__.acs = strategy; -} - -/** - * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK. - * - * @param callback The callback to run in its own async context - * @param options Options to pass to the async context strategy - * @returns The result of the callback - */ -function runWithAsyncContext(callback, options = {}) { - const registry = getMainCarrier(); - - if (registry.__SENTRY__ && registry.__SENTRY__.acs) { - return registry.__SENTRY__.acs.runWithAsyncContext(callback, options); +function concatBuffers(buffers) { + const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0); + const merged = new Uint8Array(totalLength); + let offset = 0; + for (const buffer of buffers) { + merged.set(buffer, offset); + offset += buffer.length; } - - // if there was no strategy, fallback to just calling the callback - return callback(); + return merged; } - -/** - * This will tell whether a carrier has a hub on it or not - * @param carrier object - */ -function hasHubOnCarrier(carrier) { - return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub); +function createAttachmentEnvelopeItem(attachment, textEncoder) { + const buffer = typeof attachment.data === "string" ? encodeUTF8(attachment.data, textEncoder) : attachment.data; + return [ + dropUndefinedKeys({ + type: "attachment", + length: buffer.length, + filename: attachment.filename, + content_type: attachment.contentType, + attachment_type: attachment.attachmentType + }), + buffer + ]; } - -/** - * This will create a new {@link Hub} and add to the passed object on - * __SENTRY__.hub. - * @param carrier object - * @hidden - */ -// eslint-disable-next-line deprecation/deprecation -function getHubFromCarrier(carrier) { - // eslint-disable-next-line deprecation/deprecation - return utils.getGlobalSingleton('hub', () => new Hub(), carrier); +function envelopeItemTypeToDataCategory(type2) { + return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type2]; } - -/** - * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute - * @param carrier object - * @param hub Hub - * @returns A boolean indicating success or failure - */ -// eslint-disable-next-line deprecation/deprecation -function setHubOnCarrier(carrier, hub) { - if (!carrier) return false; - const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {}); - __SENTRY__.hub = hub; - return true; +function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { + if (!metadataOrEvent || !metadataOrEvent.sdk) { + return; + } + const { name, version } = metadataOrEvent.sdk; + return { name, version }; } - -exports.API_VERSION = API_VERSION; -exports.Hub = Hub; -exports.ensureHubOnCarrier = ensureHubOnCarrier; -exports.getCurrentHub = getCurrentHub; -exports.getHubFromCarrier = getHubFromCarrier; -exports.getIsolationScope = getIsolationScope; -exports.getMainCarrier = getMainCarrier; -exports.makeMain = makeMain; -exports.runWithAsyncContext = runWithAsyncContext; -exports.setAsyncContextStrategy = setAsyncContextStrategy; -exports.setHubOnCarrier = setHubOnCarrier; -//# sourceMappingURL=hub.js.map - - -/***/ }), - -/***/ 90155: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const hubextensions = __nccwpck_require__(723); -const idletransaction = __nccwpck_require__(9808); -const span$1 = __nccwpck_require__(28784); -const transaction = __nccwpck_require__(88738); -const utils = __nccwpck_require__(29807); -const spanstatus = __nccwpck_require__(48662); -const trace = __nccwpck_require__(57795); -const dynamicSamplingContext = __nccwpck_require__(18359); -const measurement = __nccwpck_require__(86310); -const sampling = __nccwpck_require__(50873); -const semanticAttributes = __nccwpck_require__(35366); -const envelope = __nccwpck_require__(51715); -const exports$1 = __nccwpck_require__(78820); -const hub = __nccwpck_require__(54724); -const session = __nccwpck_require__(88939); -const sessionflusher = __nccwpck_require__(33190); -const scope = __nccwpck_require__(8747); -const eventProcessors = __nccwpck_require__(76742); -const api = __nccwpck_require__(84191); -const baseclient = __nccwpck_require__(38009); -const serverRuntimeClient = __nccwpck_require__(71833); -const sdk = __nccwpck_require__(72259); -const base = __nccwpck_require__(56669); -const offline = __nccwpck_require__(20913); -const multiplexed = __nccwpck_require__(19111); -const version = __nccwpck_require__(63491); -const integration = __nccwpck_require__(65869); -const applyScopeDataToEvent = __nccwpck_require__(53134); -const prepareEvent = __nccwpck_require__(38060); -const checkin = __nccwpck_require__(6036); -const span = __nccwpck_require__(27903); -const hasTracingEnabled = __nccwpck_require__(55726); -const isSentryRequestUrl = __nccwpck_require__(4080); -const handleCallbackErrors = __nccwpck_require__(26103); -const parameterize = __nccwpck_require__(82); -const spanUtils = __nccwpck_require__(59152); -const getRootSpan = __nccwpck_require__(23665); -const sdkMetadata = __nccwpck_require__(48992); -const constants = __nccwpck_require__(74894); -const metadata = __nccwpck_require__(94050); -const requestdata = __nccwpck_require__(77734); -const inboundfilters = __nccwpck_require__(97639); -const functiontostring = __nccwpck_require__(93983); -const linkederrors = __nccwpck_require__(55121); -const index = __nccwpck_require__(22527); -const exports$2 = __nccwpck_require__(70542); - -/** @deprecated Import the integration function directly, e.g. `inboundFiltersIntegration()` instead of `new Integrations.InboundFilter(). */ -const Integrations = index; - -exports.addTracingExtensions = hubextensions.addTracingExtensions; -exports.startIdleTransaction = hubextensions.startIdleTransaction; -exports.IdleTransaction = idletransaction.IdleTransaction; -exports.TRACING_DEFAULTS = idletransaction.TRACING_DEFAULTS; -exports.Span = span$1.Span; -exports.Transaction = transaction.Transaction; -exports.extractTraceparentData = utils.extractTraceparentData; -exports.getActiveTransaction = utils.getActiveTransaction; -Object.defineProperty(exports, "SpanStatus", ({ - enumerable: true, - get: () => spanstatus.SpanStatus -})); -exports.getSpanStatusFromHttpCode = spanstatus.getSpanStatusFromHttpCode; -exports.setHttpStatus = spanstatus.setHttpStatus; -exports.spanStatusfromHttpCode = spanstatus.spanStatusfromHttpCode; -exports.continueTrace = trace.continueTrace; -exports.getActiveSpan = trace.getActiveSpan; -exports.startActiveSpan = trace.startActiveSpan; -exports.startInactiveSpan = trace.startInactiveSpan; -exports.startSpan = trace.startSpan; -exports.startSpanManual = trace.startSpanManual; -exports.trace = trace.trace; -exports.getDynamicSamplingContextFromClient = dynamicSamplingContext.getDynamicSamplingContextFromClient; -exports.getDynamicSamplingContextFromSpan = dynamicSamplingContext.getDynamicSamplingContextFromSpan; -exports.setMeasurement = measurement.setMeasurement; -exports.isValidSampleRate = sampling.isValidSampleRate; -exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID; -exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP; -exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; -exports.createEventEnvelope = envelope.createEventEnvelope; -exports.createSessionEnvelope = envelope.createSessionEnvelope; -exports.addBreadcrumb = exports$1.addBreadcrumb; -exports.captureCheckIn = exports$1.captureCheckIn; -exports.captureEvent = exports$1.captureEvent; -exports.captureException = exports$1.captureException; -exports.captureMessage = exports$1.captureMessage; -exports.captureSession = exports$1.captureSession; -exports.close = exports$1.close; -exports.configureScope = exports$1.configureScope; -exports.endSession = exports$1.endSession; -exports.flush = exports$1.flush; -exports.getClient = exports$1.getClient; -exports.getCurrentScope = exports$1.getCurrentScope; -exports.isInitialized = exports$1.isInitialized; -exports.lastEventId = exports$1.lastEventId; -exports.setContext = exports$1.setContext; -exports.setExtra = exports$1.setExtra; -exports.setExtras = exports$1.setExtras; -exports.setTag = exports$1.setTag; -exports.setTags = exports$1.setTags; -exports.setUser = exports$1.setUser; -exports.startSession = exports$1.startSession; -exports.startTransaction = exports$1.startTransaction; -exports.withActiveSpan = exports$1.withActiveSpan; -exports.withIsolationScope = exports$1.withIsolationScope; -exports.withMonitor = exports$1.withMonitor; -exports.withScope = exports$1.withScope; -exports.Hub = hub.Hub; -exports.ensureHubOnCarrier = hub.ensureHubOnCarrier; -exports.getCurrentHub = hub.getCurrentHub; -exports.getHubFromCarrier = hub.getHubFromCarrier; -exports.getIsolationScope = hub.getIsolationScope; -exports.getMainCarrier = hub.getMainCarrier; -exports.makeMain = hub.makeMain; -exports.runWithAsyncContext = hub.runWithAsyncContext; -exports.setAsyncContextStrategy = hub.setAsyncContextStrategy; -exports.setHubOnCarrier = hub.setHubOnCarrier; -exports.closeSession = session.closeSession; -exports.makeSession = session.makeSession; -exports.updateSession = session.updateSession; -exports.SessionFlusher = sessionflusher.SessionFlusher; -exports.Scope = scope.Scope; -exports.getGlobalScope = scope.getGlobalScope; -exports.setGlobalScope = scope.setGlobalScope; -exports.addGlobalEventProcessor = eventProcessors.addGlobalEventProcessor; -exports.notifyEventProcessors = eventProcessors.notifyEventProcessors; -exports.getEnvelopeEndpointWithUrlEncodedAuth = api.getEnvelopeEndpointWithUrlEncodedAuth; -exports.getReportDialogEndpoint = api.getReportDialogEndpoint; -exports.BaseClient = baseclient.BaseClient; -exports.addEventProcessor = baseclient.addEventProcessor; -exports.ServerRuntimeClient = serverRuntimeClient.ServerRuntimeClient; -exports.initAndBind = sdk.initAndBind; -exports.setCurrentClient = sdk.setCurrentClient; -exports.createTransport = base.createTransport; -exports.makeOfflineTransport = offline.makeOfflineTransport; -exports.makeMultiplexedTransport = multiplexed.makeMultiplexedTransport; -exports.SDK_VERSION = version.SDK_VERSION; -exports.addIntegration = integration.addIntegration; -exports.convertIntegrationFnToClass = integration.convertIntegrationFnToClass; -exports.defineIntegration = integration.defineIntegration; -exports.getIntegrationsToSetup = integration.getIntegrationsToSetup; -exports.applyScopeDataToEvent = applyScopeDataToEvent.applyScopeDataToEvent; -exports.mergeScopeData = applyScopeDataToEvent.mergeScopeData; -exports.prepareEvent = prepareEvent.prepareEvent; -exports.createCheckInEnvelope = checkin.createCheckInEnvelope; -exports.createSpanEnvelope = span.createSpanEnvelope; -exports.hasTracingEnabled = hasTracingEnabled.hasTracingEnabled; -exports.isSentryRequestUrl = isSentryRequestUrl.isSentryRequestUrl; -exports.handleCallbackErrors = handleCallbackErrors.handleCallbackErrors; -exports.parameterize = parameterize.parameterize; -exports.spanIsSampled = spanUtils.spanIsSampled; -exports.spanToJSON = spanUtils.spanToJSON; -exports.spanToTraceContext = spanUtils.spanToTraceContext; -exports.spanToTraceHeader = spanUtils.spanToTraceHeader; -exports.getRootSpan = getRootSpan.getRootSpan; -exports.applySdkMetadata = sdkMetadata.applySdkMetadata; -exports.DEFAULT_ENVIRONMENT = constants.DEFAULT_ENVIRONMENT; -exports.ModuleMetadata = metadata.ModuleMetadata; -exports.moduleMetadataIntegration = metadata.moduleMetadataIntegration; -exports.RequestData = requestdata.RequestData; -exports.requestDataIntegration = requestdata.requestDataIntegration; -exports.InboundFilters = inboundfilters.InboundFilters; -exports.inboundFiltersIntegration = inboundfilters.inboundFiltersIntegration; -exports.FunctionToString = functiontostring.FunctionToString; -exports.functionToStringIntegration = functiontostring.functionToStringIntegration; -exports.LinkedErrors = linkederrors.LinkedErrors; -exports.linkedErrorsIntegration = linkederrors.linkedErrorsIntegration; -exports.metrics = exports$2.metrics; -exports.Integrations = Integrations; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 65869: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const eventProcessors = __nccwpck_require__(76742); -const exports$1 = __nccwpck_require__(78820); -const hub = __nccwpck_require__(54724); - -const installedIntegrations = []; - -/** Map of integrations assigned to a client */ - -/** - * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to - * preseve the order of integrations in the array. - * - * @private - */ -function filterDuplicates(integrations) { - const integrationsByName = {}; - - integrations.forEach(currentInstance => { - const { name } = currentInstance; - - const existingInstance = integrationsByName[name]; - - // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a - // default instance to overwrite an existing user instance - if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) { - return; +function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) { + const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; + return { + event_id: event.event_id, + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: dsnToString(dsn) }, + ...dynamicSamplingContext && { + trace: dropUndefinedKeys({ ...dynamicSamplingContext }) } - - integrationsByName[name] = currentInstance; - }); - - return Object.keys(integrationsByName).map(k => integrationsByName[k]); + }; } - -/** Gets integrations to install */ -function getIntegrationsToSetup(options) { - const defaultIntegrations = options.defaultIntegrations || []; - const userIntegrations = options.integrations; - - // We flag default instances, so that later we can tell them apart from any user-created instances of the same class - defaultIntegrations.forEach(integration => { - integration.isDefaultInstance = true; - }); - - let integrations; - - if (Array.isArray(userIntegrations)) { - integrations = [...defaultIntegrations, ...userIntegrations]; - } else if (typeof userIntegrations === 'function') { - integrations = utils.arrayify(userIntegrations(defaultIntegrations)); - } else { - integrations = defaultIntegrations; +var ITEM_TYPE_TO_DATA_CATEGORY_MAP; +var init_envelope = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/envelope.js"() { + init_dsn(); + init_normalize(); + init_object(); + ITEM_TYPE_TO_DATA_CATEGORY_MAP = { + session: "session", + sessions: "session", + attachment: "attachment", + transaction: "transaction", + event: "error", + client_report: "internal", + user_report: "default", + profile: "profile", + replay_event: "replay", + replay_recording: "replay", + check_in: "monitor", + feedback: "feedback", + span: "span", + statsd: "metric_bucket" + }; } +}); - const finalIntegrations = filterDuplicates(integrations); - - // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or - // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event - // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore - // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array. - const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug'); - if (debugIndex !== -1) { - const [debugInstance] = finalIntegrations.splice(debugIndex, 1); - finalIntegrations.push(debugInstance); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/ratelimit.js +function parseRetryAfterHeader(header, now = Date.now()) { + const headerDelay = parseInt(`${header}`, 10); + if (!isNaN(headerDelay)) { + return headerDelay * 1e3; } - - return finalIntegrations; + const headerDate = Date.parse(`${header}`); + if (!isNaN(headerDate)) { + return headerDate - now; + } + return DEFAULT_RETRY_AFTER; } - -/** - * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default - * integrations are added unless they were already provided before. - * @param integrations array of integration instances - * @param withDefault should enable default integrations - */ -function setupIntegrations(client, integrations) { - const integrationIndex = {}; - - integrations.forEach(integration => { - // guard against empty provided integrations - if (integration) { - setupIntegration(client, integration, integrationIndex); - } - }); - - return integrationIndex; +function disabledUntil(limits, dataCategory) { + return limits[dataCategory] || limits.all || 0; } - -/** - * Execute the `afterAllSetup` hooks of the given integrations. - */ -function afterSetupIntegrations(client, integrations) { - for (const integration of integrations) { - // guard against empty provided integrations - if (integration && integration.afterAllSetup) { - integration.afterAllSetup(client); +function isRateLimited(limits, dataCategory, now = Date.now()) { + return disabledUntil(limits, dataCategory) > now; +} +function updateRateLimits(limits, { statusCode, headers }, now = Date.now()) { + const updatedRateLimits = { + ...limits + }; + const rateLimitHeader = headers && headers["x-sentry-rate-limits"]; + const retryAfterHeader = headers && headers["retry-after"]; + if (rateLimitHeader) { + for (const limit of rateLimitHeader.trim().split(",")) { + const [retryAfter, categories, , , namespaces] = limit.split(":", 5); + const headerDelay = parseInt(retryAfter, 10); + const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1e3; + if (!categories) { + updatedRateLimits.all = now + delay; + } else { + for (const category of categories.split(";")) { + if (category === "metric_bucket") { + if (!namespaces || namespaces.split(";").includes("custom")) { + updatedRateLimits[category] = now + delay; + } + } else { + updatedRateLimits[category] = now + delay; + } + } + } } + } else if (retryAfterHeader) { + updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now); + } else if (statusCode === 429) { + updatedRateLimits.all = now + 60 * 1e3; } + return updatedRateLimits; } - -/** Setup a single integration. */ -function setupIntegration(client, integration, integrationIndex) { - if (integrationIndex[integration.name]) { - debugBuild.DEBUG_BUILD && utils.logger.log(`Integration skipped because it was already installed: ${integration.name}`); - return; - } - integrationIndex[integration.name] = integration; - - // `setupOnce` is only called the first time - if (installedIntegrations.indexOf(integration.name) === -1) { - // eslint-disable-next-line deprecation/deprecation - integration.setupOnce(eventProcessors.addGlobalEventProcessor, hub.getCurrentHub); - installedIntegrations.push(integration.name); - } - - // `setup` is run for each client - if (integration.setup && typeof integration.setup === 'function') { - integration.setup(client); - } - - if (client.on && typeof integration.preprocessEvent === 'function') { - const callback = integration.preprocessEvent.bind(integration) ; - client.on('preprocessEvent', (event, hint) => callback(event, hint, client)); - } - - if (client.addEventProcessor && typeof integration.processEvent === 'function') { - const callback = integration.processEvent.bind(integration) ; - - const processor = Object.assign((event, hint) => callback(event, hint, client), { - id: integration.name, - }); - - client.addEventProcessor(processor); +var DEFAULT_RETRY_AFTER; +var init_ratelimit = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/ratelimit.js"() { + DEFAULT_RETRY_AFTER = 60 * 1e3; } +}); - debugBuild.DEBUG_BUILD && utils.logger.log(`Integration installed: ${integration.name}`); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/eventbuilder.js +function parseStackFrames(stackParser, error) { + return stackParser(error.stack || "", 1); } - -/** Add an integration to the current hub's client. */ -function addIntegration(integration) { - const client = exports$1.getClient(); - - if (!client || !client.addIntegration) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); - return; +function exceptionFromError(stackParser, error) { + const exception2 = { + type: error.name || error.constructor.name, + value: error.message + }; + const frames = parseStackFrames(stackParser, error); + if (frames.length) { + exception2.stacktrace = { frames }; } - - client.addIntegration(integration); + return exception2; } - -// Polyfill for Array.findIndex(), which is not supported in ES5 -function findIndex(arr, callback) { - for (let i = 0; i < arr.length; i++) { - if (callback(arr[i]) === true) { - return i; +function getMessageForObject(exception2) { + if ("name" in exception2 && typeof exception2.name === "string") { + let message = `'${exception2.name}' captured as exception`; + if ("message" in exception2 && typeof exception2.message === "string") { + message += ` with message '${exception2.message}'`; } + return message; + } else if ("message" in exception2 && typeof exception2.message === "string") { + return exception2.message; + } else { + return `Object captured as exception with keys: ${extractExceptionKeysForMessage( + exception2 + )}`; } - - return -1; -} - -/** - * Convert a new integration function to the legacy class syntax. - * In v8, we can remove this and instead export the integration functions directly. - * - * @deprecated This will be removed in v8! - */ -function convertIntegrationFnToClass( - name, - fn, -) { - return Object.assign( - function ConvertedIntegration(...args) { - return fn(...args); - }, - { id: name }, - ) ; } - -/** - * Define an integration function that can be used to create an integration instance. - * Note that this by design hides the implementation details of the integration, as they are considered internal. - */ -function defineIntegration(fn) { - return fn; -} - -exports.addIntegration = addIntegration; -exports.afterSetupIntegrations = afterSetupIntegrations; -exports.convertIntegrationFnToClass = convertIntegrationFnToClass; -exports.defineIntegration = defineIntegration; -exports.getIntegrationsToSetup = getIntegrationsToSetup; -exports.installedIntegrations = installedIntegrations; -exports.setupIntegration = setupIntegration; -exports.setupIntegrations = setupIntegrations; -//# sourceMappingURL=integration.js.map - - -/***/ }), - -/***/ 93983: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const exports$1 = __nccwpck_require__(78820); -const integration = __nccwpck_require__(65869); - -let originalFunctionToString; - -const INTEGRATION_NAME = 'FunctionToString'; - -const SETUP_CLIENTS = new WeakMap(); - -const _functionToStringIntegration = (() => { - return { - name: INTEGRATION_NAME, - setupOnce() { - // eslint-disable-next-line @typescript-eslint/unbound-method - originalFunctionToString = Function.prototype.toString; - - // intrinsics (like Function.prototype) might be immutable in some environments - // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal) - try { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - Function.prototype.toString = function ( ...args) { - const originalFunction = utils.getOriginalFunction(this); - const context = - SETUP_CLIENTS.has(exports$1.getClient() ) && originalFunction !== undefined ? originalFunction : this; - return originalFunctionToString.apply(context, args); - }; - } catch (e) { - // ignore errors here, just don't patch this - } - }, - setup(client) { - SETUP_CLIENTS.set(client, true); - }, +function eventFromUnknownInput(getHubOrClient, stackParser, exception2, hint) { + const client = typeof getHubOrClient === "function" ? ( + // eslint-disable-next-line deprecation/deprecation + getHubOrClient().getClient() + ) : getHubOrClient; + let ex = exception2; + const providedMechanism = hint && hint.data && hint.data.mechanism; + const mechanism = providedMechanism || { + handled: true, + type: "generic" }; -}) ; - -/** - * Patch toString calls to return proper name for wrapped functions. - * - * ```js - * Sentry.init({ - * integrations: [ - * functionToStringIntegration(), - * ], - * }); - * ``` - */ -const functionToStringIntegration = integration.defineIntegration(_functionToStringIntegration); - -/** - * Patch toString calls to return proper name for wrapped functions. - * - * @deprecated Use `functionToStringIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const FunctionToString = integration.convertIntegrationFnToClass( - INTEGRATION_NAME, - functionToStringIntegration, -) ; - -// eslint-disable-next-line deprecation/deprecation - -exports.FunctionToString = FunctionToString; -exports.functionToStringIntegration = functionToStringIntegration; -//# sourceMappingURL=functiontostring.js.map - - -/***/ }), - -/***/ 97639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const integration = __nccwpck_require__(65869); - -// "Script error." is hard coded into browsers for errors that it can't read. -// this is the result of a script being pulled in from an external domain and CORS. -const DEFAULT_IGNORE_ERRORS = [ - /^Script error\.?$/, - /^Javascript error: Script error\.? on line 0$/, - /^ResizeObserver loop completed with undelivered notifications.$/, - /^Cannot redefine property: googletag$/, -]; - -const DEFAULT_IGNORE_TRANSACTIONS = [ - /^.*\/healthcheck$/, - /^.*\/healthy$/, - /^.*\/live$/, - /^.*\/ready$/, - /^.*\/heartbeat$/, - /^.*\/health$/, - /^.*\/healthz$/, -]; - -/** Options for the InboundFilters integration */ - -const INTEGRATION_NAME = 'InboundFilters'; -const _inboundFiltersIntegration = ((options = {}) => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event, _hint, client) { - const clientOptions = client.getOptions(); - const mergedOptions = _mergeOptions(options, clientOptions); - return _shouldDropEvent(event, mergedOptions) ? null : event; - }, + let extras; + if (!isError(exception2)) { + if (isPlainObject(exception2)) { + const normalizeDepth = client && client.getOptions().normalizeDepth; + extras = { ["__serialized__"]: normalizeToSize(exception2, normalizeDepth) }; + const message = getMessageForObject(exception2); + ex = hint && hint.syntheticException || new Error(message); + ex.message = message; + } else { + ex = hint && hint.syntheticException || new Error(exception2); + ex.message = exception2; + } + mechanism.synthetic = true; + } + const event = { + exception: { + values: [exceptionFromError(stackParser, ex)] + } }; -}) ; - -const inboundFiltersIntegration = integration.defineIntegration(_inboundFiltersIntegration); - -/** - * Inbound filters configurable by the user. - * @deprecated Use `inboundFiltersIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const InboundFilters = integration.convertIntegrationFnToClass( - INTEGRATION_NAME, - inboundFiltersIntegration, -) - -; - -function _mergeOptions( - internalOptions = {}, - clientOptions = {}, -) { + if (extras) { + event.extra = extras; + } + addExceptionTypeValue(event, void 0, void 0); + addExceptionMechanism(event, mechanism); return { - allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])], - denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])], - ignoreErrors: [ - ...(internalOptions.ignoreErrors || []), - ...(clientOptions.ignoreErrors || []), - ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS), - ], - ignoreTransactions: [ - ...(internalOptions.ignoreTransactions || []), - ...(clientOptions.ignoreTransactions || []), - ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS), - ], - ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true, + ...event, + event_id: hint && hint.event_id }; } - -function _shouldDropEvent(event, options) { - if (options.ignoreInternal && _isSentryError(event)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${utils.getEventDescription(event)}`); - return true; - } - if (_isIgnoredError(event, options.ignoreErrors)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${utils.getEventDescription(event)}`, - ); - return true; - } - if (_isIgnoredTransaction(event, options.ignoreTransactions)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${utils.getEventDescription(event)}`, - ); - return true; - } - if (_isDeniedUrl(event, options.denyUrls)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${utils.getEventDescription( - event, - )}.\nUrl: ${_getEventFilterUrl(event)}`, - ); - return true; +function eventFromMessage(stackParser, message, level = "info", hint, attachStacktrace) { + const event = { + event_id: hint && hint.event_id, + level + }; + if (attachStacktrace && hint && hint.syntheticException) { + const frames = parseStackFrames(stackParser, hint.syntheticException); + if (frames.length) { + event.exception = { + values: [ + { + value: message, + stacktrace: { frames } + } + ] + }; + } } - if (!_isAllowedUrl(event, options.allowUrls)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${utils.getEventDescription( - event, - )}.\nUrl: ${_getEventFilterUrl(event)}`, - ); - return true; + if (isParameterizedString(message)) { + const { __sentry_template_string__, __sentry_template_values__ } = message; + event.logentry = { + message: __sentry_template_string__, + params: __sentry_template_values__ + }; + return event; } - return false; + event.message = message; + return event; } - -function _isIgnoredError(event, ignoreErrors) { - // If event.type, this is not an error - if (event.type || !ignoreErrors || !ignoreErrors.length) { - return false; +var init_eventbuilder = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/eventbuilder.js"() { + init_is(); + init_misc(); + init_normalize(); + init_object(); } +}); - return _getPossibleEventMessages(event).some(message => utils.stringMatchesSomePattern(message, ignoreErrors)); -} - -function _isIgnoredTransaction(event, ignoreTransactions) { - if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) { - return false; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/lru.js +var LRUMap; +var init_lru = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/lru.js"() { + LRUMap = class { + constructor(_maxSize) { + this._maxSize = _maxSize; + this._cache = /* @__PURE__ */ new Map(); + } + /** Get the current size of the cache */ + get size() { + return this._cache.size; + } + /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ + get(key) { + const value = this._cache.get(key); + if (value === void 0) { + return void 0; + } + this._cache.delete(key); + this._cache.set(key, value); + return value; + } + /** Insert an entry and evict an older entry if we've reached maxSize */ + set(key, value) { + if (this._cache.size >= this._maxSize) { + this._cache.delete(this._cache.keys().next().value); + } + this._cache.set(key, value); + } + /** Remove an entry and return the entry if it was in the cache */ + remove(key) { + const value = this._cache.get(key); + if (value) { + this._cache.delete(key); + } + return value; + } + /** Clear all entries */ + clear() { + this._cache.clear(); + } + /** Get all the keys */ + keys() { + return Array.from(this._cache.keys()); + } + /** Get all the values */ + values() { + const values = []; + this._cache.forEach((value) => values.push(value)); + return values; + } + }; } +}); - const name = event.transaction; - return name ? utils.stringMatchesSomePattern(name, ignoreTransactions) : false; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_nullishCoalesce.js +function _nullishCoalesce(lhs, rhsFn) { + return lhs != null ? lhs : rhsFn(); } - -function _isDeniedUrl(event, denyUrls) { - // TODO: Use Glob instead? - if (!denyUrls || !denyUrls.length) { - return false; +var init_nullishCoalesce = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_nullishCoalesce.js"() { } - const url = _getEventFilterUrl(event); - return !url ? false : utils.stringMatchesSomePattern(url, denyUrls); -} +}); -function _isAllowedUrl(event, allowUrls) { - // TODO: Use Glob instead? - if (!allowUrls || !allowUrls.length) { - return true; +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js +function _optionalChain(ops) { + let lastAccessLHS = void 0; + let value = ops[0]; + let i = 1; + while (i < ops.length) { + const op = ops[i]; + const fn = ops[i + 1]; + i += 2; + if ((op === "optionalAccess" || op === "optionalCall") && value == null) { + return; + } + if (op === "access" || op === "optionalAccess") { + lastAccessLHS = value; + value = fn(value); + } else if (op === "call" || op === "optionalCall") { + value = fn((...args) => value.call(lastAccessLHS, ...args)); + lastAccessLHS = void 0; + } } - const url = _getEventFilterUrl(event); - return !url ? true : utils.stringMatchesSomePattern(url, allowUrls); + return value; } +var init_optionalChain = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js"() { + } +}); -function _getPossibleEventMessages(event) { - const possibleMessages = []; - - if (event.message) { - possibleMessages.push(event.message); +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChainDelete.js +function _optionalChainDelete(ops) { + const result = _optionalChain(ops); + return result == null ? true : result; +} +var init_optionalChainDelete = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/buildPolyfills/_optionalChainDelete.js"() { + init_optionalChain(); } +}); - let lastException; - try { - // @ts-expect-error Try catching to save bundle size - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - lastException = event.exception.values[event.exception.values.length - 1]; - } catch (e) { - // try catching to save bundle size checking existence of variables +// node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/index.js +var init_esm = __esm({ + "node_modules/.pnpm/@sentry+utils@7.120.0/node_modules/@sentry/utils/esm/index.js"() { + init_aggregate_errors(); + init_dsn(); + init_error(); + init_worldwide(); + init_is(); + init_logger(); + init_misc(); + init_node(); + init_normalize(); + init_object(); + init_path(); + init_promisebuffer(); + init_requestdata(); + init_severity(); + init_stacktrace(); + init_string(); + init_supports(); + init_syncpromise(); + init_time(); + init_tracing(); + init_envelope(); + init_ratelimit(); + init_baggage(); + init_url(); + init_eventbuilder(); + init_lru(); + init_nullishCoalesce(); + init_optionalChain(); + init_optionalChainDelete(); + init_console(); + init_xhr(); + init_fetch(); + init_globalError(); + init_globalUnhandledRejection(); } +}); - if (lastException) { - if (lastException.value) { - possibleMessages.push(lastException.value); - if (lastException.type) { - possibleMessages.push(`${lastException.type}: ${lastException.value}`); - } - } +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/debug-build.js +var DEBUG_BUILD2; +var init_debug_build2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/debug-build.js"() { + DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; } +}); - if (debugBuild.DEBUG_BUILD && possibleMessages.length === 0) { - utils.logger.error(`Could not extract message for event ${utils.getEventDescription(event)}`); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/constants.js +var DEFAULT_ENVIRONMENT; +var init_constants = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/constants.js"() { + DEFAULT_ENVIRONMENT = "production"; } +}); - return possibleMessages; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/eventProcessors.js +function getGlobalEventProcessors() { + return getGlobalSingleton("globalEventProcessors", () => []); } - -function _isSentryError(event) { - try { - // @ts-expect-error can't be a sentry error if undefined - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return event.exception.values[0].type === 'SentryError'; - } catch (e) { - // ignore - } - return false; +function addGlobalEventProcessor(callback) { + getGlobalEventProcessors().push(callback); } - -function _getLastValidUrl(frames = []) { - for (let i = frames.length - 1; i >= 0; i--) { - const frame = frames[i]; - - if (frame && frame.filename !== '' && frame.filename !== '[native code]') { - return frame.filename || null; +function notifyEventProcessors(processors, event, hint, index = 0) { + return new SyncPromise((resolve4, reject) => { + const processor = processors[index]; + if (event === null || typeof processor !== "function") { + resolve4(event); + } else { + const result = processor({ ...event }, hint); + DEBUG_BUILD2 && processor.id && result === null && logger.log(`Event processor "${processor.id}" dropped event`); + if (isThenable(result)) { + void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve4)).then(null, reject); + } else { + void notifyEventProcessors(processors, result, hint, index + 1).then(resolve4).then(null, reject); + } } - } - - return null; + }); } +var init_eventProcessors = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/eventProcessors.js"() { + init_esm(); + init_debug_build2(); + } +}); -function _getEventFilterUrl(event) { - try { - let frames; - try { - // @ts-expect-error we only care about frames if the whole thing here is defined - frames = event.exception.values[0].stacktrace.frames; - } catch (e) { - // ignore - } - return frames ? _getLastValidUrl(frames) : null; - } catch (oO) { - debugBuild.DEBUG_BUILD && utils.logger.error(`Cannot extract url for event ${utils.getEventDescription(event)}`); - return null; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/session.js +function makeSession(context) { + const startingTime = timestampInSeconds(); + const session = { + sid: uuid4(), + init: true, + timestamp: startingTime, + started: startingTime, + duration: 0, + status: "ok", + errors: 0, + ignoreDuration: false, + toJSON: () => sessionToJSON(session) + }; + if (context) { + updateSession(session, context); } + return session; } - -exports.InboundFilters = InboundFilters; -exports.inboundFiltersIntegration = inboundFiltersIntegration; -//# sourceMappingURL=inboundfilters.js.map - - -/***/ }), - -/***/ 22527: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const functiontostring = __nccwpck_require__(93983); -const inboundfilters = __nccwpck_require__(97639); -const linkederrors = __nccwpck_require__(55121); - -/* eslint-disable deprecation/deprecation */ - -exports.FunctionToString = functiontostring.FunctionToString; -exports.InboundFilters = inboundfilters.InboundFilters; -exports.LinkedErrors = linkederrors.LinkedErrors; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 55121: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const integration = __nccwpck_require__(65869); - -const DEFAULT_KEY = 'cause'; -const DEFAULT_LIMIT = 5; - -const INTEGRATION_NAME = 'LinkedErrors'; - -const _linkedErrorsIntegration = ((options = {}) => { - const limit = options.limit || DEFAULT_LIMIT; - const key = options.key || DEFAULT_KEY; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - preprocessEvent(event, hint, client) { - const options = client.getOptions(); - - utils.applyAggregateErrorsToEvent( - utils.exceptionFromError, - options.stackParser, - options.maxValueLength, - key, - limit, - event, - hint, - ); - }, - }; -}) ; - -const linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration); - -/** - * Adds SDK info to an event. - * @deprecated Use `linkedErrorsIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const LinkedErrors = integration.convertIntegrationFnToClass(INTEGRATION_NAME, linkedErrorsIntegration) - -; - -exports.LinkedErrors = LinkedErrors; -exports.linkedErrorsIntegration = linkedErrorsIntegration; -//# sourceMappingURL=linkederrors.js.map - - -/***/ }), - -/***/ 94050: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const integration = __nccwpck_require__(65869); -const metadata = __nccwpck_require__(12710); - -const INTEGRATION_NAME = 'ModuleMetadata'; - -const _moduleMetadataIntegration = (() => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - if (typeof client.on !== 'function') { - return; - } - - // We need to strip metadata from stack frames before sending them to Sentry since these are client side only. - client.on('beforeEnvelope', envelope => { - utils.forEachEnvelopeItem(envelope, (item, type) => { - if (type === 'event') { - const event = Array.isArray(item) ? (item )[1] : undefined; - - if (event) { - metadata.stripMetadataFromStackFrames(event); - item[1] = event; - } - } - }); - }); - }, - - processEvent(event, _hint, client) { - const stackParser = client.getOptions().stackParser; - metadata.addMetadataToStackFrames(stackParser, event); - return event; - }, - }; -}) ; - -const moduleMetadataIntegration = integration.defineIntegration(_moduleMetadataIntegration); - -/** - * Adds module metadata to stack frames. - * - * Metadata can be injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option. - * - * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events - * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams - * our sources - * - * @deprecated Use `moduleMetadataIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const ModuleMetadata = integration.convertIntegrationFnToClass( - INTEGRATION_NAME, - moduleMetadataIntegration, -) - -; - -exports.ModuleMetadata = ModuleMetadata; -exports.moduleMetadataIntegration = moduleMetadataIntegration; -//# sourceMappingURL=metadata.js.map - - -/***/ }), - -/***/ 77734: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const integration = __nccwpck_require__(65869); -const spanUtils = __nccwpck_require__(59152); - -const DEFAULT_OPTIONS = { - include: { - cookies: true, - data: true, - headers: true, - ip: false, - query_string: true, - url: true, - user: { - id: true, - username: true, - email: true, - }, - }, - transactionNamingScheme: 'methodPath', -}; - -const INTEGRATION_NAME = 'RequestData'; - -const _requestDataIntegration = ((options = {}) => { - const _addRequestData = utils.addRequestDataToEvent; - const _options = { - ...DEFAULT_OPTIONS, - ...options, - include: { - // @ts-expect-error It's mad because `method` isn't a known `include` key. (It's only here and not set by default in - // `addRequestDataToEvent` for legacy reasons. TODO (v8): Change that.) - method: true, - ...DEFAULT_OPTIONS.include, - ...options.include, - user: - options.include && typeof options.include.user === 'boolean' - ? options.include.user - : { - ...DEFAULT_OPTIONS.include.user, - // Unclear why TS still thinks `options.include.user` could be a boolean at this point - ...((options.include || {}).user ), - }, - }, - }; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event, _hint, client) { - // Note: In the long run, most of the logic here should probably move into the request data utility functions. For - // the moment it lives here, though, until https://github.com/getsentry/sentry-javascript/issues/5718 is addressed. - // (TL;DR: Those functions touch many parts of the repo in many different ways, and need to be clened up. Once - // that's happened, it will be easier to add this logic in without worrying about unexpected side effects.) - const { transactionNamingScheme } = _options; - - const { sdkProcessingMetadata = {} } = event; - const req = sdkProcessingMetadata.request; - - if (!req) { - return event; - } - - // The Express request handler takes a similar `include` option to that which can be passed to this integration. - // If passed there, we store it in `sdkProcessingMetadata`. TODO(v8): Force express and GCP people to use this - // integration, so that all of this passing and conversion isn't necessary - const addRequestDataOptions = - sdkProcessingMetadata.requestDataOptionsFromExpressHandler || - sdkProcessingMetadata.requestDataOptionsFromGCPWrapper || - convertReqDataIntegrationOptsToAddReqDataOpts(_options); - - const processedEvent = _addRequestData(event, req, addRequestDataOptions); - - // Transaction events already have the right `transaction` value - if (event.type === 'transaction' || transactionNamingScheme === 'handler') { - return processedEvent; - } - - // In all other cases, use the request's associated transaction (if any) to overwrite the event's `transaction` - // value with a high-quality one - const reqWithTransaction = req ; - const transaction = reqWithTransaction._sentryTransaction; - if (transaction) { - const name = spanUtils.spanToJSON(transaction).description || ''; - - // TODO (v8): Remove the nextjs check and just base it on `transactionNamingScheme` for all SDKs. (We have to - // keep it the way it is for the moment, because changing the names of transactions in Sentry has the potential - // to break things like alert rules.) - const shouldIncludeMethodInTransactionName = - getSDKName(client) === 'sentry.javascript.nextjs' - ? name.startsWith('/api') - : transactionNamingScheme !== 'path'; - - const [transactionValue] = utils.extractPathForTransaction(req, { - path: true, - method: shouldIncludeMethodInTransactionName, - customRoute: name, - }); - - processedEvent.transaction = transactionValue; - } - - return processedEvent; - }, - }; -}) ; - -const requestDataIntegration = integration.defineIntegration(_requestDataIntegration); - -/** - * Add data about a request to an event. Primarily for use in Node-based SDKs, but included in `@sentry/integrations` - * so it can be used in cross-platform SDKs like `@sentry/nextjs`. - * @deprecated Use `requestDataIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const RequestData = integration.convertIntegrationFnToClass(INTEGRATION_NAME, requestDataIntegration) - -; - -/** Convert this integration's options to match what `addRequestDataToEvent` expects */ -/** TODO: Can possibly be deleted once https://github.com/getsentry/sentry-javascript/issues/5718 is fixed */ -function convertReqDataIntegrationOptsToAddReqDataOpts( - integrationOptions, -) { - const { - transactionNamingScheme, - include: { ip, user, ...requestOptions }, - } = integrationOptions; - - const requestIncludeKeys = []; - for (const [key, value] of Object.entries(requestOptions)) { - if (value) { - requestIncludeKeys.push(key); +function updateSession(session, context = {}) { + if (context.user) { + if (!session.ipAddress && context.user.ip_address) { + session.ipAddress = context.user.ip_address; } - } - - let addReqDataUserOpt; - if (user === undefined) { - addReqDataUserOpt = true; - } else if (typeof user === 'boolean') { - addReqDataUserOpt = user; - } else { - const userIncludeKeys = []; - for (const [key, value] of Object.entries(user)) { - if (value) { - userIncludeKeys.push(key); - } + if (!session.did && !context.did) { + session.did = context.user.id || context.user.email || context.user.username; } - addReqDataUserOpt = userIncludeKeys; - } - - return { - include: { - ip, - user: addReqDataUserOpt, - request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : undefined, - transaction: transactionNamingScheme, - }, - }; -} - -function getSDKName(client) { - try { - // For a long chain like this, it's fewer bytes to combine a try-catch with assuming everything is there than to - // write out a long chain of `a && a.b && a.b.c && ...` - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return client.getOptions()._metadata.sdk.name; - } catch (err) { - // In theory we should never get here - return undefined; } -} - -exports.RequestData = RequestData; -exports.requestDataIntegration = requestDataIntegration; -//# sourceMappingURL=requestdata.js.map - - -/***/ }), - -/***/ 12710: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** Keys are source filename/url, values are metadata objects. */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -const filenameMetadataMap = new Map(); -/** Set of stack strings that have already been parsed. */ -const parsedStacks = new Set(); - -function ensureMetadataStacksAreParsed(parser) { - if (!utils.GLOBAL_OBJ._sentryModuleMetadata) { - return; + session.timestamp = context.timestamp || timestampInSeconds(); + if (context.abnormal_mechanism) { + session.abnormal_mechanism = context.abnormal_mechanism; } - - for (const stack of Object.keys(utils.GLOBAL_OBJ._sentryModuleMetadata)) { - const metadata = utils.GLOBAL_OBJ._sentryModuleMetadata[stack]; - - if (parsedStacks.has(stack)) { - continue; - } - - // Ensure this stack doesn't get parsed again - parsedStacks.add(stack); - - const frames = parser(stack); - - // Go through the frames starting from the top of the stack and find the first one with a filename - for (const frame of frames.reverse()) { - if (frame.filename) { - // Save the metadata for this filename - filenameMetadataMap.set(frame.filename, metadata); - break; - } - } + if (context.ignoreDuration) { + session.ignoreDuration = context.ignoreDuration; } -} - -/** - * Retrieve metadata for a specific JavaScript file URL. - * - * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function getMetadataForUrl(parser, filename) { - ensureMetadataStacksAreParsed(parser); - return filenameMetadataMap.get(filename); -} - -/** - * Adds metadata to stack frames. - * - * Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option. - */ -function addMetadataToStackFrames(parser, event) { - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - event.exception.values.forEach(exception => { - if (!exception.stacktrace) { - return; - } - - for (const frame of exception.stacktrace.frames || []) { - if (!frame.filename) { - continue; - } - - const metadata = getMetadataForUrl(parser, frame.filename); - - if (metadata) { - frame.module_metadata = metadata; - } - } - }); - } catch (_) { - // To save bundle size we're just try catching here instead of checking for the existence of all the different objects. + if (context.sid) { + session.sid = context.sid.length === 32 ? context.sid : uuid4(); } -} - -/** - * Strips metadata from stack frames. - */ -function stripMetadataFromStackFrames(event) { - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - event.exception.values.forEach(exception => { - if (!exception.stacktrace) { - return; - } - - for (const frame of exception.stacktrace.frames || []) { - delete frame.module_metadata; - } - }); - } catch (_) { - // To save bundle size we're just try catching here instead of checking for the existence of all the different objects. + if (context.init !== void 0) { + session.init = context.init; } -} - -exports.addMetadataToStackFrames = addMetadataToStackFrames; -exports.getMetadataForUrl = getMetadataForUrl; -exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames; -//# sourceMappingURL=metadata.js.map - - -/***/ }), - -/***/ 25620: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils$1 = __nccwpck_require__(79565); -const constants = __nccwpck_require__(45540); -const instance = __nccwpck_require__(12394); -const metricSummary = __nccwpck_require__(23832); -const utils = __nccwpck_require__(31480); - -/** - * A metrics aggregator that aggregates metrics in memory and flushes them periodically. - */ -class MetricsAggregator { - // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets - // when the aggregator is garbage collected. - // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - - // Different metrics have different weights. We use this to limit the number of metrics - // that we store in memory. - - // Cast to any so that it can use Node.js timeout - // eslint-disable-next-line @typescript-eslint/no-explicit-any - - // SDKs are required to shift the flush interval by random() * rollup_in_seconds. - // That shift is determined once per startup to create jittering. - - // An SDK is required to perform force flushing ahead of scheduled time if the memory - // pressure is too high. There is no rule for this other than that SDKs should be tracking - // abstract aggregation complexity (eg: a counter only carries a single float, whereas a - // distribution is a float per emission). - // - // Force flush is used on either shutdown, flush() or when we exceed the max weight. - - constructor( _client) {this._client = _client; - this._buckets = new Map(); - this._bucketsTotalWeight = 0; - - this._interval = setInterval(() => this._flush(), constants.DEFAULT_FLUSH_INTERVAL) ; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (this._interval.unref) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - this._interval.unref(); - } - - this._flushShift = Math.floor((Math.random() * constants.DEFAULT_FLUSH_INTERVAL) / 1000); - this._forceFlush = false; + if (!session.did && context.did) { + session.did = `${context.did}`; } - - /** - * @inheritDoc - */ - add( - metricType, - unsanitizedName, - value, - unsanitizedUnit = 'none', - unsanitizedTags = {}, - maybeFloatTimestamp = utils$1.timestampInSeconds(), - ) { - const timestamp = Math.floor(maybeFloatTimestamp); - const name = utils.sanitizeMetricKey(unsanitizedName); - const tags = utils.sanitizeTags(unsanitizedTags); - const unit = utils.sanitizeUnit(unsanitizedUnit ); - - const bucketKey = utils.getBucketKey(metricType, name, unit, tags); - - let bucketItem = this._buckets.get(bucketKey); - // If this is a set metric, we need to calculate the delta from the previous weight. - const previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; - - if (bucketItem) { - bucketItem.metric.add(value); - // TODO(abhi): Do we need this check? - if (bucketItem.timestamp < timestamp) { - bucketItem.timestamp = timestamp; - } - } else { - bucketItem = { - // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. - metric: new instance.METRIC_MAP[metricType](value), - timestamp, - metricType, - name, - unit, - tags, - }; - this._buckets.set(bucketKey, bucketItem); - } - - // If value is a string, it's a set metric so calculate the delta from the previous weight. - const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value; - metricSummary.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); - - // We need to keep track of the total weight of the buckets so that we can - // flush them when we exceed the max weight. - this._bucketsTotalWeight += bucketItem.metric.weight; - - if (this._bucketsTotalWeight >= constants.MAX_WEIGHT) { - this.flush(); - } - } - - /** - * Flushes the current metrics to the transport via the transport. - */ - flush() { - this._forceFlush = true; - this._flush(); - } - - /** - * Shuts down metrics aggregator and clears all metrics. - */ - close() { - this._forceFlush = true; - clearInterval(this._interval); - this._flush(); - } - - /** - * Flushes the buckets according to the internal state of the aggregator. - * If it is a force flush, which happens on shutdown, it will flush all buckets. - * Otherwise, it will only flush buckets that are older than the flush interval, - * and according to the flush shift. - * - * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. - */ - _flush() { - // TODO(@anonrig): Add Atomics for locking to avoid having force flush and regular flush - // running at the same time. - // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics - - // This path eliminates the need for checking for timestamps since we're forcing a flush. - // Remember to reset the flag, or it will always flush all metrics. - if (this._forceFlush) { - this._forceFlush = false; - this._bucketsTotalWeight = 0; - this._captureMetrics(this._buckets); - this._buckets.clear(); - return; - } - const cutoffSeconds = Math.floor(utils$1.timestampInSeconds()) - constants.DEFAULT_FLUSH_INTERVAL / 1000 - this._flushShift; - // TODO(@anonrig): Optimization opportunity. - // Convert this map to an array and store key in the bucketItem. - const flushedBuckets = new Map(); - for (const [key, bucket] of this._buckets) { - if (bucket.timestamp <= cutoffSeconds) { - flushedBuckets.set(key, bucket); - this._bucketsTotalWeight -= bucket.metric.weight; - } - } - - for (const [key] of flushedBuckets) { - this._buckets.delete(key); - } - - this._captureMetrics(flushedBuckets); + if (typeof context.started === "number") { + session.started = context.started; } - - /** - * Only captures a subset of the buckets passed to this function. - * @param flushedBuckets - */ - _captureMetrics(flushedBuckets) { - if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) { - // TODO(@anonrig): Optimization opportunity. - // This copy operation can be avoided if we store the key in the bucketItem. - const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); - this._client.captureAggregateMetrics(buckets); - } + if (session.ignoreDuration) { + session.duration = void 0; + } else if (typeof context.duration === "number") { + session.duration = context.duration; + } else { + const duration = session.timestamp - session.started; + session.duration = duration >= 0 ? duration : 0; } -} - -exports.MetricsAggregator = MetricsAggregator; -//# sourceMappingURL=aggregator.js.map - - -/***/ }), - -/***/ 12883: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils$1 = __nccwpck_require__(79565); -const constants = __nccwpck_require__(45540); -const instance = __nccwpck_require__(12394); -const metricSummary = __nccwpck_require__(23832); -const utils = __nccwpck_require__(31480); - -/** - * A simple metrics aggregator that aggregates metrics in memory and flushes them periodically. - * Default flush interval is 5 seconds. - * - * @experimental This API is experimental and might change in the future. - */ -class BrowserMetricsAggregator { - // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets - // when the aggregator is garbage collected. - // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry - - constructor( _client) {this._client = _client; - this._buckets = new Map(); - this._interval = setInterval(() => this.flush(), constants.DEFAULT_BROWSER_FLUSH_INTERVAL); + if (context.release) { + session.release = context.release; } - - /** - * @inheritDoc - */ - add( - metricType, - unsanitizedName, - value, - unsanitizedUnit = 'none', - unsanitizedTags = {}, - maybeFloatTimestamp = utils$1.timestampInSeconds(), - ) { - const timestamp = Math.floor(maybeFloatTimestamp); - const name = utils.sanitizeMetricKey(unsanitizedName); - const tags = utils.sanitizeTags(unsanitizedTags); - const unit = utils.sanitizeUnit(unsanitizedUnit ); - - const bucketKey = utils.getBucketKey(metricType, name, unit, tags); - - let bucketItem = this._buckets.get(bucketKey); - // If this is a set metric, we need to calculate the delta from the previous weight. - const previousWeight = bucketItem && metricType === constants.SET_METRIC_TYPE ? bucketItem.metric.weight : 0; - - if (bucketItem) { - bucketItem.metric.add(value); - // TODO(abhi): Do we need this check? - if (bucketItem.timestamp < timestamp) { - bucketItem.timestamp = timestamp; - } - } else { - bucketItem = { - // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. - metric: new instance.METRIC_MAP[metricType](value), - timestamp, - metricType, - name, - unit, - tags, - }; - this._buckets.set(bucketKey, bucketItem); - } - - // If value is a string, it's a set metric so calculate the delta from the previous weight. - const val = typeof value === 'string' ? bucketItem.metric.weight - previousWeight : value; - metricSummary.updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + if (context.environment) { + session.environment = context.environment; } - - /** - * @inheritDoc - */ - flush() { - // short circuit if buckets are empty. - if (this._buckets.size === 0) { - return; - } - - if (this._client.captureAggregateMetrics) { - // TODO(@anonrig): Use Object.values() when we support ES6+ - const metricBuckets = Array.from(this._buckets).map(([, bucketItem]) => bucketItem); - this._client.captureAggregateMetrics(metricBuckets); - } - - this._buckets.clear(); + if (!session.ipAddress && context.ipAddress) { + session.ipAddress = context.ipAddress; } - - /** - * @inheritDoc - */ - close() { - clearInterval(this._interval); - this.flush(); + if (!session.userAgent && context.userAgent) { + session.userAgent = context.userAgent; } -} - -exports.BrowserMetricsAggregator = BrowserMetricsAggregator; -//# sourceMappingURL=browser-aggregator.js.map - - -/***/ }), - -/***/ 45540: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const COUNTER_METRIC_TYPE = 'c' ; -const GAUGE_METRIC_TYPE = 'g' ; -const SET_METRIC_TYPE = 's' ; -const DISTRIBUTION_METRIC_TYPE = 'd' ; - -/** - * This does not match spec in https://develop.sentry.dev/sdk/metrics - * but was chosen to optimize for the most common case in browser environments. - */ -const DEFAULT_BROWSER_FLUSH_INTERVAL = 5000; - -/** - * SDKs are required to bucket into 10 second intervals (rollup in seconds) - * which is the current lower bound of metric accuracy. - */ -const DEFAULT_FLUSH_INTERVAL = 10000; - -/** - * The maximum number of metrics that should be stored in memory. - */ -const MAX_WEIGHT = 10000; - -exports.COUNTER_METRIC_TYPE = COUNTER_METRIC_TYPE; -exports.DEFAULT_BROWSER_FLUSH_INTERVAL = DEFAULT_BROWSER_FLUSH_INTERVAL; -exports.DEFAULT_FLUSH_INTERVAL = DEFAULT_FLUSH_INTERVAL; -exports.DISTRIBUTION_METRIC_TYPE = DISTRIBUTION_METRIC_TYPE; -exports.GAUGE_METRIC_TYPE = GAUGE_METRIC_TYPE; -exports.MAX_WEIGHT = MAX_WEIGHT; -exports.SET_METRIC_TYPE = SET_METRIC_TYPE; -//# sourceMappingURL=constants.js.map - - -/***/ }), - -/***/ 5745: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const utils$1 = __nccwpck_require__(31480); - -/** - * Create envelope from a metric aggregate. - */ -function createMetricEnvelope( - metricBucketItems, - dsn, - metadata, - tunnel, -) { - const headers = { - sent_at: new Date().toISOString(), - }; - - if (metadata && metadata.sdk) { - headers.sdk = { - name: metadata.sdk.name, - version: metadata.sdk.version, - }; + if (typeof context.errors === "number") { + session.errors = context.errors; } - - if (!!tunnel && dsn) { - headers.dsn = utils.dsnToString(dsn); + if (context.status) { + session.status = context.status; } - - const item = createMetricEnvelopeItem(metricBucketItems); - return utils.createEnvelope(headers, [item]); -} - -function createMetricEnvelopeItem(metricBucketItems) { - const payload = utils$1.serializeMetricBuckets(metricBucketItems); - const metricHeaders = { - type: 'statsd', - length: payload.length, - }; - return [metricHeaders, payload]; } - -exports.createMetricEnvelope = createMetricEnvelope; -//# sourceMappingURL=envelope.js.map - - -/***/ }), - -/***/ 70542: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const exports$1 = __nccwpck_require__(78820); -const spanUtils = __nccwpck_require__(59152); -const constants = __nccwpck_require__(45540); -const integration = __nccwpck_require__(22695); - -function addToMetricsAggregator( - metricType, - name, - value, - data = {}, -) { - const client = exports$1.getClient(); - const scope = exports$1.getCurrentScope(); - if (client) { - if (!client.metricsAggregator) { - debugBuild.DEBUG_BUILD && - utils.logger.warn('No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs'); - return; - } - const { unit, tags, timestamp } = data; - const { release, environment } = client.getOptions(); - // eslint-disable-next-line deprecation/deprecation - const transaction = scope.getTransaction(); - const metricTags = {}; - if (release) { - metricTags.release = release; - } - if (environment) { - metricTags.environment = environment; - } - if (transaction) { - metricTags.transaction = spanUtils.spanToJSON(transaction).description || ''; - } - - debugBuild.DEBUG_BUILD && utils.logger.log(`Adding value of ${value} to ${metricType} metric ${name}`); - client.metricsAggregator.add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp); +function closeSession(session, status) { + let context = {}; + if (status) { + context = { status }; + } else if (session.status === "ok") { + context = { status: "exited" }; } + updateSession(session, context); } - -/** - * Adds a value to a counter metric - * - * @experimental This API is experimental and might have breaking changes in the future. - */ -function increment(name, value = 1, data) { - addToMetricsAggregator(constants.COUNTER_METRIC_TYPE, name, value, data); +function sessionToJSON(session) { + return dropUndefinedKeys({ + sid: `${session.sid}`, + init: session.init, + // Make sure that sec is converted to ms for date constructor + started: new Date(session.started * 1e3).toISOString(), + timestamp: new Date(session.timestamp * 1e3).toISOString(), + status: session.status, + errors: session.errors, + did: typeof session.did === "number" || typeof session.did === "string" ? `${session.did}` : void 0, + duration: session.duration, + abnormal_mechanism: session.abnormal_mechanism, + attrs: { + release: session.release, + environment: session.environment, + ip_address: session.ipAddress, + user_agent: session.userAgent + } + }); } +var init_session = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/session.js"() { + init_esm(); + } +}); -/** - * Adds a value to a distribution metric - * - * @experimental This API is experimental and might have breaking changes in the future. - */ -function distribution(name, value, data) { - addToMetricsAggregator(constants.DISTRIBUTION_METRIC_TYPE, name, value, data); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/spanUtils.js +function spanToTraceContext(span) { + const { spanId: span_id, traceId: trace_id } = span.spanContext(); + const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span); + return dropUndefinedKeys({ + data, + op, + parent_span_id, + span_id, + status, + tags, + trace_id, + origin + }); } - -/** - * Adds a value to a set metric. Value must be a string or integer. - * - * @experimental This API is experimental and might have breaking changes in the future. - */ -function set(name, value, data) { - addToMetricsAggregator(constants.SET_METRIC_TYPE, name, value, data); +function spanToTraceHeader(span) { + const { traceId, spanId } = span.spanContext(); + const sampled = spanIsSampled(span); + return generateSentryTraceHeader(traceId, spanId, sampled); } - -/** - * Adds a value to a gauge metric - * - * @experimental This API is experimental and might have breaking changes in the future. - */ -function gauge(name, value, data) { - addToMetricsAggregator(constants.GAUGE_METRIC_TYPE, name, value, data); -} - -const metrics = { - increment, - distribution, - set, - gauge, - /** @deprecated Use `metrics.metricsAggregratorIntegration()` instead. */ - // eslint-disable-next-line deprecation/deprecation - MetricsAggregator: integration.MetricsAggregator, - metricsAggregatorIntegration: integration.metricsAggregatorIntegration, -}; - -exports.distribution = distribution; -exports.gauge = gauge; -exports.increment = increment; -exports.metrics = metrics; -exports.set = set; -//# sourceMappingURL=exports.js.map - - -/***/ }), - -/***/ 12394: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const constants = __nccwpck_require__(45540); -const utils = __nccwpck_require__(31480); - -/** - * A metric instance representing a counter. - */ -class CounterMetric { - constructor( _value) {this._value = _value;} - - /** @inheritDoc */ - get weight() { - return 1; +function spanTimeInputToSeconds(input) { + if (typeof input === "number") { + return ensureTimestampInSeconds(input); } - - /** @inheritdoc */ - add(value) { - this._value += value; + if (Array.isArray(input)) { + return input[0] + input[1] / 1e9; } - - /** @inheritdoc */ - toString() { - return `${this._value}`; + if (input instanceof Date) { + return ensureTimestampInSeconds(input.getTime()); } + return timestampInSeconds(); } - -/** - * A metric instance representing a gauge. - */ -class GaugeMetric { - - constructor(value) { - this._last = value; - this._min = value; - this._max = value; - this._sum = value; - this._count = 1; +function ensureTimestampInSeconds(timestamp2) { + const isMs = timestamp2 > 9999999999; + return isMs ? timestamp2 / 1e3 : timestamp2; +} +function spanToJSON(span) { + if (spanIsSpanClass(span)) { + return span.getSpanJSON(); } - - /** @inheritDoc */ - get weight() { - return 5; + if (typeof span.toJSON === "function") { + return span.toJSON(); } - - /** @inheritdoc */ - add(value) { - this._last = value; - if (value < this._min) { - this._min = value; - } - if (value > this._max) { - this._max = value; - } - this._sum += value; - this._count++; + return {}; +} +function spanIsSpanClass(span) { + return typeof span.getSpanJSON === "function"; +} +function spanIsSampled(span) { + const { traceFlags } = span.spanContext(); + return Boolean(traceFlags & TRACE_FLAG_SAMPLED); +} +var TRACE_FLAG_NONE, TRACE_FLAG_SAMPLED; +var init_spanUtils = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/spanUtils.js"() { + init_esm(); + TRACE_FLAG_NONE = 0; + TRACE_FLAG_SAMPLED = 1; } +}); - /** @inheritdoc */ - toString() { - return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/prepareEvent.js +function prepareEvent(options2, event, hint, scope, client, isolationScope) { + const { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options2; + const prepared = { + ...event, + event_id: event.event_id || hint.event_id || uuid4(), + timestamp: event.timestamp || dateTimestampInSeconds() + }; + const integrations = hint.integrations || options2.integrations.map((i) => i.name); + applyClientOptions(prepared, options2); + applyIntegrationsMetadata(prepared, integrations); + if (event.type === void 0) { + applyDebugIds(prepared, options2.stackParser); } -} - -/** - * A metric instance representing a distribution. - */ -class DistributionMetric { - - constructor(first) { - this._value = [first]; + const finalScope = getFinalScope(scope, hint.captureContext); + if (hint.mechanism) { + addExceptionMechanism(prepared, hint.mechanism); } - - /** @inheritDoc */ - get weight() { - return this._value.length; + const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : []; + const data = getGlobalScope().getScopeData(); + if (isolationScope) { + const isolationData = isolationScope.getScopeData(); + mergeScopeData(data, isolationData); } - - /** @inheritdoc */ - add(value) { - this._value.push(value); + if (finalScope) { + const finalScopeData = finalScope.getScopeData(); + mergeScopeData(data, finalScopeData); } - - /** @inheritdoc */ - toString() { - return this._value.join(':'); + const attachments = [...hint.attachments || [], ...data.attachments]; + if (attachments.length) { + hint.attachments = attachments; } + applyScopeDataToEvent(prepared, data); + const eventProcessors = [ + ...clientEventProcessors, + // eslint-disable-next-line deprecation/deprecation + ...getGlobalEventProcessors(), + // Run scope event processors _after_ all other processors + ...data.eventProcessors + ]; + const result = notifyEventProcessors(eventProcessors, prepared, hint); + return result.then((evt) => { + if (evt) { + applyDebugMeta(evt); + } + if (typeof normalizeDepth === "number" && normalizeDepth > 0) { + return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth); + } + return evt; + }); } - -/** - * A metric instance representing a set. - */ -class SetMetric { - - constructor( first) {this.first = first; - this._value = new Set([first]); +function applyClientOptions(event, options2) { + const { environment, release: release2, dist, maxValueLength = 250 } = options2; + if (!("environment" in event)) { + event.environment = "environment" in options2 ? environment : DEFAULT_ENVIRONMENT; } - - /** @inheritDoc */ - get weight() { - return this._value.size; + if (event.release === void 0 && release2 !== void 0) { + event.release = release2; } - - /** @inheritdoc */ - add(value) { - this._value.add(value); + if (event.dist === void 0 && dist !== void 0) { + event.dist = dist; } - - /** @inheritdoc */ - toString() { - return Array.from(this._value) - .map(val => (typeof val === 'string' ? utils.simpleHash(val) : val)) - .join(':'); + if (event.message) { + event.message = truncate(event.message, maxValueLength); + } + const exception2 = event.exception && event.exception.values && event.exception.values[0]; + if (exception2 && exception2.value) { + exception2.value = truncate(exception2.value, maxValueLength); + } + const request2 = event.request; + if (request2 && request2.url) { + request2.url = truncate(request2.url, maxValueLength); } } - -const METRIC_MAP = { - [constants.COUNTER_METRIC_TYPE]: CounterMetric, - [constants.GAUGE_METRIC_TYPE]: GaugeMetric, - [constants.DISTRIBUTION_METRIC_TYPE]: DistributionMetric, - [constants.SET_METRIC_TYPE]: SetMetric, -}; - -exports.CounterMetric = CounterMetric; -exports.DistributionMetric = DistributionMetric; -exports.GaugeMetric = GaugeMetric; -exports.METRIC_MAP = METRIC_MAP; -exports.SetMetric = SetMetric; -//# sourceMappingURL=instance.js.map - - -/***/ }), - -/***/ 22695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const integration = __nccwpck_require__(65869); -const browserAggregator = __nccwpck_require__(12883); - -const INTEGRATION_NAME = 'MetricsAggregator'; - -const _metricsAggregatorIntegration = (() => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - client.metricsAggregator = new browserAggregator.BrowserMetricsAggregator(client); - }, - }; -}) ; - -const metricsAggregatorIntegration = integration.defineIntegration(_metricsAggregatorIntegration); - -/** - * Enables Sentry metrics monitoring. - * - * @experimental This API is experimental and might having breaking changes in the future. - * @deprecated Use `metricsAggegratorIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const MetricsAggregator = integration.convertIntegrationFnToClass( - INTEGRATION_NAME, - metricsAggregatorIntegration, -) ; - -exports.MetricsAggregator = MetricsAggregator; -exports.metricsAggregatorIntegration = metricsAggregatorIntegration; -//# sourceMappingURL=integration.js.map - - -/***/ }), - -/***/ 23832: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -__nccwpck_require__(68145); -__nccwpck_require__(13955); -__nccwpck_require__(48662); -const trace = __nccwpck_require__(57795); - -/** - * key: bucketKey - * value: [exportKey, MetricSummary] - */ - -let SPAN_METRIC_SUMMARY; - -function getMetricStorageForSpan(span) { - return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : undefined; -} - -/** - * Fetches the metric summary if it exists for the passed span - */ -function getMetricSummaryJsonForSpan(span) { - const storage = getMetricStorageForSpan(span); - - if (!storage) { - return undefined; +function applyDebugIds(event, stackParser) { + const debugIdMap = GLOBAL_OBJ._sentryDebugIds; + if (!debugIdMap) { + return; } - const output = {}; - - for (const [, [exportKey, summary]] of storage) { - if (!output[exportKey]) { - output[exportKey] = []; + let debugIdStackFramesCache; + const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); + if (cachedDebugIdStackFrameCache) { + debugIdStackFramesCache = cachedDebugIdStackFrameCache; + } else { + debugIdStackFramesCache = /* @__PURE__ */ new Map(); + debugIdStackParserCache.set(stackParser, debugIdStackFramesCache); + } + const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { + let parsedStack; + const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); + if (cachedParsedStack) { + parsedStack = cachedParsedStack; + } else { + parsedStack = stackParser(debugIdStackTrace); + debugIdStackFramesCache.set(debugIdStackTrace, parsedStack); } - - output[exportKey].push(utils.dropUndefinedKeys(summary)); + for (let i = parsedStack.length - 1; i >= 0; i--) { + const stackFrame = parsedStack[i]; + if (stackFrame.filename) { + acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; + break; + } + } + return acc; + }, {}); + try { + event.exception.values.forEach((exception2) => { + exception2.stacktrace.frames.forEach((frame) => { + if (frame.filename) { + frame.debug_id = filenameDebugIdMap[frame.filename]; + } + }); + }); + } catch (e) { } - - return output; } - -/** - * Updates the metric summary on the currently active span - */ -function updateMetricSummaryOnActiveSpan( - metricType, - sanitizedName, - value, - unit, - tags, - bucketKey, -) { - const span = trace.getActiveSpan(); - if (span) { - const storage = getMetricStorageForSpan(span) || new Map(); - - const exportKey = `${metricType}:${sanitizedName}@${unit}`; - const bucketItem = storage.get(bucketKey); - - if (bucketItem) { - const [, summary] = bucketItem; - storage.set(bucketKey, [ - exportKey, - { - min: Math.min(summary.min, value), - max: Math.max(summary.max, value), - count: (summary.count += 1), - sum: (summary.sum += value), - tags: summary.tags, - }, - ]); - } else { - storage.set(bucketKey, [ - exportKey, - { - min: value, - max: value, - count: 1, - sum: value, - tags, - }, - ]); +function applyDebugMeta(event) { + const filenameDebugIdMap = {}; + try { + event.exception.values.forEach((exception2) => { + exception2.stacktrace.frames.forEach((frame) => { + if (frame.debug_id) { + if (frame.abs_path) { + filenameDebugIdMap[frame.abs_path] = frame.debug_id; + } else if (frame.filename) { + filenameDebugIdMap[frame.filename] = frame.debug_id; + } + delete frame.debug_id; + } + }); + }); + } catch (e) { + } + if (Object.keys(filenameDebugIdMap).length === 0) { + return; + } + event.debug_meta = event.debug_meta || {}; + event.debug_meta.images = event.debug_meta.images || []; + const images = event.debug_meta.images; + Object.keys(filenameDebugIdMap).forEach((filename) => { + images.push({ + type: "sourcemap", + code_file: filename, + debug_id: filenameDebugIdMap[filename] + }); + }); +} +function applyIntegrationsMetadata(event, integrationNames) { + if (integrationNames.length > 0) { + event.sdk = event.sdk || {}; + event.sdk.integrations = [...event.sdk.integrations || [], ...integrationNames]; + } +} +function normalizeEvent(event, depth, maxBreadth) { + if (!event) { + return null; + } + const normalized = { + ...event, + ...event.breadcrumbs && { + breadcrumbs: event.breadcrumbs.map((b) => ({ + ...b, + ...b.data && { + data: normalize(b.data, depth, maxBreadth) + } + })) + }, + ...event.user && { + user: normalize(event.user, depth, maxBreadth) + }, + ...event.contexts && { + contexts: normalize(event.contexts, depth, maxBreadth) + }, + ...event.extra && { + extra: normalize(event.extra, depth, maxBreadth) } - - if (!SPAN_METRIC_SUMMARY) { - SPAN_METRIC_SUMMARY = new WeakMap(); + }; + if (event.contexts && event.contexts.trace && normalized.contexts) { + normalized.contexts.trace = event.contexts.trace; + if (event.contexts.trace.data) { + normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth); } - - SPAN_METRIC_SUMMARY.set(span, storage); } + if (event.spans) { + normalized.spans = event.spans.map((span) => { + const data = spanToJSON(span).data; + if (data) { + span.data = normalize(data, depth, maxBreadth); + } + return span; + }); + } + return normalized; } - -exports.getMetricSummaryJsonForSpan = getMetricSummaryJsonForSpan; -exports.updateMetricSummaryOnActiveSpan = updateMetricSummaryOnActiveSpan; -//# sourceMappingURL=metric-summary.js.map - - -/***/ }), - -/***/ 31480: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Generate bucket key from metric properties. - */ -function getBucketKey( - metricType, - name, - unit, - tags, -) { - const stringifiedTags = Object.entries(utils.dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); - return `${metricType}${name}${unit}${stringifiedTags}`; -} - -/* eslint-disable no-bitwise */ -/** - * Simple hash function for strings. - */ -function simpleHash(s) { - let rv = 0; - for (let i = 0; i < s.length; i++) { - const c = s.charCodeAt(i); - rv = (rv << 5) - rv + c; - rv &= rv; +function getFinalScope(scope, captureContext) { + if (!captureContext) { + return scope; } - return rv >>> 0; + const finalScope = scope ? scope.clone() : new Scope(); + finalScope.update(captureContext); + return finalScope; } -/* eslint-enable no-bitwise */ - -/** - * Serialize metrics buckets into a string based on statsd format. - * - * Example of format: - * metric.name@second:1:1.2|d|#a:value,b:anothervalue|T12345677 - * Segments: - * name: metric.name - * unit: second - * value: [1, 1.2] - * type of metric: d (distribution) - * tags: { a: value, b: anothervalue } - * timestamp: 12345677 - */ -function serializeMetricBuckets(metricBucketItems) { - let out = ''; - for (const item of metricBucketItems) { - const tagEntries = Object.entries(item.tags); - const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(',')}` : ''; - out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp}\n`; +function parseEventHintOrCaptureContext(hint) { + if (!hint) { + return void 0; } - return out; + if (hintIsScopeOrFunction(hint)) { + return { captureContext: hint }; + } + if (hintIsScopeContext(hint)) { + return { + captureContext: hint + }; + } + return hint; } - -/** Sanitizes units */ -function sanitizeUnit(unit) { - return unit.replace(/[^\w]+/gi, '_'); +function hintIsScopeOrFunction(hint) { + return hint instanceof Scope || typeof hint === "function"; } +function hintIsScopeContext(hint) { + return Object.keys(hint).some((key) => captureContextKeys.includes(key)); +} +var debugIdStackParserCache, captureContextKeys; +var init_prepareEvent = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/prepareEvent.js"() { + init_esm(); + init_constants(); + init_eventProcessors(); + init_scope(); + init_applyScopeDataToEvent(); + init_spanUtils(); + debugIdStackParserCache = /* @__PURE__ */ new WeakMap(); + captureContextKeys = [ + "user", + "level", + "extra", + "contexts", + "tags", + "fingerprint", + "requestSession", + "propagationContext" + ]; + } +}); -/** Sanitizes metric keys */ -function sanitizeMetricKey(key) { - return key.replace(/[^\w\-.]+/gi, '_'); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/exports.js +function captureException(exception2, hint) { + return getCurrentHub().captureException(exception2, parseEventHintOrCaptureContext(hint)); } - -function sanitizeTagKey(key) { - return key.replace(/[^\w\-./]+/gi, ''); +function captureMessage(message, captureContext) { + const level = typeof captureContext === "string" ? captureContext : void 0; + const context = typeof captureContext !== "string" ? { captureContext } : void 0; + return getCurrentHub().captureMessage(message, level, context); } - -const tagValueReplacements = [ - ['\n', '\\n'], - ['\r', '\\r'], - ['\t', '\\t'], - ['\\', '\\\\'], - ['|', '\\u{7c}'], - [',', '\\u{2c}'], -]; - -function getCharOrReplacement(input) { - for (const [search, replacement] of tagValueReplacements) { - if (input === search) { - return replacement; +function captureEvent(event, hint) { + return getCurrentHub().captureEvent(event, hint); +} +function configureScope(callback) { + getCurrentHub().configureScope(callback); +} +function addBreadcrumb(breadcrumb, hint) { + getCurrentHub().addBreadcrumb(breadcrumb, hint); +} +function setContext(name, context) { + getCurrentHub().setContext(name, context); +} +function setExtras(extras) { + getCurrentHub().setExtras(extras); +} +function setExtra(key, extra) { + getCurrentHub().setExtra(key, extra); +} +function setTags(tags) { + getCurrentHub().setTags(tags); +} +function setTag(key, value) { + getCurrentHub().setTag(key, value); +} +function setUser(user) { + getCurrentHub().setUser(user); +} +function withScope(...rest) { + const hub = getCurrentHub(); + if (rest.length === 2) { + const [scope, callback] = rest; + if (!scope) { + return hub.withScope(callback); } + return hub.withScope(() => { + hub.getStackTop().scope = scope; + return callback(scope); + }); } - - return input; + return hub.withScope(rest[0]); } - -function sanitizeTagValue(value) { - return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ''); +function withIsolationScope(callback) { + return runWithAsyncContext(() => { + return callback(getIsolationScope()); + }); } - -/** - * Sanitizes tags. - */ -function sanitizeTags(unsanitizedTags) { - const tags = {}; - for (const key in unsanitizedTags) { - if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { - const sanitizedKey = sanitizeTagKey(key); - tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); - } +function withActiveSpan(span, callback) { + return withScope((scope) => { + scope.setSpan(span); + return callback(scope); + }); +} +function startTransaction(context, customSamplingContext) { + return getCurrentHub().startTransaction({ ...context }, customSamplingContext); +} +function captureCheckIn(checkIn, upsertMonitorConfig) { + const scope = getCurrentScope(); + const client = getClient(); + if (!client) { + DEBUG_BUILD2 && logger.warn("Cannot capture check-in. No client defined."); + } else if (!client.captureCheckIn) { + DEBUG_BUILD2 && logger.warn("Cannot capture check-in. Client does not support sending check-ins."); + } else { + return client.captureCheckIn(checkIn, upsertMonitorConfig, scope); } - return tags; + return uuid4(); } - -exports.getBucketKey = getBucketKey; -exports.sanitizeMetricKey = sanitizeMetricKey; -exports.sanitizeTags = sanitizeTags; -exports.sanitizeUnit = sanitizeUnit; -exports.serializeMetricBuckets = serializeMetricBuckets; -exports.simpleHash = simpleHash; -//# sourceMappingURL=utils.js.map - - -/***/ }), - -/***/ 8747: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const eventProcessors = __nccwpck_require__(76742); -const session = __nccwpck_require__(88939); -const applyScopeDataToEvent = __nccwpck_require__(53134); - -/** - * Default value for maximum number of breadcrumbs added to an event. - */ -const DEFAULT_MAX_BREADCRUMBS = 100; - -/** - * The global scope is kept in this module. - * When accessing this via `getGlobalScope()` we'll make sure to set one if none is currently present. - */ -let globalScope; - -/** - * Holds additional event information. {@link Scope.applyToEvent} will be - * called by the client before an event will be sent. - */ -class Scope { - /** Flag if notifying is happening. */ - - /** Callback for client to receive scope changes. */ - - /** Callback list that will be called after {@link applyToEvent}. */ - - /** Array of breadcrumbs. */ - - /** User */ - - /** Tags */ - - /** Extra */ - - /** Contexts */ - - /** Attachments */ - - /** Propagation Context for distributed tracing */ - - /** - * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get - * sent to Sentry - */ - - /** Fingerprint */ - - /** Severity */ - // eslint-disable-next-line deprecation/deprecation - - /** - * Transaction Name - */ - - /** Span */ - - /** Session */ - - /** Request Mode Session Status */ - - /** The client on this scope */ - - // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. - - constructor() { - this._notifyingListeners = false; - this._scopeListeners = []; - this._eventProcessors = []; - this._breadcrumbs = []; - this._attachments = []; - this._user = {}; - this._tags = {}; - this._extra = {}; - this._contexts = {}; - this._sdkProcessingMetadata = {}; - this._propagationContext = generatePropagationContext(); +function withMonitor(monitorSlug, callback, upsertMonitorConfig) { + const checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig); + const now = timestampInSeconds(); + function finishCheckIn(status) { + captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now }); } - - /** - * Inherit values from the parent scope. - * @deprecated Use `scope.clone()` and `new Scope()` instead. - */ - static clone(scope) { - return scope ? scope.clone() : new Scope(); + let maybePromiseResult; + try { + maybePromiseResult = callback(); + } catch (e) { + finishCheckIn("error"); + throw e; } - - /** - * Clone this scope instance. - */ - clone() { - const newScope = new Scope(); - newScope._breadcrumbs = [...this._breadcrumbs]; - newScope._tags = { ...this._tags }; - newScope._extra = { ...this._extra }; - newScope._contexts = { ...this._contexts }; - newScope._user = this._user; - newScope._level = this._level; - newScope._span = this._span; - newScope._session = this._session; - newScope._transactionName = this._transactionName; - newScope._fingerprint = this._fingerprint; - newScope._eventProcessors = [...this._eventProcessors]; - newScope._requestSession = this._requestSession; - newScope._attachments = [...this._attachments]; - newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }; - newScope._propagationContext = { ...this._propagationContext }; - newScope._client = this._client; - - return newScope; + if (isThenable(maybePromiseResult)) { + Promise.resolve(maybePromiseResult).then( + () => { + finishCheckIn("ok"); + }, + () => { + finishCheckIn("error"); + } + ); + } else { + finishCheckIn("ok"); } - - /** Update the client on the scope. */ - setClient(client) { - this._client = client; + return maybePromiseResult; +} +async function flush(timeout) { + const client = getClient(); + if (client) { + return client.flush(timeout); } - - /** - * Get the client assigned to this scope. - * - * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing. - */ - getClient() { - return this._client; + DEBUG_BUILD2 && logger.warn("Cannot flush events. No client defined."); + return Promise.resolve(false); +} +async function close(timeout) { + const client = getClient(); + if (client) { + return client.close(timeout); } - - /** - * Add internal on change listener. Used for sub SDKs that need to store the scope. - * @hidden - */ - addScopeListener(callback) { - this._scopeListeners.push(callback); + DEBUG_BUILD2 && logger.warn("Cannot flush events and disable SDK. No client defined."); + return Promise.resolve(false); +} +function lastEventId() { + return getCurrentHub().lastEventId(); +} +function getClient() { + return getCurrentHub().getClient(); +} +function isInitialized() { + return !!getClient(); +} +function getCurrentScope() { + return getCurrentHub().getScope(); +} +function startSession(context) { + const client = getClient(); + const isolationScope = getIsolationScope(); + const currentScope = getCurrentScope(); + const { release: release2, environment = DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}; + const { userAgent: userAgent2 } = GLOBAL_OBJ.navigator || {}; + const session = makeSession({ + release: release2, + environment, + user: currentScope.getUser() || isolationScope.getUser(), + ...userAgent2 && { userAgent: userAgent2 }, + ...context + }); + const currentSession = isolationScope.getSession(); + if (currentSession && currentSession.status === "ok") { + updateSession(currentSession, { status: "exited" }); } - - /** - * @inheritDoc - */ - addEventProcessor(callback) { - this._eventProcessors.push(callback); - return this; - } - - /** - * @inheritDoc - */ - setUser(user) { - // If null is passed we want to unset everything, but still define keys, - // so that later down in the pipeline any existing values are cleared. - this._user = user || { - email: undefined, - id: undefined, - ip_address: undefined, - segment: undefined, - username: undefined, - }; - - if (this._session) { - session.updateSession(this._session, { user }); - } - - this._notifyScopeListeners(); - return this; - } - - /** - * @inheritDoc - */ - getUser() { - return this._user; - } - - /** - * @inheritDoc - */ - getRequestSession() { - return this._requestSession; - } - - /** - * @inheritDoc - */ - setRequestSession(requestSession) { - this._requestSession = requestSession; - return this; - } - - /** - * @inheritDoc - */ - setTags(tags) { - this._tags = { - ...this._tags, - ...tags, - }; - this._notifyScopeListeners(); - return this; - } - - /** - * @inheritDoc - */ - setTag(key, value) { - this._tags = { ...this._tags, [key]: value }; - this._notifyScopeListeners(); - return this; + endSession(); + isolationScope.setSession(session); + currentScope.setSession(session); + return session; +} +function endSession() { + const isolationScope = getIsolationScope(); + const currentScope = getCurrentScope(); + const session = currentScope.getSession() || isolationScope.getSession(); + if (session) { + closeSession(session); } - - /** - * @inheritDoc - */ - setExtras(extras) { - this._extra = { - ...this._extra, - ...extras, - }; - this._notifyScopeListeners(); - return this; - } - - /** - * @inheritDoc - */ - setExtra(key, extra) { - this._extra = { ...this._extra, [key]: extra }; - this._notifyScopeListeners(); - return this; + _sendSessionUpdate(); + isolationScope.setSession(); + currentScope.setSession(); +} +function _sendSessionUpdate() { + const isolationScope = getIsolationScope(); + const currentScope = getCurrentScope(); + const client = getClient(); + const session = currentScope.getSession() || isolationScope.getSession(); + if (session && client && client.captureSession) { + client.captureSession(session); } - - /** - * @inheritDoc - */ - setFingerprint(fingerprint) { - this._fingerprint = fingerprint; - this._notifyScopeListeners(); - return this; +} +function captureSession(end2 = false) { + if (end2) { + endSession(); + return; } - - /** - * @inheritDoc - */ - setLevel( - // eslint-disable-next-line deprecation/deprecation - level, - ) { - this._level = level; - this._notifyScopeListeners(); - return this; - } - - /** - * Sets the transaction name on the scope for future events. - */ - setTransactionName(name) { - this._transactionName = name; - this._notifyScopeListeners(); - return this; - } - - /** - * @inheritDoc - */ - setContext(key, context) { - if (context === null) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this._contexts[key]; - } else { - this._contexts[key] = context; - } - - this._notifyScopeListeners(); - return this; - } - - /** - * Sets the Span on the scope. - * @param span Span - * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead. - */ - setSpan(span) { - this._span = span; - this._notifyScopeListeners(); - return this; - } - - /** - * Returns the `Span` if there is one. - * @deprecated Use `getActiveSpan()` instead. - */ - getSpan() { - return this._span; - } - - /** - * Returns the `Transaction` attached to the scope (if there is one). - * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead. - */ - getTransaction() { - // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will - // have a pointer to the currently-active transaction. - const span = this._span; - // Cannot replace with getRootSpan because getRootSpan returns a span, not a transaction - // Also, this method will be removed anyway. - // eslint-disable-next-line deprecation/deprecation - return span && span.transaction; + _sendSessionUpdate(); +} +var init_exports = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/exports.js"() { + init_esm(); + init_constants(); + init_debug_build2(); + init_hub(); + init_session(); + init_prepareEvent(); } +}); - /** - * @inheritDoc - */ - setSession(session) { - if (!session) { - delete this._session; - } else { - this._session = session; - } - this._notifyScopeListeners(); - return this; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/getRootSpan.js +function getRootSpan(span) { + return span.transaction; +} +var init_getRootSpan = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/getRootSpan.js"() { } +}); - /** - * @inheritDoc - */ - getSession() { - return this._session; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js +function getDynamicSamplingContextFromClient(trace_id, client, scope) { + const options2 = client.getOptions(); + const { publicKey: public_key } = client.getDsn() || {}; + const { segment: user_segment } = scope && scope.getUser() || {}; + const dsc = dropUndefinedKeys({ + environment: options2.environment || DEFAULT_ENVIRONMENT, + release: options2.release, + user_segment, + public_key, + trace_id + }); + client.emit && client.emit("createDsc", dsc); + return dsc; +} +function getDynamicSamplingContextFromSpan(span) { + const client = getClient(); + if (!client) { + return {}; } - - /** - * @inheritDoc - */ - update(captureContext) { - if (!captureContext) { - return this; - } - - const scopeToMerge = typeof captureContext === 'function' ? captureContext(this) : captureContext; - - if (scopeToMerge instanceof Scope) { - const scopeData = scopeToMerge.getScopeData(); - - this._tags = { ...this._tags, ...scopeData.tags }; - this._extra = { ...this._extra, ...scopeData.extra }; - this._contexts = { ...this._contexts, ...scopeData.contexts }; - if (scopeData.user && Object.keys(scopeData.user).length) { - this._user = scopeData.user; - } - if (scopeData.level) { - this._level = scopeData.level; - } - if (scopeData.fingerprint.length) { - this._fingerprint = scopeData.fingerprint; - } - if (scopeToMerge.getRequestSession()) { - this._requestSession = scopeToMerge.getRequestSession(); - } - if (scopeData.propagationContext) { - this._propagationContext = scopeData.propagationContext; - } - } else if (utils.isPlainObject(scopeToMerge)) { - const scopeContext = captureContext ; - this._tags = { ...this._tags, ...scopeContext.tags }; - this._extra = { ...this._extra, ...scopeContext.extra }; - this._contexts = { ...this._contexts, ...scopeContext.contexts }; - if (scopeContext.user) { - this._user = scopeContext.user; - } - if (scopeContext.level) { - this._level = scopeContext.level; - } - if (scopeContext.fingerprint) { - this._fingerprint = scopeContext.fingerprint; - } - if (scopeContext.requestSession) { - this._requestSession = scopeContext.requestSession; - } - if (scopeContext.propagationContext) { - this._propagationContext = scopeContext.propagationContext; - } - } - - return this; + const dsc = getDynamicSamplingContextFromClient(spanToJSON(span).trace_id || "", client, getCurrentScope()); + const txn = getRootSpan(span); + if (!txn) { + return dsc; } - - /** - * @inheritDoc - */ - clear() { - this._breadcrumbs = []; - this._tags = {}; - this._extra = {}; - this._user = {}; - this._contexts = {}; - this._level = undefined; - this._transactionName = undefined; - this._fingerprint = undefined; - this._requestSession = undefined; - this._span = undefined; - this._session = undefined; - this._notifyScopeListeners(); - this._attachments = []; - this._propagationContext = generatePropagationContext(); - return this; + const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext; + if (v7FrozenDsc) { + return v7FrozenDsc; } - - /** - * @inheritDoc - */ - addBreadcrumb(breadcrumb, maxBreadcrumbs) { - const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; - - // No data has been changed, so don't notify scope listeners - if (maxCrumbs <= 0) { - return this; - } - - const mergedBreadcrumb = { - timestamp: utils.dateTimestampInSeconds(), - ...breadcrumb, - }; - - const breadcrumbs = this._breadcrumbs; - breadcrumbs.push(mergedBreadcrumb); - this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs; - - this._notifyScopeListeners(); - - return this; + const { sampleRate: maybeSampleRate, source } = txn.metadata; + if (maybeSampleRate != null) { + dsc.sample_rate = `${maybeSampleRate}`; } - - /** - * @inheritDoc - */ - getLastBreadcrumb() { - return this._breadcrumbs[this._breadcrumbs.length - 1]; + const jsonSpan = spanToJSON(txn); + if (source && source !== "url") { + dsc.transaction = jsonSpan.description; } - - /** - * @inheritDoc - */ - clearBreadcrumbs() { - this._breadcrumbs = []; - this._notifyScopeListeners(); - return this; + dsc.sampled = String(spanIsSampled(txn)); + client.emit && client.emit("createDsc", dsc); + return dsc; +} +var init_dynamicSamplingContext = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js"() { + init_esm(); + init_constants(); + init_exports(); + init_getRootSpan(); + init_spanUtils(); } +}); - /** - * @inheritDoc - */ - addAttachment(attachment) { - this._attachments.push(attachment); - return this; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js +function applyScopeDataToEvent(event, data) { + const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; + applyDataToEvent(event, data); + if (span) { + applySpanToEvent(event, span); } - - /** - * @inheritDoc - * @deprecated Use `getScopeData()` instead. - */ - getAttachments() { - const data = this.getScopeData(); - - return data.attachments; + applyFingerprintToEvent(event, fingerprint); + applyBreadcrumbsToEvent(event, breadcrumbs); + applySdkMetadataToEvent(event, sdkProcessingMetadata); +} +function mergeScopeData(data, mergeData) { + const { + extra, + tags, + user, + contexts, + level, + sdkProcessingMetadata, + breadcrumbs, + fingerprint, + eventProcessors, + attachments, + propagationContext, + // eslint-disable-next-line deprecation/deprecation + transactionName, + span + } = mergeData; + mergeAndOverwriteScopeData(data, "extra", extra); + mergeAndOverwriteScopeData(data, "tags", tags); + mergeAndOverwriteScopeData(data, "user", user); + mergeAndOverwriteScopeData(data, "contexts", contexts); + mergeAndOverwriteScopeData(data, "sdkProcessingMetadata", sdkProcessingMetadata); + if (level) { + data.level = level; } - - /** - * @inheritDoc - */ - clearAttachments() { - this._attachments = []; - return this; + if (transactionName) { + data.transactionName = transactionName; } - - /** @inheritDoc */ - getScopeData() { - const { - _breadcrumbs, - _attachments, - _contexts, - _tags, - _extra, - _user, - _level, - _fingerprint, - _eventProcessors, - _propagationContext, - _sdkProcessingMetadata, - _transactionName, - _span, - } = this; - - return { - breadcrumbs: _breadcrumbs, - attachments: _attachments, - contexts: _contexts, - tags: _tags, - extra: _extra, - user: _user, - level: _level, - fingerprint: _fingerprint || [], - eventProcessors: _eventProcessors, - propagationContext: _propagationContext, - sdkProcessingMetadata: _sdkProcessingMetadata, - transactionName: _transactionName, - span: _span, - }; - } - - /** - * Applies data from the scope to the event and runs all event processors on it. - * - * @param event Event - * @param hint Object containing additional information about the original exception, for use by the event processors. - * @hidden - * @deprecated Use `applyScopeDataToEvent()` directly - */ - applyToEvent( - event, - hint = {}, - additionalEventProcessors = [], - ) { - applyScopeDataToEvent.applyScopeDataToEvent(event, this.getScopeData()); - - // TODO (v8): Update this order to be: Global > Client > Scope - const eventProcessors$1 = [ - ...additionalEventProcessors, - // eslint-disable-next-line deprecation/deprecation - ...eventProcessors.getGlobalEventProcessors(), - ...this._eventProcessors, - ]; - - return eventProcessors.notifyEventProcessors(eventProcessors$1, event, hint); + if (span) { + data.span = span; } - - /** - * Add data which will be accessible during event processing but won't get sent to Sentry - */ - setSDKProcessingMetadata(newData) { - this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }; - - return this; + if (breadcrumbs.length) { + data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]; } - - /** - * @inheritDoc - */ - setPropagationContext(context) { - this._propagationContext = context; - return this; + if (fingerprint.length) { + data.fingerprint = [...data.fingerprint, ...fingerprint]; } - - /** - * @inheritDoc - */ - getPropagationContext() { - return this._propagationContext; + if (eventProcessors.length) { + data.eventProcessors = [...data.eventProcessors, ...eventProcessors]; } - - /** - * Capture an exception for this scope. - * - * @param exception The exception to capture. - * @param hint Optinal additional data to attach to the Sentry event. - * @returns the id of the captured Sentry event. - */ - captureException(exception, hint) { - const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); - - if (!this._client) { - utils.logger.warn('No client configured on scope - will not capture exception!'); - return eventId; - } - - const syntheticException = new Error('Sentry syntheticException'); - - this._client.captureException( - exception, - { - originalException: exception, - syntheticException, - ...hint, - event_id: eventId, - }, - this, - ); - - return eventId; + if (attachments.length) { + data.attachments = [...data.attachments, ...attachments]; } - - /** - * Capture a message for this scope. - * - * @param message The message to capture. - * @param level An optional severity level to report the message with. - * @param hint Optional additional data to attach to the Sentry event. - * @returns the id of the captured message. - */ - captureMessage(message, level, hint) { - const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); - - if (!this._client) { - utils.logger.warn('No client configured on scope - will not capture message!'); - return eventId; + data.propagationContext = { ...data.propagationContext, ...propagationContext }; +} +function mergeAndOverwriteScopeData(data, prop, mergeVal) { + if (mergeVal && Object.keys(mergeVal).length) { + data[prop] = { ...data[prop] }; + for (const key in mergeVal) { + if (Object.prototype.hasOwnProperty.call(mergeVal, key)) { + data[prop][key] = mergeVal[key]; + } } - - const syntheticException = new Error(message); - - this._client.captureMessage( - message, - level, - { - originalException: message, - syntheticException, - ...hint, - event_id: eventId, - }, - this, - ); - - return eventId; } - - /** - * Captures a manually created event for this scope and sends it to Sentry. - * - * @param exception The event to capture. - * @param hint Optional additional data to attach to the Sentry event. - * @returns the id of the captured event. - */ - captureEvent(event, hint) { - const eventId = hint && hint.event_id ? hint.event_id : utils.uuid4(); - - if (!this._client) { - utils.logger.warn('No client configured on scope - will not capture event!'); - return eventId; - } - - this._client.captureEvent(event, { ...hint, event_id: eventId }, this); - - return eventId; +} +function applyDataToEvent(event, data) { + const { + extra, + tags, + user, + contexts, + level, + // eslint-disable-next-line deprecation/deprecation + transactionName + } = data; + const cleanedExtra = dropUndefinedKeys(extra); + if (cleanedExtra && Object.keys(cleanedExtra).length) { + event.extra = { ...cleanedExtra, ...event.extra }; } - - /** - * This will be called on every set call. - */ - _notifyScopeListeners() { - // We need this check for this._notifyingListeners to be able to work on scope during updates - // If this check is not here we'll produce endless recursion when something is done with the scope - // during the callback. - if (!this._notifyingListeners) { - this._notifyingListeners = true; - this._scopeListeners.forEach(callback => { - callback(this); - }); - this._notifyingListeners = false; + const cleanedTags = dropUndefinedKeys(tags); + if (cleanedTags && Object.keys(cleanedTags).length) { + event.tags = { ...cleanedTags, ...event.tags }; + } + const cleanedUser = dropUndefinedKeys(user); + if (cleanedUser && Object.keys(cleanedUser).length) { + event.user = { ...cleanedUser, ...event.user }; + } + const cleanedContexts = dropUndefinedKeys(contexts); + if (cleanedContexts && Object.keys(cleanedContexts).length) { + event.contexts = { ...cleanedContexts, ...event.contexts }; + } + if (level) { + event.level = level; + } + if (transactionName) { + event.transaction = transactionName; + } +} +function applyBreadcrumbsToEvent(event, breadcrumbs) { + const mergedBreadcrumbs = [...event.breadcrumbs || [], ...breadcrumbs]; + event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : void 0; +} +function applySdkMetadataToEvent(event, sdkProcessingMetadata) { + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + ...sdkProcessingMetadata + }; +} +function applySpanToEvent(event, span) { + event.contexts = { trace: spanToTraceContext(span), ...event.contexts }; + const rootSpan = getRootSpan(span); + if (rootSpan) { + event.sdkProcessingMetadata = { + dynamicSamplingContext: getDynamicSamplingContextFromSpan(span), + ...event.sdkProcessingMetadata + }; + const transactionName = spanToJSON(rootSpan).description; + if (transactionName) { + event.tags = { transaction: transactionName, ...event.tags }; } } } +function applyFingerprintToEvent(event, fingerprint) { + event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : []; + if (fingerprint) { + event.fingerprint = event.fingerprint.concat(fingerprint); + } + if (event.fingerprint && !event.fingerprint.length) { + delete event.fingerprint; + } +} +var init_applyScopeDataToEvent = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/applyScopeDataToEvent.js"() { + init_esm(); + init_dynamicSamplingContext(); + init_getRootSpan(); + init_spanUtils(); + } +}); -/** - * Get the global scope. - * This scope is applied to _all_ events. - */ +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/scope.js function getGlobalScope() { if (!globalScope) { globalScope = new Scope(); } - return globalScope; } - -/** - * This is mainly needed for tests. - * DO NOT USE this, as this is an internal API and subject to change. - * @hidden - */ -function setGlobalScope(scope) { - globalScope = scope; -} - function generatePropagationContext() { return { - traceId: utils.uuid4(), - spanId: utils.uuid4().substring(16), + traceId: uuid4(), + spanId: uuid4().substring(16) }; } - -exports.Scope = Scope; -exports.getGlobalScope = getGlobalScope; -exports.setGlobalScope = setGlobalScope; -//# sourceMappingURL=scope.js.map - - -/***/ }), - -/***/ 72259: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const exports$1 = __nccwpck_require__(78820); -const hub = __nccwpck_require__(54724); - -/** A class object that can instantiate Client objects. */ - -/** - * Internal function to create a new SDK client instance. The client is - * installed and then bound to the current scope. - * - * @param clientClass The client class to instantiate. - * @param options Options to pass to the client. - */ -function initAndBind( - clientClass, - options, -) { - if (options.debug === true) { - if (debugBuild.DEBUG_BUILD) { - utils.logger.enable(); - } else { - // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped - utils.consoleSandbox(() => { - // eslint-disable-next-line no-console - console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.'); - }); - } - } - const scope = exports$1.getCurrentScope(); - scope.update(options.initialScope); - - const client = new clientClass(options); - setCurrentClient(client); - initializeClient(client); -} - -/** - * Make the given client the current client. - */ -function setCurrentClient(client) { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation - const top = hub$1.getStackTop(); - top.client = client; - top.scope.setClient(client); -} - -/** - * Initialize the client for the current scope. - * Make sure to call this after `setCurrentClient()`. - */ -function initializeClient(client) { - if (client.init) { - client.init(); - // TODO v8: Remove this fallback - // eslint-disable-next-line deprecation/deprecation - } else if (client.setupIntegrations) { - // eslint-disable-next-line deprecation/deprecation - client.setupIntegrations(); - } -} - -exports.initAndBind = initAndBind; -exports.setCurrentClient = setCurrentClient; -//# sourceMappingURL=sdk.js.map - - -/***/ }), - -/***/ 35366: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Use this attribute to represent the source of a span. - * Should be one of: custom, url, route, view, component, task, unknown - * - */ -const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = 'sentry.source'; - -/** - * Use this attribute to represent the sample rate used for a span. - */ -const SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = 'sentry.sample_rate'; - -/** - * Use this attribute to represent the operation of a span. - */ -const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op'; - -/** - * Use this attribute to represent the origin of a span. - */ -const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin'; - -/** - * The id of the profile that this span occured in. - */ -const SEMANTIC_ATTRIBUTE_PROFILE_ID = 'profile_id'; - -exports.SEMANTIC_ATTRIBUTE_PROFILE_ID = SEMANTIC_ATTRIBUTE_PROFILE_ID; -exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = SEMANTIC_ATTRIBUTE_SENTRY_OP; -exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; -//# sourceMappingURL=semanticAttributes.js.map - - -/***/ }), - -/***/ 71833: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const baseclient = __nccwpck_require__(38009); -const checkin = __nccwpck_require__(6036); -const debugBuild = __nccwpck_require__(68145); -const exports$1 = __nccwpck_require__(78820); -const aggregator = __nccwpck_require__(25620); -const sessionflusher = __nccwpck_require__(33190); -const hubextensions = __nccwpck_require__(723); -const spanUtils = __nccwpck_require__(59152); -const getRootSpan = __nccwpck_require__(23665); -__nccwpck_require__(48662); -const dynamicSamplingContext = __nccwpck_require__(18359); - -/** - * The Sentry Server Runtime Client SDK. - */ -class ServerRuntimeClient - - extends baseclient.BaseClient { - - /** - * Creates a new Edge SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options) { - // Server clients always support tracing - hubextensions.addTracingExtensions(); - - super(options); - - if (options._experiments && options._experiments['metricsAggregator']) { - this.metricsAggregator = new aggregator.MetricsAggregator(this); - } - } - - /** - * @inheritDoc - */ - eventFromException(exception, hint) { - return utils.resolvedSyncPromise(utils.eventFromUnknownInput(exports$1.getClient(), this._options.stackParser, exception, hint)); - } - - /** - * @inheritDoc - */ - eventFromMessage( - message, - // eslint-disable-next-line deprecation/deprecation - level = 'info', - hint, - ) { - return utils.resolvedSyncPromise( - utils.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace), - ); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types - captureException(exception, hint, scope) { - // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only - // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload - // sent to the Server only when the `requestHandler` middleware is used - if (this._options.autoSessionTracking && this._sessionFlusher && scope) { - const requestSession = scope.getRequestSession(); - - // Necessary checks to ensure this is code block is executed only within a request - // Should override the status only if `requestSession.status` is `Ok`, which is its initial stage - if (requestSession && requestSession.status === 'ok') { - requestSession.status = 'errored'; +var DEFAULT_MAX_BREADCRUMBS, globalScope, Scope; +var init_scope = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/scope.js"() { + init_esm(); + init_eventProcessors(); + init_session(); + init_applyScopeDataToEvent(); + DEFAULT_MAX_BREADCRUMBS = 100; + Scope = class _Scope { + /** Flag if notifying is happening. */ + /** Callback for client to receive scope changes. */ + /** Callback list that will be called after {@link applyToEvent}. */ + /** Array of breadcrumbs. */ + /** User */ + /** Tags */ + /** Extra */ + /** Contexts */ + /** Attachments */ + /** Propagation Context for distributed tracing */ + /** + * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get + * sent to Sentry + */ + /** Fingerprint */ + /** Severity */ + // eslint-disable-next-line deprecation/deprecation + /** + * Transaction Name + */ + /** Span */ + /** Session */ + /** Request Mode Session Status */ + /** The client on this scope */ + // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method. + constructor() { + this._notifyingListeners = false; + this._scopeListeners = []; + this._eventProcessors = []; + this._breadcrumbs = []; + this._attachments = []; + this._user = {}; + this._tags = {}; + this._extra = {}; + this._contexts = {}; + this._sdkProcessingMetadata = {}; + this._propagationContext = generatePropagationContext(); } - } - - return super.captureException(exception, hint, scope); - } - - /** - * @inheritDoc - */ - captureEvent(event, hint, scope) { - // Check if the flag `autoSessionTracking` is enabled, and if `_sessionFlusher` exists because it is initialised only - // when the `requestHandler` middleware is used, and hence the expectation is to have SessionAggregates payload - // sent to the Server only when the `requestHandler` middleware is used - if (this._options.autoSessionTracking && this._sessionFlusher && scope) { - const eventType = event.type || 'exception'; - const isException = - eventType === 'exception' && event.exception && event.exception.values && event.exception.values.length > 0; - - // If the event is of type Exception, then a request session should be captured - if (isException) { - const requestSession = scope.getRequestSession(); - - // Ensure that this is happening within the bounds of a request, and make sure not to override - // Session Status if Errored / Crashed - if (requestSession && requestSession.status === 'ok') { - requestSession.status = 'errored'; + /** + * Inherit values from the parent scope. + * @deprecated Use `scope.clone()` and `new Scope()` instead. + */ + static clone(scope) { + return scope ? scope.clone() : new _Scope(); + } + /** + * Clone this scope instance. + */ + clone() { + const newScope = new _Scope(); + newScope._breadcrumbs = [...this._breadcrumbs]; + newScope._tags = { ...this._tags }; + newScope._extra = { ...this._extra }; + newScope._contexts = { ...this._contexts }; + newScope._user = this._user; + newScope._level = this._level; + newScope._span = this._span; + newScope._session = this._session; + newScope._transactionName = this._transactionName; + newScope._fingerprint = this._fingerprint; + newScope._eventProcessors = [...this._eventProcessors]; + newScope._requestSession = this._requestSession; + newScope._attachments = [...this._attachments]; + newScope._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }; + newScope._propagationContext = { ...this._propagationContext }; + newScope._client = this._client; + return newScope; + } + /** Update the client on the scope. */ + setClient(client) { + this._client = client; + } + /** + * Get the client assigned to this scope. + * + * It is generally recommended to use the global function `Sentry.getClient()` instead, unless you know what you are doing. + */ + getClient() { + return this._client; + } + /** + * Add internal on change listener. Used for sub SDKs that need to store the scope. + * @hidden + */ + addScopeListener(callback) { + this._scopeListeners.push(callback); + } + /** + * @inheritDoc + */ + addEventProcessor(callback) { + this._eventProcessors.push(callback); + return this; + } + /** + * @inheritDoc + */ + setUser(user) { + this._user = user || { + email: void 0, + id: void 0, + ip_address: void 0, + segment: void 0, + username: void 0 + }; + if (this._session) { + updateSession(this._session, { user }); + } + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + getUser() { + return this._user; + } + /** + * @inheritDoc + */ + getRequestSession() { + return this._requestSession; + } + /** + * @inheritDoc + */ + setRequestSession(requestSession) { + this._requestSession = requestSession; + return this; + } + /** + * @inheritDoc + */ + setTags(tags) { + this._tags = { + ...this._tags, + ...tags + }; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setTag(key, value) { + this._tags = { ...this._tags, [key]: value }; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setExtras(extras) { + this._extra = { + ...this._extra, + ...extras + }; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setExtra(key, extra) { + this._extra = { ...this._extra, [key]: extra }; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setFingerprint(fingerprint) { + this._fingerprint = fingerprint; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setLevel(level) { + this._level = level; + this._notifyScopeListeners(); + return this; + } + /** + * Sets the transaction name on the scope for future events. + */ + setTransactionName(name) { + this._transactionName = name; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + setContext(key, context) { + if (context === null) { + delete this._contexts[key]; + } else { + this._contexts[key] = context; + } + this._notifyScopeListeners(); + return this; + } + /** + * Sets the Span on the scope. + * @param span Span + * @deprecated Instead of setting a span on a scope, use `startSpan()`/`startSpanManual()` instead. + */ + setSpan(span) { + this._span = span; + this._notifyScopeListeners(); + return this; + } + /** + * Returns the `Span` if there is one. + * @deprecated Use `getActiveSpan()` instead. + */ + getSpan() { + return this._span; + } + /** + * Returns the `Transaction` attached to the scope (if there is one). + * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead. + */ + getTransaction() { + const span = this._span; + return span && span.transaction; + } + /** + * @inheritDoc + */ + setSession(session) { + if (!session) { + delete this._session; + } else { + this._session = session; + } + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + getSession() { + return this._session; + } + /** + * @inheritDoc + */ + update(captureContext) { + if (!captureContext) { + return this; + } + const scopeToMerge = typeof captureContext === "function" ? captureContext(this) : captureContext; + if (scopeToMerge instanceof _Scope) { + const scopeData = scopeToMerge.getScopeData(); + this._tags = { ...this._tags, ...scopeData.tags }; + this._extra = { ...this._extra, ...scopeData.extra }; + this._contexts = { ...this._contexts, ...scopeData.contexts }; + if (scopeData.user && Object.keys(scopeData.user).length) { + this._user = scopeData.user; + } + if (scopeData.level) { + this._level = scopeData.level; + } + if (scopeData.fingerprint.length) { + this._fingerprint = scopeData.fingerprint; + } + if (scopeToMerge.getRequestSession()) { + this._requestSession = scopeToMerge.getRequestSession(); + } + if (scopeData.propagationContext) { + this._propagationContext = scopeData.propagationContext; + } + } else if (isPlainObject(scopeToMerge)) { + const scopeContext = captureContext; + this._tags = { ...this._tags, ...scopeContext.tags }; + this._extra = { ...this._extra, ...scopeContext.extra }; + this._contexts = { ...this._contexts, ...scopeContext.contexts }; + if (scopeContext.user) { + this._user = scopeContext.user; + } + if (scopeContext.level) { + this._level = scopeContext.level; + } + if (scopeContext.fingerprint) { + this._fingerprint = scopeContext.fingerprint; + } + if (scopeContext.requestSession) { + this._requestSession = scopeContext.requestSession; + } + if (scopeContext.propagationContext) { + this._propagationContext = scopeContext.propagationContext; + } + } + return this; + } + /** + * @inheritDoc + */ + clear() { + this._breadcrumbs = []; + this._tags = {}; + this._extra = {}; + this._user = {}; + this._contexts = {}; + this._level = void 0; + this._transactionName = void 0; + this._fingerprint = void 0; + this._requestSession = void 0; + this._span = void 0; + this._session = void 0; + this._notifyScopeListeners(); + this._attachments = []; + this._propagationContext = generatePropagationContext(); + return this; + } + /** + * @inheritDoc + */ + addBreadcrumb(breadcrumb, maxBreadcrumbs) { + const maxCrumbs = typeof maxBreadcrumbs === "number" ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS; + if (maxCrumbs <= 0) { + return this; + } + const mergedBreadcrumb = { + timestamp: dateTimestampInSeconds(), + ...breadcrumb + }; + const breadcrumbs = this._breadcrumbs; + breadcrumbs.push(mergedBreadcrumb); + this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + getLastBreadcrumb() { + return this._breadcrumbs[this._breadcrumbs.length - 1]; + } + /** + * @inheritDoc + */ + clearBreadcrumbs() { + this._breadcrumbs = []; + this._notifyScopeListeners(); + return this; + } + /** + * @inheritDoc + */ + addAttachment(attachment) { + this._attachments.push(attachment); + return this; + } + /** + * @inheritDoc + * @deprecated Use `getScopeData()` instead. + */ + getAttachments() { + const data = this.getScopeData(); + return data.attachments; + } + /** + * @inheritDoc + */ + clearAttachments() { + this._attachments = []; + return this; + } + /** @inheritDoc */ + getScopeData() { + const { + _breadcrumbs, + _attachments, + _contexts, + _tags, + _extra, + _user, + _level, + _fingerprint, + _eventProcessors, + _propagationContext, + _sdkProcessingMetadata, + _transactionName, + _span + } = this; + return { + breadcrumbs: _breadcrumbs, + attachments: _attachments, + contexts: _contexts, + tags: _tags, + extra: _extra, + user: _user, + level: _level, + fingerprint: _fingerprint || [], + eventProcessors: _eventProcessors, + propagationContext: _propagationContext, + sdkProcessingMetadata: _sdkProcessingMetadata, + transactionName: _transactionName, + span: _span + }; + } + /** + * Applies data from the scope to the event and runs all event processors on it. + * + * @param event Event + * @param hint Object containing additional information about the original exception, for use by the event processors. + * @hidden + * @deprecated Use `applyScopeDataToEvent()` directly + */ + applyToEvent(event, hint = {}, additionalEventProcessors = []) { + applyScopeDataToEvent(event, this.getScopeData()); + const eventProcessors = [ + ...additionalEventProcessors, + // eslint-disable-next-line deprecation/deprecation + ...getGlobalEventProcessors(), + ...this._eventProcessors + ]; + return notifyEventProcessors(eventProcessors, event, hint); + } + /** + * Add data which will be accessible during event processing but won't get sent to Sentry + */ + setSDKProcessingMetadata(newData) { + this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData }; + return this; + } + /** + * @inheritDoc + */ + setPropagationContext(context) { + this._propagationContext = context; + return this; + } + /** + * @inheritDoc + */ + getPropagationContext() { + return this._propagationContext; + } + /** + * Capture an exception for this scope. + * + * @param exception The exception to capture. + * @param hint Optinal additional data to attach to the Sentry event. + * @returns the id of the captured Sentry event. + */ + captureException(exception2, hint) { + const eventId = hint && hint.event_id ? hint.event_id : uuid4(); + if (!this._client) { + logger.warn("No client configured on scope - will not capture exception!"); + return eventId; + } + const syntheticException = new Error("Sentry syntheticException"); + this._client.captureException( + exception2, + { + originalException: exception2, + syntheticException, + ...hint, + event_id: eventId + }, + this + ); + return eventId; + } + /** + * Capture a message for this scope. + * + * @param message The message to capture. + * @param level An optional severity level to report the message with. + * @param hint Optional additional data to attach to the Sentry event. + * @returns the id of the captured message. + */ + captureMessage(message, level, hint) { + const eventId = hint && hint.event_id ? hint.event_id : uuid4(); + if (!this._client) { + logger.warn("No client configured on scope - will not capture message!"); + return eventId; + } + const syntheticException = new Error(message); + this._client.captureMessage( + message, + level, + { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }, + this + ); + return eventId; + } + /** + * Captures a manually created event for this scope and sends it to Sentry. + * + * @param exception The event to capture. + * @param hint Optional additional data to attach to the Sentry event. + * @returns the id of the captured event. + */ + captureEvent(event, hint) { + const eventId = hint && hint.event_id ? hint.event_id : uuid4(); + if (!this._client) { + logger.warn("No client configured on scope - will not capture event!"); + return eventId; + } + this._client.captureEvent(event, { ...hint, event_id: eventId }, this); + return eventId; + } + /** + * This will be called on every set call. + */ + _notifyScopeListeners() { + if (!this._notifyingListeners) { + this._notifyingListeners = true; + this._scopeListeners.forEach((callback) => { + callback(this); + }); + this._notifyingListeners = false; } } - } - - return super.captureEvent(event, hint, scope); - } - - /** - * - * @inheritdoc - */ - close(timeout) { - if (this._sessionFlusher) { - this._sessionFlusher.close(); - } - return super.close(timeout); - } - - /** Method that initialises an instance of SessionFlusher on Client */ - initSessionFlusher() { - const { release, environment } = this._options; - if (!release) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Cannot initialise an instance of SessionFlusher if no release is provided!'); - } else { - this._sessionFlusher = new sessionflusher.SessionFlusher(this, { - release, - environment, - }); - } - } - - /** - * Create a cron monitor check in and send it to Sentry. - * - * @param checkIn An object that describes a check in. - * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want - * to create a monitor automatically when sending a check in. - */ - captureCheckIn(checkIn, monitorConfig, scope) { - const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : utils.uuid4(); - if (!this._isEnabled()) { - debugBuild.DEBUG_BUILD && utils.logger.warn('SDK not enabled, will not capture checkin.'); - return id; - } - - const options = this.getOptions(); - const { release, environment, tunnel } = options; - - const serializedCheckIn = { - check_in_id: id, - monitor_slug: checkIn.monitorSlug, - status: checkIn.status, - release, - environment, }; - - if ('duration' in checkIn) { - serializedCheckIn.duration = checkIn.duration; - } - - if (monitorConfig) { - serializedCheckIn.monitor_config = { - schedule: monitorConfig.schedule, - checkin_margin: monitorConfig.checkinMargin, - max_runtime: monitorConfig.maxRuntime, - timezone: monitorConfig.timezone, - }; - } - - const [dynamicSamplingContext, traceContext] = this._getTraceInfoFromScope(scope); - if (traceContext) { - serializedCheckIn.contexts = { - trace: traceContext, - }; - } - - const envelope = checkin.createCheckInEnvelope( - serializedCheckIn, - dynamicSamplingContext, - this.getSdkMetadata(), - tunnel, - this.getDsn(), - ); - - debugBuild.DEBUG_BUILD && utils.logger.info('Sending checkin:', checkIn.monitorSlug, checkIn.status); - - // _sendEnvelope should not throw - // eslint-disable-next-line @typescript-eslint/no-floating-promises - this._sendEnvelope(envelope); - - return id; - } - - /** - * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment - * appropriate session aggregates bucket - */ - _captureRequestSession() { - if (!this._sessionFlusher) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Discarded request mode session because autoSessionTracking option was disabled'); - } else { - this._sessionFlusher.incrementSessionStatusCount(); - } - } - - /** - * @inheritDoc - */ - _prepareEvent( - event, - hint, - scope, - isolationScope, - ) { - if (this._options.platform) { - event.platform = event.platform || this._options.platform; - } - - if (this._options.runtime) { - event.contexts = { - ...event.contexts, - runtime: (event.contexts || {}).runtime || this._options.runtime, - }; - } - - if (this._options.serverName) { - event.server_name = event.server_name || this._options.serverName; - } - - return super._prepareEvent(event, hint, scope, isolationScope); } +}); - /** Extract trace information from scope */ - _getTraceInfoFromScope( - scope, - ) { - if (!scope) { - return [undefined, undefined]; - } - - // eslint-disable-next-line deprecation/deprecation - const span = scope.getSpan(); - if (span) { - const samplingContext = getRootSpan.getRootSpan(span) ? dynamicSamplingContext.getDynamicSamplingContextFromSpan(span) : undefined; - return [samplingContext, spanUtils.spanToTraceContext(span)]; - } - - const { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(); - const traceContext = { - trace_id: traceId, - span_id: spanId, - parent_span_id: parentSpanId, - }; - if (dsc) { - return [dsc, traceContext]; - } - - return [dynamicSamplingContext.getDynamicSamplingContextFromClient(traceId, this, scope), traceContext]; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/version.js +var SDK_VERSION; +var init_version = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/version.js"() { + SDK_VERSION = "7.120.0"; } -} - -exports.ServerRuntimeClient = ServerRuntimeClient; -//# sourceMappingURL=server-runtime-client.js.map - - -/***/ }), - -/***/ 88939: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Creates a new `Session` object by setting certain default parameters. If optional @param context - * is passed, the passed properties are applied to the session object. - * - * @param context (optional) additional properties to be applied to the returned session object - * - * @returns a new `Session` object - */ -function makeSession(context) { - // Both timestamp and started are in seconds since the UNIX epoch. - const startingTime = utils.timestampInSeconds(); +}); - const session = { - sid: utils.uuid4(), - init: true, - timestamp: startingTime, - started: startingTime, - duration: 0, - status: 'ok', - errors: 0, - ignoreDuration: false, - toJSON: () => sessionToJSON(session), +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/hub.js +function getMainCarrier() { + GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || { + extensions: {}, + hub: void 0 }; - - if (context) { - updateSession(session, context); - } - - return session; + return GLOBAL_OBJ; } - -/** - * Updates a session object with the properties passed in the context. - * - * Note that this function mutates the passed object and returns void. - * (Had to do this instead of returning a new and updated session because closing and sending a session - * makes an update to the session after it was passed to the sending logic. - * @see BaseClient.captureSession ) - * - * @param session the `Session` to update - * @param context the `SessionContext` holding the properties that should be updated in @param session - */ -// eslint-disable-next-line complexity -function updateSession(session, context = {}) { - if (context.user) { - if (!session.ipAddress && context.user.ip_address) { - session.ipAddress = context.user.ip_address; - } - - if (!session.did && !context.did) { - session.did = context.user.id || context.user.email || context.user.username; - } - } - - session.timestamp = context.timestamp || utils.timestampInSeconds(); - - if (context.abnormal_mechanism) { - session.abnormal_mechanism = context.abnormal_mechanism; - } - - if (context.ignoreDuration) { - session.ignoreDuration = context.ignoreDuration; - } - if (context.sid) { - // Good enough uuid validation. — Kamil - session.sid = context.sid.length === 32 ? context.sid : utils.uuid4(); - } - if (context.init !== undefined) { - session.init = context.init; - } - if (!session.did && context.did) { - session.did = `${context.did}`; - } - if (typeof context.started === 'number') { - session.started = context.started; - } - if (session.ignoreDuration) { - session.duration = undefined; - } else if (typeof context.duration === 'number') { - session.duration = context.duration; - } else { - const duration = session.timestamp - session.started; - session.duration = duration >= 0 ? duration : 0; - } - if (context.release) { - session.release = context.release; - } - if (context.environment) { - session.environment = context.environment; - } - if (!session.ipAddress && context.ipAddress) { - session.ipAddress = context.ipAddress; - } - if (!session.userAgent && context.userAgent) { - session.userAgent = context.userAgent; - } - if (typeof context.errors === 'number') { - session.errors = context.errors; - } - if (context.status) { - session.status = context.status; - } +function makeMain(hub) { + const registry = getMainCarrier(); + const oldHub = getHubFromCarrier(registry); + setHubOnCarrier(registry, hub); + return oldHub; } - -/** - * Closes a session by setting its status and updating the session object with it. - * Internally calls `updateSession` to update the passed session object. - * - * Note that this function mutates the passed session (@see updateSession for explanation). - * - * @param session the `Session` object to be closed - * @param status the `SessionStatus` with which the session was closed. If you don't pass a status, - * this function will keep the previously set status, unless it was `'ok'` in which case - * it is changed to `'exited'`. - */ -function closeSession(session, status) { - let context = {}; - if (status) { - context = { status }; - } else if (session.status === 'ok') { - context = { status: 'exited' }; +function getCurrentHub() { + const registry = getMainCarrier(); + if (registry.__SENTRY__ && registry.__SENTRY__.acs) { + const hub = registry.__SENTRY__.acs.getCurrentHub(); + if (hub) { + return hub; + } } - - updateSession(session, context); + return getGlobalHub(registry); } - -/** - * Serializes a passed session object to a JSON object with a slightly different structure. - * This is necessary because the Sentry backend requires a slightly different schema of a session - * than the one the JS SDKs use internally. - * - * @param session the session to be converted - * - * @returns a JSON object of the passed session - */ -function sessionToJSON(session) { - return utils.dropUndefinedKeys({ - sid: `${session.sid}`, - init: session.init, - // Make sure that sec is converted to ms for date constructor - started: new Date(session.started * 1000).toISOString(), - timestamp: new Date(session.timestamp * 1000).toISOString(), - status: session.status, - errors: session.errors, - did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined, - duration: session.duration, - abnormal_mechanism: session.abnormal_mechanism, - attrs: { - release: session.release, - environment: session.environment, - ip_address: session.ipAddress, - user_agent: session.userAgent, - }, - }); +function getIsolationScope() { + return getCurrentHub().getIsolationScope(); } - -exports.closeSession = closeSession; -exports.makeSession = makeSession; -exports.updateSession = updateSession; -//# sourceMappingURL=session.js.map - - -/***/ }), - -/***/ 33190: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const exports$1 = __nccwpck_require__(78820); - -/** - * @inheritdoc - */ -class SessionFlusher { - - // Cast to any so that it can use Node.js timeout - // eslint-disable-next-line @typescript-eslint/no-explicit-any - - constructor(client, attrs) { - this._client = client; - this.flushTimeout = 60; - this._pendingAggregates = {}; - this._isEnabled = true; - - // Call to setInterval, so that flush is called every 60 seconds. - this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1000); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (this._intervalId.unref) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - this._intervalId.unref(); - } - this._sessionAttrs = attrs; - } - - /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ - flush() { - const sessionAggregates = this.getSessionAggregates(); - if (sessionAggregates.aggregates.length === 0) { - return; - } - this._pendingAggregates = {}; - this._client.sendSession(sessionAggregates); - } - - /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ - getSessionAggregates() { - const aggregates = Object.keys(this._pendingAggregates).map((key) => { - return this._pendingAggregates[parseInt(key)]; - }); - - const sessionAggregates = { - attrs: this._sessionAttrs, - aggregates, - }; - return utils.dropUndefinedKeys(sessionAggregates); - } - - /** JSDoc */ - close() { - clearInterval(this._intervalId); - this._isEnabled = false; - this.flush(); - } - - /** - * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then - * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to - * `_incrementSessionStatusCount` along with the start date - */ - incrementSessionStatusCount() { - if (!this._isEnabled) { - return; - } - const scope = exports$1.getCurrentScope(); - const requestSession = scope.getRequestSession(); - - if (requestSession && requestSession.status) { - this._incrementSessionStatusCount(requestSession.status, new Date()); - // This is not entirely necessarily but is added as a safe guard to indicate the bounds of a request and so in - // case captureRequestSession is called more than once to prevent double count - scope.setRequestSession(undefined); - /* eslint-enable @typescript-eslint/no-unsafe-member-access */ - } - } - - /** - * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of - * the session received - */ - _incrementSessionStatusCount(status, date) { - // Truncate minutes and seconds on Session Started attribute to have one minute bucket keys - const sessionStartedTrunc = new Date(date).setSeconds(0, 0); - this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; - - // corresponds to aggregated sessions in one specific minute bucket - // for example, {"started":"2021-03-16T08:00:00.000Z","exited":4, "errored": 1} - const aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; - if (!aggregationCounts.started) { - aggregationCounts.started = new Date(sessionStartedTrunc).toISOString(); - } - - switch (status) { - case 'errored': - aggregationCounts.errored = (aggregationCounts.errored || 0) + 1; - return aggregationCounts.errored; - case 'ok': - aggregationCounts.exited = (aggregationCounts.exited || 0) + 1; - return aggregationCounts.exited; - default: - aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1; - return aggregationCounts.crashed; - } +function getGlobalHub(registry = getMainCarrier()) { + if (!hasHubOnCarrier(registry) || // eslint-disable-next-line deprecation/deprecation + getHubFromCarrier(registry).isOlderThan(API_VERSION)) { + setHubOnCarrier(registry, new Hub()); } + return getHubFromCarrier(registry); } - -exports.SessionFlusher = SessionFlusher; -//# sourceMappingURL=sessionflusher.js.map - - -/***/ }), - -/***/ 27903: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Create envelope from Span item. - */ -function createSpanEnvelope(spans, dsn) { - const headers = { - sent_at: new Date().toISOString(), - }; - - if (dsn) { - headers.dsn = utils.dsnToString(dsn); +function ensureHubOnCarrier(carrier, parent = getGlobalHub()) { + if (!hasHubOnCarrier(carrier) || // eslint-disable-next-line deprecation/deprecation + getHubFromCarrier(carrier).isOlderThan(API_VERSION)) { + const client = parent.getClient(); + const scope = parent.getScope(); + const isolationScope = parent.getIsolationScope(); + setHubOnCarrier(carrier, new Hub(client, scope.clone(), isolationScope.clone())); } - - const items = spans.map(createSpanItem); - return utils.createEnvelope(headers, items); -} - -function createSpanItem(span) { - const spanHeaders = { - type: 'span', - }; - return [spanHeaders, span]; } - -exports.createSpanEnvelope = createSpanEnvelope; -//# sourceMappingURL=span.js.map - - -/***/ }), - -/***/ 18359: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const constants = __nccwpck_require__(74894); -const exports$1 = __nccwpck_require__(78820); -const getRootSpan = __nccwpck_require__(23665); -const spanUtils = __nccwpck_require__(59152); - -/** - * Creates a dynamic sampling context from a client. - * - * Dispatches the `createDsc` lifecycle hook as a side effect. - */ -function getDynamicSamplingContextFromClient( - trace_id, - client, - scope, -) { - const options = client.getOptions(); - - const { publicKey: public_key } = client.getDsn() || {}; - // TODO(v8): Remove segment from User - // eslint-disable-next-line deprecation/deprecation - const { segment: user_segment } = (scope && scope.getUser()) || {}; - - const dsc = utils.dropUndefinedKeys({ - environment: options.environment || constants.DEFAULT_ENVIRONMENT, - release: options.release, - user_segment, - public_key, - trace_id, - }) ; - - client.emit && client.emit('createDsc', dsc); - - return dsc; +function setAsyncContextStrategy(strategy) { + const registry = getMainCarrier(); + registry.__SENTRY__ = registry.__SENTRY__ || {}; + registry.__SENTRY__.acs = strategy; } - -/** - * A Span with a frozen dynamic sampling context. - */ - -/** - * Creates a dynamic sampling context from a span (and client and scope) - * - * @param span the span from which a few values like the root span name and sample rate are extracted. - * - * @returns a dynamic sampling context - */ -function getDynamicSamplingContextFromSpan(span) { - const client = exports$1.getClient(); - if (!client) { - return {}; - } - - // passing emit=false here to only emit later once the DSC is actually populated - const dsc = getDynamicSamplingContextFromClient(spanUtils.spanToJSON(span).trace_id || '', client, exports$1.getCurrentScope()); - - // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext - const txn = getRootSpan.getRootSpan(span) ; - if (!txn) { - return dsc; - } - - // TODO (v8): Remove v7FrozenDsc as a Transaction will no longer have _frozenDynamicSamplingContext - // For now we need to avoid breaking users who directly created a txn with a DSC, where this field is still set. - // @see Transaction class constructor - const v7FrozenDsc = txn && txn._frozenDynamicSamplingContext; - if (v7FrozenDsc) { - return v7FrozenDsc; - } - - // TODO (v8): Replace txn.metadata with txn.attributes[] - // We can't do this yet because attributes aren't always set yet. - // eslint-disable-next-line deprecation/deprecation - const { sampleRate: maybeSampleRate, source } = txn.metadata; - if (maybeSampleRate != null) { - dsc.sample_rate = `${maybeSampleRate}`; - } - - // We don't want to have a transaction name in the DSC if the source is "url" because URLs might contain PII - const jsonSpan = spanUtils.spanToJSON(txn); - - // after JSON conversion, txn.name becomes jsonSpan.description - if (source && source !== 'url') { - dsc.transaction = jsonSpan.description; +function runWithAsyncContext(callback, options2 = {}) { + const registry = getMainCarrier(); + if (registry.__SENTRY__ && registry.__SENTRY__.acs) { + return registry.__SENTRY__.acs.runWithAsyncContext(callback, options2); } - - dsc.sampled = String(spanUtils.spanIsSampled(txn)); - - client.emit && client.emit('createDsc', dsc); - - return dsc; + return callback(); } - -exports.getDynamicSamplingContextFromClient = getDynamicSamplingContextFromClient; -exports.getDynamicSamplingContextFromSpan = getDynamicSamplingContextFromSpan; -//# sourceMappingURL=dynamicSamplingContext.js.map - - -/***/ }), - -/***/ 13955: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const utils$1 = __nccwpck_require__(29807); - -let errorsInstrumented = false; - -/** - * Configures global error listeners - */ -function registerErrorInstrumentation() { - if (errorsInstrumented) { - return; - } - - errorsInstrumented = true; - utils.addGlobalErrorInstrumentationHandler(errorCallback); - utils.addGlobalUnhandledRejectionInstrumentationHandler(errorCallback); +function hasHubOnCarrier(carrier) { + return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub); } - -/** - * If an error or unhandled promise occurs, we mark the active transaction as failed - */ -function errorCallback() { - // eslint-disable-next-line deprecation/deprecation - const activeTransaction = utils$1.getActiveTransaction(); - if (activeTransaction) { - const status = 'internal_error'; - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Transaction: ${status} -> Global error occured`); - activeTransaction.setStatus(status); - } +function getHubFromCarrier(carrier) { + return getGlobalSingleton("hub", () => new Hub(), carrier); } - -// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the -// node.js default exit behaviour -errorCallback.tag = 'sentry_tracingErrorCallback'; - -exports.registerErrorInstrumentation = registerErrorInstrumentation; -//# sourceMappingURL=errors.js.map - - -/***/ }), - -/***/ 723: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const hub = __nccwpck_require__(54724); -const spanUtils = __nccwpck_require__(59152); -const errors = __nccwpck_require__(13955); -const idletransaction = __nccwpck_require__(9808); -const sampling = __nccwpck_require__(50873); -const transaction = __nccwpck_require__(88738); - -/** Returns all trace headers that are currently on the top scope. */ -// eslint-disable-next-line deprecation/deprecation -function traceHeaders() { - // eslint-disable-next-line deprecation/deprecation - const scope = this.getScope(); - // eslint-disable-next-line deprecation/deprecation - const span = scope.getSpan(); - - return span - ? { - 'sentry-trace': spanUtils.spanToTraceHeader(span), - } - : {}; -} - -/** - * Creates a new transaction and adds a sampling decision if it doesn't yet have one. - * - * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if - * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an - * "extension method." - * - * @param this: The Hub starting the transaction - * @param transactionContext: Data used to configure the transaction - * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any) - * - * @returns The new transaction - * - * @see {@link Hub.startTransaction} - */ -function _startTransaction( - // eslint-disable-next-line deprecation/deprecation - - transactionContext, - customSamplingContext, -) { - // eslint-disable-next-line deprecation/deprecation - const client = this.getClient(); - const options = (client && client.getOptions()) || {}; - - const configInstrumenter = options.instrumenter || 'sentry'; - const transactionInstrumenter = transactionContext.instrumenter || 'sentry'; - - if (configInstrumenter !== transactionInstrumenter) { - debugBuild.DEBUG_BUILD && - utils.logger.error( - `A transaction was started with instrumenter=\`${transactionInstrumenter}\`, but the SDK is configured with the \`${configInstrumenter}\` instrumenter. -The transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`, - ); - - // eslint-disable-next-line deprecation/deprecation - transactionContext.sampled = false; - } - - // eslint-disable-next-line deprecation/deprecation - let transaction$1 = new transaction.Transaction(transactionContext, this); - transaction$1 = sampling.sampleTransaction(transaction$1, options, { - name: transactionContext.name, - parentSampled: transactionContext.parentSampled, - transactionContext, - attributes: { - // eslint-disable-next-line deprecation/deprecation - ...transactionContext.data, - ...transactionContext.attributes, - }, - ...customSamplingContext, - }); - if (transaction$1.isRecording()) { - transaction$1.initSpanRecorder(options._experiments && (options._experiments.maxSpans )); - } - if (client && client.emit) { - client.emit('startTransaction', transaction$1); - } - return transaction$1; -} - -/** - * Create new idle transaction. - */ -function startIdleTransaction( - // eslint-disable-next-line deprecation/deprecation - hub, - transactionContext, - idleTimeout, - finalTimeout, - onScope, - customSamplingContext, - heartbeatInterval, - delayAutoFinishUntilSignal = false, -) { - // eslint-disable-next-line deprecation/deprecation - const client = hub.getClient(); - const options = (client && client.getOptions()) || {}; - - // eslint-disable-next-line deprecation/deprecation - let transaction = new idletransaction.IdleTransaction( - transactionContext, - hub, - idleTimeout, - finalTimeout, - heartbeatInterval, - onScope, - delayAutoFinishUntilSignal, - ); - transaction = sampling.sampleTransaction(transaction, options, { - name: transactionContext.name, - parentSampled: transactionContext.parentSampled, - transactionContext, - attributes: { - // eslint-disable-next-line deprecation/deprecation - ...transactionContext.data, - ...transactionContext.attributes, - }, - ...customSamplingContext, - }); - if (transaction.isRecording()) { - transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans )); - } - if (client && client.emit) { - client.emit('startTransaction', transaction); - } - return transaction; -} - -/** - * Adds tracing extensions to the global hub. - */ -function addTracingExtensions() { - const carrier = hub.getMainCarrier(); - if (!carrier.__SENTRY__) { - return; - } - carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; - if (!carrier.__SENTRY__.extensions.startTransaction) { - carrier.__SENTRY__.extensions.startTransaction = _startTransaction; - } - if (!carrier.__SENTRY__.extensions.traceHeaders) { - carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; - } - - errors.registerErrorInstrumentation(); +function setHubOnCarrier(carrier, hub) { + if (!carrier) return false; + const __SENTRY__ = carrier.__SENTRY__ = carrier.__SENTRY__ || {}; + __SENTRY__.hub = hub; + return true; } - -exports.addTracingExtensions = addTracingExtensions; -exports.startIdleTransaction = startIdleTransaction; -//# sourceMappingURL=hubextensions.js.map - - -/***/ }), - -/***/ 9808: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const spanUtils = __nccwpck_require__(59152); -const span = __nccwpck_require__(28784); -const transaction = __nccwpck_require__(88738); - -const TRACING_DEFAULTS = { - idleTimeout: 1000, - finalTimeout: 30000, - heartbeatInterval: 5000, -}; - -const FINISH_REASON_TAG = 'finishReason'; - -const IDLE_TRANSACTION_FINISH_REASONS = [ - 'heartbeatFailed', - 'idleTimeout', - 'documentHidden', - 'finalTimeout', - 'externalFinish', - 'cancelled', -]; - -/** - * @inheritDoc - */ -class IdleTransactionSpanRecorder extends span.SpanRecorder { - constructor( - _pushActivity, - _popActivity, - transactionSpanId, - maxlen, - ) { - super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; } - - /** - * @inheritDoc - */ - add(span) { - // We should make sure we do not push and pop activities for - // the transaction that this span recorder belongs to. - if (span.spanContext().spanId !== this.transactionSpanId) { - // We patch span.end() to pop an activity after setting an endTimestamp. - // eslint-disable-next-line @typescript-eslint/unbound-method - const originalEnd = span.end; - span.end = (...rest) => { - this._popActivity(span.spanContext().spanId); - return originalEnd.apply(span, rest); - }; - - // We should only push new activities if the span does not have an end timestamp. - if (spanUtils.spanToJSON(span).timestamp === undefined) { - this._pushActivity(span.spanContext().spanId); +var API_VERSION, DEFAULT_BREADCRUMBS, Hub; +var init_hub = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/hub.js"() { + init_esm(); + init_constants(); + init_debug_build2(); + init_scope(); + init_session(); + init_version(); + API_VERSION = parseFloat(SDK_VERSION); + DEFAULT_BREADCRUMBS = 100; + Hub = class { + /** Is a {@link Layer}[] containing the client and scope */ + /** Contains the last event id of a captured event. */ + /** + * Creates a new instance of the hub, will push one {@link Layer} into the + * internal stack on creation. + * + * @param client bound to the hub. + * @param scope bound to the hub. + * @param version number, higher number means higher priority. + * + * @deprecated Instantiation of Hub objects is deprecated and the constructor will be removed in version 8 of the SDK. + * + * If you are currently using the Hub for multi-client use like so: + * + * ``` + * // OLD + * const hub = new Hub(); + * hub.bindClient(client); + * makeMain(hub) + * ``` + * + * instead initialize the client as follows: + * + * ``` + * // NEW + * Sentry.withIsolationScope(() => { + * Sentry.setCurrentClient(client); + * client.init(); + * }); + * ``` + * + * If you are using the Hub to capture events like so: + * + * ``` + * // OLD + * const client = new Client(); + * const hub = new Hub(client); + * hub.captureException() + * ``` + * + * instead capture isolated events as follows: + * + * ``` + * // NEW + * const client = new Client(); + * const scope = new Scope(); + * scope.setClient(client); + * scope.captureException(); + * ``` + */ + constructor(client, scope, isolationScope, _version = API_VERSION) { + this._version = _version; + let assignedScope; + if (!scope) { + assignedScope = new Scope(); + assignedScope.setClient(client); + } else { + assignedScope = scope; + } + let assignedIsolationScope; + if (!isolationScope) { + assignedIsolationScope = new Scope(); + assignedIsolationScope.setClient(client); + } else { + assignedIsolationScope = isolationScope; + } + this._stack = [{ scope: assignedScope }]; + if (client) { + this.bindClient(client); + } + this._isolationScope = assignedIsolationScope; } - } - - super.add(span); - } -} - -/** - * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities. - * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will - * put itself on the scope on creation. - */ -class IdleTransaction extends transaction.Transaction { - // Activities store a list of active spans - - // Track state of activities in previous heartbeat - - // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats. - - // We should not use heartbeat if we finished a transaction - - // Idle timeout was canceled and we should finish the transaction with the last span end. - - /** - * Timer that tracks Transaction idleTimeout - */ - - /** - * @deprecated Transactions will be removed in v8. Use spans instead. - */ - constructor( - transactionContext, - // eslint-disable-next-line deprecation/deprecation - _idleHub, - /** - * The time to wait in ms until the idle transaction will be finished. This timer is started each time - * there are no active spans on this transaction. - */ - _idleTimeout = TRACING_DEFAULTS.idleTimeout, - /** - * The final value in ms that a transaction cannot exceed - */ - _finalTimeout = TRACING_DEFAULTS.finalTimeout, - _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval, - // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends - _onScope = false, - /** - * When set to `true`, will disable the idle timeout (`_idleTimeout` option) and heartbeat mechanisms (`_heartbeatInterval` - * option) until the `sendAutoFinishSignal()` method is called. The final timeout mechanism (`_finalTimeout` option) - * will not be affected by this option, meaning the transaction will definitely be finished when the final timeout is - * reached, no matter what this option is configured to. - * - * Defaults to `false`. - */ - delayAutoFinishUntilSignal = false, - ) { - super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope; - this.activities = {}; - this._heartbeatCounter = 0; - this._finished = false; - this._idleTimeoutCanceledPermanently = false; - this._beforeFinishCallbacks = []; - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4]; - this._autoFinishAllowed = !delayAutoFinishUntilSignal; - - if (_onScope) { - // We set the transaction here on the scope so error events pick up the trace - // context and attach it to the error. - debugBuild.DEBUG_BUILD && utils.logger.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`); - // eslint-disable-next-line deprecation/deprecation - _idleHub.getScope().setSpan(this); - } - - if (!delayAutoFinishUntilSignal) { - this._restartIdleTimeout(); - } - - setTimeout(() => { - if (!this._finished) { - this.setStatus('deadline_exceeded'); - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3]; - this.end(); + /** + * Checks if this hub's version is older than the given version. + * + * @param version A version number to compare to. + * @return True if the given version is newer; otherwise false. + * + * @deprecated This will be removed in v8. + */ + isOlderThan(version) { + return this._version < version; } - }, this._finalTimeout); - } - - /** {@inheritDoc} */ - end(endTimestamp) { - const endTimestampInS = spanUtils.spanTimeInputToSeconds(endTimestamp); - - this._finished = true; - this.activities = {}; - - // eslint-disable-next-line deprecation/deprecation - if (this.op === 'ui.action.click') { - this.setAttribute(FINISH_REASON_TAG, this._finishReason); - } - - // eslint-disable-next-line deprecation/deprecation - if (this.spanRecorder) { - debugBuild.DEBUG_BUILD && - // eslint-disable-next-line deprecation/deprecation - utils.logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestampInS * 1000).toISOString(), this.op); - - for (const callback of this._beforeFinishCallbacks) { - callback(this, endTimestampInS); + /** + * This binds the given client to the current scope. + * @param client An SDK client (client) instance. + * + * @deprecated Use `initAndBind()` directly, or `setCurrentClient()` and/or `client.init()` instead. + */ + bindClient(client) { + const top = this.getStackTop(); + top.client = client; + top.scope.setClient(client); + if (client && client.setupIntegrations) { + client.setupIntegrations(); + } } - + /** + * @inheritDoc + * + * @deprecated Use `withScope` instead. + */ + pushScope() { + const scope = this.getScope().clone(); + this.getStack().push({ + // eslint-disable-next-line deprecation/deprecation + client: this.getClient(), + scope + }); + return scope; + } + /** + * @inheritDoc + * + * @deprecated Use `withScope` instead. + */ + popScope() { + if (this.getStack().length <= 1) return false; + return !!this.getStack().pop(); + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.withScope()` instead. + */ + withScope(callback) { + const scope = this.pushScope(); + let maybePromiseResult; + try { + maybePromiseResult = callback(scope); + } catch (e) { + this.popScope(); + throw e; + } + if (isThenable(maybePromiseResult)) { + return maybePromiseResult.then( + (res) => { + this.popScope(); + return res; + }, + (e) => { + this.popScope(); + throw e; + } + ); + } + this.popScope(); + return maybePromiseResult; + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.getClient()` instead. + */ + getClient() { + return this.getStackTop().client; + } + /** + * Returns the scope of the top stack. + * + * @deprecated Use `Sentry.getCurrentScope()` instead. + */ + getScope() { + return this.getStackTop().scope; + } + /** + * @deprecated Use `Sentry.getIsolationScope()` instead. + */ + getIsolationScope() { + return this._isolationScope; + } + /** + * Returns the scope stack for domains or the process. + * @deprecated This will be removed in v8. + */ + getStack() { + return this._stack; + } + /** + * Returns the topmost scope layer in the order domain > local > process. + * @deprecated This will be removed in v8. + */ + getStackTop() { + return this._stack[this._stack.length - 1]; + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.captureException()` instead. + */ + captureException(exception2, hint) { + const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4(); + const syntheticException = new Error("Sentry syntheticException"); + this.getScope().captureException(exception2, { + originalException: exception2, + syntheticException, + ...hint, + event_id: eventId + }); + return eventId; + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.captureMessage()` instead. + */ + captureMessage(message, level, hint) { + const eventId = this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4(); + const syntheticException = new Error(message); + this.getScope().captureMessage(message, level, { + originalException: message, + syntheticException, + ...hint, + event_id: eventId + }); + return eventId; + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.captureEvent()` instead. + */ + captureEvent(event, hint) { + const eventId = hint && hint.event_id ? hint.event_id : uuid4(); + if (!event.type) { + this._lastEventId = eventId; + } + this.getScope().captureEvent(event, { ...hint, event_id: eventId }); + return eventId; + } + /** + * @inheritDoc + * + * @deprecated This will be removed in v8. + */ + lastEventId() { + return this._lastEventId; + } + /** + * @inheritDoc + * + * @deprecated Use `Sentry.addBreadcrumb()` instead. + */ + addBreadcrumb(breadcrumb, hint) { + const { scope, client } = this.getStackTop(); + if (!client) return; + const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } = client.getOptions && client.getOptions() || {}; + if (maxBreadcrumbs <= 0) return; + const timestamp2 = dateTimestampInSeconds(); + const mergedBreadcrumb = { timestamp: timestamp2, ...breadcrumb }; + const finalBreadcrumb = beforeBreadcrumb ? consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) : mergedBreadcrumb; + if (finalBreadcrumb === null) return; + if (client.emit) { + client.emit("beforeAddBreadcrumb", finalBreadcrumb, hint); + } + scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setUser()` instead. + */ + setUser(user) { + this.getScope().setUser(user); + this.getIsolationScope().setUser(user); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setTags()` instead. + */ + setTags(tags) { + this.getScope().setTags(tags); + this.getIsolationScope().setTags(tags); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setExtras()` instead. + */ + setExtras(extras) { + this.getScope().setExtras(extras); + this.getIsolationScope().setExtras(extras); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setTag()` instead. + */ + setTag(key, value) { + this.getScope().setTag(key, value); + this.getIsolationScope().setTag(key, value); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setExtra()` instead. + */ + setExtra(key, extra) { + this.getScope().setExtra(key, extra); + this.getIsolationScope().setExtra(key, extra); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.setContext()` instead. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + setContext(name, context) { + this.getScope().setContext(name, context); + this.getIsolationScope().setContext(name, context); + } + /** + * @inheritDoc + * + * @deprecated Use `getScope()` directly. + */ + configureScope(callback) { + const { scope, client } = this.getStackTop(); + if (client) { + callback(scope); + } + } + /** + * @inheritDoc + */ // eslint-disable-next-line deprecation/deprecation - this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => { - // If we are dealing with the transaction itself, we just return it - if (span.spanContext().spanId === this.spanContext().spanId) { - return true; + run(callback) { + const oldHub = makeMain(this); + try { + callback(this); + } finally { + makeMain(oldHub); } - - // We cancel all pending spans with status "cancelled" to indicate the idle transaction was finished early - if (!spanUtils.spanToJSON(span).timestamp) { - span.setStatus('cancelled'); - span.end(endTimestampInS); - debugBuild.DEBUG_BUILD && - utils.logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2)); + } + /** + * @inheritDoc + * @deprecated Use `Sentry.getClient().getIntegrationByName()` instead. + */ + getIntegration(integration) { + const client = this.getClient(); + if (!client) return null; + try { + return client.getIntegration(integration); + } catch (_oO) { + DEBUG_BUILD2 && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`); + return null; } - - const { start_timestamp: startTime, timestamp: endTime } = spanUtils.spanToJSON(span); - const spanStartedBeforeTransactionFinish = startTime && startTime < endTimestampInS; - - // Add a delta with idle timeout so that we prevent false positives - const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000; - const spanEndedBeforeFinalTimeout = endTime && startTime && endTime - startTime < timeoutWithMarginOfError; - - if (debugBuild.DEBUG_BUILD) { - const stringifiedSpan = JSON.stringify(span, undefined, 2); - if (!spanStartedBeforeTransactionFinish) { - utils.logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan); - } else if (!spanEndedBeforeFinalTimeout) { - utils.logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan); + } + /** + * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation. + * + * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a + * new child span within the transaction or any span, call the respective `.startChild()` method. + * + * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded. + * + * The transaction must be finished with a call to its `.end()` method, at which point the transaction with all its + * finished child spans will be sent to Sentry. + * + * @param context Properties of the new `Transaction`. + * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent + * default values). See {@link Options.tracesSampler}. + * + * @returns The transaction which was just started + * + * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. + */ + startTransaction(context, customSamplingContext) { + const result = this._callExtensionMethod("startTransaction", context, customSamplingContext); + if (DEBUG_BUILD2 && !result) { + const client = this.getClient(); + if (!client) { + logger.warn( + "Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'" + ); + } else { + logger.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init': +Sentry.addTracingExtensions(); +Sentry.init({...}); +`); } } - - return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout; - }); - - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] flushing IdleTransaction'); - } else { - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] No active IdleTransaction'); - } - - // if `this._onScope` is `true`, the transaction put itself on the scope when it started - if (this._onScope) { - // eslint-disable-next-line deprecation/deprecation - const scope = this._idleHub.getScope(); - // eslint-disable-next-line deprecation/deprecation - if (scope.getTransaction() === this) { - // eslint-disable-next-line deprecation/deprecation - scope.setSpan(undefined); + return result; } - } - - return super.end(endTimestamp); - } - - /** - * Register a callback function that gets executed before the transaction finishes. - * Useful for cleanup or if you want to add any additional spans based on current context. - * - * This is exposed because users have no other way of running something before an idle transaction - * finishes. - */ - registerBeforeFinishCallback(callback) { - this._beforeFinishCallbacks.push(callback); - } - - /** - * @inheritDoc - */ - initSpanRecorder(maxlen) { - // eslint-disable-next-line deprecation/deprecation - if (!this.spanRecorder) { - const pushActivity = (id) => { - if (this._finished) { - return; + /** + * @inheritDoc + * @deprecated Use `spanToTraceHeader()` instead. + */ + traceHeaders() { + return this._callExtensionMethod("traceHeaders"); + } + /** + * @inheritDoc + * + * @deprecated Use top level `captureSession` instead. + */ + captureSession(endSession2 = false) { + if (endSession2) { + return this.endSession(); } - this._pushActivity(id); - }; - const popActivity = (id) => { - if (this._finished) { - return; + this._sendSessionUpdate(); + } + /** + * @inheritDoc + * @deprecated Use top level `endSession` instead. + */ + endSession() { + const layer = this.getStackTop(); + const scope = layer.scope; + const session = scope.getSession(); + if (session) { + closeSession(session); } - this._popActivity(id); - }; - - // eslint-disable-next-line deprecation/deprecation - this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanContext().spanId, maxlen); - - // Start heartbeat so that transactions do not run forever. - debugBuild.DEBUG_BUILD && utils.logger.log('Starting heartbeat'); - this._pingHeartbeat(); - } - // eslint-disable-next-line deprecation/deprecation - this.spanRecorder.add(this); - } - - /** - * Cancels the existing idle timeout, if there is one. - * @param restartOnChildSpanChange Default is `true`. - * If set to false the transaction will end - * with the last child span. - */ - cancelIdleTimeout( - endTimestamp, - { - restartOnChildSpanChange, - } - - = { - restartOnChildSpanChange: true, - }, - ) { - this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false; - if (this._idleTimeoutID) { - clearTimeout(this._idleTimeoutID); - this._idleTimeoutID = undefined; - - if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) { - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5]; - this.end(endTimestamp); - } - } - } - - /** - * Temporary method used to externally set the transaction's `finishReason` - * - * ** WARNING** - * This is for the purpose of experimentation only and will be removed in the near future, do not use! - * - * @internal - * - */ - setFinishReason(reason) { - this._finishReason = reason; - } - - /** - * Permits the IdleTransaction to automatically end itself via the idle timeout and heartbeat mechanisms when the `delayAutoFinishUntilSignal` option was set to `true`. - */ - sendAutoFinishSignal() { - if (!this._autoFinishAllowed) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Received finish signal for idle transaction.'); - this._restartIdleTimeout(); - this._autoFinishAllowed = true; - } - } - - /** - * Restarts idle timeout, if there is no running idle timeout it will start one. - */ - _restartIdleTimeout(endTimestamp) { - this.cancelIdleTimeout(); - this._idleTimeoutID = setTimeout(() => { - if (!this._finished && Object.keys(this.activities).length === 0) { - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1]; - this.end(endTimestamp); - } - }, this._idleTimeout); - } - - /** - * Start tracking a specific activity. - * @param spanId The span id that represents the activity - */ - _pushActivity(spanId) { - this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently }); - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] pushActivity: ${spanId}`); - this.activities[spanId] = true; - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] new activities count', Object.keys(this.activities).length); - } - - /** - * Remove an activity from usage - * @param spanId The span id that represents the activity - */ - _popActivity(spanId) { - if (this.activities[spanId]) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] popActivity ${spanId}`); - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this.activities[spanId]; - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] new activities count', Object.keys(this.activities).length); - } - - if (Object.keys(this.activities).length === 0) { - const endTimestamp = utils.timestampInSeconds(); - if (this._idleTimeoutCanceledPermanently) { - if (this._autoFinishAllowed) { - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5]; - this.end(endTimestamp); + this._sendSessionUpdate(); + scope.setSession(); + } + /** + * @inheritDoc + * @deprecated Use top level `startSession` instead. + */ + startSession(context) { + const { scope, client } = this.getStackTop(); + const { release: release2, environment = DEFAULT_ENVIRONMENT } = client && client.getOptions() || {}; + const { userAgent: userAgent2 } = GLOBAL_OBJ.navigator || {}; + const session = makeSession({ + release: release2, + environment, + user: scope.getUser(), + ...userAgent2 && { userAgent: userAgent2 }, + ...context + }); + const currentSession = scope.getSession && scope.getSession(); + if (currentSession && currentSession.status === "ok") { + updateSession(currentSession, { status: "exited" }); } - } else { - // We need to add the timeout here to have the real endtimestamp of the transaction - // Remember timestampInSeconds is in seconds, timeout is in ms - this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000); + this.endSession(); + scope.setSession(session); + return session; } - } - } - - /** - * Checks when entries of this.activities are not changing for 3 beats. - * If this occurs we finish the transaction. - */ - _beat() { - // We should not be running heartbeat if the idle transaction is finished. - if (this._finished) { - return; - } - - const heartbeatString = Object.keys(this.activities).join(''); - - if (heartbeatString === this._prevHeartbeatString) { - this._heartbeatCounter++; - } else { - this._heartbeatCounter = 1; - } - - this._prevHeartbeatString = heartbeatString; - - if (this._heartbeatCounter >= 3) { - if (this._autoFinishAllowed) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Transaction finished because of no change for 3 heart beats'); - this.setStatus('deadline_exceeded'); - this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0]; - this.end(); + /** + * Returns if default PII should be sent to Sentry and propagated in ourgoing requests + * when Tracing is used. + * + * @deprecated Use top-level `getClient().getOptions().sendDefaultPii` instead. This function + * only unnecessarily increased API surface but only wrapped accessing the option. + */ + shouldSendDefaultPii() { + const client = this.getClient(); + const options2 = client && client.getOptions(); + return Boolean(options2 && options2.sendDefaultPii); } - } else { - this._pingHeartbeat(); - } - } - - /** - * Pings the heartbeat - */ - _pingHeartbeat() { - debugBuild.DEBUG_BUILD && utils.logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`); - setTimeout(() => { - this._beat(); - }, this._heartbeatInterval); + /** + * Sends the current Session on the scope + */ + _sendSessionUpdate() { + const { scope, client } = this.getStackTop(); + const session = scope.getSession(); + if (session && client && client.captureSession) { + client.captureSession(session); + } + } + /** + * Calls global extension method and binding current instance to the function call + */ + // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366) + // eslint-disable-next-line @typescript-eslint/no-explicit-any + _callExtensionMethod(method, ...args) { + const carrier = getMainCarrier(); + const sentry = carrier.__SENTRY__; + if (sentry && sentry.extensions && typeof sentry.extensions[method] === "function") { + return sentry.extensions[method].apply(this, args); + } + DEBUG_BUILD2 && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`); + } + }; } -} - -exports.IdleTransaction = IdleTransaction; -exports.IdleTransactionSpanRecorder = IdleTransactionSpanRecorder; -exports.TRACING_DEFAULTS = TRACING_DEFAULTS; -//# sourceMappingURL=idletransaction.js.map - - -/***/ }), - -/***/ 86310: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(29807); +}); -/** - * Adds a measurement to the current active transaction. - */ -function setMeasurement(name, value, unit) { - // eslint-disable-next-line deprecation/deprecation - const transaction = utils.getActiveTransaction(); - if (transaction) { - // eslint-disable-next-line deprecation/deprecation - transaction.setMeasurement(name, value, unit); - } +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/utils.js +function getActiveTransaction(maybeHub) { + const hub = maybeHub || getCurrentHub(); + const scope = hub.getScope(); + return scope.getTransaction(); } - -exports.setMeasurement = setMeasurement; -//# sourceMappingURL=measurement.js.map - - -/***/ }), - -/***/ 50873: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const semanticAttributes = __nccwpck_require__(35366); -const hasTracingEnabled = __nccwpck_require__(55726); -const spanUtils = __nccwpck_require__(59152); - -/** - * Makes a sampling decision for the given transaction and stores it on the transaction. - * - * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be - * sent to Sentry. - * - * This method muttes the given `transaction` and will set the `sampled` value on it. - * It returns the same transaction, for convenience. - */ -function sampleTransaction( - transaction, - options, - samplingContext, -) { - // nothing to do if tracing is not enabled - if (!hasTracingEnabled.hasTracingEnabled(options)) { - // eslint-disable-next-line deprecation/deprecation - transaction.sampled = false; - return transaction; - } - - // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that - // eslint-disable-next-line deprecation/deprecation - if (transaction.sampled !== undefined) { - // eslint-disable-next-line deprecation/deprecation - transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(transaction.sampled)); - return transaction; - } - - // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should - // work; prefer the hook if so - let sampleRate; - if (typeof options.tracesSampler === 'function') { - sampleRate = options.tracesSampler(samplingContext); - transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate)); - } else if (samplingContext.parentSampled !== undefined) { - sampleRate = samplingContext.parentSampled; - } else if (typeof options.tracesSampleRate !== 'undefined') { - sampleRate = options.tracesSampleRate; - transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate)); - } else { - // When `enableTracing === true`, we use a sample rate of 100% - sampleRate = 1; - transaction.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate); - } - - // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The - // only valid values are booleans or numbers between 0 and 1.) - if (!isValidSampleRate(sampleRate)) { - debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Discarding transaction because of invalid sample rate.'); - // eslint-disable-next-line deprecation/deprecation - transaction.sampled = false; - return transaction; - } - - // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped - if (!sampleRate) { - debugBuild.DEBUG_BUILD && - utils.logger.log( - `[Tracing] Discarding transaction because ${ - typeof options.tracesSampler === 'function' - ? 'tracesSampler returned 0 or false' - : 'a negative sampling decision was inherited or tracesSampleRate is set to 0' - }`, - ); - // eslint-disable-next-line deprecation/deprecation - transaction.sampled = false; - return transaction; +var extractTraceparentData2; +var init_utils = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/utils.js"() { + init_esm(); + init_hub(); + extractTraceparentData2 = extractTraceparentData; } +}); - // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is - // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false. - // eslint-disable-next-line deprecation/deprecation - transaction.sampled = Math.random() < (sampleRate ); - - // if we're not going to keep it, we're done - // eslint-disable-next-line deprecation/deprecation - if (!transaction.sampled) { - debugBuild.DEBUG_BUILD && - utils.logger.log( - `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( - sampleRate, - )})`, - ); - return transaction; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/errors.js +function registerErrorInstrumentation() { + if (errorsInstrumented) { + return; } - - debugBuild.DEBUG_BUILD && - // eslint-disable-next-line deprecation/deprecation - utils.logger.log(`[Tracing] starting ${transaction.op} transaction - ${spanUtils.spanToJSON(transaction).description}`); - return transaction; + errorsInstrumented = true; + addGlobalErrorInstrumentationHandler(errorCallback); + addGlobalUnhandledRejectionInstrumentationHandler(errorCallback); } - -/** - * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1). - */ -function isValidSampleRate(rate) { - // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck - // eslint-disable-next-line @typescript-eslint/no-explicit-any - if (utils.isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( - rate, - )} of type ${JSON.stringify(typeof rate)}.`, - ); - return false; - } - - // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false - if (rate < 0 || rate > 1) { - debugBuild.DEBUG_BUILD && - utils.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`); - return false; +function errorCallback() { + const activeTransaction = getActiveTransaction(); + if (activeTransaction) { + const status = "internal_error"; + DEBUG_BUILD2 && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`); + activeTransaction.setStatus(status); } - return true; } - -exports.isValidSampleRate = isValidSampleRate; -exports.sampleTransaction = sampleTransaction; -//# sourceMappingURL=sampling.js.map - - -/***/ }), - -/***/ 28784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const metricSummary = __nccwpck_require__(23832); -const semanticAttributes = __nccwpck_require__(35366); -const getRootSpan = __nccwpck_require__(23665); -const spanUtils = __nccwpck_require__(59152); -const spanstatus = __nccwpck_require__(48662); - -/** - * Keeps track of finished spans for a given transaction - * @internal - * @hideconstructor - * @hidden - */ -class SpanRecorder { - - constructor(maxlen = 1000) { - this._maxlen = maxlen; - this.spans = []; - } - - /** - * This is just so that we don't run out of memory while recording a lot - * of spans. At some point we just stop and flush out the start of the - * trace tree (i.e.the first n spans with the smallest - * start_timestamp). - */ - add(span) { - if (this.spans.length > this._maxlen) { - // eslint-disable-next-line deprecation/deprecation - span.spanRecorder = undefined; - } else { - this.spans.push(span); - } - } -} - -/** - * Span contains all data about a span - */ -class Span { - /** - * Tags for the span. - * @deprecated Use `spanToJSON(span).atttributes` instead. - */ - - /** - * Data for the span. - * @deprecated Use `spanToJSON(span).atttributes` instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - - /** - * List of spans that were finalized - * - * @deprecated This property will no longer be public. Span recording will be handled internally. - */ - - /** - * @inheritDoc - * @deprecated Use top level `Sentry.getRootSpan()` instead - */ - - /** - * The instrumenter that created this span. - * - * TODO (v8): This can probably be replaced by an `instanceOf` check of the span class. - * the instrumenter can only be sentry or otel so we can check the span instance - * to verify which one it is and remove this field entirely. - * - * @deprecated This field will be removed. - */ - - /** Epoch timestamp in seconds when the span started. */ - - /** Epoch timestamp in seconds when the span ended. */ - - /** Internal keeper of the status */ - - /** - * You should never call the constructor manually, always use `Sentry.startTransaction()` - * or call `startChild()` on an existing span. - * @internal - * @hideconstructor - * @hidden - */ - constructor(spanContext = {}) { - this._traceId = spanContext.traceId || utils.uuid4(); - this._spanId = spanContext.spanId || utils.uuid4().substring(16); - this._startTime = spanContext.startTimestamp || utils.timestampInSeconds(); - // eslint-disable-next-line deprecation/deprecation - this.tags = spanContext.tags ? { ...spanContext.tags } : {}; - // eslint-disable-next-line deprecation/deprecation - this.data = spanContext.data ? { ...spanContext.data } : {}; - // eslint-disable-next-line deprecation/deprecation - this.instrumenter = spanContext.instrumenter || 'sentry'; - - this._attributes = {}; - this.setAttributes({ - [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanContext.origin || 'manual', - [semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, - ...spanContext.attributes, - }); - - // eslint-disable-next-line deprecation/deprecation - this._name = spanContext.name || spanContext.description; - - if (spanContext.parentSpanId) { - this._parentSpanId = spanContext.parentSpanId; - } - // We want to include booleans as well here - if ('sampled' in spanContext) { - this._sampled = spanContext.sampled; - } - if (spanContext.status) { - this._status = spanContext.status; - } - if (spanContext.endTimestamp) { - this._endTime = spanContext.endTimestamp; - } - if (spanContext.exclusiveTime !== undefined) { - this._exclusiveTime = spanContext.exclusiveTime; - } - this._measurements = spanContext.measurements ? { ...spanContext.measurements } : {}; - } - - // This rule conflicts with another eslint rule :( - /* eslint-disable @typescript-eslint/member-ordering */ - - /** - * An alias for `description` of the Span. - * @deprecated Use `spanToJSON(span).description` instead. - */ - get name() { - return this._name || ''; - } - - /** - * Update the name of the span. - * @deprecated Use `spanToJSON(span).description` instead. - */ - set name(name) { - this.updateName(name); - } - - /** - * Get the description of the Span. - * @deprecated Use `spanToJSON(span).description` instead. - */ - get description() { - return this._name; - } - - /** - * Get the description of the Span. - * @deprecated Use `spanToJSON(span).description` instead. - */ - set description(description) { - this._name = description; - } - - /** - * The ID of the trace. - * @deprecated Use `spanContext().traceId` instead. - */ - get traceId() { - return this._traceId; - } - - /** - * The ID of the trace. - * @deprecated You cannot update the traceId of a span after span creation. - */ - set traceId(traceId) { - this._traceId = traceId; - } - - /** - * The ID of the span. - * @deprecated Use `spanContext().spanId` instead. - */ - get spanId() { - return this._spanId; - } - - /** - * The ID of the span. - * @deprecated You cannot update the spanId of a span after span creation. - */ - set spanId(spanId) { - this._spanId = spanId; - } - - /** - * @inheritDoc - * - * @deprecated Use `startSpan` functions instead. - */ - set parentSpanId(string) { - this._parentSpanId = string; - } - - /** - * @inheritDoc - * - * @deprecated Use `spanToJSON(span).parent_span_id` instead. - */ - get parentSpanId() { - return this._parentSpanId; - } - - /** - * Was this span chosen to be sent as part of the sample? - * @deprecated Use `isRecording()` instead. - */ - get sampled() { - return this._sampled; - } - - /** - * Was this span chosen to be sent as part of the sample? - * @deprecated You cannot update the sampling decision of a span after span creation. - */ - set sampled(sampled) { - this._sampled = sampled; - } - - /** - * Attributes for the span. - * @deprecated Use `spanToJSON(span).atttributes` instead. - */ - get attributes() { - return this._attributes; - } - - /** - * Attributes for the span. - * @deprecated Use `setAttributes()` instead. - */ - set attributes(attributes) { - this._attributes = attributes; - } - - /** - * Timestamp in seconds (epoch time) indicating when the span started. - * @deprecated Use `spanToJSON()` instead. - */ - get startTimestamp() { - return this._startTime; - } - - /** - * Timestamp in seconds (epoch time) indicating when the span started. - * @deprecated In v8, you will not be able to update the span start time after creation. - */ - set startTimestamp(startTime) { - this._startTime = startTime; - } - - /** - * Timestamp in seconds when the span ended. - * @deprecated Use `spanToJSON()` instead. - */ - get endTimestamp() { - return this._endTime; - } - - /** - * Timestamp in seconds when the span ended. - * @deprecated Set the end time via `span.end()` instead. - */ - set endTimestamp(endTime) { - this._endTime = endTime; - } - - /** - * The status of the span. - * - * @deprecated Use `spanToJSON().status` instead to get the status. - */ - get status() { - return this._status; - } - - /** - * The status of the span. - * - * @deprecated Use `.setStatus()` instead to set or update the status. - */ - set status(status) { - this._status = status; - } - - /** - * Operation of the span - * - * @deprecated Use `spanToJSON().op` to read the op instead. - */ - get op() { - return this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP] ; - } - - /** - * Operation of the span - * - * @deprecated Use `startSpan()` functions to set or `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op') - * to update the span instead. - */ - set op(op) { - this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP, op); - } - - /** - * The origin of the span, giving context about what created the span. - * - * @deprecated Use `spanToJSON().origin` to read the origin instead. - */ - get origin() { - return this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ; - } - - /** - * The origin of the span, giving context about what created the span. - * - * @deprecated Use `startSpan()` functions to set the origin instead. - */ - set origin(origin) { - this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin); - } - - /* eslint-enable @typescript-eslint/member-ordering */ - - /** @inheritdoc */ - spanContext() { - const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; - return { - spanId, - traceId, - traceFlags: sampled ? spanUtils.TRACE_FLAG_SAMPLED : spanUtils.TRACE_FLAG_NONE, - }; - } - - /** - * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. - * Also the `sampled` decision will be inherited. - * - * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. - */ - startChild( - spanContext, - ) { - const childSpan = new Span({ - ...spanContext, - parentSpanId: this._spanId, - sampled: this._sampled, - traceId: this._traceId, - }); - - // eslint-disable-next-line deprecation/deprecation - childSpan.spanRecorder = this.spanRecorder; - // eslint-disable-next-line deprecation/deprecation - if (childSpan.spanRecorder) { - // eslint-disable-next-line deprecation/deprecation - childSpan.spanRecorder.add(childSpan); - } - - const rootSpan = getRootSpan.getRootSpan(this); - // TODO: still set span.transaction here until we have a more permanent solution - // Probably similarly to the weakmap we hold in node-experimental - // eslint-disable-next-line deprecation/deprecation - childSpan.transaction = rootSpan ; - - if (debugBuild.DEBUG_BUILD && rootSpan) { - const opStr = (spanContext && spanContext.op) || '< unknown op >'; - const nameStr = spanUtils.spanToJSON(childSpan).description || '< unknown name >'; - const idStr = rootSpan.spanContext().spanId; - - const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`; - utils.logger.log(logMessage); - this._logMessage = logMessage; - } - - return childSpan; - } - - /** - * Sets the tag attribute on the current span. - * - * Can also be used to unset a tag, by passing `undefined`. - * - * @param key Tag key - * @param value Tag value - * @deprecated Use `setAttribute()` instead. - */ - setTag(key, value) { - // eslint-disable-next-line deprecation/deprecation - this.tags = { ...this.tags, [key]: value }; - return this; - } - - /** - * Sets the data attribute on the current span - * @param key Data key - * @param value Data value - * @deprecated Use `setAttribute()` instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - setData(key, value) { - // eslint-disable-next-line deprecation/deprecation - this.data = { ...this.data, [key]: value }; - return this; - } - - /** @inheritdoc */ - setAttribute(key, value) { - if (value === undefined) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this._attributes[key]; - } else { - this._attributes[key] = value; - } - } - - /** @inheritdoc */ - setAttributes(attributes) { - Object.keys(attributes).forEach(key => this.setAttribute(key, attributes[key])); - } - - /** - * @inheritDoc - */ - setStatus(value) { - this._status = value; - return this; - } - - /** - * @inheritDoc - * @deprecated Use top-level `setHttpStatus()` instead. - */ - setHttpStatus(httpStatus) { - spanstatus.setHttpStatus(this, httpStatus); - return this; - } - - /** - * @inheritdoc - * - * @deprecated Use `.updateName()` instead. - */ - setName(name) { - this.updateName(name); - } - - /** - * @inheritDoc - */ - updateName(name) { - this._name = name; - return this; - } - - /** - * @inheritDoc - * - * @deprecated Use `spanToJSON(span).status === 'ok'` instead. - */ - isSuccess() { - return this._status === 'ok'; - } - - /** - * @inheritDoc - * - * @deprecated Use `.end()` instead. - */ - finish(endTimestamp) { - return this.end(endTimestamp); +var errorsInstrumented; +var init_errors = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/errors.js"() { + init_esm(); + init_debug_build2(); + init_utils(); + errorsInstrumented = false; + errorCallback.tag = "sentry_tracingErrorCallback"; } +}); - /** @inheritdoc */ - end(endTimestamp) { - // If already ended, skip - if (this._endTime) { - return; - } - const rootSpan = getRootSpan.getRootSpan(this); - if ( - debugBuild.DEBUG_BUILD && - // Don't call this for transactions - rootSpan && - rootSpan.spanContext().spanId !== this._spanId - ) { - const logMessage = this._logMessage; - if (logMessage) { - utils.logger.log((logMessage ).replace('Starting', 'Finishing')); - } - } - - this._endTime = spanUtils.spanTimeInputToSeconds(endTimestamp); - } - - /** - * @inheritDoc - * - * @deprecated Use `spanToTraceHeader()` instead. - */ - toTraceparent() { - return spanUtils.spanToTraceHeader(this); - } - - /** - * @inheritDoc - * - * @deprecated Use `spanToJSON()` or access the fields directly instead. - */ - toContext() { - return utils.dropUndefinedKeys({ - data: this._getData(), - description: this._name, - endTimestamp: this._endTime, - // eslint-disable-next-line deprecation/deprecation - op: this.op, - parentSpanId: this._parentSpanId, - sampled: this._sampled, - spanId: this._spanId, - startTimestamp: this._startTime, - status: this._status, - // eslint-disable-next-line deprecation/deprecation - tags: this.tags, - traceId: this._traceId, - }); - } - - /** - * @inheritDoc - * - * @deprecated Update the fields directly instead. - */ - updateWithContext(spanContext) { - // eslint-disable-next-line deprecation/deprecation - this.data = spanContext.data || {}; - // eslint-disable-next-line deprecation/deprecation - this._name = spanContext.name || spanContext.description; - this._endTime = spanContext.endTimestamp; - // eslint-disable-next-line deprecation/deprecation - this.op = spanContext.op; - this._parentSpanId = spanContext.parentSpanId; - this._sampled = spanContext.sampled; - this._spanId = spanContext.spanId || this._spanId; - this._startTime = spanContext.startTimestamp || this._startTime; - this._status = spanContext.status; - // eslint-disable-next-line deprecation/deprecation - this.tags = spanContext.tags || {}; - this._traceId = spanContext.traceId || this._traceId; - - return this; - } - - /** - * @inheritDoc - * - * @deprecated Use `spanToTraceContext()` util function instead. - */ - getTraceContext() { - return spanUtils.spanToTraceContext(this); - } - - /** - * Get JSON representation of this span. - * - * @hidden - * @internal This method is purely for internal purposes and should not be used outside - * of SDK code. If you need to get a JSON representation of a span, - * use `spanToJSON(span)` instead. - */ - getSpanJSON() { - return utils.dropUndefinedKeys({ - data: this._getData(), - description: this._name, - op: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP] , - parent_span_id: this._parentSpanId, - span_id: this._spanId, - start_timestamp: this._startTime, - status: this._status, - // eslint-disable-next-line deprecation/deprecation - tags: Object.keys(this.tags).length > 0 ? this.tags : undefined, - timestamp: this._endTime, - trace_id: this._traceId, - origin: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] , - _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), - profile_id: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_PROFILE_ID] , - exclusive_time: this._exclusiveTime, - measurements: Object.keys(this._measurements).length > 0 ? this._measurements : undefined, - }); - } - - /** @inheritdoc */ - isRecording() { - return !this._endTime && !!this._sampled; - } - - /** - * Convert the object to JSON. - * @deprecated Use `spanToJSON(span)` instead. - */ - toJSON() { - return this.getSpanJSON(); - } - - /** - * Get the merged data for this span. - * For now, this combines `data` and `attributes` together, - * until eventually we can ingest `attributes` directly. - */ - _getData() - - { - // eslint-disable-next-line deprecation/deprecation - const { data, _attributes: attributes } = this; - - const hasData = Object.keys(data).length > 0; - const hasAttributes = Object.keys(attributes).length > 0; - - if (!hasData && !hasAttributes) { - return undefined; - } - - if (hasData && hasAttributes) { - return { - ...data, - ...attributes, - }; - } - - return hasData ? data : attributes; - } -} - -exports.Span = Span; -exports.SpanRecorder = SpanRecorder; -//# sourceMappingURL=span.js.map - - -/***/ }), - -/***/ 48662: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** The status of an Span. - * - * @deprecated Use string literals - if you require type casting, cast to SpanStatusType type - */ -exports.SpanStatus = void 0; (function (SpanStatus) { - /** The operation completed successfully. */ - const Ok = 'ok'; SpanStatus["Ok"] = Ok; - /** Deadline expired before operation could complete. */ - const DeadlineExceeded = 'deadline_exceeded'; SpanStatus["DeadlineExceeded"] = DeadlineExceeded; - /** 401 Unauthorized (actually does mean unauthenticated according to RFC 7235) */ - const Unauthenticated = 'unauthenticated'; SpanStatus["Unauthenticated"] = Unauthenticated; - /** 403 Forbidden */ - const PermissionDenied = 'permission_denied'; SpanStatus["PermissionDenied"] = PermissionDenied; - /** 404 Not Found. Some requested entity (file or directory) was not found. */ - const NotFound = 'not_found'; SpanStatus["NotFound"] = NotFound; - /** 429 Too Many Requests */ - const ResourceExhausted = 'resource_exhausted'; SpanStatus["ResourceExhausted"] = ResourceExhausted; - /** Client specified an invalid argument. 4xx. */ - const InvalidArgument = 'invalid_argument'; SpanStatus["InvalidArgument"] = InvalidArgument; - /** 501 Not Implemented */ - const Unimplemented = 'unimplemented'; SpanStatus["Unimplemented"] = Unimplemented; - /** 503 Service Unavailable */ - const Unavailable = 'unavailable'; SpanStatus["Unavailable"] = Unavailable; - /** Other/generic 5xx. */ - const InternalError = 'internal_error'; SpanStatus["InternalError"] = InternalError; - /** Unknown. Any non-standard HTTP status code. */ - const UnknownError = 'unknown_error'; SpanStatus["UnknownError"] = UnknownError; - /** The operation was cancelled (typically by the user). */ - const Cancelled = 'cancelled'; SpanStatus["Cancelled"] = Cancelled; - /** Already exists (409) */ - const AlreadyExists = 'already_exists'; SpanStatus["AlreadyExists"] = AlreadyExists; - /** Operation was rejected because the system is not in a state required for the operation's */ - const FailedPrecondition = 'failed_precondition'; SpanStatus["FailedPrecondition"] = FailedPrecondition; - /** The operation was aborted, typically due to a concurrency issue. */ - const Aborted = 'aborted'; SpanStatus["Aborted"] = Aborted; - /** Operation was attempted past the valid range. */ - const OutOfRange = 'out_of_range'; SpanStatus["OutOfRange"] = OutOfRange; - /** Unrecoverable data loss or corruption */ - const DataLoss = 'data_loss'; SpanStatus["DataLoss"] = DataLoss; -})(exports.SpanStatus || (exports.SpanStatus = {})); - -/** - * Converts a HTTP status code into a {@link SpanStatusType}. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or unknown_error. - */ +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/spanstatus.js function getSpanStatusFromHttpCode(httpStatus) { if (httpStatus < 400 && httpStatus >= 100) { - return 'ok'; + return "ok"; } - if (httpStatus >= 400 && httpStatus < 500) { switch (httpStatus) { case 401: - return 'unauthenticated'; + return "unauthenticated"; case 403: - return 'permission_denied'; + return "permission_denied"; case 404: - return 'not_found'; + return "not_found"; case 409: - return 'already_exists'; + return "already_exists"; case 413: - return 'failed_precondition'; + return "failed_precondition"; case 429: - return 'resource_exhausted'; + return "resource_exhausted"; default: - return 'invalid_argument'; + return "invalid_argument"; } } - if (httpStatus >= 500 && httpStatus < 600) { switch (httpStatus) { case 501: - return 'unimplemented'; + return "unimplemented"; case 503: - return 'unavailable'; + return "unavailable"; case 504: - return 'deadline_exceeded'; + return "deadline_exceeded"; default: - return 'internal_error'; + return "internal_error"; } } - - return 'unknown_error'; + return "unknown_error"; } - -/** - * Converts a HTTP status code into a {@link SpanStatusType}. - * - * @deprecated Use {@link spanStatusFromHttpCode} instead. - * This export will be removed in v8 as the signature contains a typo. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or unknown_error. - */ -const spanStatusfromHttpCode = getSpanStatusFromHttpCode; - -/** - * Sets the Http status attributes on the current span based on the http code. - * Additionally, the span's status is updated, depending on the http code. - */ function setHttpStatus(span, httpStatus) { - // TODO (v8): Remove these calls - // Relay does not require us to send the status code as a tag - // For now, just because users might expect it to land as a tag we keep sending it. - // Same with data. - // In v8, we replace both, simply with - // span.setAttribute('http.response.status_code', httpStatus); - - // eslint-disable-next-line deprecation/deprecation - span.setTag('http.status_code', String(httpStatus)); - // eslint-disable-next-line deprecation/deprecation - span.setData('http.response.status_code', httpStatus); - + span.setTag("http.status_code", String(httpStatus)); + span.setData("http.response.status_code", httpStatus); const spanStatus = getSpanStatusFromHttpCode(httpStatus); - if (spanStatus !== 'unknown_error') { + if (spanStatus !== "unknown_error") { span.setStatus(spanStatus); } } +var SpanStatus, spanStatusfromHttpCode; +var init_spanstatus = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/spanstatus.js"() { + (function(SpanStatus2) { + const Ok = "ok"; + SpanStatus2["Ok"] = Ok; + const DeadlineExceeded = "deadline_exceeded"; + SpanStatus2["DeadlineExceeded"] = DeadlineExceeded; + const Unauthenticated = "unauthenticated"; + SpanStatus2["Unauthenticated"] = Unauthenticated; + const PermissionDenied = "permission_denied"; + SpanStatus2["PermissionDenied"] = PermissionDenied; + const NotFound = "not_found"; + SpanStatus2["NotFound"] = NotFound; + const ResourceExhausted = "resource_exhausted"; + SpanStatus2["ResourceExhausted"] = ResourceExhausted; + const InvalidArgument = "invalid_argument"; + SpanStatus2["InvalidArgument"] = InvalidArgument; + const Unimplemented = "unimplemented"; + SpanStatus2["Unimplemented"] = Unimplemented; + const Unavailable = "unavailable"; + SpanStatus2["Unavailable"] = Unavailable; + const InternalError = "internal_error"; + SpanStatus2["InternalError"] = InternalError; + const UnknownError = "unknown_error"; + SpanStatus2["UnknownError"] = UnknownError; + const Cancelled = "cancelled"; + SpanStatus2["Cancelled"] = Cancelled; + const AlreadyExists = "already_exists"; + SpanStatus2["AlreadyExists"] = AlreadyExists; + const FailedPrecondition = "failed_precondition"; + SpanStatus2["FailedPrecondition"] = FailedPrecondition; + const Aborted = "aborted"; + SpanStatus2["Aborted"] = Aborted; + const OutOfRange = "out_of_range"; + SpanStatus2["OutOfRange"] = OutOfRange; + const DataLoss = "data_loss"; + SpanStatus2["DataLoss"] = DataLoss; + })(SpanStatus || (SpanStatus = {})); + spanStatusfromHttpCode = getSpanStatusFromHttpCode; + } +}); -exports.getSpanStatusFromHttpCode = getSpanStatusFromHttpCode; -exports.setHttpStatus = setHttpStatus; -exports.spanStatusfromHttpCode = spanStatusfromHttpCode; -//# sourceMappingURL=spanstatus.js.map - - -/***/ }), - -/***/ 57795: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const hub = __nccwpck_require__(54724); -const spanUtils = __nccwpck_require__(59152); -__nccwpck_require__(13955); -__nccwpck_require__(48662); -const dynamicSamplingContext = __nccwpck_require__(18359); -const exports$1 = __nccwpck_require__(78820); -const handleCallbackErrors = __nccwpck_require__(26103); -const hasTracingEnabled = __nccwpck_require__(55726); - -/** - * Wraps a function with a transaction/span and finishes the span after the function is done. - * - * Note that if you have not enabled tracing extensions via `addTracingExtensions` - * or you didn't set `tracesSampleRate`, this function will not generate spans - * and the `span` returned from the callback will be undefined. - * - * This function is meant to be used internally and may break at any time. Use at your own risk. - * - * @internal - * @private - * - * @deprecated Use `startSpan` instead. - */ -function trace( - context, - callback, - // eslint-disable-next-line @typescript-eslint/no-empty-function - onError = () => {}, - // eslint-disable-next-line @typescript-eslint/no-empty-function - afterFinish = () => {}, -) { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - const scope = exports$1.getCurrentScope(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/handleCallbackErrors.js +function handleCallbackErrors(fn, onError, onFinally = () => { +}) { + let maybePromiseResult; + try { + maybePromiseResult = fn(); + } catch (e) { + onError(e); + onFinally(); + throw e; + } + return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); +} +function maybeHandlePromiseRejection(value, onError, onFinally) { + if (isThenable(value)) { + return value.then( + (res) => { + onFinally(); + return res; + }, + (e) => { + onError(e); + onFinally(); + throw e; + } + ); + } + onFinally(); + return value; +} +var init_handleCallbackErrors = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/handleCallbackErrors.js"() { + init_esm(); + } +}); + +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/hasTracingEnabled.js +function hasTracingEnabled(maybeOptions) { + if (typeof __SENTRY_TRACING__ === "boolean" && !__SENTRY_TRACING__) { + return false; + } + const client = getClient(); + const options2 = maybeOptions || client && client.getOptions(); + return !!options2 && (options2.enableTracing || "tracesSampleRate" in options2 || "tracesSampler" in options2); +} +var init_hasTracingEnabled = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/hasTracingEnabled.js"() { + init_exports(); + } +}); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/trace.js +function trace(context, callback, onError = () => { +}, afterFinish = () => { +}) { + const hub = getCurrentHub(); + const scope = getCurrentScope(); + const parentSpan = scope.getSpan(); const spanContext = normalizeContext(context); - const activeSpan = createChildSpanOrTransaction(hub$1, { + const activeSpan = createChildSpanOrTransaction(hub, { parentSpan, spanContext, forceTransaction: false, - scope, + scope }); - - // eslint-disable-next-line deprecation/deprecation scope.setSpan(activeSpan); - - return handleCallbackErrors.handleCallbackErrors( + return handleCallbackErrors( () => callback(activeSpan), - error => { - activeSpan && activeSpan.setStatus('internal_error'); + (error) => { + activeSpan && activeSpan.setStatus("internal_error"); onError(error, activeSpan); }, () => { activeSpan && activeSpan.end(); - // eslint-disable-next-line deprecation/deprecation scope.setSpan(parentSpan); afterFinish(); - }, + } ); } - -/** - * Wraps a function with a transaction/span and finishes the span after the function is done. - * The created span is the active span and will be used as parent by other spans created inside the function - * and can be accessed via `Sentry.getSpan()`, as long as the function is executed while the scope is active. - * - * If you want to create a span that is not set as active, use {@link startInactiveSpan}. - * - * Note that if you have not enabled tracing extensions via `addTracingExtensions` - * or you didn't set `tracesSampleRate`, this function will not generate spans - * and the `span` returned from the callback will be undefined. - */ function startSpan(context, callback) { const spanContext = normalizeContext(context); - - return hub.runWithAsyncContext(() => { - return exports$1.withScope(context.scope, scope => { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation + return runWithAsyncContext(() => { + return withScope(context.scope, (scope) => { + const hub = getCurrentHub(); const parentSpan = scope.getSpan(); - const shouldSkipSpan = context.onlyIfParent && !parentSpan; - const activeSpan = shouldSkipSpan - ? undefined - : createChildSpanOrTransaction(hub$1, { - parentSpan, - spanContext, - forceTransaction: context.forceTransaction, - scope, - }); - - return handleCallbackErrors.handleCallbackErrors( + const activeSpan = shouldSkipSpan ? void 0 : createChildSpanOrTransaction(hub, { + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); + return handleCallbackErrors( () => callback(activeSpan), () => { - // Only update the span status if it hasn't been changed yet if (activeSpan) { - const { status } = spanUtils.spanToJSON(activeSpan); - if (!status || status === 'ok') { - activeSpan.setStatus('internal_error'); + const { status } = spanToJSON(activeSpan); + if (!status || status === "ok") { + activeSpan.setStatus("internal_error"); } } }, - () => activeSpan && activeSpan.end(), + () => activeSpan && activeSpan.end() ); }); }); } - -/** - * @deprecated Use {@link startSpan} instead. - */ -const startActiveSpan = startSpan; - -/** - * Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span - * after the function is done automatically. You'll have to call `span.end()` manually. - * - * The created span is the active span and will be used as parent by other spans created inside the function - * and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active. - * - * Note that if you have not enabled tracing extensions via `addTracingExtensions` - * or you didn't set `tracesSampleRate`, this function will not generate spans - * and the `span` returned from the callback will be undefined. - */ -function startSpanManual( - context, - callback, -) { +function startSpanManual(context, callback) { const spanContext = normalizeContext(context); - - return hub.runWithAsyncContext(() => { - return exports$1.withScope(context.scope, scope => { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation + return runWithAsyncContext(() => { + return withScope(context.scope, (scope) => { + const hub = getCurrentHub(); const parentSpan = scope.getSpan(); - const shouldSkipSpan = context.onlyIfParent && !parentSpan; - const activeSpan = shouldSkipSpan - ? undefined - : createChildSpanOrTransaction(hub$1, { - parentSpan, - spanContext, - forceTransaction: context.forceTransaction, - scope, - }); - + const activeSpan = shouldSkipSpan ? void 0 : createChildSpanOrTransaction(hub, { + parentSpan, + spanContext, + forceTransaction: context.forceTransaction, + scope + }); function finishAndSetSpan() { activeSpan && activeSpan.end(); } - - return handleCallbackErrors.handleCallbackErrors( + return handleCallbackErrors( () => callback(activeSpan, finishAndSetSpan), () => { - // Only update the span status if it hasn't been changed yet, and the span is not yet finished if (activeSpan && activeSpan.isRecording()) { - const { status } = spanUtils.spanToJSON(activeSpan); - if (!status || status === 'ok') { - activeSpan.setStatus('internal_error'); + const { status } = spanToJSON(activeSpan); + if (!status || status === "ok") { + activeSpan.setStatus("internal_error"); } } - }, + } ); }); }); } - -/** - * Creates a span. This span is not set as active, so will not get automatic instrumentation spans - * as children or be able to be accessed via `Sentry.getSpan()`. - * - * If you want to create a span that is set as active, use {@link startSpan}. - * - * Note that if you have not enabled tracing extensions via `addTracingExtensions` - * or you didn't set `tracesSampleRate` or `tracesSampler`, this function will not generate spans - * and the `span` returned from the callback will be undefined. - */ function startInactiveSpan(context) { - if (!hasTracingEnabled.hasTracingEnabled()) { - return undefined; + if (!hasTracingEnabled()) { + return void 0; } - const spanContext = normalizeContext(context); - // eslint-disable-next-line deprecation/deprecation - const hub$1 = hub.getCurrentHub(); - const parentSpan = context.scope - ? // eslint-disable-next-line deprecation/deprecation - context.scope.getSpan() - : getActiveSpan(); - + const hub = getCurrentHub(); + const parentSpan = context.scope ? ( + // eslint-disable-next-line deprecation/deprecation + context.scope.getSpan() + ) : getActiveSpan(); const shouldSkipSpan = context.onlyIfParent && !parentSpan; - if (shouldSkipSpan) { - return undefined; + return void 0; } - - const scope = context.scope || exports$1.getCurrentScope(); - - // Even though we don't actually want to make this span active on the current scope, - // we need to make it active on a temporary scope that we use for event processing - // as otherwise, it won't pick the correct span for the event when processing it - const temporaryScope = (scope ).clone(); - - return createChildSpanOrTransaction(hub$1, { + const scope = context.scope || getCurrentScope(); + const temporaryScope = scope.clone(); + return createChildSpanOrTransaction(hub, { parentSpan, spanContext, forceTransaction: context.forceTransaction, - scope: temporaryScope, + scope: temporaryScope }); } - -/** - * Returns the currently active span. - */ function getActiveSpan() { - // eslint-disable-next-line deprecation/deprecation - return exports$1.getCurrentScope().getSpan(); + return getCurrentScope().getSpan(); } - -const continueTrace = ( - { - sentryTrace, - baggage, - } - -, - callback, -) => { - // TODO(v8): Change this function so it doesn't do anything besides setting the propagation context on the current scope: - /* - return withScope((scope) => { - const propagationContext = propagationContextFromHeaders(sentryTrace, baggage); - scope.setPropagationContext(propagationContext); - return callback(); - }) - */ - - const currentScope = exports$1.getCurrentScope(); - - // eslint-disable-next-line deprecation/deprecation - const { traceparentData, dynamicSamplingContext, propagationContext } = utils.tracingContextFromHeaders( - sentryTrace, - baggage, - ); - - currentScope.setPropagationContext(propagationContext); - - if (debugBuild.DEBUG_BUILD && traceparentData) { - utils.logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`); - } - - const transactionContext = { - ...traceparentData, - metadata: utils.dropUndefinedKeys({ - dynamicSamplingContext, - }), - }; - - if (!callback) { - return transactionContext; - } - - return hub.runWithAsyncContext(() => { - return callback(transactionContext); - }); -}; - -function createChildSpanOrTransaction( - // eslint-disable-next-line deprecation/deprecation - hub$1, - { - parentSpan, - spanContext, - forceTransaction, - scope, - } - -, -) { - if (!hasTracingEnabled.hasTracingEnabled()) { - return undefined; +function createChildSpanOrTransaction(hub, { + parentSpan, + spanContext, + forceTransaction, + scope +}) { + if (!hasTracingEnabled()) { + return void 0; } - - const isolationScope = hub.getIsolationScope(); - + const isolationScope = getIsolationScope(); let span; if (parentSpan && !forceTransaction) { - // eslint-disable-next-line deprecation/deprecation span = parentSpan.startChild(spanContext); } else if (parentSpan) { - // If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope - const dsc = dynamicSamplingContext.getDynamicSamplingContextFromSpan(parentSpan); + const dsc = getDynamicSamplingContextFromSpan(parentSpan); const { traceId, spanId: parentSpanId } = parentSpan.spanContext(); - const sampled = spanUtils.spanIsSampled(parentSpan); - - // eslint-disable-next-line deprecation/deprecation - span = hub$1.startTransaction({ + const sampled = spanIsSampled(parentSpan); + span = hub.startTransaction({ traceId, parentSpanId, parentSampled: sampled, @@ -18538,17 +16668,15 @@ function createChildSpanOrTransaction( metadata: { dynamicSamplingContext: dsc, // eslint-disable-next-line deprecation/deprecation - ...spanContext.metadata, - }, + ...spanContext.metadata + } }); } else { const { traceId, dsc, parentSpanId, sampled } = { ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext(), + ...scope.getPropagationContext() }; - - // eslint-disable-next-line deprecation/deprecation - span = hub$1.startTransaction({ + span = hub.startTransaction({ traceId, parentSpanId, parentSampled: sampled, @@ -18556,5289 +16684,5296 @@ function createChildSpanOrTransaction( metadata: { dynamicSamplingContext: dsc, // eslint-disable-next-line deprecation/deprecation - ...spanContext.metadata, - }, + ...spanContext.metadata + } }); } - - // We always set this as active span on the scope - // In the case of this being an inactive span, we ensure to pass a detached scope in here in the first place - // But by having this here, we can ensure that the lookup through `getCapturedScopesOnSpan` results in the correct scope & span combo - // eslint-disable-next-line deprecation/deprecation scope.setSpan(span); - setCapturedScopesOnSpan(span, scope, isolationScope); - return span; } - -/** - * This converts StartSpanOptions to TransactionContext. - * For the most part (for now) we accept the same options, - * but some of them need to be transformed. - * - * Eventually the StartSpanOptions will be more aligned with OpenTelemetry. - */ function normalizeContext(context) { if (context.startTime) { const ctx = { ...context }; - ctx.startTimestamp = spanUtils.spanTimeInputToSeconds(context.startTime); + ctx.startTimestamp = spanTimeInputToSeconds(context.startTime); delete ctx.startTime; return ctx; } - return context; } - -const SCOPE_ON_START_SPAN_FIELD = '_sentryScope'; -const ISOLATION_SCOPE_ON_START_SPAN_FIELD = '_sentryIsolationScope'; - function setCapturedScopesOnSpan(span, scope, isolationScope) { if (span) { - utils.addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope); - utils.addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope); + addNonEnumerableProperty(span, ISOLATION_SCOPE_ON_START_SPAN_FIELD, isolationScope); + addNonEnumerableProperty(span, SCOPE_ON_START_SPAN_FIELD, scope); } } - -/** - * Grabs the scope and isolation scope off a span that were active when the span was started. - */ function getCapturedScopesOnSpan(span) { return { - scope: (span )[SCOPE_ON_START_SPAN_FIELD], - isolationScope: (span )[ISOLATION_SCOPE_ON_START_SPAN_FIELD], + scope: span[SCOPE_ON_START_SPAN_FIELD], + isolationScope: span[ISOLATION_SCOPE_ON_START_SPAN_FIELD] }; } - -exports.continueTrace = continueTrace; -exports.getActiveSpan = getActiveSpan; -exports.getCapturedScopesOnSpan = getCapturedScopesOnSpan; -exports.startActiveSpan = startActiveSpan; -exports.startInactiveSpan = startInactiveSpan; -exports.startSpan = startSpan; -exports.startSpanManual = startSpanManual; -exports.trace = trace; -//# sourceMappingURL=trace.js.map - - -/***/ }), - -/***/ 88738: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); -const hub = __nccwpck_require__(54724); -const metricSummary = __nccwpck_require__(23832); -const semanticAttributes = __nccwpck_require__(35366); -const spanUtils = __nccwpck_require__(59152); -const dynamicSamplingContext = __nccwpck_require__(18359); -const span = __nccwpck_require__(28784); -const trace = __nccwpck_require__(57795); - -/** JSDoc */ -class Transaction extends span.Span { - /** - * The reference to the current hub. - */ - // eslint-disable-next-line deprecation/deprecation - - // DO NOT yet remove this property, it is used in a hack for v7 backwards compatibility. - - /** - * This constructor should never be called manually. Those instrumenting tracing should use - * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`. - * @internal - * @hideconstructor - * @hidden - * - * @deprecated Transactions will be removed in v8. Use spans instead. - */ - // eslint-disable-next-line deprecation/deprecation - constructor(transactionContext, hub$1) { - super(transactionContext); - this._contexts = {}; - - // eslint-disable-next-line deprecation/deprecation - this._hub = hub$1 || hub.getCurrentHub(); - - this._name = transactionContext.name || ''; - - this._metadata = { - // eslint-disable-next-line deprecation/deprecation - ...transactionContext.metadata, - }; - - this._trimEnd = transactionContext.trimEnd; - - // this is because transactions are also spans, and spans have a transaction pointer - // TODO (v8): Replace this with another way to set the root span - // eslint-disable-next-line deprecation/deprecation - this.transaction = this; - - // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means - // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means) - const incomingDynamicSamplingContext = this._metadata.dynamicSamplingContext; - if (incomingDynamicSamplingContext) { - // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext` - this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext }; - } - } - - // This sadly conflicts with the getter/setter ordering :( - /* eslint-disable @typescript-eslint/member-ordering */ - - /** - * Getter for `name` property. - * @deprecated Use `spanToJSON(span).description` instead. - */ - get name() { - return this._name; - } - - /** - * Setter for `name` property, which also sets `source` as custom. - * @deprecated Use `updateName()` and `setMetadata()` instead. - */ - set name(newName) { - // eslint-disable-next-line deprecation/deprecation - this.setName(newName); - } - - /** - * Get the metadata for this transaction. - * @deprecated Use `spanGetMetadata(transaction)` instead. - */ - get metadata() { - // We merge attributes in for backwards compatibility - return { - // Defaults - // eslint-disable-next-line deprecation/deprecation - source: 'custom', - spanMetadata: {}, - - // Legacy metadata - ...this._metadata, - - // From attributes - ...(this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] && { - source: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] , - }), - ...(this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] && { - sampleRate: this._attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] , - }), +var startActiveSpan, continueTrace, SCOPE_ON_START_SPAN_FIELD, ISOLATION_SCOPE_ON_START_SPAN_FIELD; +var init_trace = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/trace.js"() { + init_esm(); + init_debug_build2(); + init_hub(); + init_spanUtils(); + init_dynamicSamplingContext(); + init_exports(); + init_handleCallbackErrors(); + init_hasTracingEnabled(); + startActiveSpan = startSpan; + continueTrace = ({ + sentryTrace, + baggage + }, callback) => { + const currentScope = getCurrentScope(); + const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders( + sentryTrace, + baggage + ); + currentScope.setPropagationContext(propagationContext); + if (DEBUG_BUILD2 && traceparentData) { + logger.log(`[Tracing] Continuing trace ${traceparentData.traceId}.`); + } + const transactionContext = { + ...traceparentData, + metadata: dropUndefinedKeys({ + dynamicSamplingContext + }) + }; + if (!callback) { + return transactionContext; + } + return runWithAsyncContext(() => { + return callback(transactionContext); + }); }; + SCOPE_ON_START_SPAN_FIELD = "_sentryScope"; + ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope"; } +}); - /** - * Update the metadata for this transaction. - * @deprecated Use `spanGetMetadata(transaction)` instead. - */ - set metadata(metadata) { - this._metadata = metadata; - } - - /* eslint-enable @typescript-eslint/member-ordering */ - - /** - * Setter for `name` property, which also sets `source` on the metadata. - * - * @deprecated Use `.updateName()` and `.setAttribute()` instead. - */ - setName(name, source = 'custom') { - this._name = name; - this.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source); - } - - /** @inheritdoc */ - updateName(name) { - this._name = name; - return this; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/metric-summary.js +function getMetricStorageForSpan(span) { + return SPAN_METRIC_SUMMARY ? SPAN_METRIC_SUMMARY.get(span) : void 0; +} +function getMetricSummaryJsonForSpan(span) { + const storage = getMetricStorageForSpan(span); + if (!storage) { + return void 0; } - - /** - * Attaches SpanRecorder to the span itself - * @param maxlen maximum number of spans that can be recorded - */ - initSpanRecorder(maxlen = 1000) { - // eslint-disable-next-line deprecation/deprecation - if (!this.spanRecorder) { - // eslint-disable-next-line deprecation/deprecation - this.spanRecorder = new span.SpanRecorder(maxlen); + const output = {}; + for (const [, [exportKey, summary]] of storage) { + if (!output[exportKey]) { + output[exportKey] = []; } - // eslint-disable-next-line deprecation/deprecation - this.spanRecorder.add(this); + output[exportKey].push(dropUndefinedKeys(summary)); } - - /** - * Set the context of a transaction event. - * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction. - */ - setContext(key, context) { - if (context === null) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this._contexts[key]; + return output; +} +function updateMetricSummaryOnActiveSpan(metricType, sanitizedName, value, unit, tags, bucketKey) { + const span = getActiveSpan(); + if (span) { + const storage = getMetricStorageForSpan(span) || /* @__PURE__ */ new Map(); + const exportKey = `${metricType}:${sanitizedName}@${unit}`; + const bucketItem = storage.get(bucketKey); + if (bucketItem) { + const [, summary] = bucketItem; + storage.set(bucketKey, [ + exportKey, + { + min: Math.min(summary.min, value), + max: Math.max(summary.max, value), + count: summary.count += 1, + sum: summary.sum += value, + tags: summary.tags + } + ]); } else { - this._contexts[key] = context; + storage.set(bucketKey, [ + exportKey, + { + min: value, + max: value, + count: 1, + sum: value, + tags + } + ]); } - } - - /** - * @inheritDoc - * - * @deprecated Use top-level `setMeasurement()` instead. - */ - setMeasurement(name, value, unit = '') { - this._measurements[name] = { value, unit }; - } - - /** - * Store metadata on this transaction. - * @deprecated Use attributes or store data on the scope instead. - */ - setMetadata(newMetadata) { - this._metadata = { ...this._metadata, ...newMetadata }; - } - - /** - * @inheritDoc - */ - end(endTimestamp) { - const timestampInS = spanUtils.spanTimeInputToSeconds(endTimestamp); - const transaction = this._finishTransaction(timestampInS); - if (!transaction) { - return undefined; + if (!SPAN_METRIC_SUMMARY) { + SPAN_METRIC_SUMMARY = /* @__PURE__ */ new WeakMap(); } - // eslint-disable-next-line deprecation/deprecation - return this._hub.captureEvent(transaction); - } - - /** - * @inheritDoc - */ - toContext() { - // eslint-disable-next-line deprecation/deprecation - const spanContext = super.toContext(); - - return utils.dropUndefinedKeys({ - ...spanContext, - name: this._name, - trimEnd: this._trimEnd, - }); - } - - /** - * @inheritDoc - */ - updateWithContext(transactionContext) { - // eslint-disable-next-line deprecation/deprecation - super.updateWithContext(transactionContext); - - this._name = transactionContext.name || ''; - this._trimEnd = transactionContext.trimEnd; - - return this; - } - - /** - * @inheritdoc - * - * @experimental - * - * @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead. - */ - getDynamicSamplingContext() { - return dynamicSamplingContext.getDynamicSamplingContextFromSpan(this); + SPAN_METRIC_SUMMARY.set(span, storage); } - - /** - * Override the current hub with a new one. - * Used if you want another hub to finish the transaction. - * - * @internal - */ - // eslint-disable-next-line deprecation/deprecation - setHub(hub) { - this._hub = hub; +} +var SPAN_METRIC_SUMMARY; +var init_metric_summary = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/metric-summary.js"() { + init_esm(); + init_trace(); } +}); - /** - * Get the profile id of the transaction. - */ - getProfileId() { - if (this._contexts !== undefined && this._contexts['profile'] !== undefined) { - return this._contexts['profile'].profile_id ; - } - return undefined; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/semanticAttributes.js +var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_PROFILE_ID; +var init_semanticAttributes = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/semanticAttributes.js"() { + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source"; + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate"; + SEMANTIC_ATTRIBUTE_SENTRY_OP = "sentry.op"; + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = "sentry.origin"; + SEMANTIC_ATTRIBUTE_PROFILE_ID = "profile_id"; } +}); - /** - * Finish the transaction & prepare the event to send to Sentry. - */ - _finishTransaction(endTimestamp) { - // This transaction is already finished, so we should not flush it again. - if (this._endTime !== undefined) { - return undefined; - } - - if (!this._name) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Transaction has no name, falling back to ``.'); - this._name = ''; - } - - // just sets the end timestamp - super.end(endTimestamp); - - // eslint-disable-next-line deprecation/deprecation - const client = this._hub.getClient(); - if (client && client.emit) { - client.emit('finishTransaction', this); - } - - if (this._sampled !== true) { - // At this point if `sampled !== true` we want to discard the transaction. - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.'); - - if (client) { - client.recordDroppedEvent('sample_rate', 'transaction'); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/span.js +var SpanRecorder, Span; +var init_span = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/span.js"() { + init_esm(); + init_debug_build2(); + init_metric_summary(); + init_semanticAttributes(); + init_getRootSpan(); + init_spanUtils(); + init_spanstatus(); + SpanRecorder = class { + constructor(maxlen = 1e3) { + this._maxlen = maxlen; + this.spans = []; } - - return undefined; - } - - // eslint-disable-next-line deprecation/deprecation - const finishedSpans = this.spanRecorder - ? // eslint-disable-next-line deprecation/deprecation - this.spanRecorder.spans.filter(span => span !== this && spanUtils.spanToJSON(span).timestamp) - : []; - - if (this._trimEnd && finishedSpans.length > 0) { - const endTimes = finishedSpans.map(span => spanUtils.spanToJSON(span).timestamp).filter(Boolean) ; - this._endTime = endTimes.reduce((prev, current) => { - return prev > current ? prev : current; - }); - } - - const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = trace.getCapturedScopesOnSpan(this); - - // eslint-disable-next-line deprecation/deprecation - const { metadata } = this; - // eslint-disable-next-line deprecation/deprecation - const { source } = metadata; - - const transaction = { - contexts: { - ...this._contexts, - // We don't want to override trace context - trace: spanUtils.spanToTraceContext(this), - }, - // TODO: Pass spans serialized via `spanToJSON()` here instead in v8. - spans: finishedSpans, - start_timestamp: this._startTime, - // eslint-disable-next-line deprecation/deprecation - tags: this.tags, - timestamp: this._endTime, - transaction: this._name, - type: 'transaction', - sdkProcessingMetadata: { - ...metadata, - capturedSpanScope, - capturedSpanIsolationScope, - ...utils.dropUndefinedKeys({ - dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(this), - }), - }, - _metrics_summary: metricSummary.getMetricSummaryJsonForSpan(this), - ...(source && { - transaction_info: { - source, - }, - }), - }; - - const hasMeasurements = Object.keys(this._measurements).length > 0; - - if (hasMeasurements) { - debugBuild.DEBUG_BUILD && - utils.logger.log( - '[Measurements] Adding measurements to transaction', - JSON.stringify(this._measurements, undefined, 2), - ); - transaction.measurements = this._measurements; - } - - // eslint-disable-next-line deprecation/deprecation - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`); - - return transaction; - } -} - -exports.Transaction = Transaction; -//# sourceMappingURL=transaction.js.map - - -/***/ }), - -/***/ 29807: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const hub = __nccwpck_require__(54724); - -/** - * Grabs active transaction off scope. - * - * @deprecated You should not rely on the transaction, but just use `startSpan()` APIs instead. - */ -// eslint-disable-next-line deprecation/deprecation -function getActiveTransaction(maybeHub) { - // eslint-disable-next-line deprecation/deprecation - const hub$1 = maybeHub || hub.getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation - const scope = hub$1.getScope(); - // eslint-disable-next-line deprecation/deprecation - return scope.getTransaction() ; -} - -/** - * The `extractTraceparentData` function and `TRACEPARENT_REGEXP` constant used - * to be declared in this file. It was later moved into `@sentry/utils` as part of a - * move to remove `@sentry/tracing` dependencies from `@sentry/node` (`extractTraceparentData` - * is the only tracing function used by `@sentry/node`). - * - * These exports are kept here for backwards compatability's sake. - * - * See https://github.com/getsentry/sentry-javascript/issues/4642 for more details. - * - * @deprecated Import this function from `@sentry/utils` instead - */ -const extractTraceparentData = utils.extractTraceparentData; - -exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; -exports.extractTraceparentData = extractTraceparentData; -exports.getActiveTransaction = getActiveTransaction; -//# sourceMappingURL=utils.js.map - - -/***/ }), - -/***/ 56669: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); - -const DEFAULT_TRANSPORT_BUFFER_SIZE = 30; - -/** - * Creates an instance of a Sentry `Transport` - * - * @param options - * @param makeRequest - */ -function createTransport( - options, - makeRequest, - buffer = utils.makePromiseBuffer( - options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE, - ), -) { - let rateLimits = {}; - const flush = (timeout) => buffer.drain(timeout); - - function send(envelope) { - const filteredEnvelopeItems = []; - - // Drop rate limited items from envelope - utils.forEachEnvelopeItem(envelope, (item, type) => { - const dataCategory = utils.envelopeItemTypeToDataCategory(type); - if (utils.isRateLimited(rateLimits, dataCategory)) { - const event = getEventForEnvelopeItem(item, type); - options.recordDroppedEvent('ratelimit_backoff', dataCategory, event); - } else { - filteredEnvelopeItems.push(item); + /** + * This is just so that we don't run out of memory while recording a lot + * of spans. At some point we just stop and flush out the start of the + * trace tree (i.e.the first n spans with the smallest + * start_timestamp). + */ + add(span) { + if (this.spans.length > this._maxlen) { + span.spanRecorder = void 0; + } else { + this.spans.push(span); + } } - }); - - // Skip sending if envelope is empty after filtering out rate limited events - if (filteredEnvelopeItems.length === 0) { - return utils.resolvedSyncPromise(); - } - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const filteredEnvelope = utils.createEnvelope(envelope[0], filteredEnvelopeItems ); - - // Creates client report for each item in an envelope - const recordEnvelopeLoss = (reason) => { - utils.forEachEnvelopeItem(filteredEnvelope, (item, type) => { - const event = getEventForEnvelopeItem(item, type); - options.recordDroppedEvent(reason, utils.envelopeItemTypeToDataCategory(type), event); - }); }; - - const requestTask = () => - makeRequest({ body: utils.serializeEnvelope(filteredEnvelope, options.textEncoder) }).then( - response => { - // We don't want to throw on NOK responses, but we want to at least log them - if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`); - } - - rateLimits = utils.updateRateLimits(rateLimits, response); - return response; - }, - error => { - recordEnvelopeLoss('network_error'); - throw error; - }, - ); - - return buffer.add(requestTask).then( - result => result, - error => { - if (error instanceof utils.SentryError) { - debugBuild.DEBUG_BUILD && utils.logger.error('Skipped sending event because buffer is full.'); - recordEnvelopeLoss('queue_overflow'); - return utils.resolvedSyncPromise(); - } else { - throw error; + Span = class _Span { + /** + * Tags for the span. + * @deprecated Use `spanToJSON(span).atttributes` instead. + */ + /** + * Data for the span. + * @deprecated Use `spanToJSON(span).atttributes` instead. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + /** + * List of spans that were finalized + * + * @deprecated This property will no longer be public. Span recording will be handled internally. + */ + /** + * @inheritDoc + * @deprecated Use top level `Sentry.getRootSpan()` instead + */ + /** + * The instrumenter that created this span. + * + * TODO (v8): This can probably be replaced by an `instanceOf` check of the span class. + * the instrumenter can only be sentry or otel so we can check the span instance + * to verify which one it is and remove this field entirely. + * + * @deprecated This field will be removed. + */ + /** Epoch timestamp in seconds when the span started. */ + /** Epoch timestamp in seconds when the span ended. */ + /** Internal keeper of the status */ + /** + * You should never call the constructor manually, always use `Sentry.startTransaction()` + * or call `startChild()` on an existing span. + * @internal + * @hideconstructor + * @hidden + */ + constructor(spanContext = {}) { + this._traceId = spanContext.traceId || uuid4(); + this._spanId = spanContext.spanId || uuid4().substring(16); + this._startTime = spanContext.startTimestamp || timestampInSeconds(); + this.tags = spanContext.tags ? { ...spanContext.tags } : {}; + this.data = spanContext.data ? { ...spanContext.data } : {}; + this.instrumenter = spanContext.instrumenter || "sentry"; + this._attributes = {}; + this.setAttributes({ + [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanContext.origin || "manual", + [SEMANTIC_ATTRIBUTE_SENTRY_OP]: spanContext.op, + ...spanContext.attributes + }); + this._name = spanContext.name || spanContext.description; + if (spanContext.parentSpanId) { + this._parentSpanId = spanContext.parentSpanId; } - }, - ); - } - - // We use this to identifify if the transport is the base transport - // TODO (v8): Remove this again as we'll no longer need it - send.__sentry__baseTransport__ = true; - - return { - send, - flush, - }; -} - -function getEventForEnvelopeItem(item, type) { - if (type !== 'event' && type !== 'transaction') { - return undefined; - } - - return Array.isArray(item) ? (item )[1] : undefined; -} - -exports.DEFAULT_TRANSPORT_BUFFER_SIZE = DEFAULT_TRANSPORT_BUFFER_SIZE; -exports.createTransport = createTransport; -//# sourceMappingURL=base.js.map - - -/***/ }), - -/***/ 19111: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const api = __nccwpck_require__(84191); - -/** - * Gets an event from an envelope. - * - * This is only exported for use in the tests - */ -function eventFromEnvelope(env, types) { - let event; - - utils.forEachEnvelopeItem(env, (item, type) => { - if (types.includes(type)) { - event = Array.isArray(item) ? (item )[1] : undefined; - } - // bail out if we found an event - return !!event; - }); - - return event; -} - -/** - * Creates a transport that overrides the release on all events. - */ -function makeOverrideReleaseTransport( - createTransport, - release, -) { - return options => { - const transport = createTransport(options); - - return { - ...transport, - send: async (envelope) => { - const event = eventFromEnvelope(envelope, ['event', 'transaction', 'profile', 'replay_event']); - - if (event) { - event.release = release; + if ("sampled" in spanContext) { + this._sampled = spanContext.sampled; } - return transport.send(envelope); - }, - }; - }; -} - -/** Overrides the DSN in the envelope header */ -function overrideDsn(envelope, dsn) { - return utils.createEnvelope( - dsn - ? { - ...envelope[0], - dsn, + if (spanContext.status) { + this._status = spanContext.status; } - : envelope[0], - envelope[1], - ); -} - -/** - * Creates a transport that can send events to different DSNs depending on the envelope contents. - */ -function makeMultiplexedTransport( - createTransport, - matcher, -) { - return options => { - const fallbackTransport = createTransport(options); - const otherTransports = new Map(); - - function getTransport(dsn, release) { - // We create a transport for every unique dsn/release combination as there may be code from multiple releases in - // use at the same time - const key = release ? `${dsn}:${release}` : dsn; - - let transport = otherTransports.get(key); - - if (!transport) { - const validatedDsn = utils.dsnFromString(dsn); - if (!validatedDsn) { - return undefined; + if (spanContext.endTimestamp) { + this._endTime = spanContext.endTimestamp; } - - const url = api.getEnvelopeEndpointWithUrlEncodedAuth(validatedDsn, options.tunnel); - - transport = release - ? makeOverrideReleaseTransport(createTransport, release)({ ...options, url }) - : createTransport({ ...options, url }); - - otherTransports.set(key, transport); + if (spanContext.exclusiveTime !== void 0) { + this._exclusiveTime = spanContext.exclusiveTime; + } + this._measurements = spanContext.measurements ? { ...spanContext.measurements } : {}; } - - return [dsn, transport]; - } - - async function send(envelope) { - function getEvent(types) { - const eventTypes = types && types.length ? types : ['event']; - return eventFromEnvelope(envelope, eventTypes); + // This rule conflicts with another eslint rule :( + /* eslint-disable @typescript-eslint/member-ordering */ + /** + * An alias for `description` of the Span. + * @deprecated Use `spanToJSON(span).description` instead. + */ + get name() { + return this._name || ""; } - - const transports = matcher({ envelope, getEvent }) - .map(result => { - if (typeof result === 'string') { - return getTransport(result, undefined); - } else { - return getTransport(result.dsn, result.release); - } - }) - .filter((t) => !!t); - - // If we have no transports to send to, use the fallback transport - if (transports.length === 0) { - // Don't override the DSN in the header for the fallback transport. '' is falsy - transports.push(['', fallbackTransport]); + /** + * Update the name of the span. + * @deprecated Use `spanToJSON(span).description` instead. + */ + set name(name) { + this.updateName(name); } - - const results = await Promise.all( - transports.map(([dsn, transport]) => transport.send(overrideDsn(envelope, dsn))), - ); - - return results[0]; - } - - async function flush(timeout) { - const promises = [await fallbackTransport.flush(timeout)]; - for (const [, transport] of otherTransports) { - promises.push(await transport.flush(timeout)); + /** + * Get the description of the Span. + * @deprecated Use `spanToJSON(span).description` instead. + */ + get description() { + return this._name; } - - return promises.every(r => r); - } - - return { - send, - flush, - }; - }; -} - -exports.eventFromEnvelope = eventFromEnvelope; -exports.makeMultiplexedTransport = makeMultiplexedTransport; -//# sourceMappingURL=multiplexed.js.map - - -/***/ }), - -/***/ 20913: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(68145); - -const MIN_DELAY = 100; // 100 ms -const START_DELAY = 5000; // 5 seconds -const MAX_DELAY = 3.6e6; // 1 hour - -function log(msg, error) { - debugBuild.DEBUG_BUILD && utils.logger.info(`[Offline]: ${msg}`, error); -} - -/** - * Wraps a transport and stores and retries events when they fail to send. - * - * @param createTransport The transport to wrap. - */ -function makeOfflineTransport( - createTransport, -) { - return options => { - const transport = createTransport(options); - const store = options.createStore ? options.createStore(options) : undefined; - - let retryDelay = START_DELAY; - let flushTimer; - - function shouldQueue(env, error, retryDelay) { - // We don't queue Session Replay envelopes because they are: - // - Ordered and Replay relies on the response status to know when they're successfully sent. - // - Likely to fill the queue quickly and block other events from being sent. - // We also want to drop client reports because they can be generated when we retry sending events while offline. - if (utils.envelopeContainsItemType(env, ['replay_event', 'replay_recording', 'client_report'])) { - return false; + /** + * Get the description of the Span. + * @deprecated Use `spanToJSON(span).description` instead. + */ + set description(description) { + this._name = description; } - - if (options.shouldStore) { - return options.shouldStore(env, error, retryDelay); + /** + * The ID of the trace. + * @deprecated Use `spanContext().traceId` instead. + */ + get traceId() { + return this._traceId; } - - return true; - } - - function flushIn(delay) { - if (!store) { - return; + /** + * The ID of the trace. + * @deprecated You cannot update the traceId of a span after span creation. + */ + set traceId(traceId) { + this._traceId = traceId; } - - if (flushTimer) { - clearTimeout(flushTimer ); + /** + * The ID of the span. + * @deprecated Use `spanContext().spanId` instead. + */ + get spanId() { + return this._spanId; } - - flushTimer = setTimeout(async () => { - flushTimer = undefined; - - const found = await store.pop(); - if (found) { - log('Attempting to send previously queued event'); - void send(found).catch(e => { - log('Failed to retry sending', e); - }); - } - }, delay) ; - - // We need to unref the timer in node.js, otherwise the node process never exit. - if (typeof flushTimer !== 'number' && flushTimer.unref) { - flushTimer.unref(); + /** + * The ID of the span. + * @deprecated You cannot update the spanId of a span after span creation. + */ + set spanId(spanId) { + this._spanId = spanId; } - } - - function flushWithBackOff() { - if (flushTimer) { - return; + /** + * @inheritDoc + * + * @deprecated Use `startSpan` functions instead. + */ + set parentSpanId(string) { + this._parentSpanId = string; } - - flushIn(retryDelay); - - retryDelay = Math.min(retryDelay * 2, MAX_DELAY); - } - - async function send(envelope) { - try { - const result = await transport.send(envelope); - - let delay = MIN_DELAY; - - if (result) { - // If there's a retry-after header, use that as the next delay. - if (result.headers && result.headers['retry-after']) { - delay = utils.parseRetryAfterHeader(result.headers['retry-after']); - } // If we have a server error, return now so we don't flush the queue. - else if ((result.statusCode || 0) >= 400) { - return result; - } - } - - flushIn(delay); - retryDelay = START_DELAY; - return result; - } catch (e) { - if (store && (await shouldQueue(envelope, e , retryDelay))) { - await store.insert(envelope); - flushWithBackOff(); - log('Error sending. Event queued', e ); - return {}; - } else { - throw e; - } + /** + * @inheritDoc + * + * @deprecated Use `spanToJSON(span).parent_span_id` instead. + */ + get parentSpanId() { + return this._parentSpanId; } - } - - if (options.flushAtStartup) { - flushWithBackOff(); - } - - return { - send, - flush: t => transport.flush(t), - }; - }; -} - -exports.MIN_DELAY = MIN_DELAY; -exports.START_DELAY = START_DELAY; -exports.makeOfflineTransport = makeOfflineTransport; -//# sourceMappingURL=offline.js.map - - -/***/ }), - -/***/ 53134: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const dynamicSamplingContext = __nccwpck_require__(18359); -const getRootSpan = __nccwpck_require__(23665); -const spanUtils = __nccwpck_require__(59152); - -/** - * Applies data from the scope to the event and runs all event processors on it. - */ -function applyScopeDataToEvent(event, data) { - const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data; - - // Apply general data - applyDataToEvent(event, data); - - // We want to set the trace context for normal events only if there isn't already - // a trace context on the event. There is a product feature in place where we link - // errors with transaction and it relies on that. - if (span) { - applySpanToEvent(event, span); - } - - applyFingerprintToEvent(event, fingerprint); - applyBreadcrumbsToEvent(event, breadcrumbs); - applySdkMetadataToEvent(event, sdkProcessingMetadata); -} - -/** Merge data of two scopes together. */ -function mergeScopeData(data, mergeData) { - const { - extra, - tags, - user, - contexts, - level, - sdkProcessingMetadata, - breadcrumbs, - fingerprint, - eventProcessors, - attachments, - propagationContext, - // eslint-disable-next-line deprecation/deprecation - transactionName, - span, - } = mergeData; - - mergeAndOverwriteScopeData(data, 'extra', extra); - mergeAndOverwriteScopeData(data, 'tags', tags); - mergeAndOverwriteScopeData(data, 'user', user); - mergeAndOverwriteScopeData(data, 'contexts', contexts); - mergeAndOverwriteScopeData(data, 'sdkProcessingMetadata', sdkProcessingMetadata); - - if (level) { - data.level = level; - } - - if (transactionName) { - // eslint-disable-next-line deprecation/deprecation - data.transactionName = transactionName; - } - - if (span) { - data.span = span; + /** + * Was this span chosen to be sent as part of the sample? + * @deprecated Use `isRecording()` instead. + */ + get sampled() { + return this._sampled; + } + /** + * Was this span chosen to be sent as part of the sample? + * @deprecated You cannot update the sampling decision of a span after span creation. + */ + set sampled(sampled) { + this._sampled = sampled; + } + /** + * Attributes for the span. + * @deprecated Use `spanToJSON(span).atttributes` instead. + */ + get attributes() { + return this._attributes; + } + /** + * Attributes for the span. + * @deprecated Use `setAttributes()` instead. + */ + set attributes(attributes) { + this._attributes = attributes; + } + /** + * Timestamp in seconds (epoch time) indicating when the span started. + * @deprecated Use `spanToJSON()` instead. + */ + get startTimestamp() { + return this._startTime; + } + /** + * Timestamp in seconds (epoch time) indicating when the span started. + * @deprecated In v8, you will not be able to update the span start time after creation. + */ + set startTimestamp(startTime) { + this._startTime = startTime; + } + /** + * Timestamp in seconds when the span ended. + * @deprecated Use `spanToJSON()` instead. + */ + get endTimestamp() { + return this._endTime; + } + /** + * Timestamp in seconds when the span ended. + * @deprecated Set the end time via `span.end()` instead. + */ + set endTimestamp(endTime) { + this._endTime = endTime; + } + /** + * The status of the span. + * + * @deprecated Use `spanToJSON().status` instead to get the status. + */ + get status() { + return this._status; + } + /** + * The status of the span. + * + * @deprecated Use `.setStatus()` instead to set or update the status. + */ + set status(status) { + this._status = status; + } + /** + * Operation of the span + * + * @deprecated Use `spanToJSON().op` to read the op instead. + */ + get op() { + return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP]; + } + /** + * Operation of the span + * + * @deprecated Use `startSpan()` functions to set or `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op') + * to update the span instead. + */ + set op(op) { + this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, op); + } + /** + * The origin of the span, giving context about what created the span. + * + * @deprecated Use `spanToJSON().origin` to read the origin instead. + */ + get origin() { + return this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]; + } + /** + * The origin of the span, giving context about what created the span. + * + * @deprecated Use `startSpan()` functions to set the origin instead. + */ + set origin(origin) { + this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin); + } + /* eslint-enable @typescript-eslint/member-ordering */ + /** @inheritdoc */ + spanContext() { + const { _spanId: spanId, _traceId: traceId, _sampled: sampled } = this; + return { + spanId, + traceId, + traceFlags: sampled ? TRACE_FLAG_SAMPLED : TRACE_FLAG_NONE + }; + } + /** + * Creates a new `Span` while setting the current `Span.id` as `parentSpanId`. + * Also the `sampled` decision will be inherited. + * + * @deprecated Use `startSpan()`, `startSpanManual()` or `startInactiveSpan()` instead. + */ + startChild(spanContext) { + const childSpan = new _Span({ + ...spanContext, + parentSpanId: this._spanId, + sampled: this._sampled, + traceId: this._traceId + }); + childSpan.spanRecorder = this.spanRecorder; + if (childSpan.spanRecorder) { + childSpan.spanRecorder.add(childSpan); + } + const rootSpan = getRootSpan(this); + childSpan.transaction = rootSpan; + if (DEBUG_BUILD2 && rootSpan) { + const opStr = spanContext && spanContext.op || "< unknown op >"; + const nameStr = spanToJSON(childSpan).description || "< unknown name >"; + const idStr = rootSpan.spanContext().spanId; + const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`; + logger.log(logMessage); + this._logMessage = logMessage; + } + return childSpan; + } + /** + * Sets the tag attribute on the current span. + * + * Can also be used to unset a tag, by passing `undefined`. + * + * @param key Tag key + * @param value Tag value + * @deprecated Use `setAttribute()` instead. + */ + setTag(key, value) { + this.tags = { ...this.tags, [key]: value }; + return this; + } + /** + * Sets the data attribute on the current span + * @param key Data key + * @param value Data value + * @deprecated Use `setAttribute()` instead. + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + setData(key, value) { + this.data = { ...this.data, [key]: value }; + return this; + } + /** @inheritdoc */ + setAttribute(key, value) { + if (value === void 0) { + delete this._attributes[key]; + } else { + this._attributes[key] = value; + } + } + /** @inheritdoc */ + setAttributes(attributes) { + Object.keys(attributes).forEach((key) => this.setAttribute(key, attributes[key])); + } + /** + * @inheritDoc + */ + setStatus(value) { + this._status = value; + return this; + } + /** + * @inheritDoc + * @deprecated Use top-level `setHttpStatus()` instead. + */ + setHttpStatus(httpStatus) { + setHttpStatus(this, httpStatus); + return this; + } + /** + * @inheritdoc + * + * @deprecated Use `.updateName()` instead. + */ + setName(name) { + this.updateName(name); + } + /** + * @inheritDoc + */ + updateName(name) { + this._name = name; + return this; + } + /** + * @inheritDoc + * + * @deprecated Use `spanToJSON(span).status === 'ok'` instead. + */ + isSuccess() { + return this._status === "ok"; + } + /** + * @inheritDoc + * + * @deprecated Use `.end()` instead. + */ + finish(endTimestamp) { + return this.end(endTimestamp); + } + /** @inheritdoc */ + end(endTimestamp) { + if (this._endTime) { + return; + } + const rootSpan = getRootSpan(this); + if (DEBUG_BUILD2 && // Don't call this for transactions + rootSpan && rootSpan.spanContext().spanId !== this._spanId) { + const logMessage = this._logMessage; + if (logMessage) { + logger.log(logMessage.replace("Starting", "Finishing")); + } + } + this._endTime = spanTimeInputToSeconds(endTimestamp); + } + /** + * @inheritDoc + * + * @deprecated Use `spanToTraceHeader()` instead. + */ + toTraceparent() { + return spanToTraceHeader(this); + } + /** + * @inheritDoc + * + * @deprecated Use `spanToJSON()` or access the fields directly instead. + */ + toContext() { + return dropUndefinedKeys({ + data: this._getData(), + description: this._name, + endTimestamp: this._endTime, + // eslint-disable-next-line deprecation/deprecation + op: this.op, + parentSpanId: this._parentSpanId, + sampled: this._sampled, + spanId: this._spanId, + startTimestamp: this._startTime, + status: this._status, + // eslint-disable-next-line deprecation/deprecation + tags: this.tags, + traceId: this._traceId + }); + } + /** + * @inheritDoc + * + * @deprecated Update the fields directly instead. + */ + updateWithContext(spanContext) { + this.data = spanContext.data || {}; + this._name = spanContext.name || spanContext.description; + this._endTime = spanContext.endTimestamp; + this.op = spanContext.op; + this._parentSpanId = spanContext.parentSpanId; + this._sampled = spanContext.sampled; + this._spanId = spanContext.spanId || this._spanId; + this._startTime = spanContext.startTimestamp || this._startTime; + this._status = spanContext.status; + this.tags = spanContext.tags || {}; + this._traceId = spanContext.traceId || this._traceId; + return this; + } + /** + * @inheritDoc + * + * @deprecated Use `spanToTraceContext()` util function instead. + */ + getTraceContext() { + return spanToTraceContext(this); + } + /** + * Get JSON representation of this span. + * + * @hidden + * @internal This method is purely for internal purposes and should not be used outside + * of SDK code. If you need to get a JSON representation of a span, + * use `spanToJSON(span)` instead. + */ + getSpanJSON() { + return dropUndefinedKeys({ + data: this._getData(), + description: this._name, + op: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP], + parent_span_id: this._parentSpanId, + span_id: this._spanId, + start_timestamp: this._startTime, + status: this._status, + // eslint-disable-next-line deprecation/deprecation + tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, + timestamp: this._endTime, + trace_id: this._traceId, + origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN], + _metrics_summary: getMetricSummaryJsonForSpan(this), + profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID], + exclusive_time: this._exclusiveTime, + measurements: Object.keys(this._measurements).length > 0 ? this._measurements : void 0 + }); + } + /** @inheritdoc */ + isRecording() { + return !this._endTime && !!this._sampled; + } + /** + * Convert the object to JSON. + * @deprecated Use `spanToJSON(span)` instead. + */ + toJSON() { + return this.getSpanJSON(); + } + /** + * Get the merged data for this span. + * For now, this combines `data` and `attributes` together, + * until eventually we can ingest `attributes` directly. + */ + _getData() { + const { data, _attributes: attributes } = this; + const hasData = Object.keys(data).length > 0; + const hasAttributes = Object.keys(attributes).length > 0; + if (!hasData && !hasAttributes) { + return void 0; + } + if (hasData && hasAttributes) { + return { + ...data, + ...attributes + }; + } + return hasData ? data : attributes; + } + }; } +}); - if (breadcrumbs.length) { - data.breadcrumbs = [...data.breadcrumbs, ...breadcrumbs]; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/transaction.js +var Transaction; +var init_transaction = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/transaction.js"() { + init_esm(); + init_debug_build2(); + init_hub(); + init_metric_summary(); + init_semanticAttributes(); + init_spanUtils(); + init_dynamicSamplingContext(); + init_span(); + init_trace(); + Transaction = class extends Span { + /** + * The reference to the current hub. + */ + // eslint-disable-next-line deprecation/deprecation + // DO NOT yet remove this property, it is used in a hack for v7 backwards compatibility. + /** + * This constructor should never be called manually. Those instrumenting tracing should use + * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`. + * @internal + * @hideconstructor + * @hidden + * + * @deprecated Transactions will be removed in v8. Use spans instead. + */ + // eslint-disable-next-line deprecation/deprecation + constructor(transactionContext, hub) { + super(transactionContext); + this._contexts = {}; + this._hub = hub || getCurrentHub(); + this._name = transactionContext.name || ""; + this._metadata = { + // eslint-disable-next-line deprecation/deprecation + ...transactionContext.metadata + }; + this._trimEnd = transactionContext.trimEnd; + this.transaction = this; + const incomingDynamicSamplingContext = this._metadata.dynamicSamplingContext; + if (incomingDynamicSamplingContext) { + this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext }; + } + } + // This sadly conflicts with the getter/setter ordering :( + /* eslint-disable @typescript-eslint/member-ordering */ + /** + * Getter for `name` property. + * @deprecated Use `spanToJSON(span).description` instead. + */ + get name() { + return this._name; + } + /** + * Setter for `name` property, which also sets `source` as custom. + * @deprecated Use `updateName()` and `setMetadata()` instead. + */ + set name(newName) { + this.setName(newName); + } + /** + * Get the metadata for this transaction. + * @deprecated Use `spanGetMetadata(transaction)` instead. + */ + get metadata() { + return { + // Defaults + // eslint-disable-next-line deprecation/deprecation + source: "custom", + spanMetadata: {}, + // Legacy metadata + ...this._metadata, + // From attributes + ...this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] && { + source: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] + }, + ...this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] && { + sampleRate: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE] + } + }; + } + /** + * Update the metadata for this transaction. + * @deprecated Use `spanGetMetadata(transaction)` instead. + */ + set metadata(metadata) { + this._metadata = metadata; + } + /* eslint-enable @typescript-eslint/member-ordering */ + /** + * Setter for `name` property, which also sets `source` on the metadata. + * + * @deprecated Use `.updateName()` and `.setAttribute()` instead. + */ + setName(name, source = "custom") { + this._name = name; + this.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source); + } + /** @inheritdoc */ + updateName(name) { + this._name = name; + return this; + } + /** + * Attaches SpanRecorder to the span itself + * @param maxlen maximum number of spans that can be recorded + */ + initSpanRecorder(maxlen = 1e3) { + if (!this.spanRecorder) { + this.spanRecorder = new SpanRecorder(maxlen); + } + this.spanRecorder.add(this); + } + /** + * Set the context of a transaction event. + * @deprecated Use either `.setAttribute()`, or set the context on the scope before creating the transaction. + */ + setContext(key, context) { + if (context === null) { + delete this._contexts[key]; + } else { + this._contexts[key] = context; + } + } + /** + * @inheritDoc + * + * @deprecated Use top-level `setMeasurement()` instead. + */ + setMeasurement(name, value, unit = "") { + this._measurements[name] = { value, unit }; + } + /** + * Store metadata on this transaction. + * @deprecated Use attributes or store data on the scope instead. + */ + setMetadata(newMetadata) { + this._metadata = { ...this._metadata, ...newMetadata }; + } + /** + * @inheritDoc + */ + end(endTimestamp) { + const timestampInS = spanTimeInputToSeconds(endTimestamp); + const transaction = this._finishTransaction(timestampInS); + if (!transaction) { + return void 0; + } + return this._hub.captureEvent(transaction); + } + /** + * @inheritDoc + */ + toContext() { + const spanContext = super.toContext(); + return dropUndefinedKeys({ + ...spanContext, + name: this._name, + trimEnd: this._trimEnd + }); + } + /** + * @inheritDoc + */ + updateWithContext(transactionContext) { + super.updateWithContext(transactionContext); + this._name = transactionContext.name || ""; + this._trimEnd = transactionContext.trimEnd; + return this; + } + /** + * @inheritdoc + * + * @experimental + * + * @deprecated Use top-level `getDynamicSamplingContextFromSpan` instead. + */ + getDynamicSamplingContext() { + return getDynamicSamplingContextFromSpan(this); + } + /** + * Override the current hub with a new one. + * Used if you want another hub to finish the transaction. + * + * @internal + */ + // eslint-disable-next-line deprecation/deprecation + setHub(hub) { + this._hub = hub; + } + /** + * Get the profile id of the transaction. + */ + getProfileId() { + if (this._contexts !== void 0 && this._contexts["profile"] !== void 0) { + return this._contexts["profile"].profile_id; + } + return void 0; + } + /** + * Finish the transaction & prepare the event to send to Sentry. + */ + _finishTransaction(endTimestamp) { + if (this._endTime !== void 0) { + return void 0; + } + if (!this._name) { + DEBUG_BUILD2 && logger.warn("Transaction has no name, falling back to ``."); + this._name = ""; + } + super.end(endTimestamp); + const client = this._hub.getClient(); + if (client && client.emit) { + client.emit("finishTransaction", this); + } + if (this._sampled !== true) { + DEBUG_BUILD2 && logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."); + if (client) { + client.recordDroppedEvent("sample_rate", "transaction"); + } + return void 0; + } + const finishedSpans = this.spanRecorder ? ( + // eslint-disable-next-line deprecation/deprecation + this.spanRecorder.spans.filter((span) => span !== this && spanToJSON(span).timestamp) + ) : []; + if (this._trimEnd && finishedSpans.length > 0) { + const endTimes = finishedSpans.map((span) => spanToJSON(span).timestamp).filter(Boolean); + this._endTime = endTimes.reduce((prev, current) => { + return prev > current ? prev : current; + }); + } + const { scope: capturedSpanScope, isolationScope: capturedSpanIsolationScope } = getCapturedScopesOnSpan(this); + const { metadata } = this; + const { source } = metadata; + const transaction = { + contexts: { + ...this._contexts, + // We don't want to override trace context + trace: spanToTraceContext(this) + }, + // TODO: Pass spans serialized via `spanToJSON()` here instead in v8. + spans: finishedSpans, + start_timestamp: this._startTime, + // eslint-disable-next-line deprecation/deprecation + tags: this.tags, + timestamp: this._endTime, + transaction: this._name, + type: "transaction", + sdkProcessingMetadata: { + ...metadata, + capturedSpanScope, + capturedSpanIsolationScope, + ...dropUndefinedKeys({ + dynamicSamplingContext: getDynamicSamplingContextFromSpan(this) + }) + }, + _metrics_summary: getMetricSummaryJsonForSpan(this), + ...source && { + transaction_info: { + source + } + } + }; + const hasMeasurements = Object.keys(this._measurements).length > 0; + if (hasMeasurements) { + DEBUG_BUILD2 && logger.log( + "[Measurements] Adding measurements to transaction", + JSON.stringify(this._measurements, void 0, 2) + ); + transaction.measurements = this._measurements; + } + DEBUG_BUILD2 && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`); + return transaction; + } + }; } +}); - if (fingerprint.length) { - data.fingerprint = [...data.fingerprint, ...fingerprint]; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/sampling.js +function sampleTransaction(transaction, options2, samplingContext) { + if (!hasTracingEnabled(options2)) { + transaction.sampled = false; + return transaction; } - - if (eventProcessors.length) { - data.eventProcessors = [...data.eventProcessors, ...eventProcessors]; + if (transaction.sampled !== void 0) { + transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(transaction.sampled)); + return transaction; } - - if (attachments.length) { - data.attachments = [...data.attachments, ...attachments]; + let sampleRate; + if (typeof options2.tracesSampler === "function") { + sampleRate = options2.tracesSampler(samplingContext); + transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate)); + } else if (samplingContext.parentSampled !== void 0) { + sampleRate = samplingContext.parentSampled; + } else if (typeof options2.tracesSampleRate !== "undefined") { + sampleRate = options2.tracesSampleRate; + transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Number(sampleRate)); + } else { + sampleRate = 1; + transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, sampleRate); } - - data.propagationContext = { ...data.propagationContext, ...propagationContext }; -} - -/** - * Merges certain scope data. Undefined values will overwrite any existing values. - * Exported only for tests. - */ -function mergeAndOverwriteScopeData - -(data, prop, mergeVal) { - if (mergeVal && Object.keys(mergeVal).length) { - // Clone object - data[prop] = { ...data[prop] }; - for (const key in mergeVal) { - if (Object.prototype.hasOwnProperty.call(mergeVal, key)) { - data[prop][key] = mergeVal[key]; - } - } + if (!isValidSampleRate(sampleRate)) { + DEBUG_BUILD2 && logger.warn("[Tracing] Discarding transaction because of invalid sample rate."); + transaction.sampled = false; + return transaction; + } + if (!sampleRate) { + DEBUG_BUILD2 && logger.log( + `[Tracing] Discarding transaction because ${typeof options2.tracesSampler === "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}` + ); + transaction.sampled = false; + return transaction; + } + transaction.sampled = Math.random() < sampleRate; + if (!transaction.sampled) { + DEBUG_BUILD2 && logger.log( + `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number( + sampleRate + )})` + ); + return transaction; } + DEBUG_BUILD2 && // eslint-disable-next-line deprecation/deprecation + logger.log(`[Tracing] starting ${transaction.op} transaction - ${spanToJSON(transaction).description}`); + return transaction; } - -function applyDataToEvent(event, data) { - const { - extra, - tags, - user, - contexts, - level, - // eslint-disable-next-line deprecation/deprecation - transactionName, - } = data; - - const cleanedExtra = utils.dropUndefinedKeys(extra); - if (cleanedExtra && Object.keys(cleanedExtra).length) { - event.extra = { ...cleanedExtra, ...event.extra }; +function isValidSampleRate(rate) { + if (isNaN2(rate) || !(typeof rate === "number" || typeof rate === "boolean")) { + DEBUG_BUILD2 && logger.warn( + `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify( + rate + )} of type ${JSON.stringify(typeof rate)}.` + ); + return false; } - - const cleanedTags = utils.dropUndefinedKeys(tags); - if (cleanedTags && Object.keys(cleanedTags).length) { - event.tags = { ...cleanedTags, ...event.tags }; + if (rate < 0 || rate > 1) { + DEBUG_BUILD2 && logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`); + return false; } - - const cleanedUser = utils.dropUndefinedKeys(user); - if (cleanedUser && Object.keys(cleanedUser).length) { - event.user = { ...cleanedUser, ...event.user }; + return true; +} +var init_sampling = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/sampling.js"() { + init_esm(); + init_debug_build2(); + init_semanticAttributes(); + init_hasTracingEnabled(); + init_spanUtils(); } +}); - const cleanedContexts = utils.dropUndefinedKeys(contexts); - if (cleanedContexts && Object.keys(cleanedContexts).length) { - event.contexts = { ...cleanedContexts, ...event.contexts }; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/hubextensions.js +function traceHeaders() { + const scope = this.getScope(); + const span = scope.getSpan(); + return span ? { + "sentry-trace": spanToTraceHeader(span) + } : {}; +} +function _startTransaction(transactionContext, customSamplingContext) { + const client = this.getClient(); + const options2 = client && client.getOptions() || {}; + const configInstrumenter = options2.instrumenter || "sentry"; + const transactionInstrumenter = transactionContext.instrumenter || "sentry"; + if (configInstrumenter !== transactionInstrumenter) { + DEBUG_BUILD2 && logger.error( + `A transaction was started with instrumenter=\`${transactionInstrumenter}\`, but the SDK is configured with the \`${configInstrumenter}\` instrumenter. +The transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.` + ); + transactionContext.sampled = false; } - - if (level) { - event.level = level; + let transaction = new Transaction(transactionContext, this); + transaction = sampleTransaction(transaction, options2, { + name: transactionContext.name, + parentSampled: transactionContext.parentSampled, + transactionContext, + attributes: { + // eslint-disable-next-line deprecation/deprecation + ...transactionContext.data, + ...transactionContext.attributes + }, + ...customSamplingContext + }); + if (transaction.isRecording()) { + transaction.initSpanRecorder(options2._experiments && options2._experiments.maxSpans); } - - if (transactionName) { - event.transaction = transactionName; + if (client && client.emit) { + client.emit("startTransaction", transaction); } + return transaction; } - -function applyBreadcrumbsToEvent(event, breadcrumbs) { - const mergedBreadcrumbs = [...(event.breadcrumbs || []), ...breadcrumbs]; - event.breadcrumbs = mergedBreadcrumbs.length ? mergedBreadcrumbs : undefined; -} - -function applySdkMetadataToEvent(event, sdkProcessingMetadata) { - event.sdkProcessingMetadata = { - ...event.sdkProcessingMetadata, - ...sdkProcessingMetadata, - }; -} - -function applySpanToEvent(event, span) { - event.contexts = { trace: spanUtils.spanToTraceContext(span), ...event.contexts }; - const rootSpan = getRootSpan.getRootSpan(span); - if (rootSpan) { - event.sdkProcessingMetadata = { - dynamicSamplingContext: dynamicSamplingContext.getDynamicSamplingContextFromSpan(span), - ...event.sdkProcessingMetadata, - }; - const transactionName = spanUtils.spanToJSON(rootSpan).description; - if (transactionName) { - event.tags = { transaction: transactionName, ...event.tags }; - } +function addTracingExtensions() { + const carrier = getMainCarrier(); + if (!carrier.__SENTRY__) { + return; } -} - -/** - * Applies fingerprint from the scope to the event if there's one, - * uses message if there's one instead or get rid of empty fingerprint - */ -function applyFingerprintToEvent(event, fingerprint) { - // Make sure it's an array first and we actually have something in place - event.fingerprint = event.fingerprint ? utils.arrayify(event.fingerprint) : []; - - // If we have something on the scope, then merge it with event - if (fingerprint) { - event.fingerprint = event.fingerprint.concat(fingerprint); + carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {}; + if (!carrier.__SENTRY__.extensions.startTransaction) { + carrier.__SENTRY__.extensions.startTransaction = _startTransaction; } - - // If we have no data at all, remove empty array default - if (event.fingerprint && !event.fingerprint.length) { - delete event.fingerprint; + if (!carrier.__SENTRY__.extensions.traceHeaders) { + carrier.__SENTRY__.extensions.traceHeaders = traceHeaders; } + registerErrorInstrumentation(); } - -exports.applyScopeDataToEvent = applyScopeDataToEvent; -exports.mergeAndOverwriteScopeData = mergeAndOverwriteScopeData; -exports.mergeScopeData = mergeScopeData; -//# sourceMappingURL=applyScopeDataToEvent.js.map - - -/***/ }), - -/***/ 23665: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Returns the root span of a given span. - * - * As long as we use `Transaction`s internally, the returned root span - * will be a `Transaction` but be aware that this might change in the future. - * - * If the given span has no root span or transaction, `undefined` is returned. - */ -function getRootSpan(span) { - // TODO (v8): Remove this check and just return span - // eslint-disable-next-line deprecation/deprecation - return span.transaction; -} - -exports.getRootSpan = getRootSpan; -//# sourceMappingURL=getRootSpan.js.map - - -/***/ }), - -/***/ 26103: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * Wrap a callback function with error handling. - * If an error is thrown, it will be passed to the `onError` callback and re-thrown. - * - * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`. - * - * If an `onFinally` callback is provided, this will be called when the callback has finished - * - so if it returns a promise, once the promise resolved/rejected, - * else once the callback has finished executing. - * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not. - */ -function handleCallbackErrors - -( - fn, - onError, - // eslint-disable-next-line @typescript-eslint/no-empty-function - onFinally = () => {}, -) { - let maybePromiseResult; - try { - maybePromiseResult = fn(); - } catch (e) { - onError(e); - onFinally(); - throw e; +var init_hubextensions = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/hubextensions.js"() { + init_esm(); + init_debug_build2(); + init_hub(); + init_spanUtils(); + init_errors(); + init_sampling(); + init_transaction(); } +}); - return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally); -} - -/** - * Maybe handle a promise rejection. - * This expects to be given a value that _may_ be a promise, or any other value. - * If it is a promise, and it rejects, it will call the `onError` callback. - * Other than this, it will generally return the given value as-is. - */ -function maybeHandlePromiseRejection( - value, - onError, - onFinally, -) { - if (utils.isThenable(value)) { - // @ts-expect-error - the isThenable check returns the "wrong" type here - return value.then( - res => { - onFinally(); - return res; - }, - e => { - onError(e); - onFinally(); - throw e; - }, - ); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/measurement.js +function setMeasurement(name, value, unit) { + const transaction = getActiveTransaction(); + if (transaction) { + transaction.setMeasurement(name, value, unit); } - - onFinally(); - return value; } - -exports.handleCallbackErrors = handleCallbackErrors; -//# sourceMappingURL=handleCallbackErrors.js.map - - -/***/ }), - -/***/ 55726: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const exports$1 = __nccwpck_require__(78820); - -// Treeshakable guard to remove all code related to tracing - -/** - * Determines if tracing is currently enabled. - * - * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config. - */ -function hasTracingEnabled( - maybeOptions, -) { - if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) { - return false; +var init_measurement = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/tracing/measurement.js"() { + init_utils(); } +}); - const client = exports$1.getClient(); - const options = maybeOptions || (client && client.getOptions()); - return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/envelope.js +function enhanceEventWithSdkInfo(event, sdkInfo) { + if (!sdkInfo) { + return event; + } + event.sdk = event.sdk || {}; + event.sdk.name = event.sdk.name || sdkInfo.name; + event.sdk.version = event.sdk.version || sdkInfo.version; + event.sdk.integrations = [...event.sdk.integrations || [], ...sdkInfo.integrations || []]; + event.sdk.packages = [...event.sdk.packages || [], ...sdkInfo.packages || []]; + return event; } - -exports.hasTracingEnabled = hasTracingEnabled; -//# sourceMappingURL=hasTracingEnabled.js.map - - -/***/ }), - -/***/ 4080: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Checks whether given url points to Sentry server - * @param url url to verify - * - * TODO(v8): Remove Hub fallback type - */ -// eslint-disable-next-line deprecation/deprecation -function isSentryRequestUrl(url, hubOrClient) { - const client = - hubOrClient && isHub(hubOrClient) - ? // eslint-disable-next-line deprecation/deprecation - hubOrClient.getClient() - : hubOrClient; - const dsn = client && client.getDsn(); - const tunnel = client && client.getOptions().tunnel; - - return checkDsn(url, dsn) || checkTunnel(url, tunnel); +function createSessionEnvelope(session, dsn, metadata, tunnel) { + const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); + const envelopeHeaders = { + sent_at: (/* @__PURE__ */ new Date()).toISOString(), + ...sdkInfo && { sdk: sdkInfo }, + ...!!tunnel && dsn && { dsn: dsnToString(dsn) } + }; + const envelopeItem = "aggregates" in session ? [{ type: "sessions" }, session] : [{ type: "session" }, session.toJSON()]; + return createEnvelope(envelopeHeaders, [envelopeItem]); } - -function checkTunnel(url, tunnel) { - if (!tunnel) { - return false; +function createEventEnvelope(event, dsn, metadata, tunnel) { + const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata); + const eventType = event.type && event.type !== "replay_event" ? event.type : "event"; + enhanceEventWithSdkInfo(event, metadata && metadata.sdk); + const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn); + delete event.sdkProcessingMetadata; + const eventItem = [{ type: eventType }, event]; + return createEnvelope(envelopeHeaders, [eventItem]); +} +var init_envelope2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/envelope.js"() { + init_esm(); } +}); - return removeTrailingSlash(url) === removeTrailingSlash(tunnel); -} +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/sessionflusher.js +var SessionFlusher; +var init_sessionflusher = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/sessionflusher.js"() { + init_esm(); + init_exports(); + SessionFlusher = class { + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + constructor(client, attrs) { + this._client = client; + this.flushTimeout = 60; + this._pendingAggregates = {}; + this._isEnabled = true; + this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3); + if (this._intervalId.unref) { + this._intervalId.unref(); + } + this._sessionAttrs = attrs; + } + /** Checks if `pendingAggregates` has entries, and if it does flushes them by calling `sendSession` */ + flush() { + const sessionAggregates = this.getSessionAggregates(); + if (sessionAggregates.aggregates.length === 0) { + return; + } + this._pendingAggregates = {}; + this._client.sendSession(sessionAggregates); + } + /** Massages the entries in `pendingAggregates` and returns aggregated sessions */ + getSessionAggregates() { + const aggregates = Object.keys(this._pendingAggregates).map((key) => { + return this._pendingAggregates[parseInt(key)]; + }); + const sessionAggregates = { + attrs: this._sessionAttrs, + aggregates + }; + return dropUndefinedKeys(sessionAggregates); + } + /** JSDoc */ + close() { + clearInterval(this._intervalId); + this._isEnabled = false; + this.flush(); + } + /** + * Wrapper function for _incrementSessionStatusCount that checks if the instance of SessionFlusher is enabled then + * fetches the session status of the request from `Scope.getRequestSession().status` on the scope and passes them to + * `_incrementSessionStatusCount` along with the start date + */ + incrementSessionStatusCount() { + if (!this._isEnabled) { + return; + } + const scope = getCurrentScope(); + const requestSession = scope.getRequestSession(); + if (requestSession && requestSession.status) { + this._incrementSessionStatusCount(requestSession.status, /* @__PURE__ */ new Date()); + scope.setRequestSession(void 0); + } + } + /** + * Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of + * the session received + */ + _incrementSessionStatusCount(status, date) { + const sessionStartedTrunc = new Date(date).setSeconds(0, 0); + this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {}; + const aggregationCounts = this._pendingAggregates[sessionStartedTrunc]; + if (!aggregationCounts.started) { + aggregationCounts.started = new Date(sessionStartedTrunc).toISOString(); + } + switch (status) { + case "errored": + aggregationCounts.errored = (aggregationCounts.errored || 0) + 1; + return aggregationCounts.errored; + case "ok": + aggregationCounts.exited = (aggregationCounts.exited || 0) + 1; + return aggregationCounts.exited; + default: + aggregationCounts.crashed = (aggregationCounts.crashed || 0) + 1; + return aggregationCounts.crashed; + } + } + }; + } +}); -function checkDsn(url, dsn) { - return dsn ? url.includes(dsn.host) : false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/api.js +function getBaseApiEndpoint(dsn) { + const protocol = dsn.protocol ? `${dsn.protocol}:` : ""; + const port = dsn.port ? `:${dsn.port}` : ""; + return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ""}/api/`; } - -function removeTrailingSlash(str) { - return str[str.length - 1] === '/' ? str.slice(0, -1) : str; +function _getIngestEndpoint(dsn) { + return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`; } - -// eslint-disable-next-line deprecation/deprecation -function isHub(hubOrClient) { - // eslint-disable-next-line deprecation/deprecation - return (hubOrClient ).getClient !== undefined; +function _encodedAuth(dsn, sdkInfo) { + return urlEncode({ + // We send only the minimum set of required information. See + // https://github.com/getsentry/sentry-javascript/issues/2572. + sentry_key: dsn.publicKey, + sentry_version: SENTRY_API_VERSION, + ...sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` } + }); } - -exports.isSentryRequestUrl = isSentryRequestUrl; -//# sourceMappingURL=isSentryRequestUrl.js.map - - -/***/ }), - -/***/ 82: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Tagged template function which returns paramaterized representation of the message - * For example: parameterize`This is a log statement with ${x} and ${y} params`, would return: - * "__sentry_template_string__": 'This is a log statement with %s and %s params', - * "__sentry_template_values__": ['first', 'second'] - * @param strings An array of string values splitted between expressions - * @param values Expressions extracted from template string - * @returns String with template information in __sentry_template_string__ and __sentry_template_values__ properties - */ -function parameterize(strings, ...values) { - const formatted = new String(String.raw(strings, ...values)) ; - formatted.__sentry_template_string__ = strings.join('\x00').replace(/%/g, '%%').replace(/\0/g, '%s'); - formatted.__sentry_template_values__ = values; - return formatted; +function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnelOrOptions = {}) { + const tunnel = typeof tunnelOrOptions === "string" ? tunnelOrOptions : tunnelOrOptions.tunnel; + const sdkInfo = typeof tunnelOrOptions === "string" || !tunnelOrOptions._metadata ? void 0 : tunnelOrOptions._metadata.sdk; + return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`; } - -exports.parameterize = parameterize; -//# sourceMappingURL=parameterize.js.map - - -/***/ }), - -/***/ 38060: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const constants = __nccwpck_require__(74894); -const eventProcessors = __nccwpck_require__(76742); -const scope = __nccwpck_require__(8747); -const applyScopeDataToEvent = __nccwpck_require__(53134); -const spanUtils = __nccwpck_require__(59152); - -/** - * This type makes sure that we get either a CaptureContext, OR an EventHint. - * It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed: - * { user: { id: '123' }, mechanism: { handled: false } } - */ - -/** - * Adds common information to events. - * - * The information includes release and environment from `options`, - * breadcrumbs and context (extra, tags and user) from the scope. - * - * Information that is already present in the event is never overwritten. For - * nested objects, such as the context, keys are merged. - * - * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`. - * - * @param event The original event. - * @param hint May contain additional information about the original exception. - * @param scope A scope containing event metadata. - * @returns A new event with more information. - * @hidden - */ -function prepareEvent( - options, - event, - hint, - scope$1, - client, - isolationScope, -) { - const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options; - const prepared = { - ...event, - event_id: event.event_id || hint.event_id || utils.uuid4(), - timestamp: event.timestamp || utils.dateTimestampInSeconds(), - }; - const integrations = hint.integrations || options.integrations.map(i => i.name); - - applyClientOptions(prepared, options); - applyIntegrationsMetadata(prepared, integrations); - - // Only put debug IDs onto frames for error events. - if (event.type === undefined) { - applyDebugIds(prepared, options.stackParser); +var SENTRY_API_VERSION; +var init_api = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/api.js"() { + init_esm(); + SENTRY_API_VERSION = "7"; } +}); - // If we have scope given to us, use it as the base for further modifications. - // This allows us to prevent unnecessary copying of data if `captureContext` is not provided. - const finalScope = getFinalScope(scope$1, hint.captureContext); - - if (hint.mechanism) { - utils.addExceptionMechanism(prepared, hint.mechanism); - } - - const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : []; - - // This should be the last thing called, since we want that - // {@link Hub.addEventProcessor} gets the finished prepared event. - // Merge scope data together - const data = scope.getGlobalScope().getScopeData(); - - if (isolationScope) { - const isolationData = isolationScope.getScopeData(); - applyScopeDataToEvent.mergeScopeData(data, isolationData); - } - - if (finalScope) { - const finalScopeData = finalScope.getScopeData(); - applyScopeDataToEvent.mergeScopeData(data, finalScopeData); - } - - const attachments = [...(hint.attachments || []), ...data.attachments]; - if (attachments.length) { - hint.attachments = attachments; - } - - applyScopeDataToEvent.applyScopeDataToEvent(prepared, data); - - // TODO (v8): Update this order to be: Global > Client > Scope - const eventProcessors$1 = [ - ...clientEventProcessors, - // eslint-disable-next-line deprecation/deprecation - ...eventProcessors.getGlobalEventProcessors(), - // Run scope event processors _after_ all other processors - ...data.eventProcessors, - ]; - - const result = eventProcessors.notifyEventProcessors(eventProcessors$1, prepared, hint); - - return result.then(evt => { - if (evt) { - // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified - // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed. - // This should not cause any PII issues, since we're only moving data that is already on the event and not adding - // any new data - applyDebugMeta(evt); - } - - if (typeof normalizeDepth === 'number' && normalizeDepth > 0) { - return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integration.js +function filterDuplicates(integrations) { + const integrationsByName = {}; + integrations.forEach((currentInstance) => { + const { name } = currentInstance; + const existingInstance = integrationsByName[name]; + if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) { + return; } - return evt; + integrationsByName[name] = currentInstance; }); + return Object.keys(integrationsByName).map((k) => integrationsByName[k]); } - -/** - * Enhances event using the client configuration. - * It takes care of all "static" values like environment, release and `dist`, - * as well as truncating overly long values. - * @param event event instance to be enhanced - */ -function applyClientOptions(event, options) { - const { environment, release, dist, maxValueLength = 250 } = options; - - if (!('environment' in event)) { - event.environment = 'environment' in options ? environment : constants.DEFAULT_ENVIRONMENT; - } - - if (event.release === undefined && release !== undefined) { - event.release = release; - } - - if (event.dist === undefined && dist !== undefined) { - event.dist = dist; - } - - if (event.message) { - event.message = utils.truncate(event.message, maxValueLength); - } - - const exception = event.exception && event.exception.values && event.exception.values[0]; - if (exception && exception.value) { - exception.value = utils.truncate(exception.value, maxValueLength); +function getIntegrationsToSetup(options2) { + const defaultIntegrations2 = options2.defaultIntegrations || []; + const userIntegrations = options2.integrations; + defaultIntegrations2.forEach((integration) => { + integration.isDefaultInstance = true; + }); + let integrations; + if (Array.isArray(userIntegrations)) { + integrations = [...defaultIntegrations2, ...userIntegrations]; + } else if (typeof userIntegrations === "function") { + integrations = arrayify(userIntegrations(defaultIntegrations2)); + } else { + integrations = defaultIntegrations2; } - - const request = event.request; - if (request && request.url) { - request.url = utils.truncate(request.url, maxValueLength); + const finalIntegrations = filterDuplicates(integrations); + const debugIndex = findIndex(finalIntegrations, (integration) => integration.name === "Debug"); + if (debugIndex !== -1) { + const [debugInstance] = finalIntegrations.splice(debugIndex, 1); + finalIntegrations.push(debugInstance); } + return finalIntegrations; } - -const debugIdStackParserCache = new WeakMap(); - -/** - * Puts debug IDs into the stack frames of an error event. - */ -function applyDebugIds(event, stackParser) { - const debugIdMap = utils.GLOBAL_OBJ._sentryDebugIds; - - if (!debugIdMap) { - return; - } - - let debugIdStackFramesCache; - const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser); - if (cachedDebugIdStackFrameCache) { - debugIdStackFramesCache = cachedDebugIdStackFrameCache; - } else { - debugIdStackFramesCache = new Map(); - debugIdStackParserCache.set(stackParser, debugIdStackFramesCache); - } - - // Build a map of filename -> debug_id - const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => { - let parsedStack; - const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace); - if (cachedParsedStack) { - parsedStack = cachedParsedStack; - } else { - parsedStack = stackParser(debugIdStackTrace); - debugIdStackFramesCache.set(debugIdStackTrace, parsedStack); +function setupIntegrations(client, integrations) { + const integrationIndex = {}; + integrations.forEach((integration) => { + if (integration) { + setupIntegration(client, integration, integrationIndex); } - - for (let i = parsedStack.length - 1; i >= 0; i--) { - const stackFrame = parsedStack[i]; - if (stackFrame.filename) { - acc[stackFrame.filename] = debugIdMap[debugIdStackTrace]; - break; - } + }); + return integrationIndex; +} +function afterSetupIntegrations(client, integrations) { + for (const integration of integrations) { + if (integration && integration.afterAllSetup) { + integration.afterAllSetup(client); } - return acc; - }, {}); - - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - event.exception.values.forEach(exception => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - exception.stacktrace.frames.forEach(frame => { - if (frame.filename) { - frame.debug_id = filenameDebugIdMap[frame.filename]; - } - }); - }); - } catch (e) { - // To save bundle size we're just try catching here instead of checking for the existence of all the different objects. } } - -/** - * Moves debug IDs from the stack frames of an error event into the debug_meta field. - */ -function applyDebugMeta(event) { - // Extract debug IDs and filenames from the stack frames on the event. - const filenameDebugIdMap = {}; - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - event.exception.values.forEach(exception => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - exception.stacktrace.frames.forEach(frame => { - if (frame.debug_id) { - if (frame.abs_path) { - filenameDebugIdMap[frame.abs_path] = frame.debug_id; - } else if (frame.filename) { - filenameDebugIdMap[frame.filename] = frame.debug_id; - } - delete frame.debug_id; - } - }); - }); - } catch (e) { - // To save bundle size we're just try catching here instead of checking for the existence of all the different objects. - } - - if (Object.keys(filenameDebugIdMap).length === 0) { +function setupIntegration(client, integration, integrationIndex) { + if (integrationIndex[integration.name]) { + DEBUG_BUILD2 && logger.log(`Integration skipped because it was already installed: ${integration.name}`); return; } - - // Fill debug_meta information - event.debug_meta = event.debug_meta || {}; - event.debug_meta.images = event.debug_meta.images || []; - const images = event.debug_meta.images; - Object.keys(filenameDebugIdMap).forEach(filename => { - images.push({ - type: 'sourcemap', - code_file: filename, - debug_id: filenameDebugIdMap[filename], - }); - }); -} - -/** - * This function adds all used integrations to the SDK info in the event. - * @param event The event that will be filled with all integrations. - */ -function applyIntegrationsMetadata(event, integrationNames) { - if (integrationNames.length > 0) { - event.sdk = event.sdk || {}; - event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames]; + integrationIndex[integration.name] = integration; + if (installedIntegrations.indexOf(integration.name) === -1) { + integration.setupOnce(addGlobalEventProcessor, getCurrentHub); + installedIntegrations.push(integration.name); } -} - -/** - * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization. - * Normalized keys: - * - `breadcrumbs.data` - * - `user` - * - `contexts` - * - `extra` - * @param event Event - * @returns Normalized event - */ -function normalizeEvent(event, depth, maxBreadth) { - if (!event) { - return null; + if (integration.setup && typeof integration.setup === "function") { + integration.setup(client); } - - const normalized = { - ...event, - ...(event.breadcrumbs && { - breadcrumbs: event.breadcrumbs.map(b => ({ - ...b, - ...(b.data && { - data: utils.normalize(b.data, depth, maxBreadth), - }), - })), - }), - ...(event.user && { - user: utils.normalize(event.user, depth, maxBreadth), - }), - ...(event.contexts && { - contexts: utils.normalize(event.contexts, depth, maxBreadth), - }), - ...(event.extra && { - extra: utils.normalize(event.extra, depth, maxBreadth), - }), - }; - - // event.contexts.trace stores information about a Transaction. Similarly, - // event.spans[] stores information about child Spans. Given that a - // Transaction is conceptually a Span, normalization should apply to both - // Transactions and Spans consistently. - // For now the decision is to skip normalization of Transactions and Spans, - // so this block overwrites the normalized event to add back the original - // Transaction information prior to normalization. - if (event.contexts && event.contexts.trace && normalized.contexts) { - normalized.contexts.trace = event.contexts.trace; - - // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it - if (event.contexts.trace.data) { - normalized.contexts.trace.data = utils.normalize(event.contexts.trace.data, depth, maxBreadth); - } + if (client.on && typeof integration.preprocessEvent === "function") { + const callback = integration.preprocessEvent.bind(integration); + client.on("preprocessEvent", (event, hint) => callback(event, hint, client)); } - - // event.spans[].data may contain circular/dangerous data so we need to normalize it - if (event.spans) { - normalized.spans = event.spans.map(span => { - const data = spanUtils.spanToJSON(span).data; - - if (data) { - // This is a bit weird, as we generally have `Span` instances here, but to be safe we do not assume so - // eslint-disable-next-line deprecation/deprecation - span.data = utils.normalize(data, depth, maxBreadth); - } - - return span; + if (client.addEventProcessor && typeof integration.processEvent === "function") { + const callback = integration.processEvent.bind(integration); + const processor = Object.assign((event, hint) => callback(event, hint, client), { + id: integration.name }); + client.addEventProcessor(processor); } - - return normalized; + DEBUG_BUILD2 && logger.log(`Integration installed: ${integration.name}`); } - -function getFinalScope(scope$1, captureContext) { - if (!captureContext) { - return scope$1; +function addIntegration(integration) { + const client = getClient(); + if (!client || !client.addIntegration) { + DEBUG_BUILD2 && logger.warn(`Cannot add integration "${integration.name}" because no SDK Client is available.`); + return; } - - const finalScope = scope$1 ? scope$1.clone() : new scope.Scope(); - finalScope.update(captureContext); - return finalScope; + client.addIntegration(integration); } - -/** - * Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`. - * This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`. - */ -function parseEventHintOrCaptureContext( - hint, -) { - if (!hint) { - return undefined; - } - - // If you pass a Scope or `() => Scope` as CaptureContext, we just return this as captureContext - if (hintIsScopeOrFunction(hint)) { - return { captureContext: hint }; - } - - if (hintIsScopeContext(hint)) { - return { - captureContext: hint, - }; +function findIndex(arr, callback) { + for (let i = 0; i < arr.length; i++) { + if (callback(arr[i]) === true) { + return i; + } } - - return hint; + return -1; } - -function hintIsScopeOrFunction( - hint, -) { - return hint instanceof scope.Scope || typeof hint === 'function'; +function convertIntegrationFnToClass(name, fn) { + return Object.assign( + function ConvertedIntegration(...args) { + return fn(...args); + }, + { id: name } + ); } - -const captureContextKeys = [ - 'user', - 'level', - 'extra', - 'contexts', - 'tags', - 'fingerprint', - 'requestSession', - 'propagationContext', -] ; - -function hintIsScopeContext(hint) { - return Object.keys(hint).some(key => captureContextKeys.includes(key )); +function defineIntegration(fn) { + return fn; } - -exports.applyDebugIds = applyDebugIds; -exports.applyDebugMeta = applyDebugMeta; -exports.parseEventHintOrCaptureContext = parseEventHintOrCaptureContext; -exports.prepareEvent = prepareEvent; -//# sourceMappingURL=prepareEvent.js.map - - -/***/ }), - -/***/ 48992: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const version = __nccwpck_require__(63491); - -/** - * A builder for the SDK metadata in the options for the SDK initialization. - * - * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit. - * We don't extract it for bundle size reasons. - * @see https://github.com/getsentry/sentry-javascript/pull/7404 - * @see https://github.com/getsentry/sentry-javascript/pull/4196 - * - * If you make changes to this function consider updating the others as well. - * - * @param options SDK options object that gets mutated - * @param names list of package names - */ -function applySdkMetadata(options, name, names = [name], source = 'npm') { - const metadata = options._metadata || {}; - - if (!metadata.sdk) { - metadata.sdk = { - name: `sentry.javascript.${name}`, - packages: names.map(name => ({ - name: `${source}:@sentry/${name}`, - version: version.SDK_VERSION, - })), - version: version.SDK_VERSION, - }; +var installedIntegrations; +var init_integration = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integration.js"() { + init_esm(); + init_debug_build2(); + init_eventProcessors(); + init_exports(); + init_hub(); + installedIntegrations = []; } +}); - options._metadata = metadata; -} - -exports.applySdkMetadata = applySdkMetadata; -//# sourceMappingURL=sdkMetadata.js.map - - -/***/ }), - -/***/ 59152: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -// These are aligned with OpenTelemetry trace flags -const TRACE_FLAG_NONE = 0x0; -const TRACE_FLAG_SAMPLED = 0x1; - -/** - * Convert a span to a trace context, which can be sent as the `trace` context in an event. - */ -function spanToTraceContext(span) { - const { spanId: span_id, traceId: trace_id } = span.spanContext(); - const { data, op, parent_span_id, status, tags, origin } = spanToJSON(span); - - return utils.dropUndefinedKeys({ - data, - op, - parent_span_id, - span_id, - status, - tags, - trace_id, - origin, - }); -} - -/** - * Convert a Span to a Sentry trace header. - */ -function spanToTraceHeader(span) { - const { traceId, spanId } = span.spanContext(); - const sampled = spanIsSampled(span); - return utils.generateSentryTraceHeader(traceId, spanId, sampled); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/utils.js +function getBucketKey(metricType, name, unit, tags) { + const stringifiedTags = Object.entries(dropUndefinedKeys(tags)).sort((a, b) => a[0].localeCompare(b[0])); + return `${metricType}${name}${unit}${stringifiedTags}`; } - -/** - * Convert a span time input intp a timestamp in seconds. - */ -function spanTimeInputToSeconds(input) { - if (typeof input === 'number') { - return ensureTimestampInSeconds(input); - } - - if (Array.isArray(input)) { - // See {@link HrTime} for the array-based time format - return input[0] + input[1] / 1e9; +function simpleHash(s) { + let rv = 0; + for (let i = 0; i < s.length; i++) { + const c = s.charCodeAt(i); + rv = (rv << 5) - rv + c; + rv &= rv; } - - if (input instanceof Date) { - return ensureTimestampInSeconds(input.getTime()); + return rv >>> 0; +} +function serializeMetricBuckets(metricBucketItems) { + let out = ""; + for (const item of metricBucketItems) { + const tagEntries = Object.entries(item.tags); + const maybeTags = tagEntries.length > 0 ? `|#${tagEntries.map(([key, value]) => `${key}:${value}`).join(",")}` : ""; + out += `${item.name}@${item.unit}:${item.metric}|${item.metricType}${maybeTags}|T${item.timestamp} +`; } - - return utils.timestampInSeconds(); + return out; } - -/** - * Converts a timestamp to second, if it was in milliseconds, or keeps it as second. - */ -function ensureTimestampInSeconds(timestamp) { - const isMs = timestamp > 9999999999; - return isMs ? timestamp / 1000 : timestamp; +function sanitizeUnit(unit) { + return unit.replace(/[^\w]+/gi, "_"); } - -/** - * Convert a span to a JSON representation. - * Note that all fields returned here are optional and need to be guarded against. - * - * Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json). - * This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility. - * And `spanToJSON` needs the Span class from `span.ts` to check here. - * TODO v8: When we remove the deprecated stuff from `span.ts`, we can remove the circular dependency again. - */ -function spanToJSON(span) { - if (spanIsSpanClass(span)) { - return span.getSpanJSON(); - } - - // Fallback: We also check for `.toJSON()` here... - // eslint-disable-next-line deprecation/deprecation - if (typeof span.toJSON === 'function') { - // eslint-disable-next-line deprecation/deprecation - return span.toJSON(); +function sanitizeMetricKey(key) { + return key.replace(/[^\w\-.]+/gi, "_"); +} +function sanitizeTagKey(key) { + return key.replace(/[^\w\-./]+/gi, ""); +} +function getCharOrReplacement(input) { + for (const [search, replacement] of tagValueReplacements) { + if (input === search) { + return replacement; + } } - - return {}; + return input; } - -/** - * Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof. - * :( So instead we approximate this by checking if it has the `getSpanJSON` method. - */ -function spanIsSpanClass(span) { - return typeof (span ).getSpanJSON === 'function'; +function sanitizeTagValue(value) { + return [...value].reduce((acc, char) => acc + getCharOrReplacement(char), ""); } - -/** - * Returns true if a span is sampled. - * In most cases, you should just use `span.isRecording()` instead. - * However, this has a slightly different semantic, as it also returns false if the span is finished. - * So in the case where this distinction is important, use this method. - */ -function spanIsSampled(span) { - // We align our trace flags with the ones OpenTelemetry use - // So we also check for sampled the same way they do. - const { traceFlags } = span.spanContext(); - // eslint-disable-next-line no-bitwise - return Boolean(traceFlags & TRACE_FLAG_SAMPLED); +function sanitizeTags(unsanitizedTags) { + const tags = {}; + for (const key in unsanitizedTags) { + if (Object.prototype.hasOwnProperty.call(unsanitizedTags, key)) { + const sanitizedKey = sanitizeTagKey(key); + tags[sanitizedKey] = sanitizeTagValue(String(unsanitizedTags[key])); + } + } + return tags; } +var tagValueReplacements; +var init_utils2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/utils.js"() { + init_esm(); + tagValueReplacements = [ + ["\n", "\\n"], + ["\r", "\\r"], + [" ", "\\t"], + ["\\", "\\\\"], + ["|", "\\u{7c}"], + [",", "\\u{2c}"] + ]; + } +}); -exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE; -exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED; -exports.spanIsSampled = spanIsSampled; -exports.spanTimeInputToSeconds = spanTimeInputToSeconds; -exports.spanToJSON = spanToJSON; -exports.spanToTraceContext = spanToTraceContext; -exports.spanToTraceHeader = spanToTraceHeader; -//# sourceMappingURL=spanUtils.js.map - - -/***/ }), - -/***/ 63491: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const SDK_VERSION = '7.120.0'; - -exports.SDK_VERSION = SDK_VERSION; -//# sourceMappingURL=version.js.map - - -/***/ }), - -/***/ 53140: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const INTEGRATION_NAME = 'CaptureConsole'; - -const _captureConsoleIntegration = ((options = {}) => { - const levels = options.levels || utils.CONSOLE_LEVELS; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - if (!('console' in utils.GLOBAL_OBJ)) { - return; - } - - utils.addConsoleInstrumentationHandler(({ args, level }) => { - if (core.getClient() !== client || !levels.includes(level)) { - return; - } - - consoleHandler(args, level); - }); - }, - }; -}) ; - -const captureConsoleIntegration = core.defineIntegration(_captureConsoleIntegration); - -/** - * Send Console API calls as Sentry Events. - * @deprecated Use `captureConsoleIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const CaptureConsole = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - captureConsoleIntegration, -) - -; - -function consoleHandler(args, level) { - const captureContext = { - level: utils.severityLevelFromString(level), - extra: { - arguments: args, - }, +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/envelope.js +function createMetricEnvelope(metricBucketItems, dsn, metadata, tunnel) { + const headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() }; - - core.withScope(scope => { - scope.addEventProcessor(event => { - event.logger = 'console'; - - utils.addExceptionMechanism(event, { - handled: false, - type: 'console', - }); - - return event; - }); - - if (level === 'assert' && args[0] === false) { - const message = `Assertion failed: ${utils.safeJoin(args.slice(1), ' ') || 'console.assert'}`; - scope.setExtra('arguments', args.slice(1)); - core.captureMessage(message, captureContext); - return; - } - - const error = args.find(arg => arg instanceof Error); - if (level === 'error' && error) { - core.captureException(error, captureContext); - return; - } - - const message = utils.safeJoin(args, ' '); - core.captureMessage(message, captureContext); - }); + if (metadata && metadata.sdk) { + headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }; + } + if (!!tunnel && dsn) { + headers.dsn = dsnToString(dsn); + } + const item = createMetricEnvelopeItem(metricBucketItems); + return createEnvelope(headers, [item]); } - -exports.CaptureConsole = CaptureConsole; -exports.captureConsoleIntegration = captureConsoleIntegration; -//# sourceMappingURL=captureconsole.js.map - - -/***/ }), - -/***/ 19693: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const WINDOW = utils.GLOBAL_OBJ ; - -const DEFAULT_LINES_OF_CONTEXT = 7; - -const INTEGRATION_NAME = 'ContextLines'; - -const _contextLinesIntegration = ((options = {}) => { - const contextLines = options.frameContextLines != null ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - return addSourceContext(event, contextLines); - }, +function createMetricEnvelopeItem(metricBucketItems) { + const payload = serializeMetricBuckets(metricBucketItems); + const metricHeaders = { + type: "statsd", + length: payload.length }; -}) ; - -const contextLinesIntegration = core.defineIntegration(_contextLinesIntegration); - -/** - * Collects source context lines around the lines of stackframes pointing to JS embedded in - * the current page's HTML. - * - * This integration DOES NOT work for stack frames pointing to JS files that are loaded by the browser. - * For frames pointing to files, context lines are added during ingestion and symbolication - * by attempting to download the JS files to the Sentry backend. - * - * Use this integration if you have inline JS code in HTML pages that can't be accessed - * by our backend (e.g. due to a login-protected page). - * - * @deprecated Use `contextLinesIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const ContextLines = core.convertIntegrationFnToClass(INTEGRATION_NAME, contextLinesIntegration) - -; - -/** - * Processes an event and adds context lines. - */ -function addSourceContext(event, contextLines) { - const doc = WINDOW.document; - const htmlFilename = WINDOW.location && utils.stripUrlQueryAndFragment(WINDOW.location.href); - if (!doc || !htmlFilename) { - return event; + return [metricHeaders, payload]; +} +var init_envelope3 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/envelope.js"() { + init_esm(); + init_utils2(); } +}); - const exceptions = event.exception && event.exception.values; - if (!exceptions || !exceptions.length) { - return event; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/baseclient.js +function _validateBeforeSendResult(beforeSendResult, beforeSendLabel) { + const invalidValueError = `${beforeSendLabel} must return \`null\` or a valid event.`; + if (isThenable(beforeSendResult)) { + return beforeSendResult.then( + (event) => { + if (!isPlainObject(event) && event !== null) { + throw new SentryError(invalidValueError); + } + return event; + }, + (e) => { + throw new SentryError(`${beforeSendLabel} rejected with ${e}`); + } + ); + } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) { + throw new SentryError(invalidValueError); } - - const html = doc.documentElement.innerHTML; - if (!html) { - return event; + return beforeSendResult; +} +function processBeforeSend(options2, event, hint) { + const { beforeSend, beforeSendTransaction } = options2; + if (isErrorEvent2(event) && beforeSend) { + return beforeSend(event, hint); } - - const htmlLines = ['', '', ...html.split('\n'), '']; - - exceptions.forEach(exception => { - const stacktrace = exception.stacktrace; - if (stacktrace && stacktrace.frames) { - stacktrace.frames = stacktrace.frames.map(frame => - applySourceContextToFrame(frame, htmlLines, htmlFilename, contextLines), - ); + if (isTransactionEvent(event) && beforeSendTransaction) { + if (event.spans) { + const spanCountBefore = event.spans.length; + event.sdkProcessingMetadata = { + ...event.sdkProcessingMetadata, + spanCountBeforeProcessing: spanCountBefore + }; } - }); - + return beforeSendTransaction(event, hint); + } return event; } - -/** - * Only exported for testing - */ -function applySourceContextToFrame( - frame, - htmlLines, - htmlFilename, - linesOfContext, -) { - if (frame.filename !== htmlFilename || !frame.lineno || !htmlLines.length) { - return frame; +function isErrorEvent2(event) { + return event.type === void 0; +} +function isTransactionEvent(event) { + return event.type === "transaction"; +} +function addEventProcessor(callback) { + const client = getClient(); + if (!client || !client.addEventProcessor) { + return; } - - utils.addContextToFrame(htmlLines, frame, linesOfContext); - - return frame; + client.addEventProcessor(callback); } - -exports.ContextLines = ContextLines; -exports.applySourceContextToFrame = applySourceContextToFrame; -exports.contextLinesIntegration = contextLinesIntegration; -//# sourceMappingURL=contextlines.js.map - - -/***/ }), - -/***/ 6773: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code. - * - * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking. - */ -const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__); - -exports.DEBUG_BUILD = DEBUG_BUILD; -//# sourceMappingURL=debug-build.js.map - - -/***/ }), - -/***/ 6136: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const INTEGRATION_NAME = 'Debug'; - -const _debugIntegration = ((options = {}) => { - const _options = { - debugger: false, - stringify: false, - ...options, - }; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - if (!client.on) { - return; +var ALREADY_SEEN_ERROR, BaseClient; +var init_baseclient = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/baseclient.js"() { + init_esm(); + init_api(); + init_debug_build2(); + init_envelope2(); + init_exports(); + init_hub(); + init_integration(); + init_envelope3(); + init_session(); + init_dynamicSamplingContext(); + init_prepareEvent(); + ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured."; + BaseClient = class { + /** + * A reference to a metrics aggregator + * + * @experimental Note this is alpha API. It may experience breaking changes in the future. + */ + /** Options passed to the SDK. */ + /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */ + /** Array of set up integrations. */ + /** Indicates whether this client's integrations have been set up. */ + /** Number of calls being processed */ + /** Holds flushable */ + // eslint-disable-next-line @typescript-eslint/ban-types + /** + * Initializes this client instance. + * + * @param options Options for the client. + */ + constructor(options2) { + this._options = options2; + this._integrations = {}; + this._integrationsInitialized = false; + this._numProcessing = 0; + this._outcomes = {}; + this._hooks = {}; + this._eventProcessors = []; + if (options2.dsn) { + this._dsn = makeDsn(options2.dsn); + } else { + DEBUG_BUILD2 && logger.warn("No DSN provided, client will not send events."); + } + if (this._dsn) { + const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options2); + this._transport = options2.transport({ + tunnel: this._options.tunnel, + recordDroppedEvent: this.recordDroppedEvent.bind(this), + ...options2.transportOptions, + url + }); + } } - - client.on('beforeSendEvent', (event, hint) => { - if (_options.debugger) { - // eslint-disable-next-line no-debugger - debugger; + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception2, hint, scope) { + if (checkOrSetAlreadyCaught(exception2)) { + DEBUG_BUILD2 && logger.log(ALREADY_SEEN_ERROR); + return; } - - /* eslint-disable no-console */ - utils.consoleSandbox(() => { - if (_options.stringify) { - console.log(JSON.stringify(event, null, 2)); - if (hint && Object.keys(hint).length) { - console.log(JSON.stringify(hint, null, 2)); - } - } else { - console.log(event); - if (hint && Object.keys(hint).length) { - console.log(hint); - } - } - }); - /* eslint-enable no-console */ - }); - }, - }; -}) ; - -const debugIntegration = core.defineIntegration(_debugIntegration); - -/** - * Integration to debug sent Sentry events. - * This integration should not be used in production. - * - * @deprecated Use `debugIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Debug = core.convertIntegrationFnToClass(INTEGRATION_NAME, debugIntegration) - -; - -exports.Debug = Debug; -exports.debugIntegration = debugIntegration; -//# sourceMappingURL=debug.js.map - - -/***/ }), - -/***/ 80360: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(6773); - -const INTEGRATION_NAME = 'Dedupe'; - -const _dedupeIntegration = (() => { - let previousEvent; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(currentEvent) { - // We want to ignore any non-error type events, e.g. transactions or replays - // These should never be deduped, and also not be compared against as _previousEvent. - if (currentEvent.type) { - return currentEvent; + let eventId = hint && hint.event_id; + this._process( + this.eventFromException(exception2, hint).then((event) => this._captureEvent(event, hint, scope)).then((result) => { + eventId = result; + }) + ); + return eventId; } - - // Juuust in case something goes wrong - try { - if (_shouldDropEvent(currentEvent, previousEvent)) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Event dropped due to being a duplicate of previously captured event.'); - return null; + /** + * @inheritDoc + */ + captureMessage(message, level, hint, scope) { + let eventId = hint && hint.event_id; + const eventMessage = isParameterizedString(message) ? message : String(message); + const promisedEvent = isPrimitive(message) ? this.eventFromMessage(eventMessage, level, hint) : this.eventFromException(message, hint); + this._process( + promisedEvent.then((event) => this._captureEvent(event, hint, scope)).then((result) => { + eventId = result; + }) + ); + return eventId; + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) { + DEBUG_BUILD2 && logger.log(ALREADY_SEEN_ERROR); + return; } - } catch (_oO) {} // eslint-disable-line no-empty - - return (previousEvent = currentEvent); - }, - }; -}) ; - -const dedupeIntegration = core.defineIntegration(_dedupeIntegration); - -/** - * Deduplication filter. - * @deprecated Use `dedupeIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Dedupe = core.convertIntegrationFnToClass(INTEGRATION_NAME, dedupeIntegration) - -; - -/** only exported for tests. */ -function _shouldDropEvent(currentEvent, previousEvent) { - if (!previousEvent) { - return false; - } - - if (_isSameMessageEvent(currentEvent, previousEvent)) { - return true; - } - - if (_isSameExceptionEvent(currentEvent, previousEvent)) { - return true; + let eventId = hint && hint.event_id; + const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; + const capturedSpanScope = sdkProcessingMetadata.capturedSpanScope; + this._process( + this._captureEvent(event, hint, capturedSpanScope || scope).then((result) => { + eventId = result; + }) + ); + return eventId; + } + /** + * @inheritDoc + */ + captureSession(session) { + if (!(typeof session.release === "string")) { + DEBUG_BUILD2 && logger.warn("Discarded session because of missing or non-string release"); + } else { + this.sendSession(session); + updateSession(session, { init: false }); + } + } + /** + * @inheritDoc + */ + getDsn() { + return this._dsn; + } + /** + * @inheritDoc + */ + getOptions() { + return this._options; + } + /** + * @see SdkMetadata in @sentry/types + * + * @return The metadata of the SDK + */ + getSdkMetadata() { + return this._options._metadata; + } + /** + * @inheritDoc + */ + getTransport() { + return this._transport; + } + /** + * @inheritDoc + */ + flush(timeout) { + const transport2 = this._transport; + if (transport2) { + if (this.metricsAggregator) { + this.metricsAggregator.flush(); + } + return this._isClientDoneProcessing(timeout).then((clientFinished) => { + return transport2.flush(timeout).then((transportFlushed) => clientFinished && transportFlushed); + }); + } else { + return resolvedSyncPromise(true); + } + } + /** + * @inheritDoc + */ + close(timeout) { + return this.flush(timeout).then((result) => { + this.getOptions().enabled = false; + if (this.metricsAggregator) { + this.metricsAggregator.close(); + } + return result; + }); + } + /** Get all installed event processors. */ + getEventProcessors() { + return this._eventProcessors; + } + /** @inheritDoc */ + addEventProcessor(eventProcessor) { + this._eventProcessors.push(eventProcessor); + } + /** + * This is an internal function to setup all integrations that should run on the client. + * @deprecated Use `client.init()` instead. + */ + setupIntegrations(forceInitialize) { + if (forceInitialize && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) { + this._setupIntegrations(); + } + } + /** @inheritdoc */ + init() { + if (this._isEnabled()) { + this._setupIntegrations(); + } + } + /** + * Gets an installed integration by its `id`. + * + * @returns The installed integration or `undefined` if no integration with that `id` was installed. + * @deprecated Use `getIntegrationByName()` instead. + */ + getIntegrationById(integrationId) { + return this.getIntegrationByName(integrationId); + } + /** + * Gets an installed integration by its name. + * + * @returns The installed integration or `undefined` if no integration with that `name` was installed. + */ + getIntegrationByName(integrationName) { + return this._integrations[integrationName]; + } + /** + * Returns the client's instance of the given integration class, it any. + * @deprecated Use `getIntegrationByName()` instead. + */ + getIntegration(integration) { + try { + return this._integrations[integration.id] || null; + } catch (_oO) { + DEBUG_BUILD2 && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`); + return null; + } + } + /** + * @inheritDoc + */ + addIntegration(integration) { + const isAlreadyInstalled = this._integrations[integration.name]; + setupIntegration(this, integration, this._integrations); + if (!isAlreadyInstalled) { + afterSetupIntegrations(this, [integration]); + } + } + /** + * @inheritDoc + */ + sendEvent(event, hint = {}) { + this.emit("beforeSendEvent", event, hint); + let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel); + for (const attachment of hint.attachments || []) { + env = addItemToEnvelope( + env, + createAttachmentEnvelopeItem( + attachment, + this._options.transportOptions && this._options.transportOptions.textEncoder + ) + ); + } + const promise = this._sendEnvelope(env); + if (promise) { + promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null); + } + } + /** + * @inheritDoc + */ + sendSession(session) { + const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel); + this._sendEnvelope(env); + } + /** + * @inheritDoc + */ + recordDroppedEvent(reason, category, eventOrCount) { + if (this._options.sendClientReports) { + const count = typeof eventOrCount === "number" ? eventOrCount : 1; + const key = `${reason}:${category}`; + DEBUG_BUILD2 && logger.log(`Recording outcome: "${key}"${count > 1 ? ` (${count} times)` : ""}`); + this._outcomes[key] = (this._outcomes[key] || 0) + count; + } + } + /** + * @inheritDoc + */ + captureAggregateMetrics(metricBucketItems) { + DEBUG_BUILD2 && logger.log(`Flushing aggregated metrics, number of metrics: ${metricBucketItems.length}`); + const metricsEnvelope = createMetricEnvelope( + metricBucketItems, + this._dsn, + this._options._metadata, + this._options.tunnel + ); + this._sendEnvelope(metricsEnvelope); + } + // Keep on() & emit() signatures in sync with types' client.ts interface + /* eslint-disable @typescript-eslint/unified-signatures */ + /** @inheritdoc */ + /** @inheritdoc */ + on(hook6, callback) { + if (!this._hooks[hook6]) { + this._hooks[hook6] = []; + } + this._hooks[hook6].push(callback); + } + /** @inheritdoc */ + /** @inheritdoc */ + emit(hook6, ...rest) { + if (this._hooks[hook6]) { + this._hooks[hook6].forEach((callback) => callback(...rest)); + } + } + /* eslint-enable @typescript-eslint/unified-signatures */ + /** Setup integrations for this client. */ + _setupIntegrations() { + const { integrations } = this._options; + this._integrations = setupIntegrations(this, integrations); + afterSetupIntegrations(this, integrations); + this._integrationsInitialized = true; + } + /** Updates existing session based on the provided event */ + _updateSessionFromEvent(session, event) { + let crashed = false; + let errored = false; + const exceptions = event.exception && event.exception.values; + if (exceptions) { + errored = true; + for (const ex of exceptions) { + const mechanism = ex.mechanism; + if (mechanism && mechanism.handled === false) { + crashed = true; + break; + } + } + } + const sessionNonTerminal = session.status === "ok"; + const shouldUpdateAndSend = sessionNonTerminal && session.errors === 0 || sessionNonTerminal && crashed; + if (shouldUpdateAndSend) { + updateSession(session, { + ...crashed && { status: "crashed" }, + errors: session.errors || Number(errored || crashed) + }); + this.captureSession(session); + } + } + /** + * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying + * "no" (resolving to `false`) in order to give the client a chance to potentially finish first. + * + * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not + * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to + * `true`. + * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and + * `false` otherwise + */ + _isClientDoneProcessing(timeout) { + return new SyncPromise((resolve4) => { + let ticked = 0; + const tick = 1; + const interval = setInterval(() => { + if (this._numProcessing == 0) { + clearInterval(interval); + resolve4(true); + } else { + ticked += tick; + if (timeout && ticked >= timeout) { + clearInterval(interval); + resolve4(false); + } + } + }, tick); + }); + } + /** Determines whether this SDK is enabled and a transport is present. */ + _isEnabled() { + return this.getOptions().enabled !== false && this._transport !== void 0; + } + /** + * Adds common information to events. + * + * The information includes release and environment from `options`, + * breadcrumbs and context (extra, tags and user) from the scope. + * + * Information that is already present in the event is never overwritten. For + * nested objects, such as the context, keys are merged. + * + * @param event The original event. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A new event with more information. + */ + _prepareEvent(event, hint, scope, isolationScope = getIsolationScope()) { + const options2 = this.getOptions(); + const integrations = Object.keys(this._integrations); + if (!hint.integrations && integrations.length > 0) { + hint.integrations = integrations; + } + this.emit("preprocessEvent", event, hint); + return prepareEvent(options2, event, hint, scope, this, isolationScope).then((evt) => { + if (evt === null) { + return evt; + } + const propagationContext = { + ...isolationScope.getPropagationContext(), + ...scope ? scope.getPropagationContext() : void 0 + }; + const trace2 = evt.contexts && evt.contexts.trace; + if (!trace2 && propagationContext) { + const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext; + evt.contexts = { + trace: { + trace_id, + span_id: spanId, + parent_span_id: parentSpanId + }, + ...evt.contexts + }; + const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope); + evt.sdkProcessingMetadata = { + dynamicSamplingContext, + ...evt.sdkProcessingMetadata + }; + } + return evt; + }); + } + /** + * Processes the event and logs an error in case of rejection + * @param event + * @param hint + * @param scope + */ + _captureEvent(event, hint = {}, scope) { + return this._processEvent(event, hint, scope).then( + (finalEvent) => { + return finalEvent.event_id; + }, + (reason) => { + if (DEBUG_BUILD2) { + const sentryError = reason; + if (sentryError.logLevel === "log") { + logger.log(sentryError.message); + } else { + logger.warn(sentryError); + } + } + return void 0; + } + ); + } + /** + * Processes an event (either error or message) and sends it to Sentry. + * + * This also adds breadcrumbs and context information to the event. However, + * platform specific meta data (such as the User's IP address) must be added + * by the SDK implementor. + * + * + * @param event The event to send to Sentry. + * @param hint May contain additional information about the original exception. + * @param scope A scope containing event metadata. + * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send. + */ + _processEvent(event, hint, scope) { + const options2 = this.getOptions(); + const { sampleRate } = options2; + const isTransaction = isTransactionEvent(event); + const isError2 = isErrorEvent2(event); + const eventType = event.type || "error"; + const beforeSendLabel = `before send for type \`${eventType}\``; + if (isError2 && typeof sampleRate === "number" && Math.random() > sampleRate) { + this.recordDroppedEvent("sample_rate", "error", event); + return rejectedSyncPromise( + new SentryError( + `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`, + "log" + ) + ); + } + const dataCategory = eventType === "replay_event" ? "replay" : eventType; + const sdkProcessingMetadata = event.sdkProcessingMetadata || {}; + const capturedSpanIsolationScope = sdkProcessingMetadata.capturedSpanIsolationScope; + return this._prepareEvent(event, hint, scope, capturedSpanIsolationScope).then((prepared) => { + if (prepared === null) { + this.recordDroppedEvent("event_processor", dataCategory, event); + throw new SentryError("An event processor returned `null`, will not send event.", "log"); + } + const isInternalException = hint.data && hint.data.__sentry__ === true; + if (isInternalException) { + return prepared; + } + const result = processBeforeSend(options2, prepared, hint); + return _validateBeforeSendResult(result, beforeSendLabel); + }).then((processedEvent) => { + if (processedEvent === null) { + this.recordDroppedEvent("before_send", dataCategory, event); + if (isTransaction) { + const spans = event.spans || []; + const spanCount = 1 + spans.length; + this.recordDroppedEvent("before_send", "span", spanCount); + } + throw new SentryError(`${beforeSendLabel} returned \`null\`, will not send event.`, "log"); + } + const session = scope && scope.getSession(); + if (!isTransaction && session) { + this._updateSessionFromEvent(session, processedEvent); + } + if (isTransaction) { + const spanCountBefore = processedEvent.sdkProcessingMetadata && processedEvent.sdkProcessingMetadata.spanCountBeforeProcessing || 0; + const spanCountAfter = processedEvent.spans ? processedEvent.spans.length : 0; + const droppedSpanCount = spanCountBefore - spanCountAfter; + if (droppedSpanCount > 0) { + this.recordDroppedEvent("before_send", "span", droppedSpanCount); + } + } + const transactionInfo = processedEvent.transaction_info; + if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) { + const source = "custom"; + processedEvent.transaction_info = { + ...transactionInfo, + source + }; + } + this.sendEvent(processedEvent, hint); + return processedEvent; + }).then(null, (reason) => { + if (reason instanceof SentryError) { + throw reason; + } + this.captureException(reason, { + data: { + __sentry__: true + }, + originalException: reason + }); + throw new SentryError( + `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${reason}` + ); + }); + } + /** + * Occupies the client with processing and event + */ + _process(promise) { + this._numProcessing++; + void promise.then( + (value) => { + this._numProcessing--; + return value; + }, + (reason) => { + this._numProcessing--; + return reason; + } + ); + } + /** + * @inheritdoc + */ + _sendEnvelope(envelope) { + this.emit("beforeEnvelope", envelope); + if (this._isEnabled() && this._transport) { + return this._transport.send(envelope).then(null, (reason) => { + DEBUG_BUILD2 && logger.error("Error while sending event:", reason); + }); + } else { + DEBUG_BUILD2 && logger.error("Transport disabled"); + } + } + /** + * Clears outcomes on this client and returns them. + */ + _clearOutcomes() { + const outcomes = this._outcomes; + this._outcomes = {}; + return Object.keys(outcomes).map((key) => { + const [reason, category] = key.split(":"); + return { + reason, + category, + quantity: outcomes[key] + }; + }); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + }; } +}); - return false; -} - -function _isSameMessageEvent(currentEvent, previousEvent) { - const currentMessage = currentEvent.message; - const previousMessage = previousEvent.message; - - // If neither event has a message property, they were both exceptions, so bail out - if (!currentMessage && !previousMessage) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/checkin.js +function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) { + const headers = { + sent_at: (/* @__PURE__ */ new Date()).toISOString() + }; + if (metadata && metadata.sdk) { + headers.sdk = { + name: metadata.sdk.name, + version: metadata.sdk.version + }; } - - // If only one event has a stacktrace, but not the other one, they are not the same - if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) { - return false; + if (!!tunnel && !!dsn) { + headers.dsn = dsnToString(dsn); } - - if (currentMessage !== previousMessage) { - return false; + if (dynamicSamplingContext) { + headers.trace = dropUndefinedKeys(dynamicSamplingContext); } - - if (!_isSameFingerprint(currentEvent, previousEvent)) { - return false; + const item = createCheckInEnvelopeItem(checkIn); + return createEnvelope(headers, [item]); +} +function createCheckInEnvelopeItem(checkIn) { + const checkInHeaders = { + type: "check_in" + }; + return [checkInHeaders, checkIn]; +} +var init_checkin = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/checkin.js"() { + init_esm(); } +}); - if (!_isSameStacktrace(currentEvent, previousEvent)) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/constants.js +var COUNTER_METRIC_TYPE, GAUGE_METRIC_TYPE, SET_METRIC_TYPE, DISTRIBUTION_METRIC_TYPE, DEFAULT_BROWSER_FLUSH_INTERVAL, DEFAULT_FLUSH_INTERVAL, MAX_WEIGHT; +var init_constants2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/constants.js"() { + COUNTER_METRIC_TYPE = "c"; + GAUGE_METRIC_TYPE = "g"; + SET_METRIC_TYPE = "s"; + DISTRIBUTION_METRIC_TYPE = "d"; + DEFAULT_BROWSER_FLUSH_INTERVAL = 5e3; + DEFAULT_FLUSH_INTERVAL = 1e4; + MAX_WEIGHT = 1e4; } +}); - return true; -} - -function _isSameExceptionEvent(currentEvent, previousEvent) { - const previousException = _getExceptionFromEvent(previousEvent); - const currentException = _getExceptionFromEvent(currentEvent); - - if (!previousException || !currentException) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/instance.js +var CounterMetric, GaugeMetric, DistributionMetric, SetMetric, METRIC_MAP; +var init_instance = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/instance.js"() { + init_constants2(); + init_utils2(); + CounterMetric = class { + constructor(_value) { + this._value = _value; + } + /** @inheritDoc */ + get weight() { + return 1; + } + /** @inheritdoc */ + add(value) { + this._value += value; + } + /** @inheritdoc */ + toString() { + return `${this._value}`; + } + }; + GaugeMetric = class { + constructor(value) { + this._last = value; + this._min = value; + this._max = value; + this._sum = value; + this._count = 1; + } + /** @inheritDoc */ + get weight() { + return 5; + } + /** @inheritdoc */ + add(value) { + this._last = value; + if (value < this._min) { + this._min = value; + } + if (value > this._max) { + this._max = value; + } + this._sum += value; + this._count++; + } + /** @inheritdoc */ + toString() { + return `${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`; + } + }; + DistributionMetric = class { + constructor(first) { + this._value = [first]; + } + /** @inheritDoc */ + get weight() { + return this._value.length; + } + /** @inheritdoc */ + add(value) { + this._value.push(value); + } + /** @inheritdoc */ + toString() { + return this._value.join(":"); + } + }; + SetMetric = class { + constructor(first) { + this.first = first; + this._value = /* @__PURE__ */ new Set([first]); + } + /** @inheritDoc */ + get weight() { + return this._value.size; + } + /** @inheritdoc */ + add(value) { + this._value.add(value); + } + /** @inheritdoc */ + toString() { + return Array.from(this._value).map((val) => typeof val === "string" ? simpleHash(val) : val).join(":"); + } + }; + METRIC_MAP = { + [COUNTER_METRIC_TYPE]: CounterMetric, + [GAUGE_METRIC_TYPE]: GaugeMetric, + [DISTRIBUTION_METRIC_TYPE]: DistributionMetric, + [SET_METRIC_TYPE]: SetMetric + }; } +}); - if (previousException.type !== currentException.type || previousException.value !== currentException.value) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/aggregator.js +var MetricsAggregator; +var init_aggregator = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/aggregator.js"() { + init_esm(); + init_constants2(); + init_instance(); + init_metric_summary(); + init_utils2(); + MetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + // Different metrics have different weights. We use this to limit the number of metrics + // that we store in memory. + // Cast to any so that it can use Node.js timeout + // eslint-disable-next-line @typescript-eslint/no-explicit-any + // SDKs are required to shift the flush interval by random() * rollup_in_seconds. + // That shift is determined once per startup to create jittering. + // An SDK is required to perform force flushing ahead of scheduled time if the memory + // pressure is too high. There is no rule for this other than that SDKs should be tracking + // abstract aggregation complexity (eg: a counter only carries a single float, whereas a + // distribution is a float per emission). + // + // Force flush is used on either shutdown, flush() or when we exceed the max weight. + constructor(_client) { + this._client = _client; + this._buckets = /* @__PURE__ */ new Map(); + this._bucketsTotalWeight = 0; + this._interval = setInterval(() => this._flush(), DEFAULT_FLUSH_INTERVAL); + if (this._interval.unref) { + this._interval.unref(); + } + this._flushShift = Math.floor(Math.random() * DEFAULT_FLUSH_INTERVAL / 1e3); + this._forceFlush = false; + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = timestampInSeconds()) { + const timestamp2 = Math.floor(maybeFloatTimestamp); + const name = sanitizeMetricKey(unsanitizedName); + const tags = sanitizeTags(unsanitizedTags); + const unit = sanitizeUnit(unsanitizedUnit); + const bucketKey = getBucketKey(metricType, name, unit, tags); + let bucketItem = this._buckets.get(bucketKey); + const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + if (bucketItem) { + bucketItem.metric.add(value); + if (bucketItem.timestamp < timestamp2) { + bucketItem.timestamp = timestamp2; + } + } else { + bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new METRIC_MAP[metricType](value), + timestamp: timestamp2, + metricType, + name, + unit, + tags + }; + this._buckets.set(bucketKey, bucketItem); + } + const val = typeof value === "string" ? bucketItem.metric.weight - previousWeight : value; + updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + this._bucketsTotalWeight += bucketItem.metric.weight; + if (this._bucketsTotalWeight >= MAX_WEIGHT) { + this.flush(); + } + } + /** + * Flushes the current metrics to the transport via the transport. + */ + flush() { + this._forceFlush = true; + this._flush(); + } + /** + * Shuts down metrics aggregator and clears all metrics. + */ + close() { + this._forceFlush = true; + clearInterval(this._interval); + this._flush(); + } + /** + * Flushes the buckets according to the internal state of the aggregator. + * If it is a force flush, which happens on shutdown, it will flush all buckets. + * Otherwise, it will only flush buckets that are older than the flush interval, + * and according to the flush shift. + * + * This function mutates `_forceFlush` and `_bucketsTotalWeight` properties. + */ + _flush() { + if (this._forceFlush) { + this._forceFlush = false; + this._bucketsTotalWeight = 0; + this._captureMetrics(this._buckets); + this._buckets.clear(); + return; + } + const cutoffSeconds = Math.floor(timestampInSeconds()) - DEFAULT_FLUSH_INTERVAL / 1e3 - this._flushShift; + const flushedBuckets = /* @__PURE__ */ new Map(); + for (const [key, bucket] of this._buckets) { + if (bucket.timestamp <= cutoffSeconds) { + flushedBuckets.set(key, bucket); + this._bucketsTotalWeight -= bucket.metric.weight; + } + } + for (const [key] of flushedBuckets) { + this._buckets.delete(key); + } + this._captureMetrics(flushedBuckets); + } + /** + * Only captures a subset of the buckets passed to this function. + * @param flushedBuckets + */ + _captureMetrics(flushedBuckets) { + if (flushedBuckets.size > 0 && this._client.captureAggregateMetrics) { + const buckets = Array.from(flushedBuckets).map(([, bucketItem]) => bucketItem); + this._client.captureAggregateMetrics(buckets); + } + } + }; } +}); - if (!_isSameFingerprint(currentEvent, previousEvent)) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/server-runtime-client.js +var ServerRuntimeClient; +var init_server_runtime_client = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/server-runtime-client.js"() { + init_esm(); + init_baseclient(); + init_checkin(); + init_debug_build2(); + init_exports(); + init_aggregator(); + init_sessionflusher(); + init_hubextensions(); + init_spanUtils(); + init_getRootSpan(); + init_dynamicSamplingContext(); + ServerRuntimeClient = class extends BaseClient { + /** + * Creates a new Edge SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options2) { + addTracingExtensions(); + super(options2); + if (options2._experiments && options2._experiments["metricsAggregator"]) { + this.metricsAggregator = new MetricsAggregator(this); + } + } + /** + * @inheritDoc + */ + eventFromException(exception2, hint) { + return resolvedSyncPromise(eventFromUnknownInput(getClient(), this._options.stackParser, exception2, hint)); + } + /** + * @inheritDoc + */ + eventFromMessage(message, level = "info", hint) { + return resolvedSyncPromise( + eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace) + ); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types + captureException(exception2, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + const requestSession = scope.getRequestSession(); + if (requestSession && requestSession.status === "ok") { + requestSession.status = "errored"; + } + } + return super.captureException(exception2, hint, scope); + } + /** + * @inheritDoc + */ + captureEvent(event, hint, scope) { + if (this._options.autoSessionTracking && this._sessionFlusher && scope) { + const eventType = event.type || "exception"; + const isException = eventType === "exception" && event.exception && event.exception.values && event.exception.values.length > 0; + if (isException) { + const requestSession = scope.getRequestSession(); + if (requestSession && requestSession.status === "ok") { + requestSession.status = "errored"; + } + } + } + return super.captureEvent(event, hint, scope); + } + /** + * + * @inheritdoc + */ + close(timeout) { + if (this._sessionFlusher) { + this._sessionFlusher.close(); + } + return super.close(timeout); + } + /** Method that initialises an instance of SessionFlusher on Client */ + initSessionFlusher() { + const { release: release2, environment } = this._options; + if (!release2) { + DEBUG_BUILD2 && logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!"); + } else { + this._sessionFlusher = new SessionFlusher(this, { + release: release2, + environment + }); + } + } + /** + * Create a cron monitor check in and send it to Sentry. + * + * @param checkIn An object that describes a check in. + * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want + * to create a monitor automatically when sending a check in. + */ + captureCheckIn(checkIn, monitorConfig, scope) { + const id = "checkInId" in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4(); + if (!this._isEnabled()) { + DEBUG_BUILD2 && logger.warn("SDK not enabled, will not capture checkin."); + return id; + } + const options2 = this.getOptions(); + const { release: release2, environment, tunnel } = options2; + const serializedCheckIn = { + check_in_id: id, + monitor_slug: checkIn.monitorSlug, + status: checkIn.status, + release: release2, + environment + }; + if ("duration" in checkIn) { + serializedCheckIn.duration = checkIn.duration; + } + if (monitorConfig) { + serializedCheckIn.monitor_config = { + schedule: monitorConfig.schedule, + checkin_margin: monitorConfig.checkinMargin, + max_runtime: monitorConfig.maxRuntime, + timezone: monitorConfig.timezone + }; + } + const [dynamicSamplingContext, traceContext] = this._getTraceInfoFromScope(scope); + if (traceContext) { + serializedCheckIn.contexts = { + trace: traceContext + }; + } + const envelope = createCheckInEnvelope( + serializedCheckIn, + dynamicSamplingContext, + this.getSdkMetadata(), + tunnel, + this.getDsn() + ); + DEBUG_BUILD2 && logger.info("Sending checkin:", checkIn.monitorSlug, checkIn.status); + this._sendEnvelope(envelope); + return id; + } + /** + * Method responsible for capturing/ending a request session by calling `incrementSessionStatusCount` to increment + * appropriate session aggregates bucket + */ + _captureRequestSession() { + if (!this._sessionFlusher) { + DEBUG_BUILD2 && logger.warn("Discarded request mode session because autoSessionTracking option was disabled"); + } else { + this._sessionFlusher.incrementSessionStatusCount(); + } + } + /** + * @inheritDoc + */ + _prepareEvent(event, hint, scope, isolationScope) { + if (this._options.platform) { + event.platform = event.platform || this._options.platform; + } + if (this._options.runtime) { + event.contexts = { + ...event.contexts, + runtime: (event.contexts || {}).runtime || this._options.runtime + }; + } + if (this._options.serverName) { + event.server_name = event.server_name || this._options.serverName; + } + return super._prepareEvent(event, hint, scope, isolationScope); + } + /** Extract trace information from scope */ + _getTraceInfoFromScope(scope) { + if (!scope) { + return [void 0, void 0]; + } + const span = scope.getSpan(); + if (span) { + const samplingContext = getRootSpan(span) ? getDynamicSamplingContextFromSpan(span) : void 0; + return [samplingContext, spanToTraceContext(span)]; + } + const { traceId, spanId, parentSpanId, dsc } = scope.getPropagationContext(); + const traceContext = { + trace_id: traceId, + span_id: spanId, + parent_span_id: parentSpanId + }; + if (dsc) { + return [dsc, traceContext]; + } + return [getDynamicSamplingContextFromClient(traceId, this, scope), traceContext]; + } + }; } +}); - if (!_isSameStacktrace(currentEvent, previousEvent)) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/sdk.js +function initAndBind(clientClass, options2) { + if (options2.debug === true) { + if (DEBUG_BUILD2) { + logger.enable(); + } else { + consoleSandbox(() => { + console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."); + }); + } } - - return true; + const scope = getCurrentScope(); + scope.update(options2.initialScope); + const client = new clientClass(options2); + setCurrentClient(client); + initializeClient(client); } - -function _isSameStacktrace(currentEvent, previousEvent) { - let currentFrames = _getFramesFromEvent(currentEvent); - let previousFrames = _getFramesFromEvent(previousEvent); - - // If neither event has a stacktrace, they are assumed to be the same - if (!currentFrames && !previousFrames) { - return true; - } - - // If only one event has a stacktrace, but not the other one, they are not the same - if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) { - return false; +function setCurrentClient(client) { + const hub = getCurrentHub(); + const top = hub.getStackTop(); + top.client = client; + top.scope.setClient(client); +} +function initializeClient(client) { + if (client.init) { + client.init(); + } else if (client.setupIntegrations) { + client.setupIntegrations(); } - - currentFrames = currentFrames ; - previousFrames = previousFrames ; - - // If number of frames differ, they are not the same - if (previousFrames.length !== currentFrames.length) { - return false; +} +var init_sdk = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/sdk.js"() { + init_esm(); + init_debug_build2(); + init_exports(); + init_hub(); } +}); - // Otherwise, compare the two - for (let i = 0; i < previousFrames.length; i++) { - const frameA = previousFrames[i]; - const frameB = currentFrames[i]; - - if ( - frameA.filename !== frameB.filename || - frameA.lineno !== frameB.lineno || - frameA.colno !== frameB.colno || - frameA.function !== frameB.function - ) { - return false; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/transports/base.js +function createTransport(options2, makeRequest, buffer = makePromiseBuffer( + options2.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE +)) { + let rateLimits = {}; + const flush2 = (timeout) => buffer.drain(timeout); + function send(envelope) { + const filteredEnvelopeItems = []; + forEachEnvelopeItem(envelope, (item, type2) => { + const dataCategory = envelopeItemTypeToDataCategory(type2); + if (isRateLimited(rateLimits, dataCategory)) { + const event = getEventForEnvelopeItem(item, type2); + options2.recordDroppedEvent("ratelimit_backoff", dataCategory, event); + } else { + filteredEnvelopeItems.push(item); + } + }); + if (filteredEnvelopeItems.length === 0) { + return resolvedSyncPromise(); } + const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems); + const recordEnvelopeLoss = (reason) => { + forEachEnvelopeItem(filteredEnvelope, (item, type2) => { + const event = getEventForEnvelopeItem(item, type2); + options2.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type2), event); + }); + }; + const requestTask = () => makeRequest({ body: serializeEnvelope(filteredEnvelope, options2.textEncoder) }).then( + (response) => { + if (response.statusCode !== void 0 && (response.statusCode < 200 || response.statusCode >= 300)) { + DEBUG_BUILD2 && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`); + } + rateLimits = updateRateLimits(rateLimits, response); + return response; + }, + (error) => { + recordEnvelopeLoss("network_error"); + throw error; + } + ); + return buffer.add(requestTask).then( + (result) => result, + (error) => { + if (error instanceof SentryError) { + DEBUG_BUILD2 && logger.error("Skipped sending event because buffer is full."); + recordEnvelopeLoss("queue_overflow"); + return resolvedSyncPromise(); + } else { + throw error; + } + } + ); } - - return true; + send.__sentry__baseTransport__ = true; + return { + send, + flush: flush2 + }; } - -function _isSameFingerprint(currentEvent, previousEvent) { - let currentFingerprint = currentEvent.fingerprint; - let previousFingerprint = previousEvent.fingerprint; - - // If neither event has a fingerprint, they are assumed to be the same - if (!currentFingerprint && !previousFingerprint) { - return true; +function getEventForEnvelopeItem(item, type2) { + if (type2 !== "event" && type2 !== "transaction") { + return void 0; } - - // If only one event has a fingerprint, but not the other one, they are not the same - if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) { - return false; + return Array.isArray(item) ? item[1] : void 0; +} +var DEFAULT_TRANSPORT_BUFFER_SIZE; +var init_base = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/transports/base.js"() { + init_esm(); + init_debug_build2(); + DEFAULT_TRANSPORT_BUFFER_SIZE = 30; } +}); - currentFingerprint = currentFingerprint ; - previousFingerprint = previousFingerprint ; - - // Otherwise, compare the two - try { - return !!(currentFingerprint.join('') === previousFingerprint.join('')); - } catch (_oO) { +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js +function isSentryRequestUrl(url, hubOrClient) { + const client = hubOrClient && isHub(hubOrClient) ? ( + // eslint-disable-next-line deprecation/deprecation + hubOrClient.getClient() + ) : hubOrClient; + const dsn = client && client.getDsn(); + const tunnel = client && client.getOptions().tunnel; + return checkDsn(url, dsn) || checkTunnel(url, tunnel); +} +function checkTunnel(url, tunnel) { + if (!tunnel) { return false; } + return removeTrailingSlash(url) === removeTrailingSlash(tunnel); } - -function _getExceptionFromEvent(event) { - return event.exception && event.exception.values && event.exception.values[0]; +function checkDsn(url, dsn) { + return dsn ? url.includes(dsn.host) : false; } - -function _getFramesFromEvent(event) { - const exception = event.exception; - - if (exception) { - try { - // @ts-expect-error Object could be undefined - return exception.values[0].stacktrace.frames; - } catch (_oO) { - return undefined; - } - } - return undefined; +function removeTrailingSlash(str2) { + return str2[str2.length - 1] === "/" ? str2.slice(0, -1) : str2; } - -exports.Dedupe = Dedupe; -exports._shouldDropEvent = _shouldDropEvent; -exports.dedupeIntegration = dedupeIntegration; -//# sourceMappingURL=dedupe.js.map - - -/***/ }), - -/***/ 64875: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(6773); - -const INTEGRATION_NAME = 'ExtraErrorData'; - -const _extraErrorDataIntegration = ((options = {}) => { - const depth = options.depth || 3; - - // TODO(v8): Flip the default for this option to true - const captureErrorCause = options.captureErrorCause || false; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event, hint) { - return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); - }, - }; -}) ; - -const extraErrorDataIntegration = core.defineIntegration(_extraErrorDataIntegration); - -/** - * Extract additional data for from original exceptions. - * @deprecated Use `extraErrorDataIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const ExtraErrorData = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - extraErrorDataIntegration, -) - -; - -function _enhanceEventWithErrorData( - event, - hint = {}, - depth, - captureErrorCause, -) { - if (!hint.originalException || !utils.isError(hint.originalException)) { - return event; +function isHub(hubOrClient) { + return hubOrClient.getClient !== void 0; +} +var init_isSentryRequestUrl = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js"() { } - const exceptionName = (hint.originalException ).name || hint.originalException.constructor.name; - - const errorData = _extractErrorData(hint.originalException , captureErrorCause); - - if (errorData) { - const contexts = { - ...event.contexts, - }; - - const normalizedErrorData = utils.normalize(errorData, depth); +}); - if (utils.isPlainObject(normalizedErrorData)) { - // We mark the error data as "already normalized" here, because we don't want other normalization procedures to - // potentially truncate the data we just already normalized, with a certain depth setting. - utils.addNonEnumerableProperty(normalizedErrorData, '__sentry_skip_normalization__', true); - contexts[exceptionName] = normalizedErrorData; - } +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/parameterize.js +function parameterize(strings, ...values) { + const formatted = new String(String.raw(strings, ...values)); + formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s"); + formatted.__sentry_template_values__ = values; + return formatted; +} +var init_parameterize = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/parameterize.js"() { + } +}); - return { - ...event, - contexts, +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/sdkMetadata.js +function applySdkMetadata(options2, name, names = [name], source = "npm") { + const metadata = options2._metadata || {}; + if (!metadata.sdk) { + metadata.sdk = { + name: `sentry.javascript.${name}`, + packages: names.map((name2) => ({ + name: `${source}:@sentry/${name2}`, + version: SDK_VERSION + })), + version: SDK_VERSION }; } - - return event; + options2._metadata = metadata; } +var init_sdkMetadata = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/utils/sdkMetadata.js"() { + init_version(); + } +}); -/** - * Extract extra information from the Error object - */ -function _extractErrorData(error, captureErrorCause) { - // We are trying to enhance already existing event, so no harm done if it won't succeed - try { - const nativeKeys = [ - 'name', - 'message', - 'stack', - 'line', - 'column', - 'fileName', - 'lineNumber', - 'columnNumber', - 'toJSON', - ]; - - const extraErrorInfo = {}; - - // We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway. - for (const key of Object.keys(error)) { - if (nativeKeys.indexOf(key) !== -1) { - continue; - } - const value = error[key]; - extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; - } - - // Error.cause is a standard property that is non enumerable, we therefore need to access it separately. - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause - if (captureErrorCause && error.cause !== undefined) { - extraErrorInfo.cause = utils.isError(error.cause) ? error.cause.toString() : error.cause; - } - - // Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that) - if (typeof error.toJSON === 'function') { - const serializedError = error.toJSON() ; - - for (const key of Object.keys(serializedError)) { - const value = serializedError[key]; - extraErrorInfo[key] = utils.isError(value) ? value.toString() : value; - } +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/requestdata.js +function convertReqDataIntegrationOptsToAddReqDataOpts(integrationOptions) { + const { + transactionNamingScheme, + include: { ip, user, ...requestOptions } + } = integrationOptions; + const requestIncludeKeys = []; + for (const [key, value] of Object.entries(requestOptions)) { + if (value) { + requestIncludeKeys.push(key); } - - return extraErrorInfo; - } catch (oO) { - debugBuild.DEBUG_BUILD && utils.logger.error('Unable to extract extra data from the Error object:', oO); } - - return null; -} - -exports.ExtraErrorData = ExtraErrorData; -exports.extraErrorDataIntegration = extraErrorDataIntegration; -//# sourceMappingURL=extraerrordata.js.map - - -/***/ }), - -/***/ 96912: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(6773); - -const INTEGRATION_NAME = 'HttpClient'; - -const _httpClientIntegration = ((options = {}) => { - const _options = { - failedRequestStatusCodes: [[500, 599]], - failedRequestTargets: [/.*/], - ...options, - }; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - _wrapFetch(client, _options); - _wrapXHR(client, _options); - }, - }; -}) ; - -const httpClientIntegration = core.defineIntegration(_httpClientIntegration); - -/** - * Create events for failed client side HTTP requests. - * @deprecated Use `httpClientIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const HttpClient = core.convertIntegrationFnToClass(INTEGRATION_NAME, httpClientIntegration) - -; - -/** - * Interceptor function for fetch requests - * - * @param requestInfo The Fetch API request info - * @param response The Fetch API response - * @param requestInit The request init object - */ -function _fetchResponseHandler( - options, - requestInfo, - response, - requestInit, -) { - if (_shouldCaptureResponse(options, response.status, response.url)) { - const request = _getRequest(requestInfo, requestInit); - - let requestHeaders, responseHeaders, requestCookies, responseCookies; - - if (_shouldSendDefaultPii()) { - [{ headers: requestHeaders, cookies: requestCookies }, { headers: responseHeaders, cookies: responseCookies }] = [ - { cookieHeader: 'Cookie', obj: request }, - { cookieHeader: 'Set-Cookie', obj: response }, - ].map(({ cookieHeader, obj }) => { - const headers = _extractFetchHeaders(obj.headers); - let cookies; - - try { - const cookieString = headers[cookieHeader] || headers[cookieHeader.toLowerCase()] || undefined; - - if (cookieString) { - cookies = _parseCookieString(cookieString); - } - } catch (e) { - debugBuild.DEBUG_BUILD && utils.logger.log(`Could not extract cookies from header ${cookieHeader}`); - } - - return { - headers, - cookies, - }; - }); + let addReqDataUserOpt; + if (user === void 0) { + addReqDataUserOpt = true; + } else if (typeof user === "boolean") { + addReqDataUserOpt = user; + } else { + const userIncludeKeys = []; + for (const [key, value] of Object.entries(user)) { + if (value) { + userIncludeKeys.push(key); + } } - - const event = _createEvent({ - url: request.url, - method: request.method, - status: response.status, - requestHeaders, - responseHeaders, - requestCookies, - responseCookies, - }); - - core.captureEvent(event); + addReqDataUserOpt = userIncludeKeys; } -} - -/** - * Interceptor function for XHR requests - * - * @param xhr The XHR request - * @param method The HTTP method - * @param headers The HTTP headers - */ -function _xhrResponseHandler( - options, - xhr, - method, - headers, -) { - if (_shouldCaptureResponse(options, xhr.status, xhr.responseURL)) { - let requestHeaders, responseCookies, responseHeaders; - - if (_shouldSendDefaultPii()) { - try { - const cookieString = xhr.getResponseHeader('Set-Cookie') || xhr.getResponseHeader('set-cookie') || undefined; - - if (cookieString) { - responseCookies = _parseCookieString(cookieString); - } - } catch (e) { - debugBuild.DEBUG_BUILD && utils.logger.log('Could not extract cookies from response headers'); - } - - try { - responseHeaders = _getXHRResponseHeaders(xhr); - } catch (e) { - debugBuild.DEBUG_BUILD && utils.logger.log('Could not extract headers from response'); - } - - requestHeaders = headers; + return { + include: { + ip, + user: addReqDataUserOpt, + request: requestIncludeKeys.length !== 0 ? requestIncludeKeys : void 0, + transaction: transactionNamingScheme } - - const event = _createEvent({ - url: xhr.responseURL, - method, - status: xhr.status, - requestHeaders, - // Can't access request cookies from XHR - responseHeaders, - responseCookies, - }); - - core.captureEvent(event); + }; +} +function getSDKName(client) { + try { + return client.getOptions()._metadata.sdk.name; + } catch (err) { + return void 0; } } - -/** - * Extracts response size from `Content-Length` header when possible - * - * @param headers - * @returns The response size in bytes or undefined - */ -function _getResponseSizeFromHeaders(headers) { - if (headers) { - const contentLength = headers['Content-Length'] || headers['content-length']; - - if (contentLength) { - return parseInt(contentLength, 10); - } +var DEFAULT_OPTIONS, INTEGRATION_NAME, _requestDataIntegration, requestDataIntegration, RequestData; +var init_requestdata2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/requestdata.js"() { + init_esm(); + init_integration(); + init_spanUtils(); + DEFAULT_OPTIONS = { + include: { + cookies: true, + data: true, + headers: true, + ip: false, + query_string: true, + url: true, + user: { + id: true, + username: true, + email: true + } + }, + transactionNamingScheme: "methodPath" + }; + INTEGRATION_NAME = "RequestData"; + _requestDataIntegration = (options2 = {}) => { + const _addRequestData = addRequestDataToEvent; + const _options = { + ...DEFAULT_OPTIONS, + ...options2, + include: { + // @ts-expect-error It's mad because `method` isn't a known `include` key. (It's only here and not set by default in + // `addRequestDataToEvent` for legacy reasons. TODO (v8): Change that.) + method: true, + ...DEFAULT_OPTIONS.include, + ...options2.include, + user: options2.include && typeof options2.include.user === "boolean" ? options2.include.user : { + ...DEFAULT_OPTIONS.include.user, + // Unclear why TS still thinks `options.include.user` could be a boolean at this point + ...(options2.include || {}).user + } + } + }; + return { + name: INTEGRATION_NAME, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event, _hint, client) { + const { transactionNamingScheme } = _options; + const { sdkProcessingMetadata = {} } = event; + const req = sdkProcessingMetadata.request; + if (!req) { + return event; + } + const addRequestDataOptions = sdkProcessingMetadata.requestDataOptionsFromExpressHandler || sdkProcessingMetadata.requestDataOptionsFromGCPWrapper || convertReqDataIntegrationOptsToAddReqDataOpts(_options); + const processedEvent = _addRequestData(event, req, addRequestDataOptions); + if (event.type === "transaction" || transactionNamingScheme === "handler") { + return processedEvent; + } + const reqWithTransaction = req; + const transaction = reqWithTransaction._sentryTransaction; + if (transaction) { + const name = spanToJSON(transaction).description || ""; + const shouldIncludeMethodInTransactionName = getSDKName(client) === "sentry.javascript.nextjs" ? name.startsWith("/api") : transactionNamingScheme !== "path"; + const [transactionValue] = extractPathForTransaction(req, { + path: true, + method: shouldIncludeMethodInTransactionName, + customRoute: name + }); + processedEvent.transaction = transactionValue; + } + return processedEvent; + } + }; + }; + requestDataIntegration = defineIntegration(_requestDataIntegration); + RequestData = convertIntegrationFnToClass(INTEGRATION_NAME, requestDataIntegration); } +}); - return undefined; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/inboundfilters.js +function _mergeOptions(internalOptions = {}, clientOptions = {}) { + return { + allowUrls: [...internalOptions.allowUrls || [], ...clientOptions.allowUrls || []], + denyUrls: [...internalOptions.denyUrls || [], ...clientOptions.denyUrls || []], + ignoreErrors: [ + ...internalOptions.ignoreErrors || [], + ...clientOptions.ignoreErrors || [], + ...internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS + ], + ignoreTransactions: [ + ...internalOptions.ignoreTransactions || [], + ...clientOptions.ignoreTransactions || [], + ...internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS + ], + ignoreInternal: internalOptions.ignoreInternal !== void 0 ? internalOptions.ignoreInternal : true + }; } - -/** - * Creates an object containing cookies from the given cookie string - * - * @param cookieString The cookie string to parse - * @returns The parsed cookies - */ -function _parseCookieString(cookieString) { - return cookieString.split('; ').reduce((acc, cookie) => { - const [key, value] = cookie.split('='); - acc[key] = value; - return acc; - }, {}); +function _shouldDropEvent(event, options2) { + if (options2.ignoreInternal && _isSentryError(event)) { + DEBUG_BUILD2 && logger.warn(`Event dropped due to being internal Sentry Error. +Event: ${getEventDescription(event)}`); + return true; + } + if (_isIgnoredError(event, options2.ignoreErrors)) { + DEBUG_BUILD2 && logger.warn( + `Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${getEventDescription(event)}` + ); + return true; + } + if (_isIgnoredTransaction(event, options2.ignoreTransactions)) { + DEBUG_BUILD2 && logger.warn( + `Event dropped due to being matched by \`ignoreTransactions\` option. +Event: ${getEventDescription(event)}` + ); + return true; + } + if (_isDeniedUrl(event, options2.denyUrls)) { + DEBUG_BUILD2 && logger.warn( + `Event dropped due to being matched by \`denyUrls\` option. +Event: ${getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ); + return true; + } + if (!_isAllowedUrl(event, options2.allowUrls)) { + DEBUG_BUILD2 && logger.warn( + `Event dropped due to not being matched by \`allowUrls\` option. +Event: ${getEventDescription( + event + )}. +Url: ${_getEventFilterUrl(event)}` + ); + return true; + } + return false; } - -/** - * Extracts the headers as an object from the given Fetch API request or response object - * - * @param headers The headers to extract - * @returns The extracted headers as an object - */ -function _extractFetchHeaders(headers) { - const result = {}; - - headers.forEach((value, key) => { - result[key] = value; - }); - - return result; +function _isIgnoredError(event, ignoreErrors) { + if (event.type || !ignoreErrors || !ignoreErrors.length) { + return false; + } + return _getPossibleEventMessages(event).some((message) => stringMatchesSomePattern(message, ignoreErrors)); } - -/** - * Extracts the response headers as an object from the given XHR object - * - * @param xhr The XHR object to extract the response headers from - * @returns The response headers as an object - */ -function _getXHRResponseHeaders(xhr) { - const headers = xhr.getAllResponseHeaders(); - - if (!headers) { - return {}; +function _isIgnoredTransaction(event, ignoreTransactions) { + if (event.type !== "transaction" || !ignoreTransactions || !ignoreTransactions.length) { + return false; } - - return headers.split('\r\n').reduce((acc, line) => { - const [key, value] = line.split(': '); - acc[key] = value; - return acc; - }, {}); + const name = event.transaction; + return name ? stringMatchesSomePattern(name, ignoreTransactions) : false; } - -/** - * Checks if the given target url is in the given list of targets - * - * @param target The target url to check - * @returns true if the target url is in the given list of targets, false otherwise - */ -function _isInGivenRequestTargets( - failedRequestTargets, - target, -) { - return failedRequestTargets.some((givenRequestTarget) => { - if (typeof givenRequestTarget === 'string') { - return target.includes(givenRequestTarget); - } - - return givenRequestTarget.test(target); - }); +function _isDeniedUrl(event, denyUrls) { + if (!denyUrls || !denyUrls.length) { + return false; + } + const url = _getEventFilterUrl(event); + return !url ? false : stringMatchesSomePattern(url, denyUrls); } - -/** - * Checks if the given status code is in the given range - * - * @param status The status code to check - * @returns true if the status code is in the given range, false otherwise - */ -function _isInGivenStatusRanges( - failedRequestStatusCodes, - status, -) { - return failedRequestStatusCodes.some((range) => { - if (typeof range === 'number') { - return range === status; - } - - return status >= range[0] && status <= range[1]; - }); +function _isAllowedUrl(event, allowUrls) { + if (!allowUrls || !allowUrls.length) { + return true; + } + const url = _getEventFilterUrl(event); + return !url ? true : stringMatchesSomePattern(url, allowUrls); } - -/** - * Wraps `fetch` function to capture request and response data - */ -function _wrapFetch(client, options) { - if (!utils.supportsNativeFetch()) { - return; +function _getPossibleEventMessages(event) { + const possibleMessages = []; + if (event.message) { + possibleMessages.push(event.message); } - - utils.addFetchInstrumentationHandler(handlerData => { - if (core.getClient() !== client) { - return; - } - - const { response, args } = handlerData; - const [requestInfo, requestInit] = args ; - - if (!response) { - return; + let lastException; + try { + lastException = event.exception.values[event.exception.values.length - 1]; + } catch (e) { + } + if (lastException) { + if (lastException.value) { + possibleMessages.push(lastException.value); + if (lastException.type) { + possibleMessages.push(`${lastException.type}: ${lastException.value}`); + } } - - _fetchResponseHandler(options, requestInfo, response , requestInit); - }); + } + if (DEBUG_BUILD2 && possibleMessages.length === 0) { + logger.error(`Could not extract message for event ${getEventDescription(event)}`); + } + return possibleMessages; } - -/** - * Wraps XMLHttpRequest to capture request and response data - */ -function _wrapXHR(client, options) { - if (!('XMLHttpRequest' in utils.GLOBAL_OBJ)) { - return; +function _isSentryError(event) { + try { + return event.exception.values[0].type === "SentryError"; + } catch (e) { } - - utils.addXhrInstrumentationHandler(handlerData => { - if (core.getClient() !== client) { - return; - } - - const xhr = handlerData.xhr ; - - const sentryXhrData = xhr[utils.SENTRY_XHR_DATA_KEY]; - - if (!sentryXhrData) { - return; + return false; +} +function _getLastValidUrl(frames = []) { + for (let i = frames.length - 1; i >= 0; i--) { + const frame = frames[i]; + if (frame && frame.filename !== "" && frame.filename !== "[native code]") { + return frame.filename || null; } - - const { method, request_headers: headers } = sentryXhrData; - + } + return null; +} +function _getEventFilterUrl(event) { + try { + let frames; try { - _xhrResponseHandler(options, xhr, method, headers); + frames = event.exception.values[0].stacktrace.frames; } catch (e) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Error while extracting response event form XHR response', e); } - }); -} - -/** - * Checks whether to capture given response as an event - * - * @param status response status code - * @param url response url - */ -function _shouldCaptureResponse(options, status, url) { - return ( - _isInGivenStatusRanges(options.failedRequestStatusCodes, status) && - _isInGivenRequestTargets(options.failedRequestTargets, url) && - !core.isSentryRequestUrl(url, core.getClient()) - ); + return frames ? _getLastValidUrl(frames) : null; + } catch (oO) { + DEBUG_BUILD2 && logger.error(`Cannot extract url for event ${getEventDescription(event)}`); + return null; + } } - -/** - * Creates a synthetic Sentry event from given response data - * - * @param data response data - * @returns event - */ -function _createEvent(data - -) { - const message = `HTTP Client Error with status code: ${data.status}`; - - const event = { - message, - exception: { - values: [ - { - type: 'Error', - value: message, +var DEFAULT_IGNORE_ERRORS, DEFAULT_IGNORE_TRANSACTIONS, INTEGRATION_NAME2, _inboundFiltersIntegration, inboundFiltersIntegration, InboundFilters; +var init_inboundfilters = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/inboundfilters.js"() { + init_esm(); + init_debug_build2(); + init_integration(); + DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, + /^Cannot redefine property: googletag$/ + ]; + DEFAULT_IGNORE_TRANSACTIONS = [ + /^.*\/healthcheck$/, + /^.*\/healthy$/, + /^.*\/live$/, + /^.*\/ready$/, + /^.*\/heartbeat$/, + /^.*\/health$/, + /^.*\/healthz$/ + ]; + INTEGRATION_NAME2 = "InboundFilters"; + _inboundFiltersIntegration = (options2 = {}) => { + return { + name: INTEGRATION_NAME2, + // TODO v8: Remove this + setupOnce() { }, - ], - }, - request: { - url: data.url, - method: data.method, - headers: data.requestHeaders, - cookies: data.requestCookies, - }, - contexts: { - response: { - status_code: data.status, - headers: data.responseHeaders, - cookies: data.responseCookies, - body_size: _getResponseSizeFromHeaders(data.responseHeaders), - }, - }, - }; - - utils.addExceptionMechanism(event, { - type: 'http.client', - handled: false, - }); - - return event; -} - -function _getRequest(requestInfo, requestInit) { - if (!requestInit && requestInfo instanceof Request) { - return requestInfo; + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event, _hint, client) { + const clientOptions = client.getOptions(); + const mergedOptions = _mergeOptions(options2, clientOptions); + return _shouldDropEvent(event, mergedOptions) ? null : event; + } + }; + }; + inboundFiltersIntegration = defineIntegration(_inboundFiltersIntegration); + InboundFilters = convertIntegrationFnToClass( + INTEGRATION_NAME2, + inboundFiltersIntegration + ); } +}); - // If both are set, we try to construct a new Request with the given arguments - // However, if e.g. the original request has a `body`, this will throw an error because it was already accessed - // In this case, as a fallback, we just use the original request - using both is rather an edge case - if (requestInfo instanceof Request && requestInfo.bodyUsed) { - return requestInfo; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/functiontostring.js +var originalFunctionToString, INTEGRATION_NAME3, SETUP_CLIENTS, _functionToStringIntegration, functionToStringIntegration, FunctionToString; +var init_functiontostring = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/functiontostring.js"() { + init_esm(); + init_exports(); + init_integration(); + INTEGRATION_NAME3 = "FunctionToString"; + SETUP_CLIENTS = /* @__PURE__ */ new WeakMap(); + _functionToStringIntegration = () => { + return { + name: INTEGRATION_NAME3, + setupOnce() { + originalFunctionToString = Function.prototype.toString; + try { + Function.prototype.toString = function(...args) { + const originalFunction = getOriginalFunction(this); + const context = SETUP_CLIENTS.has(getClient()) && originalFunction !== void 0 ? originalFunction : this; + return originalFunctionToString.apply(context, args); + }; + } catch (e) { + } + }, + setup(client) { + SETUP_CLIENTS.set(client, true); + } + }; + }; + functionToStringIntegration = defineIntegration(_functionToStringIntegration); + FunctionToString = convertIntegrationFnToClass( + INTEGRATION_NAME3, + functionToStringIntegration + ); } +}); - return new Request(requestInfo, requestInit); -} - -function _shouldSendDefaultPii() { - const client = core.getClient(); - return client ? Boolean(client.getOptions().sendDefaultPii) : false; -} - -exports.HttpClient = HttpClient; -exports.httpClientIntegration = httpClientIntegration; -//# sourceMappingURL=httpclient.js.map - - -/***/ }), - -/***/ 57671: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const captureconsole = __nccwpck_require__(53140); -const debug = __nccwpck_require__(6136); -const dedupe = __nccwpck_require__(80360); -const extraerrordata = __nccwpck_require__(64875); -const offline = __nccwpck_require__(85720); -const reportingobserver = __nccwpck_require__(58187); -const rewriteframes = __nccwpck_require__(57217); -const sessiontiming = __nccwpck_require__(92981); -const transaction = __nccwpck_require__(1883); -const httpclient = __nccwpck_require__(96912); -const contextlines = __nccwpck_require__(19693); - - - -exports.CaptureConsole = captureconsole.CaptureConsole; -exports.captureConsoleIntegration = captureconsole.captureConsoleIntegration; -exports.Debug = debug.Debug; -exports.debugIntegration = debug.debugIntegration; -exports.Dedupe = dedupe.Dedupe; -exports.dedupeIntegration = dedupe.dedupeIntegration; -exports.ExtraErrorData = extraerrordata.ExtraErrorData; -exports.extraErrorDataIntegration = extraerrordata.extraErrorDataIntegration; -exports.Offline = offline.Offline; -exports.ReportingObserver = reportingobserver.ReportingObserver; -exports.reportingObserverIntegration = reportingobserver.reportingObserverIntegration; -exports.RewriteFrames = rewriteframes.RewriteFrames; -exports.rewriteFramesIntegration = rewriteframes.rewriteFramesIntegration; -exports.SessionTiming = sessiontiming.SessionTiming; -exports.sessionTimingIntegration = sessiontiming.sessionTimingIntegration; -exports.Transaction = transaction.Transaction; -exports.HttpClient = httpclient.HttpClient; -exports.httpClientIntegration = httpclient.httpClientIntegration; -exports.ContextLines = contextlines.ContextLines; -exports.contextLinesIntegration = contextlines.contextLinesIntegration; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 85720: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const localForage = __nccwpck_require__(39054); -const debugBuild = __nccwpck_require__(6773); - -const WINDOW = utils.GLOBAL_OBJ ; - -/** - * cache offline errors and send when connected - * @deprecated The offline integration has been deprecated in favor of the offline transport wrapper. - * - * http://docs.sentry.io/platforms/javascript/configuration/transports/#offline-caching - */ -class Offline { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Offline';} - - /** - * @inheritDoc - */ - - /** - * the current hub instance - */ - - /** - * maximum number of events to store while offline - */ - - /** - * event cache - */ - - /** - * @inheritDoc - */ - constructor(options = {}) { - this.name = Offline.id; - - this.maxStoredEvents = options.maxStoredEvents || 30; // set a reasonable default - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - this.offlineEventStore = localForage.createInstance({ - name: 'sentry/offlineEventStore', - }); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/linkederrors.js +var DEFAULT_KEY, DEFAULT_LIMIT, INTEGRATION_NAME4, _linkedErrorsIntegration, linkedErrorsIntegration, LinkedErrors; +var init_linkederrors = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/linkederrors.js"() { + init_esm(); + init_integration(); + DEFAULT_KEY = "cause"; + DEFAULT_LIMIT = 5; + INTEGRATION_NAME4 = "LinkedErrors"; + _linkedErrorsIntegration = (options2 = {}) => { + const limit = options2.limit || DEFAULT_LIMIT; + const key = options2.key || DEFAULT_KEY; + return { + name: INTEGRATION_NAME4, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + preprocessEvent(event, hint, client) { + const options3 = client.getOptions(); + applyAggregateErrorsToEvent( + exceptionFromError, + options3.stackParser, + options3.maxValueLength, + key, + limit, + event, + hint + ); + } + }; + }; + linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration); + LinkedErrors = convertIntegrationFnToClass(INTEGRATION_NAME4, linkedErrorsIntegration); } +}); - /** - * @inheritDoc - */ - setupOnce(addGlobalEventProcessor, getCurrentHub) { - this.hub = getCurrentHub(); - - if ('addEventListener' in WINDOW) { - WINDOW.addEventListener('online', () => { - void this._sendEvents().catch(() => { - debugBuild.DEBUG_BUILD && utils.logger.warn('could not send cached events'); - }); - }); - } - - const eventProcessor = event => { - // eslint-disable-next-line deprecation/deprecation - if (this.hub && this.hub.getIntegration(Offline)) { - // cache if we are positively offline - if ('navigator' in WINDOW && 'onLine' in WINDOW.navigator && !WINDOW.navigator.onLine) { - debugBuild.DEBUG_BUILD && utils.logger.log('Event dropped due to being a offline - caching instead'); - - void this._cacheEvent(event) - .then((_event) => this._enforceMaxEvents()) - .catch((_error) => { - debugBuild.DEBUG_BUILD && utils.logger.warn('could not cache event while offline'); - }); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/index.js +var integrations_exports = {}; +__export(integrations_exports, { + FunctionToString: () => FunctionToString, + InboundFilters: () => InboundFilters, + LinkedErrors: () => LinkedErrors +}); +var init_integrations = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/integrations/index.js"() { + init_functiontostring(); + init_inboundfilters(); + init_linkederrors(); + } +}); - // return null on success or failure, because being offline will still result in an error - return null; +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/browser-aggregator.js +var BrowserMetricsAggregator; +var init_browser_aggregator = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/browser-aggregator.js"() { + init_esm(); + init_constants2(); + init_instance(); + init_metric_summary(); + init_utils2(); + BrowserMetricsAggregator = class { + // TODO(@anonrig): Use FinalizationRegistry to have a proper way of flushing the buckets + // when the aggregator is garbage collected. + // Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry + constructor(_client) { + this._client = _client; + this._buckets = /* @__PURE__ */ new Map(); + this._interval = setInterval(() => this.flush(), DEFAULT_BROWSER_FLUSH_INTERVAL); + } + /** + * @inheritDoc + */ + add(metricType, unsanitizedName, value, unsanitizedUnit = "none", unsanitizedTags = {}, maybeFloatTimestamp = timestampInSeconds()) { + const timestamp2 = Math.floor(maybeFloatTimestamp); + const name = sanitizeMetricKey(unsanitizedName); + const tags = sanitizeTags(unsanitizedTags); + const unit = sanitizeUnit(unsanitizedUnit); + const bucketKey = getBucketKey(metricType, name, unit, tags); + let bucketItem = this._buckets.get(bucketKey); + const previousWeight = bucketItem && metricType === SET_METRIC_TYPE ? bucketItem.metric.weight : 0; + if (bucketItem) { + bucketItem.metric.add(value); + if (bucketItem.timestamp < timestamp2) { + bucketItem.timestamp = timestamp2; + } + } else { + bucketItem = { + // @ts-expect-error we don't need to narrow down the type of value here, saves bundle size. + metric: new METRIC_MAP[metricType](value), + timestamp: timestamp2, + metricType, + name, + unit, + tags + }; + this._buckets.set(bucketKey, bucketItem); } + const val = typeof value === "string" ? bucketItem.metric.weight - previousWeight : value; + updateMetricSummaryOnActiveSpan(metricType, name, val, unit, unsanitizedTags, bucketKey); + } + /** + * @inheritDoc + */ + flush() { + if (this._buckets.size === 0) { + return; + } + if (this._client.captureAggregateMetrics) { + const metricBuckets = Array.from(this._buckets).map(([, bucketItem]) => bucketItem); + this._client.captureAggregateMetrics(metricBuckets); + } + this._buckets.clear(); + } + /** + * @inheritDoc + */ + close() { + clearInterval(this._interval); + this.flush(); } - - return event; }; + } +}); - eventProcessor.id = this.name; - addGlobalEventProcessor(eventProcessor); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/integration.js +var INTEGRATION_NAME5, _metricsAggregatorIntegration, metricsAggregatorIntegration, MetricsAggregator2; +var init_integration2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/integration.js"() { + init_integration(); + init_browser_aggregator(); + INTEGRATION_NAME5 = "MetricsAggregator"; + _metricsAggregatorIntegration = () => { + return { + name: INTEGRATION_NAME5, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + client.metricsAggregator = new BrowserMetricsAggregator(client); + } + }; + }; + metricsAggregatorIntegration = defineIntegration(_metricsAggregatorIntegration); + MetricsAggregator2 = convertIntegrationFnToClass( + INTEGRATION_NAME5, + metricsAggregatorIntegration + ); + } +}); - // if online now, send any events stored in a previous offline session - if ('navigator' in WINDOW && 'onLine' in WINDOW.navigator && WINDOW.navigator.onLine) { - void this._sendEvents().catch(() => { - debugBuild.DEBUG_BUILD && utils.logger.warn('could not send cached events'); - }); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/exports.js +function addToMetricsAggregator(metricType, name, value, data = {}) { + const client = getClient(); + const scope = getCurrentScope(); + if (client) { + if (!client.metricsAggregator) { + DEBUG_BUILD2 && logger.warn("No metrics aggregator enabled. Please add the MetricsAggregator integration to use metrics APIs"); + return; + } + const { unit, tags, timestamp: timestamp2 } = data; + const { release: release2, environment } = client.getOptions(); + const transaction = scope.getTransaction(); + const metricTags = {}; + if (release2) { + metricTags.release = release2; + } + if (environment) { + metricTags.environment = environment; } + if (transaction) { + metricTags.transaction = spanToJSON(transaction).description || ""; + } + DEBUG_BUILD2 && logger.log(`Adding value of ${value} to ${metricType} metric ${name}`); + client.metricsAggregator.add(metricType, name, value, unit, { ...metricTags, ...tags }, timestamp2); } - - /** - * cache an event to send later - * @param event an event - */ - async _cacheEvent(event) { - return this.offlineEventStore.setItem(utils.uuid4(), utils.normalize(event)); +} +function increment(name, value = 1, data) { + addToMetricsAggregator(COUNTER_METRIC_TYPE, name, value, data); +} +function distribution(name, value, data) { + addToMetricsAggregator(DISTRIBUTION_METRIC_TYPE, name, value, data); +} +function set(name, value, data) { + addToMetricsAggregator(SET_METRIC_TYPE, name, value, data); +} +function gauge(name, value, data) { + addToMetricsAggregator(GAUGE_METRIC_TYPE, name, value, data); +} +var metrics; +var init_exports2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/metrics/exports.js"() { + init_esm(); + init_debug_build2(); + init_exports(); + init_spanUtils(); + init_constants2(); + init_integration2(); + metrics = { + increment, + distribution, + set, + gauge, + /** @deprecated Use `metrics.metricsAggregratorIntegration()` instead. */ + // eslint-disable-next-line deprecation/deprecation + MetricsAggregator: MetricsAggregator2, + metricsAggregatorIntegration + }; } +}); - /** - * purge excess events if necessary - */ - async _enforceMaxEvents() { - const events = []; - - return this.offlineEventStore - .iterate((event, cacheKey, _index) => { - // aggregate events - events.push({ cacheKey, event }); - }) - .then( - () => - // this promise resolves when the iteration is finished - this._purgeEvents( - // purge all events past maxStoredEvents in reverse chronological order - events - .sort((a, b) => (b.event.timestamp || 0) - (a.event.timestamp || 0)) - .slice(this.maxStoredEvents < events.length ? this.maxStoredEvents : events.length) - .map(event => event.cacheKey), - ), - ) - .catch((_error) => { - debugBuild.DEBUG_BUILD && utils.logger.warn('could not enforce max events'); - }); +// node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/index.js +var Integrations; +var init_esm2 = __esm({ + "node_modules/.pnpm/@sentry+core@7.120.0/node_modules/@sentry/core/esm/index.js"() { + init_utils(); + init_spanstatus(); + init_trace(); + init_dynamicSamplingContext(); + init_measurement(); + init_semanticAttributes(); + init_exports(); + init_hub(); + init_scope(); + init_eventProcessors(); + init_baseclient(); + init_server_runtime_client(); + init_sdk(); + init_base(); + init_version(); + init_integration(); + init_applyScopeDataToEvent(); + init_hasTracingEnabled(); + init_isSentryRequestUrl(); + init_parameterize(); + init_spanUtils(); + init_sdkMetadata(); + init_requestdata2(); + init_inboundfilters(); + init_functiontostring(); + init_linkederrors(); + init_integrations(); + init_exports2(); + Integrations = integrations_exports; } +}); - /** - * purge event from cache - */ - async _purgeEvent(cacheKey) { - return this.offlineEventStore.removeItem(cacheKey); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/common/debug-build.js +var DEBUG_BUILD3; +var init_debug_build3 = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/common/debug-build.js"() { + DEBUG_BUILD3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; } +}); - /** - * purge events from cache - */ - async _purgeEvents(cacheKeys) { - // trail with .then to ensure the return type as void and not void|void[] - return Promise.all(cacheKeys.map(cacheKey => this._purgeEvent(cacheKey))).then(); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/utils/node-utils.js +function shouldDisableAutoInstrumentation(getCurrentHub3) { + const clientOptions = _optionalChain([getCurrentHub3, "call", (_) => _(), "access", (_2) => _2.getClient, "call", (_3) => _3(), "optionalAccess", (_4) => _4.getOptions, "call", (_5) => _5()]); + const instrumenter = _optionalChain([clientOptions, "optionalAccess", (_6) => _6.instrumenter]) || "sentry"; + return instrumenter !== "sentry"; +} +var init_node_utils = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/utils/node-utils.js"() { + init_esm(); } +}); - /** - * send all events - */ - async _sendEvents() { - return this.offlineEventStore.iterate((event, cacheKey, _index) => { - if (this.hub) { - this.hub.captureEvent(event); - - void this._purgeEvent(cacheKey).catch((_error) => { - debugBuild.DEBUG_BUILD && utils.logger.warn('could not purge event from cache'); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/express.js +function wrap(fn, method) { + const arity = fn.length; + switch (arity) { + case 2: { + return function(req, res) { + const transaction = res.__sentry_transaction; + if (transaction) { + const span = transaction.startChild({ + description: fn.name, + op: `middleware.express.${method}`, + origin: "auto.middleware.express" + }); + res.once("finish", () => { + span.end(); + }); + } + return fn.call(this, req, res); + }; + } + case 3: { + return function(req, res, next) { + const transaction = res.__sentry_transaction; + const span = _optionalChain([transaction, "optionalAccess", (_2) => _2.startChild, "call", (_3) => _3({ + description: fn.name, + op: `middleware.express.${method}`, + origin: "auto.middleware.express" + })]); + fn.call(this, req, res, function(...args) { + _optionalChain([span, "optionalAccess", (_4) => _4.end, "call", (_5) => _5()]); + next.call(this, ...args); }); - } else { - debugBuild.DEBUG_BUILD && utils.logger.warn('no hub found - could not send cached event'); - } - }); + }; + } + case 4: { + return function(err, req, res, next) { + const transaction = res.__sentry_transaction; + const span = _optionalChain([transaction, "optionalAccess", (_6) => _6.startChild, "call", (_7) => _7({ + description: fn.name, + op: `middleware.express.${method}`, + origin: "auto.middleware.express" + })]); + fn.call(this, err, req, res, function(...args) { + _optionalChain([span, "optionalAccess", (_8) => _8.end, "call", (_9) => _9()]); + next.call(this, ...args); + }); + }; + } + default: { + throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`); + } } -} Offline.__initStatic(); - -exports.Offline = Offline; -//# sourceMappingURL=offline.js.map - - -/***/ }), - -/***/ 58187: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const WINDOW = utils.GLOBAL_OBJ ; - -const INTEGRATION_NAME = 'ReportingObserver'; - -const SETUP_CLIENTS = new WeakMap(); - -const _reportingObserverIntegration = ((options = {}) => { - const types = options.types || ['crash', 'deprecation', 'intervention']; - - /** Handler for the reporting observer. */ - function handler(reports) { - if (!SETUP_CLIENTS.has(core.getClient() )) { - return; +} +function wrapMiddlewareArgs(args, method) { + return args.map((arg) => { + if (typeof arg === "function") { + return wrap(arg, method); } - - for (const report of reports) { - core.withScope(scope => { - scope.setExtra('url', report.url); - - const label = `ReportingObserver [${report.type}]`; - let details = 'No details available'; - - if (report.body) { - // Object.keys doesn't work on ReportBody, as all properties are inheirted - const plainBody - - = {}; - - // eslint-disable-next-line guard-for-in - for (const prop in report.body) { - plainBody[prop] = report.body[prop]; - } - - scope.setExtra('body', plainBody); - - if (report.type === 'crash') { - const body = report.body ; - // A fancy way to create a message out of crashId OR reason OR both OR fallback - details = [body.crashId || '', body.reason || ''].join(' ').trim() || details; - } else { - const body = report.body ; - details = body.message || details; - } + if (Array.isArray(arg)) { + return arg.map((a) => { + if (typeof a === "function") { + return wrap(a, method); } - - core.captureMessage(`${label}: ${details}`); + return a; }); } + return arg; + }); +} +function patchMiddleware(router, method) { + const originalCallback = router[method]; + router[method] = function(...args) { + return originalCallback.call(this, ...wrapMiddlewareArgs(args, method)); + }; + return router; +} +function instrumentMiddlewares(router, methods = []) { + methods.forEach((method) => patchMiddleware(router, method)); +} +function instrumentRouter(appOrRouter) { + const isApp = "settings" in appOrRouter; + if (isApp && appOrRouter._router === void 0 && appOrRouter.lazyrouter) { + appOrRouter.lazyrouter(); } - - return { - name: INTEGRATION_NAME, - setupOnce() { - if (!utils.supportsReportingObserver()) { - return; + const router = isApp ? appOrRouter._router : appOrRouter; + if (!router) { + DEBUG_BUILD3 && logger.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."); + DEBUG_BUILD3 && logger.debug("Routing instrumentation is currently only supported in Express 4."); + return; + } + const routerProto = Object.getPrototypeOf(router); + const originalProcessParams = routerProto.process_params; + routerProto.process_params = function process_params(layer, called, req, res, done) { + if (!req._reconstructedRoute) { + req._reconstructedRoute = ""; + } + const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer); + if (layerRoutePath || isRegex || isArray) { + req._hasParameters = true; + } + let partialRoute; + if (layerRoutePath) { + partialRoute = layerRoutePath; + } else { + partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || ""; + } + const finalPartialRoute = partialRoute.split("/").filter((segment) => segment.length > 0 && (isRegex || isArray || !segment.includes("*"))).join("/"); + if (finalPartialRoute && finalPartialRoute.length > 0) { + req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? "/" : ""}`; + } + const urlLength = getNumberOfUrlSegments(stripUrlQueryAndFragment(req.originalUrl || "")) + numExtraSegments; + const routeLength = getNumberOfUrlSegments(req._reconstructedRoute); + if (urlLength === routeLength) { + if (!req._hasParameters) { + if (req._reconstructedRoute !== req.originalUrl) { + req._reconstructedRoute = req.originalUrl ? stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl; + } } - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - const observer = new (WINDOW ).ReportingObserver(handler, { - buffered: true, - types, - }); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - observer.observe(); - }, - - setup(client) { - SETUP_CLIENTS.set(client, true); - }, - }; -}) ; - -const reportingObserverIntegration = core.defineIntegration(_reportingObserverIntegration); - -/** - * Reporting API integration - https://w3c.github.io/reporting/ - * @deprecated Use `reportingObserverIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const ReportingObserver = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - reportingObserverIntegration, -) - -; - -exports.ReportingObserver = ReportingObserver; -exports.reportingObserverIntegration = reportingObserverIntegration; -//# sourceMappingURL=reportingobserver.js.map - - -/***/ }), - -/***/ 57217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const INTEGRATION_NAME = 'RewriteFrames'; - -const _rewriteFramesIntegration = ((options = {}) => { - const root = options.root; - const prefix = options.prefix || 'app:///'; - - const iteratee = - options.iteratee || - ((frame) => { - if (!frame.filename) { - return frame; + const transaction = res.__sentry_transaction; + const attributes = transaction && spanToJSON(transaction).data || {}; + if (transaction && attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== "custom") { + const finalRoute = req._reconstructedRoute || "/"; + const [name, source] = extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute }); + transaction.updateName(name); + transaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source); } - // Determine if this is a Windows frame by checking for a Windows-style prefix such as `C:\` - const isWindowsFrame = - /^[a-zA-Z]:\\/.test(frame.filename) || - // or the presence of a backslash without a forward slash (which are not allowed on Windows) - (frame.filename.includes('\\') && !frame.filename.includes('/')); - // Check if the frame filename begins with `/` - const startsWithSlash = /^\//.test(frame.filename); - if (isWindowsFrame || startsWithSlash) { - const filename = isWindowsFrame - ? frame.filename - .replace(/^[a-zA-Z]:/, '') // remove Windows-style prefix - .replace(/\\/g, '/') // replace all `\\` instances with `/` - : frame.filename; - const base = root ? utils.relative(root, filename) : utils.basename(filename); - frame.filename = `${prefix}${base}`; - } - return frame; - }); - - /** Process an exception event. */ - function _processExceptionsEvent(event) { - try { - return { - ...event, - exception: { - ...event.exception, - // The check for this is performed inside `process` call itself, safe to skip here - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - values: event.exception.values.map(value => ({ - ...value, - ...(value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) }), - })), - }, - }; - } catch (_oO) { - return event; } - } - - /** Process a stack trace. */ - function _processStacktrace(stacktrace) { - return { - ...stacktrace, - frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => iteratee(f)), - }; - } - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(originalEvent) { - let processedEvent = originalEvent; - - if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) { - processedEvent = _processExceptionsEvent(processedEvent); - } - - return processedEvent; - }, - }; -}) ; - -const rewriteFramesIntegration = core.defineIntegration(_rewriteFramesIntegration); - -/** - * Rewrite event frames paths. - * @deprecated Use `rewriteFramesIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const RewriteFrames = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - rewriteFramesIntegration, -) - -; - -exports.RewriteFrames = RewriteFrames; -exports.rewriteFramesIntegration = rewriteFramesIntegration; -//# sourceMappingURL=rewriteframes.js.map - - -/***/ }), - -/***/ 92981: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); - -const INTEGRATION_NAME = 'SessionTiming'; - -const _sessionTimingIntegration = (() => { - const startTime = Date.now(); - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - const now = Date.now(); - - return { - ...event, - extra: { - ...event.extra, - ['session:start']: startTime, - ['session:duration']: now - startTime, - ['session:end']: now, - }, - }; - }, - }; -}) ; - -const sessionTimingIntegration = core.defineIntegration(_sessionTimingIntegration); - -/** - * This function adds duration since Sentry was initialized till the time event was sent. - * @deprecated Use `sessionTimingIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const SessionTiming = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - sessionTimingIntegration, -) ; - -exports.SessionTiming = SessionTiming; -exports.sessionTimingIntegration = sessionTimingIntegration; -//# sourceMappingURL=sessiontiming.js.map - - -/***/ }), - -/***/ 1883: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); - -const INTEGRATION_NAME = 'Transaction'; - -const transactionIntegration = (() => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - const frames = _getFramesFromEvent(event); - - // use for loop so we don't have to reverse whole frames array - for (let i = frames.length - 1; i >= 0; i--) { - const frame = frames[i]; - - if (frame.in_app === true) { - event.transaction = _getTransaction(frame); - break; - } - } - - return event; - }, + return originalProcessParams.call(this, layer, called, req, res, done); }; -}) ; - -/** - * Add node transaction to the event. - * @deprecated This integration will be removed in v8. - */ -// eslint-disable-next-line deprecation/deprecation -const Transaction = core.convertIntegrationFnToClass(INTEGRATION_NAME, transactionIntegration) - -; - -function _getFramesFromEvent(event) { - const exception = event.exception && event.exception.values && event.exception.values[0]; - return (exception && exception.stacktrace && exception.stacktrace.frames) || []; -} - -function _getTransaction(frame) { - return frame.module || frame.function ? `${frame.module || '?'}/${frame.function || '?'}` : ''; -} - -exports.Transaction = Transaction; -//# sourceMappingURL=transaction.js.map - - -/***/ }), - -/***/ 85302: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const domain = __nccwpck_require__(73167); -const core = __nccwpck_require__(90155); - -function getActiveDomain() { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - return (domain ).active ; } - -// eslint-disable-next-line deprecation/deprecation -function getCurrentHub() { - const activeDomain = getActiveDomain(); - - // If there's no active domain, just return undefined and the global hub will be used - if (!activeDomain) { - return undefined; +function getLayerRoutePathInfo(layer) { + let lrp = _optionalChain([layer, "access", (_12) => _12.route, "optionalAccess", (_13) => _13.path]); + const isRegex = isRegExp(lrp); + const isArray = Array.isArray(lrp); + if (!lrp) { + const [major] = GLOBAL_OBJ.process.versions.node.split(".").map(Number); + if (major >= 16) { + lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys); + } } - - core.ensureHubOnCarrier(activeDomain); - - return core.getHubFromCarrier(activeDomain); + if (!lrp) { + return { isRegex, isArray, numExtraSegments: 0 }; + } + const numExtraSegments = isArray ? Math.max(getNumberOfArrayUrlSegments(lrp) - getNumberOfUrlSegments(layer.path || ""), 0) : 0; + const layerRoutePath = getLayerRoutePathString(isArray, lrp); + return { layerRoutePath, isRegex, isArray, numExtraSegments }; } - -// eslint-disable-next-line deprecation/deprecation -function createNewHub(parent) { - const carrier = {}; - core.ensureHubOnCarrier(carrier, parent); - return core.getHubFromCarrier(carrier); +function getNumberOfArrayUrlSegments(routesArray) { + return routesArray.reduce((accNumSegments, currentRoute) => { + return accNumSegments + getNumberOfUrlSegments(currentRoute.toString()); + }, 0); } - -function runWithAsyncContext(callback, options) { - const activeDomain = getActiveDomain(); - - if (activeDomain && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) { - // We're already in a domain, so we don't need to create a new one, just call the callback with the current hub - return callback(); +function getLayerRoutePathString(isArray, lrp) { + if (isArray) { + return lrp.map((r) => r.toString()).join(","); } - - const local = domain.create() ; - - const parentHub = activeDomain ? core.getHubFromCarrier(activeDomain) : undefined; - const newHub = createNewHub(parentHub); - core.setHubOnCarrier(local, newHub); - - return local.bind(() => { - return callback(); - })(); + return lrp && lrp.toString(); } - -/** - * Sets the async context strategy to use Node.js domains. - */ -function setDomainAsyncContextStrategy() { - core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext }); +function preventDuplicateSegments(originalUrl, reconstructedRoute, layerPath) { + const normalizeURL = stripUrlQueryAndFragment(originalUrl || ""); + const originalUrlSplit = _optionalChain([normalizeURL, "optionalAccess", (_14) => _14.split, "call", (_15) => _15("/"), "access", (_16) => _16.filter, "call", (_17) => _17((v) => !!v)]); + let tempCounter = 0; + const currentOffset = _optionalChain([reconstructedRoute, "optionalAccess", (_18) => _18.split, "call", (_19) => _19("/"), "access", (_20) => _20.filter, "call", (_21) => _21((v) => !!v), "access", (_22) => _22.length]) || 0; + const result = _optionalChain([ + layerPath, + "optionalAccess", + (_23) => _23.split, + "call", + (_24) => _24("/"), + "access", + (_25) => _25.filter, + "call", + (_26) => _26((segment) => { + if (_optionalChain([originalUrlSplit, "optionalAccess", (_27) => _27[currentOffset + tempCounter]]) === segment) { + tempCounter += 1; + return true; + } + return false; + }), + "access", + (_28) => _28.join, + "call", + (_29) => _29("/") + ]); + return result; } - -exports.setDomainAsyncContextStrategy = setDomainAsyncContextStrategy; -//# sourceMappingURL=domain.js.map - - -/***/ }), - -/***/ 2236: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const async_hooks = __nccwpck_require__(90290); - -// eslint-disable-next-line deprecation/deprecation -let asyncStorage; - -/** - * Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0. - */ -function setHooksAsyncContextStrategy() { - if (!asyncStorage) { - // eslint-disable-next-line deprecation/deprecation - asyncStorage = new (async_hooks ).AsyncLocalStorage(); - } - - // eslint-disable-next-line deprecation/deprecation - function getCurrentHub() { - return asyncStorage.getStore(); - } - - // eslint-disable-next-line deprecation/deprecation - function createNewHub(parent) { - const carrier = {}; - core.ensureHubOnCarrier(carrier, parent); - return core.getHubFromCarrier(carrier); +var Express, extractOriginalRoute; +var init_express = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/express.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_debug_build3(); + init_node_utils(); + Express = class _Express { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Express"; + } + /** + * @inheritDoc + */ + /** + * Express App instance + */ + /** + * @inheritDoc + */ + constructor(options2 = {}) { + this.name = _Express.id; + this._router = options2.router || options2.app; + this._methods = (Array.isArray(options2.methods) ? options2.methods : []).concat("use"); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (!this._router) { + DEBUG_BUILD3 && logger.error("ExpressIntegration is missing an Express instance"); + return; + } + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("Express Integration is skipped because of instrumenter configuration."); + return; + } + instrumentMiddlewares(this._router, this._methods); + instrumentRouter(this._router); + } + }; + Express.__initStatic(); + extractOriginalRoute = (path2, regexp, keys) => { + if (!path2 || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, "access", (_10) => _10[0], "optionalAccess", (_11) => _11.offset])) { + return void 0; + } + const orderedKeys = keys.sort((a, b) => a.offset - b.offset); + const pathRegex = new RegExp(regexp, `${regexp.flags}d`); + const execResult = pathRegex.exec(path2); + if (!execResult || !execResult.indices) { + return void 0; + } + const [, ...paramIndices] = execResult.indices; + if (paramIndices.length !== orderedKeys.length) { + return void 0; + } + let resultPath = path2; + let indexShift = 0; + paramIndices.forEach((item, index) => { + if (item) { + const [startOffset, endOffset] = item; + const substr1 = resultPath.substring(0, startOffset - indexShift); + const replacement = `:${orderedKeys[index].name}`; + const substr2 = resultPath.substring(endOffset - indexShift); + resultPath = substr1 + replacement + substr2; + indexShift = indexShift + (endOffset - startOffset - replacement.length); + } + }); + return resultPath; + }; } +}); - function runWithAsyncContext(callback, options) { - const existingHub = getCurrentHub(); - - if (existingHub && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) { - // We're already in an async context, so we don't need to create a new one - // just call the callback with the current hub - return callback(); - } - - const newHub = createNewHub(existingHub); - - return asyncStorage.run(newHub, () => { - return callback(); - }); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/postgres.js +var Postgres; +var init_postgres = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/postgres.js"() { + init_esm(); + init_esm(); + init_debug_build3(); + init_node_utils(); + Postgres = class _Postgres { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Postgres"; + } + /** + * @inheritDoc + */ + constructor(options2 = {}) { + this.name = _Postgres.id; + this._usePgNative = !!options2.usePgNative; + this._module = options2.module; + } + /** @inheritdoc */ + loadDependency() { + return this._module = this._module || loadModule("pg"); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("Postgres Integration is skipped because of instrumenter configuration."); + return; + } + const pkg = this.loadDependency(); + if (!pkg) { + DEBUG_BUILD3 && logger.error("Postgres Integration was unable to require `pg` package."); + return; + } + const Client = this._usePgNative ? _optionalChain([pkg, "access", (_2) => _2.native, "optionalAccess", (_3) => _3.Client]) : pkg.Client; + if (!Client) { + DEBUG_BUILD3 && logger.error("Postgres Integration was unable to access 'pg-native' bindings."); + return; + } + fill(Client.prototype, "query", function(orig) { + return function(config2, values, callback) { + const scope = getCurrentHub3().getScope(); + const parentSpan = scope.getSpan(); + const data = { + "db.system": "postgresql" + }; + try { + if (this.database) { + data["db.name"] = this.database; + } + if (this.host) { + data["server.address"] = this.host; + } + if (this.port) { + data["server.port"] = this.port; + } + if (this.user) { + data["db.user"] = this.user; + } + } catch (e) { + } + const span = _optionalChain([parentSpan, "optionalAccess", (_4) => _4.startChild, "call", (_5) => _5({ + description: typeof config2 === "string" ? config2 : config2.text, + op: "db", + origin: "auto.db.postgres", + data + })]); + if (typeof callback === "function") { + return orig.call(this, config2, values, function(err, result) { + _optionalChain([span, "optionalAccess", (_6) => _6.end, "call", (_7) => _7()]); + callback(err, result); + }); + } + if (typeof values === "function") { + return orig.call(this, config2, function(err, result) { + _optionalChain([span, "optionalAccess", (_8) => _8.end, "call", (_9) => _9()]); + values(err, result); + }); + } + const rv = typeof values !== "undefined" ? orig.call(this, config2, values) : orig.call(this, config2); + if (isThenable(rv)) { + return rv.then((res) => { + _optionalChain([span, "optionalAccess", (_10) => _10.end, "call", (_11) => _11()]); + return res; + }); + } + _optionalChain([span, "optionalAccess", (_12) => _12.end, "call", (_13) => _13()]); + return rv; + }; + }); + } + }; + Postgres.__initStatic(); } +}); - core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext }); -} - -exports.setHooksAsyncContextStrategy = setHooksAsyncContextStrategy; -//# sourceMappingURL=hooks.js.map - - -/***/ }), - -/***/ 98732: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const nodeVersion = __nccwpck_require__(68047); -const domain = __nccwpck_require__(85302); -const hooks = __nccwpck_require__(2236); - -/** - * Sets the correct async context strategy for Node.js - * - * Node.js >= 14 uses AsyncLocalStorage - * Node.js < 14 uses domains - */ -function setNodeAsyncContextStrategy() { - if (nodeVersion.NODE_VERSION.major >= 14) { - hooks.setHooksAsyncContextStrategy(); - } else { - domain.setDomainAsyncContextStrategy(); - } -} - -exports.setNodeAsyncContextStrategy = setNodeAsyncContextStrategy; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 51684: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const os = __nccwpck_require__(70857); -const util = __nccwpck_require__(39023); -const core = __nccwpck_require__(90155); - -/** - * The Sentry Node SDK Client. - * - * @see NodeClientOptions for documentation on configuration options. - * @see SentryClient for usage documentation. - */ -class NodeClient extends core.ServerRuntimeClient { - /** - * Creates a new Node SDK instance. - * @param options Configuration options for this SDK. - */ - constructor(options) { - core.applySdkMetadata(options, 'node'); - - // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util - options.transportOptions = { - textEncoder: new util.TextEncoder(), - ...options.transportOptions, - }; - - const clientOptions = { - ...options, - platform: 'node', - runtime: { name: 'node', version: global.process.version }, - serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(), - }; - - super(clientOptions); - } -} - -exports.NodeClient = NodeClient; -//# sourceMappingURL=client.js.map - - -/***/ }), - -/***/ 19487: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const replacements = [ - ['january', '1'], - ['february', '2'], - ['march', '3'], - ['april', '4'], - ['may', '5'], - ['june', '6'], - ['july', '7'], - ['august', '8'], - ['september', '9'], - ['october', '10'], - ['november', '11'], - ['december', '12'], - ['jan', '1'], - ['feb', '2'], - ['mar', '3'], - ['apr', '4'], - ['may', '5'], - ['jun', '6'], - ['jul', '7'], - ['aug', '8'], - ['sep', '9'], - ['oct', '10'], - ['nov', '11'], - ['dec', '12'], - ['sunday', '0'], - ['monday', '1'], - ['tuesday', '2'], - ['wednesday', '3'], - ['thursday', '4'], - ['friday', '5'], - ['saturday', '6'], - ['sun', '0'], - ['mon', '1'], - ['tue', '2'], - ['wed', '3'], - ['thu', '4'], - ['fri', '5'], - ['sat', '6'], -]; - -/** - * Replaces names in cron expressions - */ -function replaceCronNames(cronExpression) { - return replacements.reduce( - // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor - (acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement), - cronExpression, - ); -} - -exports.replaceCronNames = replaceCronNames; -//# sourceMappingURL=common.js.map - - -/***/ }), - -/***/ 29878: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const common = __nccwpck_require__(19487); - -const ERROR_TEXT = 'Automatic instrumentation of CronJob only supports crontab string'; - -/** - * Instruments the `cron` library to send a check-in event to Sentry for each job execution. - * - * ```ts - * import * as Sentry from '@sentry/node'; - * import { CronJob } from 'cron'; - * - * const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job'); - * - * // use the constructor - * const job = new CronJobWithCheckIn('* * * * *', () => { - * console.log('You will see this message every minute'); - * }); - * - * // or from - * const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => { - * console.log('You will see this message every minute'); - * }); - * ``` - */ -function instrumentCron(lib, monitorSlug) { - let jobScheduled = false; - - return new Proxy(lib, { - construct(target, args) { - const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args; - - if (typeof cronTime !== 'string') { - throw new Error(ERROR_TEXT); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/mysql.js +var Mysql; +var init_mysql = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/mysql.js"() { + init_esm(); + init_esm(); + init_debug_build3(); + init_node_utils(); + Mysql = class _Mysql { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Mysql"; } - - if (jobScheduled) { - throw new Error(`A job named '${monitorSlug}' has already been scheduled`); + /** + * @inheritDoc + */ + constructor() { + this.name = _Mysql.id; } - - jobScheduled = true; - - const cronString = common.replaceCronNames(cronTime); - - function monitoredTick(context, onComplete) { - return core.withMonitor( - monitorSlug, - () => { - return onTick(context, onComplete); - }, - { - schedule: { type: 'crontab', value: cronString }, - timezone: timeZone || undefined, - }, - ); + /** @inheritdoc */ + loadDependency() { + return this._module = this._module || loadModule("mysql/lib/Connection.js"); } - - return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest); - }, - get(target, prop) { - if (prop === 'from') { - return (param) => { - const { cronTime, onTick, timeZone } = param; - - if (typeof cronTime !== 'string') { - throw new Error(ERROR_TEXT); + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("Mysql Integration is skipped because of instrumenter configuration."); + return; + } + const pkg = this.loadDependency(); + if (!pkg) { + DEBUG_BUILD3 && logger.error("Mysql Integration was unable to require `mysql` package."); + return; + } + let mySqlConfig = void 0; + try { + pkg.prototype.connect = new Proxy(pkg.prototype.connect, { + apply(wrappingTarget, thisArg, args) { + if (!mySqlConfig) { + mySqlConfig = thisArg.config; + } + return wrappingTarget.apply(thisArg, args); + } + }); + } catch (e) { + DEBUG_BUILD3 && logger.error("Mysql Integration was unable to instrument `mysql` config."); + } + function spanDataFromConfig() { + if (!mySqlConfig) { + return {}; } - - if (jobScheduled) { - throw new Error(`A job named '${monitorSlug}' has already been scheduled`); + return { + "server.address": mySqlConfig.host, + "server.port": mySqlConfig.port, + "db.user": mySqlConfig.user + }; + } + function finishSpan(span) { + if (!span) { + return; } - - jobScheduled = true; - - const cronString = common.replaceCronNames(cronTime); - - param.onTick = (context, onComplete) => { - return core.withMonitor( - monitorSlug, - () => { - return onTick(context, onComplete); - }, - { - schedule: { type: 'crontab', value: cronString }, - timezone: timeZone || undefined, - }, - ); + const data = spanDataFromConfig(); + Object.keys(data).forEach((key) => { + span.setAttribute(key, data[key]); + }); + span.end(); + } + fill(pkg, "createQuery", function(orig) { + return function(options2, values, callback) { + const scope = getCurrentHub3().getScope(); + const parentSpan = scope.getSpan(); + const span = _optionalChain([parentSpan, "optionalAccess", (_2) => _2.startChild, "call", (_3) => _3({ + description: typeof options2 === "string" ? options2 : options2.sql, + op: "db", + origin: "auto.db.mysql", + data: { + "db.system": "mysql" + } + })]); + if (typeof callback === "function") { + return orig.call(this, options2, values, function(err, result, fields) { + finishSpan(span); + callback(err, result, fields); + }); + } + if (typeof values === "function") { + return orig.call(this, options2, function(err, result, fields) { + finishSpan(span); + values(err, result, fields); + }); + } + const query = orig.call(this, options2, values); + query.on("end", () => { + finishSpan(span); + }); + return query; }; + }); + } + }; + Mysql.__initStatic(); + } +}); - return target.from(param); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/mongo.js +function isCursor(maybeCursor) { + return maybeCursor && typeof maybeCursor === "object" && maybeCursor.once && typeof maybeCursor.once === "function"; +} +var OPERATIONS, OPERATION_SIGNATURES, Mongo; +var init_mongo = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/mongo.js"() { + init_esm(); + init_esm(); + init_debug_build3(); + init_node_utils(); + OPERATIONS = [ + "aggregate", + // aggregate(pipeline, options, callback) + "bulkWrite", + // bulkWrite(operations, options, callback) + "countDocuments", + // countDocuments(query, options, callback) + "createIndex", + // createIndex(fieldOrSpec, options, callback) + "createIndexes", + // createIndexes(indexSpecs, options, callback) + "deleteMany", + // deleteMany(filter, options, callback) + "deleteOne", + // deleteOne(filter, options, callback) + "distinct", + // distinct(key, query, options, callback) + "drop", + // drop(options, callback) + "dropIndex", + // dropIndex(indexName, options, callback) + "dropIndexes", + // dropIndexes(options, callback) + "estimatedDocumentCount", + // estimatedDocumentCount(options, callback) + "find", + // find(query, options, callback) + "findOne", + // findOne(query, options, callback) + "findOneAndDelete", + // findOneAndDelete(filter, options, callback) + "findOneAndReplace", + // findOneAndReplace(filter, replacement, options, callback) + "findOneAndUpdate", + // findOneAndUpdate(filter, update, options, callback) + "indexes", + // indexes(options, callback) + "indexExists", + // indexExists(indexes, options, callback) + "indexInformation", + // indexInformation(options, callback) + "initializeOrderedBulkOp", + // initializeOrderedBulkOp(options, callback) + "insertMany", + // insertMany(docs, options, callback) + "insertOne", + // insertOne(doc, options, callback) + "isCapped", + // isCapped(options, callback) + "mapReduce", + // mapReduce(map, reduce, options, callback) + "options", + // options(options, callback) + "parallelCollectionScan", + // parallelCollectionScan(options, callback) + "rename", + // rename(newName, options, callback) + "replaceOne", + // replaceOne(filter, doc, options, callback) + "stats", + // stats(options, callback) + "updateMany", + // updateMany(filter, update, options, callback) + "updateOne" + // updateOne(filter, update, options, callback) + ]; + OPERATION_SIGNATURES = { + // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well + // see https://github.com/getsentry/sentry-javascript/pull/3102 + bulkWrite: ["operations"], + countDocuments: ["query"], + createIndex: ["fieldOrSpec"], + createIndexes: ["indexSpecs"], + deleteMany: ["filter"], + deleteOne: ["filter"], + distinct: ["key", "query"], + dropIndex: ["indexName"], + find: ["query"], + findOne: ["query"], + findOneAndDelete: ["filter"], + findOneAndReplace: ["filter", "replacement"], + findOneAndUpdate: ["filter", "update"], + indexExists: ["indexes"], + insertMany: ["docs"], + insertOne: ["doc"], + mapReduce: ["map", "reduce"], + rename: ["newName"], + replaceOne: ["filter", "doc"], + updateMany: ["filter", "update"], + updateOne: ["filter", "update"] + }; + Mongo = class _Mongo { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Mongo"; + } + /** + * @inheritDoc + */ + /** + * @inheritDoc + */ + constructor(options2 = {}) { + this.name = _Mongo.id; + this._operations = Array.isArray(options2.operations) ? options2.operations : OPERATIONS; + this._describeOperations = "describeOperations" in options2 ? options2.describeOperations : true; + this._useMongoose = !!options2.useMongoose; + } + /** @inheritdoc */ + loadDependency() { + const moduleName = this._useMongoose ? "mongoose" : "mongodb"; + return this._module = this._module || loadModule(moduleName); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("Mongo Integration is skipped because of instrumenter configuration."); + return; + } + const pkg = this.loadDependency(); + if (!pkg) { + const moduleName = this._useMongoose ? "mongoose" : "mongodb"; + DEBUG_BUILD3 && logger.error(`Mongo Integration was unable to require \`${moduleName}\` package.`); + return; + } + this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub3); + } + /** + * Patches original collection methods + */ + // eslint-disable-next-line deprecation/deprecation + _instrumentOperations(collection, operations, getCurrentHub3) { + operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub3)); + } + /** + * Patches original collection to utilize our tracing functionality + */ + // eslint-disable-next-line deprecation/deprecation + _patchOperation(collection, operation, getCurrentHub3) { + if (!(operation in collection.prototype)) return; + const getSpanContext = this._getSpanContextFromOperationArguments.bind(this); + fill(collection.prototype, operation, function(orig) { + return function(...args) { + const lastArg = args[args.length - 1]; + const hub = getCurrentHub3(); + const scope = hub.getScope(); + const client = hub.getClient(); + const parentSpan = scope.getSpan(); + const sendDefaultPii = _optionalChain([client, "optionalAccess", (_2) => _2.getOptions, "call", (_3) => _3(), "access", (_4) => _4.sendDefaultPii]); + if (typeof lastArg !== "function" || operation === "mapReduce" && args.length === 2) { + const span2 = _optionalChain([parentSpan, "optionalAccess", (_5) => _5.startChild, "call", (_6) => _6(getSpanContext(this, operation, args, sendDefaultPii))]); + const maybePromiseOrCursor = orig.call(this, ...args); + if (isThenable(maybePromiseOrCursor)) { + return maybePromiseOrCursor.then((res) => { + _optionalChain([span2, "optionalAccess", (_7) => _7.end, "call", (_8) => _8()]); + return res; + }); + } else if (isCursor(maybePromiseOrCursor)) { + const cursor = maybePromiseOrCursor; + try { + cursor.once("close", () => { + _optionalChain([span2, "optionalAccess", (_9) => _9.end, "call", (_10) => _10()]); + }); + } catch (e) { + _optionalChain([span2, "optionalAccess", (_11) => _11.end, "call", (_12) => _12()]); + } + return cursor; + } else { + _optionalChain([span2, "optionalAccess", (_13) => _13.end, "call", (_14) => _14()]); + return maybePromiseOrCursor; + } + } + const span = _optionalChain([parentSpan, "optionalAccess", (_15) => _15.startChild, "call", (_16) => _16(getSpanContext(this, operation, args.slice(0, -1)))]); + return orig.call(this, ...args.slice(0, -1), function(err, result) { + _optionalChain([span, "optionalAccess", (_17) => _17.end, "call", (_18) => _18()]); + lastArg(err, result); + }); + }; + }); + } + /** + * Form a SpanContext based on the user input to a given operation. + */ + _getSpanContextFromOperationArguments(collection, operation, args, sendDefaultPii = false) { + const data = { + "db.system": "mongodb", + "db.name": collection.dbName, + "db.operation": operation, + "db.mongodb.collection": collection.collectionName }; - } else { - return target[prop]; + const spanContext = { + op: "db", + // TODO v8: Use `${collection.collectionName}.${operation}` + origin: "auto.db.mongo", + description: operation, + data + }; + const signature = OPERATION_SIGNATURES[operation]; + const shouldDescribe = Array.isArray(this._describeOperations) ? this._describeOperations.includes(operation) : this._describeOperations; + if (!signature || !shouldDescribe || !sendDefaultPii) { + return spanContext; + } + try { + if (operation === "mapReduce") { + const [map2, reduce] = args; + data[signature[0]] = typeof map2 === "string" ? map2 : map2.name || ""; + data[signature[1]] = typeof reduce === "string" ? reduce : reduce.name || ""; + } else { + for (let i = 0; i < signature.length; i++) { + data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]); + } + } + } catch (_oO) { + } + return spanContext; } - }, - }); -} - -exports.instrumentCron = instrumentCron; -//# sourceMappingURL=cron.js.map - - -/***/ }), - -/***/ 30455: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const common = __nccwpck_require__(19487); - -/** - * Wraps the `node-cron` library with check-in monitoring. - * - * ```ts - * import * as Sentry from "@sentry/node"; - * import cron from "node-cron"; - * - * const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron); - * - * cronWithCheckIn.schedule( - * "* * * * *", - * () => { - * console.log("running a task every minute"); - * }, - * { name: "my-cron-job" }, - * ); - * ``` - */ -function instrumentNodeCron(lib) { - return new Proxy(lib, { - get(target, prop) { - if (prop === 'schedule' && target.schedule) { - // When 'get' is called for schedule, return a proxied version of the schedule function - return new Proxy(target.schedule, { - apply(target, thisArg, argArray) { - const [expression, , options] = argArray; + }; + Mongo.__initStatic(); + } +}); - if (!_optionalChain([options, 'optionalAccess', _ => _.name])) { - throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/prisma.js +function isValidPrismaClient(possibleClient) { + return !!possibleClient && !!possibleClient["$use"]; +} +var Prisma; +var init_prisma = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/prisma.js"() { + init_esm2(); + init_esm(); + init_debug_build3(); + init_node_utils(); + Prisma = class _Prisma { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Prisma"; + } + /** + * @inheritDoc + */ + /** + * @inheritDoc + */ + constructor(options2 = {}) { + this.name = _Prisma.id; + if (isValidPrismaClient(options2.client) && !options2.client._sentryInstrumented) { + addNonEnumerableProperty(options2.client, "_sentryInstrumented", true); + const clientData = {}; + try { + const engineConfig = options2.client._engineConfig; + if (engineConfig) { + const { activeProvider, clientVersion } = engineConfig; + if (activeProvider) { + clientData["db.system"] = activeProvider; + } + if (clientVersion) { + clientData["db.prisma.version"] = clientVersion; + } } - - return core.withMonitor( - options.name, - () => { - return target.apply(thisArg, argArray); - }, + } catch (e) { + } + options2.client.$use((params, next) => { + if (shouldDisableAutoInstrumentation(getCurrentHub)) { + return next(params); + } + const action = params.action; + const model = params.model; + return startSpan( { - schedule: { type: 'crontab', value: common.replaceCronNames(expression) }, - timezone: _optionalChain([options, 'optionalAccess', _2 => _2.timezone]), + name: model ? `${model} ${action}` : action, + onlyIfParent: true, + op: "db.prisma", + attributes: { + [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.db.prisma" + }, + data: { ...clientData, "db.operation": action } }, + () => next(params) ); - }, - }); - } else { - return target[prop]; + }); + } else { + DEBUG_BUILD3 && logger.warn("Unsupported Prisma client provided to PrismaIntegration. Provided client:", options2.client); + } } - }, - }); -} - -exports.instrumentNodeCron = instrumentNodeCron; -//# sourceMappingURL=node-cron.js.map - - -/***/ }), - -/***/ 50178: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const common = __nccwpck_require__(19487); - -/** - * Instruments the `node-schedule` library to send a check-in event to Sentry for each job execution. - * - * ```ts - * import * as Sentry from '@sentry/node'; - * import * as schedule from 'node-schedule'; - * - * const scheduleWithCheckIn = Sentry.cron.instrumentNodeSchedule(schedule); - * - * const job = scheduleWithCheckIn.scheduleJob('my-cron-job', '* * * * *', () => { - * console.log('You will see this message every minute'); - * }); - * ``` - */ -function instrumentNodeSchedule(lib) { - return new Proxy(lib, { - get(target, prop) { - if (prop === 'scheduleJob') { - // eslint-disable-next-line @typescript-eslint/unbound-method - return new Proxy(target.scheduleJob, { - apply(target, thisArg, argArray) { - const [nameOrExpression, expressionOrCallback] = argArray; + /** + * @inheritDoc + */ + setupOnce() { + } + }; + Prisma.__initStatic(); + } +}); - if (typeof nameOrExpression !== 'string' || typeof expressionOrCallback !== 'string') { - throw new Error( - "Automatic instrumentation of 'node-schedule' requires the first parameter of 'scheduleJob' to be a job name string and the second parameter to be a crontab string", - ); +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/graphql.js +var GraphQL; +var init_graphql = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/graphql.js"() { + init_esm(); + init_esm(); + init_debug_build3(); + init_node_utils(); + GraphQL = class _GraphQL { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "GraphQL"; + } + /** + * @inheritDoc + */ + constructor() { + this.name = _GraphQL.id; + } + /** @inheritdoc */ + loadDependency() { + return this._module = this._module || loadModule("graphql/execution/execute.js"); + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("GraphQL Integration is skipped because of instrumenter configuration."); + return; + } + const pkg = this.loadDependency(); + if (!pkg) { + DEBUG_BUILD3 && logger.error("GraphQL Integration was unable to require graphql/execution package."); + return; + } + fill(pkg, "execute", function(orig) { + return function(...args) { + const scope = getCurrentHub3().getScope(); + const parentSpan = scope.getSpan(); + const span = _optionalChain([parentSpan, "optionalAccess", (_2) => _2.startChild, "call", (_3) => _3({ + description: "execute", + op: "graphql.execute", + origin: "auto.graphql.graphql" + })]); + _optionalChain([scope, "optionalAccess", (_4) => _4.setSpan, "call", (_5) => _5(span)]); + const rv = orig.call(this, ...args); + if (isThenable(rv)) { + return rv.then((res) => { + _optionalChain([span, "optionalAccess", (_6) => _6.end, "call", (_7) => _7()]); + _optionalChain([scope, "optionalAccess", (_8) => _8.setSpan, "call", (_9) => _9(parentSpan)]); + return res; + }); } - - const monitorSlug = nameOrExpression; - const expression = expressionOrCallback; - - return core.withMonitor( - monitorSlug, - () => { - return target.apply(thisArg, argArray); - }, - { - schedule: { type: 'crontab', value: common.replaceCronNames(expression) }, - }, - ); - }, + _optionalChain([span, "optionalAccess", (_10) => _10.end, "call", (_11) => _11()]); + _optionalChain([scope, "optionalAccess", (_12) => _12.setSpan, "call", (_13) => _13(parentSpan)]); + return rv; + }; }); } + }; + GraphQL.__initStatic(); + } +}); - return target[prop]; - }, +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/apollo.js +function instrumentResolvers(resolvers, getCurrentHub3) { + return resolvers.map((model) => { + Object.keys(model).forEach((resolverGroupName) => { + Object.keys(model[resolverGroupName]).forEach((resolverName) => { + if (typeof model[resolverGroupName][resolverName] !== "function") { + return; + } + wrapResolver(model, resolverGroupName, resolverName, getCurrentHub3); + }); + }); + return model; }); } - -exports.instrumentNodeSchedule = instrumentNodeSchedule; -//# sourceMappingURL=node-schedule.js.map - - -/***/ }), - -/***/ 35473: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code. - * - * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking. - */ -const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__); - -exports.DEBUG_BUILD = DEBUG_BUILD; -//# sourceMappingURL=debug-build.js.map - - -/***/ }), - -/***/ 534: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(35473); -const sdk = __nccwpck_require__(58563); -const trpc = __nccwpck_require__(87524); -const requestDataDeprecated = __nccwpck_require__(60671); - -/** - * Express-compatible tracing handler. - * @see Exposed as `Handlers.tracingHandler` - */ -function tracingHandler() - - { - return function sentryTracingMiddleware( - req, - res, - next, - ) { - const options = _optionalChain([core.getClient, 'call', _ => _(), 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3()]); - - if ( - !options || - options.instrumenter !== 'sentry' || - _optionalChain([req, 'access', _4 => _4.method, 'optionalAccess', _5 => _5.toUpperCase, 'call', _6 => _6()]) === 'OPTIONS' || - _optionalChain([req, 'access', _7 => _7.method, 'optionalAccess', _8 => _8.toUpperCase, 'call', _9 => _9()]) === 'HEAD' - ) { - return next(); - } - - const sentryTrace = req.headers && utils.isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined; - const baggage = _optionalChain([req, 'access', _10 => _10.headers, 'optionalAccess', _11 => _11.baggage]); - if (!core.hasTracingEnabled(options)) { - return next(); - } - - const [name, source] = utils.extractPathForTransaction(req, { path: true, method: true }); - const transaction = core.continueTrace({ sentryTrace, baggage }, ctx => - // TODO: Refactor this to use `startSpan()` - // eslint-disable-next-line deprecation/deprecation - core.startTransaction( - { - name, - op: 'http.server', - origin: 'auto.http.node.tracingHandler', - ...ctx, - data: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source, - }, - metadata: { - // eslint-disable-next-line deprecation/deprecation - ...ctx.metadata, - // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become - // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the - // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to - // be sure - request: req, - }, - }, - // extra context passed to the tracesSampler - { request: utils.extractRequestData(req) }, - ), - ); - - // We put the transaction on the scope so users can attach children to it - // eslint-disable-next-line deprecation/deprecation - core.getCurrentScope().setSpan(transaction); - - // We also set __sentry_transaction on the response so people can grab the transaction there to add - // spans to it later. - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (res ).__sentry_transaction = transaction; - - res.once('finish', () => { - // Push `transaction.finish` to the next event loop so open spans have a chance to finish before the transaction - // closes - setImmediate(() => { - // eslint-disable-next-line deprecation/deprecation - utils.addRequestDataToTransaction(transaction, req); - core.setHttpStatus(transaction, res.statusCode); - transaction.end(); - }); - }); - - next(); - }; +function wrapResolver(model, resolverGroupName, resolverName, getCurrentHub3) { + fill(model[resolverGroupName], resolverName, function(orig) { + return function(...args) { + const scope = getCurrentHub3().getScope(); + const parentSpan = scope.getSpan(); + const span = _optionalChain([parentSpan, "optionalAccess", (_2) => _2.startChild, "call", (_3) => _3({ + description: `${resolverGroupName}.${resolverName}`, + op: "graphql.resolve", + origin: "auto.graphql.apollo" + })]); + const rv = orig.call(this, ...args); + if (isThenable(rv)) { + return rv.then((res) => { + _optionalChain([span, "optionalAccess", (_4) => _4.end, "call", (_5) => _5()]); + return res; + }); + } + _optionalChain([span, "optionalAccess", (_6) => _6.end, "call", (_7) => _7()]); + return rv; + }; + }); } +var Apollo; +var init_apollo = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/apollo.js"() { + init_esm(); + init_esm(); + init_debug_build3(); + init_node_utils(); + Apollo = class _Apollo { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Apollo"; + } + /** + * @inheritDoc + */ + /** + * @inheritDoc + */ + constructor(options2 = { + useNestjs: false + }) { + this.name = _Apollo.id; + this._useNest = !!options2.useNestjs; + } + /** @inheritdoc */ + loadDependency() { + if (this._useNest) { + this._module = this._module || loadModule("@nestjs/graphql"); + } else { + this._module = this._module || loadModule("apollo-server-core"); + } + return this._module; + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + setupOnce(_, getCurrentHub3) { + if (shouldDisableAutoInstrumentation(getCurrentHub3)) { + DEBUG_BUILD3 && logger.log("Apollo Integration is skipped because of instrumenter configuration."); + return; + } + if (this._useNest) { + const pkg = this.loadDependency(); + if (!pkg) { + DEBUG_BUILD3 && logger.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."); + return; + } + fill( + pkg.GraphQLFactory.prototype, + "mergeWithSchema", + function(orig) { + return function(...args) { + fill(this.resolversExplorerService, "explore", function(orig2) { + return function() { + const resolvers = arrayify(orig2.call(this)); + const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub3); + return instrumentedResolvers; + }; + }); + return orig.call(this, ...args); + }; + } + ); + } else { + const pkg = this.loadDependency(); + if (!pkg) { + DEBUG_BUILD3 && logger.error("Apollo Integration was unable to require apollo-server-core package."); + return; + } + fill(pkg.ApolloServerBase.prototype, "constructSchema", function(orig) { + return function() { + if (!this.config.resolvers) { + if (DEBUG_BUILD3) { + if (this.config.schema) { + logger.warn( + "Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead." + ); + logger.warn(); + } else if (this.config.modules) { + logger.warn( + "Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property." + ); + } + logger.error("Skipping tracing as no resolvers found on the `ApolloServer` instance."); + } + return orig.call(this); + } + const resolvers = arrayify(this.config.resolvers); + this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub3); + return orig.call(this); + }; + }); + } + } + }; + Apollo.__initStatic(); + } +}); -/** - * Backwards compatibility shim which can be removed in v8. Forces the given options to follow the - * `AddRequestDataToEventOptions` interface. - * - * TODO (v8): Get rid of this, and stop passing `requestDataOptionsFromExpressHandler` to `setSDKProcessingMetadata`. - */ -function convertReqHandlerOptsToAddReqDataOpts( - reqHandlerOptions = {}, -) { - let addRequestDataOptions; +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/lazy.js +var lazyLoadedNodePerformanceMonitoringIntegrations; +var init_lazy = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/node/integrations/lazy.js"() { + init_esm(); + lazyLoadedNodePerformanceMonitoringIntegrations = [ + () => { + const integration = dynamicRequire(module, "./apollo"); + return new integration.Apollo(); + }, + () => { + const integration = dynamicRequire(module, "./apollo"); + return new integration.Apollo({ useNestjs: true }); + }, + () => { + const integration = dynamicRequire(module, "./graphql"); + return new integration.GraphQL(); + }, + () => { + const integration = dynamicRequire(module, "./mongo"); + return new integration.Mongo(); + }, + () => { + const integration = dynamicRequire(module, "./mongo"); + return new integration.Mongo({ mongoose: true }); + }, + () => { + const integration = dynamicRequire(module, "./mysql"); + return new integration.Mysql(); + }, + () => { + const integration = dynamicRequire(module, "./postgres"); + return new integration.Postgres(); + } + ]; + } +}); - if ('include' in reqHandlerOptions) { - addRequestDataOptions = { include: reqHandlerOptions.include }; - } else { - // eslint-disable-next-line deprecation/deprecation - const { ip, request, transaction, user } = reqHandlerOptions ; +// node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/index.js +var init_esm3 = __esm({ + "node_modules/.pnpm/@sentry-internal+tracing@7.120.0/node_modules/@sentry-internal/tracing/esm/index.js"() { + init_express(); + init_postgres(); + init_mysql(); + init_mongo(); + init_prisma(); + init_graphql(); + init_apollo(); + init_lazy(); + } +}); - if (ip || request || transaction || user) { - addRequestDataOptions = { include: utils.dropUndefinedKeys({ ip, request, transaction, user }) }; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/tracing/index.js +function autoDiscoverNodePerformanceMonitoringIntegrations() { + const loadedIntegrations = lazyLoadedNodePerformanceMonitoringIntegrations.map((tryLoad) => { + try { + return tryLoad(); + } catch (_) { + return void 0; } + }).filter((integration) => !!integration); + if (loadedIntegrations.length === 0) { + logger.warn("Performance monitoring integrations could not be automatically loaded."); } - - return addRequestDataOptions; + return loadedIntegrations.filter((integration) => !!integration.loadDependency()); } +var init_tracing2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/tracing/index.js"() { + init_esm3(); + init_esm(); + } +}); -/** - * Express compatible request handler. - * @see Exposed as `Handlers.requestHandler` - */ -function requestHandler( - options, -) { - // TODO (v8): Get rid of this - const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options); - - const client = core.getClient(); - // Initialise an instance of SessionFlusher on the client when `autoSessionTracking` is enabled and the - // `requestHandler` middleware is used indicating that we are running in SessionAggregates mode - if (client && sdk.isAutoSessionTrackingEnabled(client)) { - client.initSessionFlusher(); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/client.js +import * as os from "os"; +import { TextEncoder as TextEncoder2 } from "util"; +var NodeClient; +var init_client = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/client.js"() { + init_esm2(); + NodeClient = class extends ServerRuntimeClient { + /** + * Creates a new Node SDK instance. + * @param options Configuration options for this SDK. + */ + constructor(options2) { + applySdkMetadata(options2, "node"); + options2.transportOptions = { + textEncoder: new TextEncoder2(), + ...options2.transportOptions + }; + const clientOptions = { + ...options2, + platform: "node", + runtime: { name: "node", version: global.process.version }, + serverName: options2.serverName || global.process.env.SENTRY_NAME || os.hostname() + }; + super(clientOptions); + } + }; + } +}); - // If Scope contains a Single mode Session, it is removed in favor of using Session Aggregates mode - const scope = core.getCurrentScope(); - if (scope.getSession()) { - scope.setSession(); - } +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/base.js +import * as http from "http"; +var INTERNAL, Agent2; +var init_base2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/base.js"() { + init_esm(); + INTERNAL = Symbol("AgentBaseInternalState"); + Agent2 = class extends http.Agent { + // Set by `http.Agent` - missing from `@types/node` + constructor(opts) { + super(opts); + this[INTERNAL] = {}; + } + /** + * Determine whether this is an `http` or `https` request. + */ + isSecureEndpoint(options2) { + if (options2) { + if (typeof options2.secureEndpoint === "boolean") { + return options2.secureEndpoint; + } + if (typeof options2.protocol === "string") { + return options2.protocol === "https:"; + } + } + const { stack } = new Error(); + if (typeof stack !== "string") return false; + return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1); + } + createSocket(req, options2, cb) { + const connectOpts = { + ...options2, + secureEndpoint: this.isSecureEndpoint(options2) + }; + Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => { + if (socket instanceof http.Agent) { + return socket.addRequest(req, connectOpts); + } + this[INTERNAL].currentSocket = socket; + super.createSocket(req, options2, cb); + }, cb); + } + createConnection() { + const socket = this[INTERNAL].currentSocket; + this[INTERNAL].currentSocket = void 0; + if (!socket) { + throw new Error("No socket was returned in the `connect()` function"); + } + return socket; + } + get defaultPort() { + return _nullishCoalesce(this[INTERNAL].defaultPort, () => this.protocol === "https:" ? 443 : 80); + } + set defaultPort(v) { + if (this[INTERNAL]) { + this[INTERNAL].defaultPort = v; + } + } + get protocol() { + return _nullishCoalesce(this[INTERNAL].protocol, () => this.isSecureEndpoint() ? "https:" : "http:"); + } + set protocol(v) { + if (this[INTERNAL]) { + this[INTERNAL].protocol = v; + } + } + }; } +}); - return function sentryRequestMiddleware( - req, - res, - next, - ) { - if (options && options.flushTimeout && options.flushTimeout > 0) { - // eslint-disable-next-line @typescript-eslint/unbound-method - const _end = res.end; - res.end = function (chunk, encoding, cb) { - void core.flush(options.flushTimeout) - .then(() => { - _end.call(this, chunk, encoding, cb); - }) - .then(null, e => { - debugBuild.DEBUG_BUILD && utils.logger.error(e); - _end.call(this, chunk, encoding, cb); - }); - }; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/parse-proxy-response.js +function debug(...args) { + logger.log("[https-proxy-agent:parse-proxy-response]", ...args); +} +function parseProxyResponse(socket) { + return new Promise((resolve4, reject) => { + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) ondata(b); + else socket.once("readable", read); } - core.runWithAsyncContext(() => { - const scope = core.getCurrentScope(); - scope.setSDKProcessingMetadata({ - request: req, - // TODO (v8): Stop passing this - requestDataOptionsFromExpressHandler: requestDataOptions, - }); - - const client = core.getClient(); - if (sdk.isAutoSessionTrackingEnabled(client)) { - // Set `status` of `RequestSession` to Ok, at the beginning of the request - scope.setRequestSession({ status: 'ok' }); + function cleanup() { + socket.removeListener("end", onend); + socket.removeListener("error", onerror); + socket.removeListener("readable", read); + } + function onend() { + cleanup(); + debug("onend"); + reject(new Error("Proxy connection ended before receiving CONNECT response")); + } + function onerror(err) { + cleanup(); + debug("onerror %o", err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf("\r\n\r\n"); + if (endOfHeaders === -1) { + debug("have not received end of HTTP headers yet..."); + read(); + return; } - - res.once('finish', () => { - const client = core.getClient(); - if (sdk.isAutoSessionTrackingEnabled(client)) { - setImmediate(() => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (client && (client )._captureRequestSession) { - // Calling _captureRequestSession to capture request session at the end of the request by incrementing - // the correct SessionAggregates bucket i.e. crashed, errored or exited - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (client )._captureRequestSession(); - } - }); + const headerParts = buffered.slice(0, endOfHeaders).toString("ascii").split("\r\n"); + const firstLine = headerParts.shift(); + if (!firstLine) { + socket.destroy(); + return reject(new Error("No header received from proxy CONNECT response")); + } + const firstLineParts = firstLine.split(" "); + const statusCode = +firstLineParts[1]; + const statusText = firstLineParts.slice(2).join(" "); + const headers = {}; + for (const header of headerParts) { + if (!header) continue; + const firstColon = header.indexOf(":"); + if (firstColon === -1) { + socket.destroy(); + return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); + } + const key = header.slice(0, firstColon).toLowerCase(); + const value = header.slice(firstColon + 1).trimStart(); + const current = headers[key]; + if (typeof current === "string") { + headers[key] = [current, value]; + } else if (Array.isArray(current)) { + current.push(value); + } else { + headers[key] = value; } + } + debug("got proxy server response: %o %o", firstLine, headers); + cleanup(); + resolve4({ + connect: { + statusCode, + statusText, + headers + }, + buffered }); - next(); - }); - }; + } + socket.on("error", onerror); + socket.on("end", onend); + read(); + }); } +var init_parse_proxy_response = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/parse-proxy-response.js"() { + init_esm(); + } +}); -/** JSDoc */ - -/** JSDoc */ -function getStatusCodeFromResponse(error) { - const statusCode = error.status || error.statusCode || error.status_code || (error.output && error.output.statusCode); - return statusCode ? parseInt(statusCode , 10) : 500; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/index.js +import * as net from "net"; +import * as tls from "tls"; +import { URL as URL2 } from "url"; +function debug2(...args) { + logger.log("[https-proxy-agent]", ...args); } - -/** Returns true if response code is internal server error */ -function defaultShouldHandleError(error) { - const status = getStatusCodeFromResponse(error); - return status >= 500; +function resume(socket) { + socket.resume(); } - -/** - * Express compatible error handler. - * @see Exposed as `Handlers.errorHandler` - */ -function errorHandler(options - -) - - { - return function sentryErrorMiddleware( - error, - _req, - res, - next, - ) { - const shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError; - - if (shouldHandleError(error)) { - core.withScope(_scope => { - // The request should already have been stored in `scope.sdkProcessingMetadata` by `sentryRequestMiddleware`, - // but on the off chance someone is using `sentryErrorMiddleware` without `sentryRequestMiddleware`, it doesn't - // hurt to be sure - _scope.setSDKProcessingMetadata({ request: _req }); - - // For some reason we need to set the transaction on the scope again - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const transaction = (res ).__sentry_transaction ; - if (transaction && !core.getActiveSpan()) { - // eslint-disable-next-line deprecation/deprecation - _scope.setSpan(transaction); +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +var HttpsProxyAgent; +var init_proxy = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/proxy/index.js"() { + init_esm(); + init_esm(); + init_base2(); + init_parse_proxy_response(); + HttpsProxyAgent = class extends Agent2 { + static __initStatic() { + this.protocols = ["http", "https"]; + } + constructor(proxy, opts) { + super(opts); + this.options = {}; + this.proxy = typeof proxy === "string" ? new URL2(proxy) : proxy; + this.proxyHeaders = _nullishCoalesce(_optionalChain([opts, "optionalAccess", (_2) => _2.headers]), () => ({})); + debug2("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); + const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; + this.connectOpts = { + // Attempt to negotiate http/1.1 for proxy servers that support http/2 + ALPNProtocols: ["http/1.1"], + ...opts ? omit(opts, "headers") : null, + host, + port + }; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + */ + async connect(req, opts) { + const { proxy } = this; + if (!opts.host) { + throw new TypeError('No "host" provided'); } - - const client = core.getClient(); - if (client && sdk.isAutoSessionTrackingEnabled(client)) { - // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the - // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only - // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be - // running in SessionAggregates mode - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const isSessionAggregatesMode = (client )._sessionFlusher !== undefined; - if (isSessionAggregatesMode) { - const requestSession = _scope.getRequestSession(); - // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a - // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within - // the bounds of a request, and if so the status is updated - if (requestSession && requestSession.status !== undefined) { - requestSession.status = 'crashed'; - } + let socket; + if (proxy.protocol === "https:") { + debug2("Creating `tls.Socket`: %o", this.connectOpts); + const servername = this.connectOpts.servername || this.connectOpts.host; + socket = tls.connect({ + ...this.connectOpts, + servername: servername && net.isIP(servername) ? void 0 : servername + }); + } else { + debug2("Creating `net.Socket`: %o", this.connectOpts); + socket = net.connect(this.connectOpts); + } + const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; + const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; + let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r +`; + if (proxy.username || proxy.password) { + const auth7 = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; + headers["Proxy-Authorization"] = `Basic ${Buffer.from(auth7).toString("base64")}`; + } + headers.Host = `${host}:${opts.port}`; + if (!headers["Proxy-Connection"]) { + headers["Proxy-Connection"] = this.keepAlive ? "Keep-Alive" : "close"; + } + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r +`; + } + const proxyResponsePromise = parseProxyResponse(socket); + socket.write(`${payload}\r +`); + const { connect: connect3, buffered } = await proxyResponsePromise; + req.emit("proxyConnect", connect3); + this.emit("proxyConnect", connect3, req); + if (connect3.statusCode === 200) { + req.once("socket", resume); + if (opts.secureEndpoint) { + debug2("Upgrading socket connection to TLS"); + const servername = opts.servername || opts.host; + return tls.connect({ + ...omit(opts, "host", "path", "port"), + socket, + servername: net.isIP(servername) ? void 0 : servername + }); } + return socket; } + socket.destroy(); + const fakeSocket = new net.Socket({ writable: false }); + fakeSocket.readable = true; + req.once("socket", (s) => { + debug2("Replaying proxy buffer for failed request"); + s.push(buffered); + s.push(null); + }); + return fakeSocket; + } + }; + HttpsProxyAgent.__initStatic(); + } +}); - const eventId = core.captureException(error, { mechanism: { type: 'middleware', handled: false } }); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - (res ).sentry = eventId; - next(error); - }); - - return; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/transports/http.js +import * as http2 from "http"; +import * as https from "https"; +import { Readable } from "stream"; +import { URL as URL3 } from "url"; +import { createGzip } from "zlib"; +function streamFromBody(body) { + return new Readable({ + read() { + this.push(body); + this.push(null); } - - next(error); + }); +} +function makeNodeTransport(options2) { + let urlSegments; + try { + urlSegments = new URL3(options2.url); + } catch (e) { + consoleSandbox(() => { + console.warn( + "[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used." + ); + }); + return createTransport(options2, () => Promise.resolve({})); + } + const isHttps = urlSegments.protocol === "https:"; + const proxy = applyNoProxyOption( + urlSegments, + options2.proxy || (isHttps ? process.env.https_proxy : void 0) || process.env.http_proxy + ); + const nativeHttpModule = isHttps ? https : http2; + const keepAlive = options2.keepAlive === void 0 ? false : options2.keepAlive; + const agent = proxy ? new HttpsProxyAgent(proxy) : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2e3 }); + const requestExecutor = createRequestExecutor(options2, _nullishCoalesce(options2.httpModule, () => nativeHttpModule), agent); + return createTransport(options2, requestExecutor); +} +function applyNoProxyOption(transportUrlSegments, proxy) { + const { no_proxy } = process.env; + const urlIsExemptFromProxy = no_proxy && no_proxy.split(",").some( + (exemption) => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption) + ); + if (urlIsExemptFromProxy) { + return void 0; + } else { + return proxy; + } +} +function createRequestExecutor(options2, httpModule, agent) { + const { hostname: hostname2, pathname, port, protocol, search } = new URL3(options2.url); + return function makeRequest(request2) { + return new Promise((resolve4, reject) => { + let body = streamFromBody(request2.body); + const headers = { ...options2.headers }; + if (request2.body.length > GZIP_THRESHOLD) { + headers["content-encoding"] = "gzip"; + body = body.pipe(createGzip()); + } + const req = httpModule.request( + { + method: "POST", + agent, + headers, + hostname: hostname2, + path: `${pathname}${search}`, + port, + protocol, + ca: options2.caCerts + }, + (res) => { + res.on("data", () => { + }); + res.on("end", () => { + }); + res.setEncoding("utf8"); + const retryAfterHeader = _nullishCoalesce(res.headers["retry-after"], () => null); + const rateLimitsHeader = _nullishCoalesce(res.headers["x-sentry-rate-limits"], () => null); + resolve4({ + statusCode: res.statusCode, + headers: { + "retry-after": retryAfterHeader, + "x-sentry-rate-limits": Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader + } + }); + } + ); + req.on("error", reject); + body.pipe(req); + }); }; } +var GZIP_THRESHOLD; +var init_http = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/transports/http.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_proxy(); + GZIP_THRESHOLD = 1024 * 32; + } +}); -/** - * Sentry tRPC middleware that names the handling transaction after the called procedure. - * - * Use the Sentry tRPC middleware in combination with the Sentry server integration, - * e.g. Express Request Handlers or Next.js SDK. - * - * @deprecated Please use the top level export instead: - * ``` - * // OLD - * import * as Sentry from '@sentry/node'; - * Sentry.Handlers.trpcMiddleware(); - * - * // NEW - * import * as Sentry from '@sentry/node'; - * Sentry.trpcMiddleware(); - * ``` - */ -// eslint-disable-next-line deprecation/deprecation -const trpcMiddleware = trpc.trpcMiddleware; - -exports.extractRequestData = requestDataDeprecated.extractRequestData; -exports.parseRequest = requestDataDeprecated.parseRequest; -exports.errorHandler = errorHandler; -exports.requestHandler = requestHandler; -exports.tracingHandler = tracingHandler; -exports.trpcMiddleware = trpcMiddleware; -//# sourceMappingURL=handlers.js.map - - -/***/ }), - -/***/ 12427: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const index = __nccwpck_require__(45662); -const client = __nccwpck_require__(51684); -const http = __nccwpck_require__(24636); -const sdk = __nccwpck_require__(58563); -const utils = __nccwpck_require__(79565); -const utils$1 = __nccwpck_require__(6230); -const module$1 = __nccwpck_require__(59055); -const legacy = __nccwpck_require__(53832); -const handlers = __nccwpck_require__(534); -const index$5 = __nccwpck_require__(67455); -const integrations$1 = __nccwpck_require__(29243); -const integrations = __nccwpck_require__(57671); -const console = __nccwpck_require__(48270); -const onuncaughtexception = __nccwpck_require__(32820); -const onunhandledrejection = __nccwpck_require__(76668); -const modules = __nccwpck_require__(14550); -const contextlines = __nccwpck_require__(23781); -const context = __nccwpck_require__(49252); -const index$1 = __nccwpck_require__(4383); -const spotlight = __nccwpck_require__(5455); -const index$2 = __nccwpck_require__(87359); -const index$3 = __nccwpck_require__(88220); -const index$4 = __nccwpck_require__(7248); -const http$1 = __nccwpck_require__(50475); -const trpc = __nccwpck_require__(87524); -const cron$1 = __nccwpck_require__(29878); -const nodeCron = __nccwpck_require__(30455); -const nodeSchedule = __nccwpck_require__(50178); - -/** - * @deprecated use `createGetModuleFromFilename` instead. - */ -const getModuleFromFilename = module$1.createGetModuleFromFilename(); - -// TODO: Deprecate this once we migrated tracing integrations -const Integrations = { - // eslint-disable-next-line deprecation/deprecation - ...core.Integrations, - ...index$5, - ...integrations$1, -}; - -/** Methods to instrument cron libraries for Sentry check-ins */ -const cron = { - instrumentCron: cron$1.instrumentCron, - instrumentNodeCron: nodeCron.instrumentNodeCron, - instrumentNodeSchedule: nodeSchedule.instrumentNodeSchedule, -}; - -exports.Hub = core.Hub; -exports.SDK_VERSION = core.SDK_VERSION; -exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = core.SEMANTIC_ATTRIBUTE_SENTRY_OP; -exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = core.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; -exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; -exports.Scope = core.Scope; -exports.addBreadcrumb = core.addBreadcrumb; -exports.addEventProcessor = core.addEventProcessor; -exports.addGlobalEventProcessor = core.addGlobalEventProcessor; -exports.addIntegration = core.addIntegration; -exports.captureCheckIn = core.captureCheckIn; -exports.captureEvent = core.captureEvent; -exports.captureException = core.captureException; -exports.captureMessage = core.captureMessage; -exports.captureSession = core.captureSession; -exports.close = core.close; -exports.configureScope = core.configureScope; -exports.continueTrace = core.continueTrace; -exports.createTransport = core.createTransport; -exports.endSession = core.endSession; -exports.extractTraceparentData = core.extractTraceparentData; -exports.flush = core.flush; -exports.functionToStringIntegration = core.functionToStringIntegration; -exports.getActiveSpan = core.getActiveSpan; -exports.getActiveTransaction = core.getActiveTransaction; -exports.getClient = core.getClient; -exports.getCurrentHub = core.getCurrentHub; -exports.getCurrentScope = core.getCurrentScope; -exports.getGlobalScope = core.getGlobalScope; -exports.getHubFromCarrier = core.getHubFromCarrier; -exports.getIsolationScope = core.getIsolationScope; -exports.getSpanStatusFromHttpCode = core.getSpanStatusFromHttpCode; -exports.inboundFiltersIntegration = core.inboundFiltersIntegration; -exports.isInitialized = core.isInitialized; -exports.lastEventId = core.lastEventId; -exports.linkedErrorsIntegration = core.linkedErrorsIntegration; -exports.makeMain = core.makeMain; -exports.metrics = core.metrics; -exports.parameterize = core.parameterize; -exports.requestDataIntegration = core.requestDataIntegration; -exports.runWithAsyncContext = core.runWithAsyncContext; -exports.setContext = core.setContext; -exports.setCurrentClient = core.setCurrentClient; -exports.setExtra = core.setExtra; -exports.setExtras = core.setExtras; -exports.setHttpStatus = core.setHttpStatus; -exports.setMeasurement = core.setMeasurement; -exports.setTag = core.setTag; -exports.setTags = core.setTags; -exports.setUser = core.setUser; -exports.spanStatusfromHttpCode = core.spanStatusfromHttpCode; -exports.startActiveSpan = core.startActiveSpan; -exports.startInactiveSpan = core.startInactiveSpan; -exports.startSession = core.startSession; -exports.startSpan = core.startSpan; -exports.startSpanManual = core.startSpanManual; -exports.startTransaction = core.startTransaction; -exports.trace = core.trace; -exports.withActiveSpan = core.withActiveSpan; -exports.withIsolationScope = core.withIsolationScope; -exports.withMonitor = core.withMonitor; -exports.withScope = core.withScope; -exports.autoDiscoverNodePerformanceMonitoringIntegrations = index.autoDiscoverNodePerformanceMonitoringIntegrations; -exports.NodeClient = client.NodeClient; -exports.makeNodeTransport = http.makeNodeTransport; -exports.defaultIntegrations = sdk.defaultIntegrations; -exports.defaultStackParser = sdk.defaultStackParser; -exports.getDefaultIntegrations = sdk.getDefaultIntegrations; -exports.getSentryRelease = sdk.getSentryRelease; -exports.init = sdk.init; -exports.DEFAULT_USER_INCLUDES = utils.DEFAULT_USER_INCLUDES; -exports.addRequestDataToEvent = utils.addRequestDataToEvent; -exports.extractRequestData = utils.extractRequestData; -exports.deepReadDirSync = utils$1.deepReadDirSync; -exports.createGetModuleFromFilename = module$1.createGetModuleFromFilename; -exports.enableAnrDetection = legacy.enableAnrDetection; -exports.Handlers = handlers; -exports.captureConsoleIntegration = integrations.captureConsoleIntegration; -exports.debugIntegration = integrations.debugIntegration; -exports.dedupeIntegration = integrations.dedupeIntegration; -exports.extraErrorDataIntegration = integrations.extraErrorDataIntegration; -exports.httpClientIntegration = integrations.httpClientIntegration; -exports.reportingObserverIntegration = integrations.reportingObserverIntegration; -exports.rewriteFramesIntegration = integrations.rewriteFramesIntegration; -exports.sessionTimingIntegration = integrations.sessionTimingIntegration; -exports.consoleIntegration = console.consoleIntegration; -exports.onUncaughtExceptionIntegration = onuncaughtexception.onUncaughtExceptionIntegration; -exports.onUnhandledRejectionIntegration = onunhandledrejection.onUnhandledRejectionIntegration; -exports.modulesIntegration = modules.modulesIntegration; -exports.contextLinesIntegration = contextlines.contextLinesIntegration; -exports.nodeContextIntegration = context.nodeContextIntegration; -exports.localVariablesIntegration = index$1.localVariablesIntegration; -exports.spotlightIntegration = spotlight.spotlightIntegration; -exports.anrIntegration = index$2.anrIntegration; -exports.hapiErrorPlugin = index$3.hapiErrorPlugin; -exports.hapiIntegration = index$3.hapiIntegration; -exports.Undici = index$4.Undici; -exports.nativeNodeFetchintegration = index$4.nativeNodeFetchintegration; -exports.Http = http$1.Http; -exports.httpIntegration = http$1.httpIntegration; -exports.trpcMiddleware = trpc.trpcMiddleware; -exports.Integrations = Integrations; -exports.cron = cron; -exports.getModuleFromFilename = getModuleFromFilename; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 87359: -/***/ ((module, exports, __nccwpck_require__) => { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -var { - _optionalChain, - _optionalChainDelete -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const url = __nccwpck_require__(87016); -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const nodeVersion = __nccwpck_require__(68047); -const workerScript = __nccwpck_require__(39309); - -const DEFAULT_INTERVAL = 50; -const DEFAULT_HANG_THRESHOLD = 5000; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/nodeVersion.js +var NODE_VERSION; +var init_nodeVersion = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/nodeVersion.js"() { + init_esm(); + NODE_VERSION = parseSemver(process.versions.node); + } +}); -function log(message, ...args) { - utils.logger.log(`[ANR] ${message}`, ...args); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/domain.js +import * as domain from "domain"; +function getActiveDomain() { + return domain.active; } - -function globalWithScopeFetchFn() { - return utils.GLOBAL_OBJ; +function getCurrentHub2() { + const activeDomain = getActiveDomain(); + if (!activeDomain) { + return void 0; + } + ensureHubOnCarrier(activeDomain); + return getHubFromCarrier(activeDomain); } - -/** Fetches merged scope data */ -function getScopeData() { - const scope = core.getGlobalScope().getScopeData(); - core.mergeScopeData(scope, core.getIsolationScope().getScopeData()); - core.mergeScopeData(scope, core.getCurrentScope().getScopeData()); - - // We remove attachments because they likely won't serialize well as json - scope.attachments = []; - // We can't serialize event processor functions - scope.eventProcessors = []; - - return scope; +function createNewHub(parent) { + const carrier = {}; + ensureHubOnCarrier(carrier, parent); + return getHubFromCarrier(carrier); } - -/** - * We need to use dynamicRequire because worker_threads is not available in node < v12 and webpack error will when - * targeting those versions - */ -function getWorkerThreads() { - return utils.dynamicRequire(module, 'worker_threads'); +function runWithAsyncContext2(callback, options2) { + const activeDomain = getActiveDomain(); + if (activeDomain && _optionalChain([options2, "optionalAccess", (_) => _.reuseExisting])) { + return callback(); + } + const local = domain.create(); + const parentHub = activeDomain ? getHubFromCarrier(activeDomain) : void 0; + const newHub = createNewHub(parentHub); + setHubOnCarrier(local, newHub); + return local.bind(() => { + return callback(); + })(); } - -/** - * Gets contexts by calling all event processors. This relies on being called after all integrations are setup - */ -async function getContexts(client) { - let event = { message: 'ANR' }; - const eventHint = {}; - - for (const processor of client.getEventProcessors()) { - if (event === null) break; - event = await processor(event, eventHint); +function setDomainAsyncContextStrategy() { + setAsyncContextStrategy({ getCurrentHub: getCurrentHub2, runWithAsyncContext: runWithAsyncContext2 }); +} +var init_domain = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/domain.js"() { + init_esm(); + init_esm2(); } +}); - return _optionalChain([event, 'optionalAccess', _2 => _2.contexts]) || {}; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/hooks.js +import * as async_hooks from "async_hooks"; +function setHooksAsyncContextStrategy() { + if (!asyncStorage) { + asyncStorage = new async_hooks.AsyncLocalStorage(); + } + function getCurrentHub3() { + return asyncStorage.getStore(); + } + function createNewHub2(parent) { + const carrier = {}; + ensureHubOnCarrier(carrier, parent); + return getHubFromCarrier(carrier); + } + function runWithAsyncContext3(callback, options2) { + const existingHub = getCurrentHub3(); + if (existingHub && _optionalChain([options2, "optionalAccess", (_) => _.reuseExisting])) { + return callback(); + } + const newHub = createNewHub2(existingHub); + return asyncStorage.run(newHub, () => { + return callback(); + }); + } + setAsyncContextStrategy({ getCurrentHub: getCurrentHub3, runWithAsyncContext: runWithAsyncContext3 }); } - -const INTEGRATION_NAME = 'Anr'; - -const _anrIntegration = ((options = {}) => { - if (nodeVersion.NODE_VERSION.major < 16 || (nodeVersion.NODE_VERSION.major === 16 && nodeVersion.NODE_VERSION.minor < 17)) { - throw new Error('ANR detection requires Node 16.17.0 or later'); +var asyncStorage; +var init_hooks = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/hooks.js"() { + init_esm(); + init_esm2(); } +}); - let worker; - let client; - - // Hookup the scope fetch function to the global object so that it can be called from the worker thread via the - // debugger when it pauses - const gbl = globalWithScopeFetchFn(); - gbl.__SENTRY_GET_SCOPES__ = getScopeData; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - startWorker: () => { - if (worker) { - return; - } - - if (client) { - worker = _startWorker(client, options); - } - }, - stopWorker: () => { - if (worker) { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - worker.then(stop => { - stop(); - worker = undefined; - }); - } - }, - setup(initClient) { - client = initClient; - - // setImmediate is used to ensure that all other integrations have had their setup called first. - // This allows us to call into all integrations to fetch the full context - setImmediate(() => this.startWorker()); - }, - } ; -}) ; - -const anrIntegration = core.defineIntegration(_anrIntegration) ; - -/** - * Starts a thread to detect App Not Responding (ANR) events - * - * ANR detection requires Node 16.17.0 or later - * - * @deprecated Use `anrIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Anr = core.convertIntegrationFnToClass(INTEGRATION_NAME, anrIntegration) - -; - -// eslint-disable-next-line deprecation/deprecation - -/** - * Starts the ANR worker thread - */ -async function _startWorker( - client, - integrationOptions, -) { - const dsn = client.getDsn(); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/index.js +function setNodeAsyncContextStrategy() { + if (NODE_VERSION.major >= 14) { + setHooksAsyncContextStrategy(); + } else { + setDomainAsyncContextStrategy(); + } +} +var init_async = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/async/index.js"() { + init_nodeVersion(); + init_domain(); + init_hooks(); + } +}); - if (!dsn) { - return () => { - // +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/console.js +import * as util from "util"; +var INTEGRATION_NAME6, _consoleIntegration, consoleIntegration, Console; +var init_console2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/console.js"() { + init_esm2(); + init_esm(); + INTEGRATION_NAME6 = "Console"; + _consoleIntegration = () => { + return { + name: INTEGRATION_NAME6, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + addConsoleInstrumentationHandler(({ args, level }) => { + if (getClient() !== client) { + return; + } + addBreadcrumb( + { + category: "console", + level: severityLevelFromString(level), + message: util.format.apply(void 0, args) + }, + { + input: [...args], + level + } + ); + }); + } + }; }; + consoleIntegration = defineIntegration(_consoleIntegration); + Console = convertIntegrationFnToClass(INTEGRATION_NAME6, consoleIntegration); } +}); - const contexts = await getContexts(client); - - // These will not be accurate if sent later from the worker thread - _optionalChainDelete([contexts, 'access', _3 => _3.app, 'optionalAccess', _4 => delete _4.app_memory]); - _optionalChainDelete([contexts, 'access', _5 => _5.device, 'optionalAccess', _6 => delete _6.free_memory]); - - const initOptions = client.getOptions(); - - const sdkMetadata = client.getSdkMetadata() || {}; - if (sdkMetadata.sdk) { - sdkMetadata.sdk.integrations = initOptions.integrations.map(i => i.name); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/context.js +import { execFile } from "child_process"; +import { readFile, readdir } from "fs"; +import * as os2 from "os"; +import { join as join2 } from "path"; +import { promisify } from "util"; +function _updateContext(contexts) { + if (_optionalChain([contexts, "optionalAccess", (_11) => _11.app, "optionalAccess", (_12) => _12.app_memory])) { + contexts.app.app_memory = process.memoryUsage().rss; } - - const options = { - debug: utils.logger.isEnabled(), - dsn, - environment: initOptions.environment || 'production', - release: initOptions.release, - dist: initOptions.dist, - sdkMetadata, - appRootPath: integrationOptions.appRootPath, - pollInterval: integrationOptions.pollInterval || DEFAULT_INTERVAL, - anrThreshold: integrationOptions.anrThreshold || DEFAULT_HANG_THRESHOLD, - captureStackTrace: !!integrationOptions.captureStackTrace, - staticTags: integrationOptions.staticTags || {}, - contexts, - }; - - if (options.captureStackTrace) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const inspector = __nccwpck_require__(50264); - if (!inspector.url()) { - inspector.open(0); - } + if (_optionalChain([contexts, "optionalAccess", (_13) => _13.device, "optionalAccess", (_14) => _14.free_memory])) { + contexts.device.free_memory = os2.freemem(); } - - const { Worker } = getWorkerThreads(); - - const worker = new Worker(new url.URL(`data:application/javascript;base64,${workerScript.base64WorkerScript}`), { - workerData: options, - }); - - process.on('exit', () => { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - worker.terminate(); - }); - - const timer = setInterval(() => { - try { - const currentSession = core.getCurrentScope().getSession(); - // We need to copy the session object and remove the toJSON method so it can be sent to the worker - // serialized without making it a SerializedSession - const session = currentSession ? { ...currentSession, toJSON: undefined } : undefined; - // message the worker to tell it the main event loop is still running - worker.postMessage({ session }); - } catch (_) { - // + return contexts; +} +async function getOsContext() { + const platformId = os2.platform(); + switch (platformId) { + case "darwin": + return getDarwinInfo(); + case "linux": + return getLinuxInfo(); + default: + return { + name: PLATFORM_NAMES[platformId] || platformId, + version: os2.release() + }; + } +} +function getCultureContext() { + try { + if (typeof process.versions.icu !== "string") { + return; } - }, options.pollInterval); - // Timer should not block exit - timer.unref(); - - worker.on('message', (msg) => { - if (msg === 'session-ended') { - log('ANR event sent from ANR worker. Clearing session in this thread.'); - core.getCurrentScope().setSession(undefined); + const january = /* @__PURE__ */ new Date(9e8); + const spanish = new Intl.DateTimeFormat("es", { month: "long" }); + if (spanish.format(january) === "enero") { + const options2 = Intl.DateTimeFormat().resolvedOptions(); + return { + locale: options2.locale, + timezone: options2.timeZone + }; } - }); - - worker.once('error', (err) => { - clearInterval(timer); - log('ANR worker error', err); - }); - - worker.once('exit', (code) => { - clearInterval(timer); - log('ANR worker exit', code); - }); - - // Ensure this thread can't block app exit - worker.unref(); - - return () => { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - worker.terminate(); - clearInterval(timer); - }; + } catch (err) { + } + return; } - -exports.Anr = Anr; -exports.anrIntegration = anrIntegration; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 53832: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const index = __nccwpck_require__(87359); - -// TODO (v8): Remove this entire file and the `enableAnrDetection` export - -/** - * @deprecated Use the `Anr` integration instead. - * - * ```ts - * import * as Sentry from '@sentry/node'; - * - * Sentry.init({ - * dsn: '__DSN__', - * integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })], - * }); - * ``` - */ -function enableAnrDetection(options) { - const client = core.getClient() ; - // eslint-disable-next-line deprecation/deprecation - const integration = new index.Anr(options); - integration.setup(client); - return Promise.resolve(); +function getAppContext() { + const app_memory = process.memoryUsage().rss; + const app_start_time = new Date(Date.now() - process.uptime() * 1e3).toISOString(); + return { app_start_time, app_memory }; } - -exports.enableAnrDetection = enableAnrDetection; -//# sourceMappingURL=legacy.js.map - - -/***/ }), - -/***/ 39309: -/***/ ((__unused_webpack_module, exports) => { - -/*! @sentry/node 7.120.0 (611282e) | https://github.com/getsentry/sentry-javascript */ -exports.base64WorkerScript="aW1wb3J0IHsgU2Vzc2lvbiB9IGZyb20gJ2luc3BlY3Rvcic7CmltcG9ydCB7IHdvcmtlckRhdGEsIHBhcmVudFBvcnQgfSBmcm9tICd3b3JrZXJfdGhyZWFkcyc7CmltcG9ydCB7IHBvc2l4LCBzZXAgfSBmcm9tICdwYXRoJzsKaW1wb3J0ICogYXMgaHR0cCBmcm9tICdodHRwJzsKaW1wb3J0ICogYXMgaHR0cHMgZnJvbSAnaHR0cHMnOwppbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gJ3N0cmVhbSc7CmltcG9ydCB7IFVSTCB9IGZyb20gJ3VybCc7CmltcG9ydCB7IGNyZWF0ZUd6aXAgfSBmcm9tICd6bGliJzsKaW1wb3J0ICogYXMgbmV0IGZyb20gJ25ldCc7CmltcG9ydCAqIGFzIHRscyBmcm9tICd0bHMnOwoKLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC91bmJvdW5kLW1ldGhvZApjb25zdCBvYmplY3RUb1N0cmluZyA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmc7CgovKioKICogQ2hlY2tzIHdoZXRoZXIgZ2l2ZW4gdmFsdWUncyB0eXBlIGlzIG9uZSBvZiBhIGZldyBFcnJvciBvciBFcnJvci1saWtlCiAqIHtAbGluayBpc0Vycm9yfS4KICoKICogQHBhcmFtIHdhdCBBIHZhbHVlIHRvIGJlIGNoZWNrZWQuCiAqIEByZXR1cm5zIEEgYm9vbGVhbiByZXByZXNlbnRpbmcgdGhlIHJlc3VsdC4KICovCmZ1bmN0aW9uIGlzRXJyb3Iod2F0KSB7CiAgc3dpdGNoIChvYmplY3RUb1N0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X2luaXQzLmNhbGwodGhpcyk7U3luY1Byb21pc2UucHJvdG90eXBlLl9faW5pdDQuY2FsbCh0aGlzKTsKICAgIHRoaXMuX3N0YXRlID0gU3RhdGVzLlBFTkRJTkc7CiAgICB0aGlzLl9oYW5kbGVycyA9IFtdOwoKICAgIHRyeSB7CiAgICAgIGV4ZWN1dG9yKHRoaXMuX3Jlc29sdmUsIHRoaXMuX3JlamVjdCk7CiAgICB9IGNhdGNoIChlKSB7CiAgICAgIHRoaXMuX3JlamVjdChlKTsKICAgIH0KICB9CgogIC8qKiBKU0RvYyAqLwogICB0aGVuKAogICAgb25mdWxmaWxsZWQsCiAgICBvbnJlamVjdGVkLAogICkgewogICAgcmV0dXJuIG5ldyBTeW5jUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgIHRoaXMuX2hhbmRsZXJzLnB1c2goWwogICAgICAgIGZhbHNlLAogICAgICAgIHJlc3VsdCA9PiB7CiAgICAgICAgICBpZiAoIW9uZnVsZmlsbGVkKSB7CiAgICAgICAgICAgIC8vIFRPRE86IMKvXF8o44OEKV8vwq8KICAgICAgICAgICAgLy8gVE9ETzogRklYTUUKICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQgKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgcmVzb2x2ZShvbmZ1bGZpbGxlZChyZXN1bHQpKTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgIHJlamVjdChlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgcmVhc29uID0+IHsKICAgICAgICAgIGlmICghb25yZWplY3RlZCkgewogICAgICAgICAgICByZWplY3QocmVhc29uKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgcmVzb2x2ZShvbnJlamVjdGVkKHJlYXNvbikpOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgcmVqZWN0KGUpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgXSk7CiAgICAgIHRoaXMuX2V4ZWN1dGVIYW5kbGVycygpOwogICAgfSk7CiAgfQoKICAvKiogSlNEb2MgKi8KICAgY2F0Y2goCiAgICBvbnJlamVjdGVkLAogICkgewogICAgcmV0dXJuIHRoaXMudGhlbih2YWwgPT4gdmFsLCBvbnJlamVjdGVkKTsKICB9CgogIC8qKiBKU0RvYyAqLwogICBmaW5hbGx5KG9uZmluYWxseSkgewogICAgcmV0dXJuIG5ldyBTeW5jUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgIGxldCB2YWw7CiAgICAgIGxldCBpc1JlamVjdGVkOwoKICAgICAgcmV0dXJuIHRoaXMudGhlbigKICAgICAgICB2YWx1ZSA9PiB7CiAgICAgICAgICBpc1JlamVjdGVkID0gZmFsc2U7CiAgICAgICAgICB2YWwgPSB2YWx1ZTsKICAgICAgICAgIGlmIChvbmZpbmFsbHkpIHsKICAgICAgICAgICAgb25maW5hbGx5KCk7CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICByZWFzb24gPT4gewogICAgICAgICAgaXNSZWplY3RlZCA9IHRydWU7CiAgICAgICAgICB2YWwgPSByZWFzb247CiAgICAgICAgICBpZiAob25maW5hbGx5KSB7CiAgICAgICAgICAgIG9uZmluYWxseSgpOwogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICkudGhlbigoKSA9PiB7CiAgICAgICAgaWYgKGlzUmVqZWN0ZWQpIHsKICAgICAgICAgIHJlamVjdCh2YWwpOwogICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KCiAgICAgICAgcmVzb2x2ZSh2YWwgKTsKICAgICAgfSk7CiAgICB9KTsKICB9CgogIC8qKiBKU0RvYyAqLwogICAgX19pbml0KCkge3RoaXMuX3Jlc29sdmUgPSAodmFsdWUpID0+IHs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0UmVxdWVzdFNlc3Npb24oKSB7CiAgICByZXR1cm4gdGhpcy5fcmVxdWVzdFNlc3Npb247CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRSZXF1ZXN0U2Vzc2lvbihyZXF1ZXN0U2Vzc2lvbikgewogICAgdGhpcy5fcmVxdWVzdFNlc3Npb24gPSByZXF1ZXN0U2Vzc2lvbjsKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgc2V0VGFncyh0YWdzKSB7CiAgICB0aGlzLl90YWdzID0gewogICAgICAuLi50aGlzLl90YWdzLAogICAgICAuLi50YWdzLAogICAgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldFRhZyhrZXksIHZhbHVlKSB7CiAgICB0aGlzLl90YWdzID0geyAuLi50aGlzLl90YWdzLCBba2V5XTogdmFsdWUgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldEV4dHJhcyhleHRyYXMpIHsKICAgIHRoaXMuX2V4dHJhID0gewogICAgICAuLi50aGlzLl9leHRyYSwKICAgICAgLi4uZXh0cmFzLAogICAgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldEV4dHJhKGtleSwgZXh0cmEpIHsKICAgIHRoaXMuX2V4dHJhID0geyAuLi50aGlzLl9leHRyYSwgW2tleV06IGV4dHJhIH07CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRGaW5nZXJwcmludChmaW5nZXJwcmludCkgewogICAgdGhpcy5fZmluZ2VycHJpbnQgPSBmaW5nZXJwcmludDsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldExldmVsKAogICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgICBsZXZlbCwKICApIHsKICAgIHRoaXMuX2xldmVsID0gbGV2ZWw7CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBTZXRzIHRoZSB0cmFuc2FjdGlvbiBuYW1lIG9uIHRoZSBzY29wZSBmb3IgZnV0dXJlIGV2ZW50cy4KICAgKi8KICAgc2V0VHJhbnNhY3Rpb25OYW1lKG5hbWUpIHsKICAgIHRoaXMuX3RyYW5zYWN0aW9uTmFtZSA9IG5hbWU7CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRDb250ZXh0KGtleSwgY29udGV4dCkgewogICAgaWYgKGNvbnRleHQgPT09IG51bGwpIHsKICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1keW5hbWljLWRlbGV0ZQogICAgICBkZWxldGUgdGhpcy5fY29udGV4dHNba2V5XTsKICAgIH0gZWxzZSB7CiAgICAgIHRoaXMuX2NvbnRleHRzW2tleV0gPSBjb250ZXh0OwogICAgfQoKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC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uLnRoaXMuX3RhZ3MsIC4uLnNjb3BlQ29udGV4dC50YWdzIH07CiAgICAgIHRoaXMuX2V4dHJhID0geyAuLi50aGlzLl9leHRyYSwgLi4uc2NvcGVDb250ZXh0LmV4dHJhIH07CiAgICAgIHRoaXMuX2NvbnRleHRzID0geyAuLi50aGlzLl9jb250ZXh0cywgLi4uc2NvcGVDb250ZXh0LmNvbnRleHRzIH07CiAgICAgIGlmIChzY29wZUNvbnRleHQudXNlcikgewogICAgICAgIHRoaXMuX3VzZXIgPSBzY29wZUNvbnRleHQudXNlcjsKICAgICAgfQogICAgICBpZiAoc2NvcGVDb250ZXh0LmxldmVsKSB7CiAgICAgICAgdGhpcy5fbGV2ZWwgPSBzY29wZUNvbnRleHQubGV2ZWw7CiAgICAgIH0KICAgICAgaWYgKHNjb3BlQ29udGV4dC5maW5nZXJwcmludCkgewogICAgICAgIHRoaXMuX2ZpbmdlcnByaW50ID0gc2NvcGVDb250ZXh0LmZpbmdlcnByaW50OwogICAgICB9CiAgICAgIGlmIChzY29wZUNvbnRleHQucmVxdWVzdFNlc3Npb24pIHsKICAgICAgICB0aGlzLl9yZXF1ZXN0U2Vzc2lvbiA9IHNjb3BlQ29udGV4dC5yZXF1ZXN0U2Vzc2lvbjsKICAgICAgfQogICAgICBpZiAoc2NvcGVDb250ZXh0LnByb3BhZ2F0aW9uQ29udGV4dCkgewogICAgICAgIHRoaXMuX3Byb3BhZ2F0aW9uQ29udGV4dCA9IHNjb3BlQ29udGV4dC5wcm9wYWdhdGlvbkNvbnRleHQ7CiAgICAgIH0KICAgIH0KCiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIGNsZWFyKCkgewogICAgdGhpcy5fYnJlYWRjcnVtYnMgPSBbXTsKICAgIHRoaXMuX3RhZ3MgPSB7fTsKICAgIHRoaXMuX2V4dHJhID0ge307CiAgICB0aGlzLl91c2VyID0ge307CiAgICB0aGlzLl9jb250ZXh0cyA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ydW1iKTsKICAgIHRoaXMuX2JyZWFkY3J1bWJzID0gYnJlYWRjcnVtYnMubGVuZ3RoID4gbWF4Q3J1bWJzID8gYnJlYWRjcnVtYnMuc2xpY2UoLW1heENydW1icykgOiBicmVhZGNydW1iczsKCiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwoKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgZ2V0TGFzdEJyZWFkY3J1bWIoKSB7CiAgICByZXR1cm4gdGhpcy5fYnJlYWRjcnVtYnNbdGhpcy5fYnJlYWRjcnVtYnMubGVuZ3RoIC0gMV07CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBjbGVhckJyZWFkY3J1bWJzKCkgewogICAgdGhpcy5fYnJlYWRjcnVtYnMgPSBbXTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIGFkZEF0dGFjaG1lbnQoYXR0YWNobWVudCkgewogICAgdGhpcy5fYXR0YWNobWVudHMucHVzaChhdHRhY2htZW50KTsKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKiBAZGVwcmVjYXRlZCBVc2UgYGdldFNjb3BlRGF0YSgpYCBpbnN0ZWFkLgogICAqLwogICBnZXRBdHRhY2htZW50cygpIHsKICAgIGNvbnN0IGRhdGEgPSB0aGlzLmdldFNjb3BlRGF0YSgpOwoKICAgIHJldHVybiBkYXRhLmF0dGFjaG1lbnRzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgY2xlYXJBdHRhY2htZW50cygpIHsKICAgIHRoaXMuX2F0dGFjaG1lbnRzID0gW107CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKiBAaW5oZXJpdERvYyAqLwogICBnZXRTY29wZURhdGEoKSB7CiAgICBjb25zdCB7CiAgICAgIF9icmVhZGNydW1icywKICAgICAgX2F0dGFjaG1lbnRzLAogICAgICBfY29udGV4dHMsCiAgICAgIF90YWdzLAogICAgICBfZXh0cmEsCiAgICAgIF91c2VyLAogICAgICBfbGV2ZWwsCiAgICAgIF9maW5nZXJwcmludCwKICAgICAgX2V2ZW50UHJvY2Vzc29ycywKICAgICAgX3Byb3BhZ2F0aW9uQ29udGV4dCwKICAgICAgX3Nka1Byb2Nlc3NpbmdNZXRhZGF0YSwKICAgICAgX3RyYW5zYWN0aW9uTmFtZSwKICAgICAgX3NwYW4sCiAgICB9ID0gdGhpczsKCiAgICByZXR1cm4gewogICAgICBicmVhZGNydW1iczogX2JyZWFkY3J1bWJzLAogICAgICBhdHRhY2htZW50czogX2F0dGFjaG1lbnRzLAogICAgICBjb250ZXh0czogX2NvbnRleHRzLAogICAgICB0YWdzOiBfdGFncywKICAgICAgZXh0cmE6IF9leHRyYSwKICAgICAgdXNlcjogX3VzZXIsCiAgICAgIGxldmVsOiBfbGV2ZWwsCiAgICAgIGZpbmdlcnByaW50OiBfZmluZ2VycHJpbnQgfHwgW10sCiAgICAgIGV2ZW50UHJvY2Vzc29yczogX2V2ZW50UHJvY2Vzc29ycywKICAgICAgcHJvcGFnYXRpb25Db250ZXh0OiBfcHJvcGFnYXRpb25Db250ZXh0LAogICAgICBzZGtQcm9jZXNzaW5nTWV0YWRhdGE6IF9zZGtQcm9jZXNzaW5nTWV0YWRhdGEsCiAgICAgIHRyYW5zYWN0aW9uTmFtZTogX3RyYW5zYWN0aW9uTmFtZSwKICAgICAgc3BhbjogX3NwYW4sCiAgICB9OwogIH0KCiAgLyoqCiAgICogQXBwbGllcyBkYXRhIGZyb20gdGhlIHNjb3BlIHRvIHRoZSBldmVudCBhbmQgcnVucyBhbGwgZXZlbnQgcHJvY2Vzc29ycyBvbiBpdC4KICAgKgogICAqIEBwYXJhbSBldmVudCBFdmVudAogICAqIEBwYXJhbS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U0RLLgogICAqCiAgICogSWYgeW91IGFyZSBjdXJyZW50bHkgdXNpbmcgdGhlIEh1YiBmb3IgbXVsdGktY2xpZW50IHVzZSBsaWtlIHNvOgogICAqCiAgICogYGBgCiAgICogLy8gT0xECiAgICogY29uc3QgaHViID0gbmV3IEh1YigpOwogICAqIGh1Yi5iaW5kQ2xpZW50KGNsaWVudCk7CiAgICogbWFrZU1haW4oaHViKQogICAqIGBgYAogICAqCiAgICogaW5zdGVhZCBpbml0aWFsaXplIHRoZSBjbGllbnQgYXMgZm9sbG93czoKICAgKgogICAqIGBgYAogICAqIC8vIE5FVwogICAqIFNlbnRyeS53aXRoSXNvbGF0aW9uU2NvcGUoKCkgPT4gewogICAqICAgIFNlbnRyeS5zZXRDdXJyZW50Q2xpZW50KGNsaWVudCk7CiAgICogICAgY2xpZW50LmluaXQoKTsKICAgKiB9KTsKICAgKiBgYGAKICAgKgogICAqIElmIHlvdSBhcmUgdXNpbmcgdGhlIEh1YiB0byBjYXB0dXJlIGV2ZW50cyBsaWtlIHNvOgogICAqCiAgICogYGBgCiAgICogLy8gT0xECiAgICogY29uc3QgY2xpZW50ID0gbmV3IENsaWVudCgpOwogICAqIGNvbnN0IGh1YiA9IG5ldyBIdWIoY2xpZW50KTsKICAgKiBodWIuY2FwdHVyZUV4Y2VwdGlvbigpCiAgICogYGBgCiAgICoKICAgKiBpbnN0ZWFkIGNhcHR1cmUgaXNvbGF0ZWQgZXZlbnRzIGFzIGZvbGxvd3M6CiAgICoKICAgKiBgYGAKICAgKiAvLyBORVcKICAgKiBjb25zdCBjbGllbnQgPSBuZXcgQ2xpZW50KCk7CiAgICogY29uc3Qgc2NvcGUgPSBuZXcgU2NvcGUoKTsKICAgKiBzY29wZS5zZXRDbGllbnQoY2xpZW50KTsKICAgKiBzY29wZS5jYXB0dXJlRXhjZXB0aW9uKCk7CiAgICogYGBgCiAgICovCiAgIGNvbnN0cnVjdG9yKAogICAgY2xpZW50LAogICAgc2NvcGUsCiAgICBpc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ICBjb25zdCBzY29wZSA9IHRoaXMucHVzaFNjb3BlKCk7CgogICAgbGV0IG1heWJlUHJvbWlzZVJlc3VsdDsKICAgIHRyeSB7CiAgICAgIG1heWJlUHJvbWlzZVJlc3VsdCA9IGNhbGxiYWNrKHNjb3BlKTsKICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgICAgIHRoaXMucG9wU2NvcGUoKTsKICAgICAgdGhyb3cgZTsKICAgIH0KCiAgICBpZiAoaXNUaGVuYWJsZShtYXliZVByb21pc2VSZXN1bHQpKSB7CiAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3IgLSBpc1RoZW5hYmxlIHJldHVybnMgdGhlIHdyb25nIHR5cGUKICAgICAgcmV0dXJuIG1heWJlUHJvbWlzZVJlc3VsdC50aGVuKAogICAgICAgIHJlcyA9PiB7CiAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgZGVwcmVjYXRpb24vZGVwcmVjYXRpb24KICAgICAgICAgIHRoaXMucG9wU2NvcGUoKTsKICAgICAgICAgIHJldHVybiByZXM7CiAgICAgICAgfSwKICAgICAgICBlID0+IHsKICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBkZXByZWNhdGlvbi9kZXByZWNhdGlvbgogICAgICAgICAgdGhpcy5wb3BTY29wZSgpOwogICAgICAgICAgdGhyb3cgZTsKICAgICAgICB9LAogICAgICApOwogICAgfQoKICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBkZXByZWNhdGlvbi9kZXByZWNhdGlvbgogICAgdGhpcy5wb3BTY29wZSgpOwogICAgcmV0dXJuIG1heWJlUHJvbWlzZVJlc3VsdDsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICoKICAgKiBAZGVwcmVjYXRlZCBVc2UgYFNlbnRyeS5nZXRDbGllbn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250ZXh0KTsKICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBkZXByZWNhdGlvbi9kZXByZWNhdGlvbgogICAgdGhpcy5nZXRJc29sYXRpb25TY29wZSgpLnNldENvbnRleHQobmFtZSwgY29udGV4dCk7CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqCiAgICogQGRlcHJlY2F0ZWQgVXNlIGBnZXRTY29wZSgpYCBkaXJlY3RseS4KICAgKi8KICAgY29uZmlndXJlU2NvcGUoY2FsbGJhY2spIHsKICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBkZXByZWNhdGlvbi9kZXByZWNhdGlvbgogICAgY29uc3QgeyBzY29wZSwgY2xpZW50IH0gPSB0aGlzLmdldFN0YWNrVG9wKCk7CiAgICBpZiAoY2xpZW50KSB7CiAgICAgIGNhbGxiYWNrKHNjb3BlKTsKICAgIH0KICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgIHJ1bihjYWxsYmFjaykgewogICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgICBjb25zdCBvbGRIdWIgPSBtYWtlTWFpbih0aGlzKTsKICAgIHRyeSB7CiAgICAgIGNhbGxiYWNrKHRoaXMpOwogICAgfSBmaW5hbGx5IHsKICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgICAgIG1ha2VNYWluKG9sZEh1Yik7CiAgICB9CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqIEBkZXByZWNhdGVkIFVzZSBgU2VudHJ5LmdldENsaWVudCgpLmdldEludGVncmF0aW9uQnlOYW1lKClgIGluc3RlYWQuCiAgICovCiAgIGdldEludGVncmF0aW9uK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7CiAgICAgICAgY29uc3QgZmlyc3RDb2xvbiA9IGhlYWRlci5pbmRleE9mKCc6Jyk7CiAgICAgICAgaWYgKGZpcnN0Q29sb24gPT09IC0xKSB7CiAgICAgICAgICBzb2NrZXQuZGVzdHJveSgpOwogICAgICAgICAgcmV0dXJuIHJlamVjdChuZXcgRXJyb3IoYEludmFsaWQgaGVhZGVyIGZyb20gcHJveHkgQ09OTkVDVCByZXNwb25zZTogIiR7aGVhZGVyfSJgKSk7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGtleSA9IGhlYWRlci5zbGljZSgwLCBmaXJzdENvbG9uKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIGNvbnN0IHZhbHVlID0gaGVhZGVyLnNsaWNlKGZpcnN0Q29sb24gKyAxKS50cmltU3RhcnQoKTsKICAgICAgICBjb25zdCBjdXJyZW50ID0gaGVhZGVyc1trZXldOwogICAgICAgIGlmICh0eXBlb2YgY3VycmVudCA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgIGhlYWRlcnNba2V5XSA9IFtjdXJyZW50LCB2YWx1ZV07CiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KGN1cnJlbnQpKSB7CiAgICAgICAgICBjdXJyZW50LnB1c2godmFsdWUpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZGVidWckMSgnZ290IHByb3h5IHNlcnZlciByZXNwb25zZTogJW8gJW8nLCBmaXJzdExpbmUsIGhlYWRlcnMpOwogICAgICBjbGVhbnVwKCk7CiAgICAgIHJlc29sdmUoewogICAgICAgIGNvbm5lY3Q6IHsKICAgICAgICAgIHN0YXR1c0NvZGUsCiAgICAgICAgICBzdGF0dXNUZXh0LAogICAgICAgICAgaGVhZGVycywKICAgICAgICB9LAogICAgICAgIGJ1ZmZlcmVkLAogICAgICB9KTsKICAgIH0KCiAgICBzb2NrZXQub24oJ2Vyc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pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICBsZXQgYm9keSA9IHN0cmVhbUZyb21Cb2R5KHJlcXVlc3QuYm9keSk7CgogICAgICBjb25zdCBoZWFkZXJzID0geyAuLi5vcHRpb25zLmhlYWRlcnMgfTsKCiAgICAgIGlmIChyZXF1ZXN0LmJvZHkubGVuZ3RoID4gR1pJUF9USFJFU0hPTEQpIHsKICAgICAgICBoZWFkZXJzWydjb250ZW50LWVuY29kaW5nJ10gPSAnZ3ppcCc7CiAgICAgICAgYm9keSA9IGJvZHkucGlwZShjcmVhdGVHemlwKCkpOwogICAgICB9CgogICAgICBjb25zdCByZXEgPSBodHRwTW9kdWxlLnJlcXVlc3QoCiAgICAgICAgewogICAgICAgICAgbWV0aG9kOiAnUE9TVCcsCiAgICAgICAgICBhZ2VudCwKICAgICAgICAgIGhlYWRlcnMsCiAgICAgICAgICBob3N0bmFtZSwKICAgICAgICAgIHBhdGg6IGAke3BhdGhuYW1lfSR7c2VhcmNofWAsCiAgICAgICAgICBwb3J0LAogICAgICAgICAgcHJvdG9jb2wsCiAgICAgICAgICBjYTogb3B0aW9ucy5jYUNlcnRzLAogICAgICAgIH0sCiAgICAgICAgcmVzID0+IHsKICAgICAgICAgIHJlcy5vbignZGF0YScsICgpID0+IHsKICAgICAgICAgICAgLy8gRHJhaW4gc29ja2V0CiAgICAgICAgICB9KTsKCiAgICAgICAgICByZXMub24oJ2VuZCcsICgpID0+IHsKICAgICAgICAgICAgLy8gRHJhaW4gc29ja2V0CiAgICAgICAgICB9KTsKCiAgICAgICAgICByZXMuc2V0RW5jb2RpbmcoJ3V0ZjgnKTsKCiAgICAgICAgICAvLyAiS2V5LXZhbHVlIHBhaXJzIG9mIGhlYWRlciBuYW1lcyBhbmQgdmFsdWVzLiBIZWFkZXIgbmFtZXMgYXJlIGxvd2VyLWNhc2VkLiIKICAgICAgICAgIC8vIGh0dHBzOi8vbm9kZWpzLm9yZy9hcGkvaHR0cC5odG1sI2h0dH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gICAgICAgc2lsZW50OiB0cnVlLAogICAgICAgICAgLy8gU2VyaWFsaXplIHRoZSByZXN1bHQgdG8ganNvbiBvdGhlcndpc2Ugb25seSBwcmltaXRpdmVzIGFyZSBzdXBwb3J0ZWQKICAgICAgICAgIHJldHVybkJ5VmFsdWU6IHRydWUsCiAgICAgICAgfSwKICAgICAgICAoZXJyLCBwYXJhbSkgPT4gewogICAgICAgICAgaWYgKGVycikgewogICAgICAgICAgICBsb2coYEVycm9yIGV4ZWN1dGluZyBzY3JpcHQ6ICcke2Vyci5tZXNzYWdlfSdgKTsKICAgICAgICAgIH0KCiAgICAgICAgICBjb25zdCBzY29wZXMgPSBwYXJhbSAmJiBwYXJhbS5yZXN1bHQgPyAocGFyYW0ucmVzdWx0LnZhbHVlICkgOiB1bmRlZmluZWQ7CgogICAgICAgICAgc2Vzc2lvbi5wb3N0KCdEZWJ1Z2dlci5yZXN1bWUnKTsKICAgICAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIuZGlzYWJsZScpOwoKICAgICAgICAgIHNlbmRBbnJFdmVudChzdGFja0ZyYW1lcywgc2NvcGVzKS50aGVuKG51bGwsICgpID0+IHsKICAgICAgICAgICAgbG9nKCdTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQuJyk7CiAgICAgICAgICB9KTsKICAgICAgICB9LAogICAgICApOwogICAgfSBjYXRjaCAoZSkgewogICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2VyLnJlc3VtZScpOwogICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2VyLmRpc2FibGUnKTsKICAgICAgdGhyb3cgZTsKICAgIH0KICB9KTsKCiAgZGVidWdnZXJQYXVzZSA9ICgpID0+IHsKICAgIHRyeSB7CiAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIuZW5hYmxlJywgKCkgPT4gewogICAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIucGF1c2UnKTsKICAgICAgfSk7CiAgICB9IGNhdGNo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2F0Y2hkb2dUaW1lb3V0KTsKCl9vcHRpb25hbENoYWluKFtwYXJlbnRQb3J0LCAnb3B0aW9uYWxBY2Nlc3MnLCBfNiA9PiBfNi5vbiwgJ2NhbGwnLCBfNyA9PiBfNygnbWVzc2FnZScsIChtc2cpID0+IHsKICBpZiAobXNnLnNlc3Npb24pIHsKICAgIHNlc3Npb24gPSBtYWtlU2Vzc2lvbihtc2cuc2Vzc2lvbik7CiAgfQoKICBwb2xsKCk7Cn0pXSk7"; - - -/***/ }), - -/***/ 48270: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const util = __nccwpck_require__(39023); -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const INTEGRATION_NAME = 'Console'; - -const _consoleIntegration = (() => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - utils.addConsoleInstrumentationHandler(({ args, level }) => { - if (core.getClient() !== client) { +function getDeviceContext(deviceOpt) { + const device = {}; + let uptime2; + try { + uptime2 = os2.uptime && os2.uptime(); + } catch (e) { + } + if (typeof uptime2 === "number") { + device.boot_time = new Date(Date.now() - uptime2 * 1e3).toISOString(); + } + device.arch = os2.arch(); + if (deviceOpt === true || deviceOpt.memory) { + device.memory_size = os2.totalmem(); + device.free_memory = os2.freemem(); + } + if (deviceOpt === true || deviceOpt.cpu) { + const cpuInfo = os2.cpus(); + if (cpuInfo && cpuInfo.length) { + const firstCpu = cpuInfo[0]; + device.processor_count = cpuInfo.length; + device.cpu_description = firstCpu.model; + device.processor_frequency = firstCpu.speed; + } + } + return device; +} +function matchFirst(regex2, text) { + const match = regex2.exec(text); + return match ? match[1] : void 0; +} +async function getDarwinInfo() { + const darwinInfo = { + kernel_version: os2.release(), + name: "Mac OS X", + version: `10.${Number(os2.release().split(".")[0]) - 4}` + }; + try { + const output = await new Promise((resolve4, reject) => { + execFile("/usr/bin/sw_vers", (error, stdout) => { + if (error) { + reject(error); return; } - - core.addBreadcrumb( - { - category: 'console', - level: utils.severityLevelFromString(level), - message: util.format.apply(undefined, args), - }, - { - input: [...args], - level, - }, - ); - }); - }, - }; -}) ; - -const consoleIntegration = core.defineIntegration(_consoleIntegration); - -/** - * Console module integration. - * @deprecated Use `consoleIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Console = core.convertIntegrationFnToClass(INTEGRATION_NAME, consoleIntegration) - -; - -// eslint-disable-next-line deprecation/deprecation - -exports.Console = Console; -exports.consoleIntegration = consoleIntegration; -//# sourceMappingURL=console.js.map - - -/***/ }), - -/***/ 49252: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const child_process = __nccwpck_require__(35317); -const fs = __nccwpck_require__(79896); -const os = __nccwpck_require__(70857); -const path = __nccwpck_require__(16928); -const util = __nccwpck_require__(39023); -const core = __nccwpck_require__(90155); - -/* eslint-disable max-lines */ - -// TODO: Required until we drop support for Node v8 -const readFileAsync = util.promisify(fs.readFile); -const readDirAsync = util.promisify(fs.readdir); - -const INTEGRATION_NAME = 'Context'; - -const _nodeContextIntegration = ((options = {}) => { - let cachedContext; - - const _options = { - app: true, - os: true, - device: true, - culture: true, - cloudResource: true, - ...options, - }; - - /** Add contexts to the event. Caches the context so we only look it up once. */ - async function addContext(event) { - if (cachedContext === undefined) { - cachedContext = _getContexts(); - } - - const updatedContext = _updateContext(await cachedContext); - - event.contexts = { - ...event.contexts, - app: { ...updatedContext.app, ..._optionalChain([event, 'access', _ => _.contexts, 'optionalAccess', _2 => _2.app]) }, - os: { ...updatedContext.os, ..._optionalChain([event, 'access', _3 => _3.contexts, 'optionalAccess', _4 => _4.os]) }, - device: { ...updatedContext.device, ..._optionalChain([event, 'access', _5 => _5.contexts, 'optionalAccess', _6 => _6.device]) }, - culture: { ...updatedContext.culture, ..._optionalChain([event, 'access', _7 => _7.contexts, 'optionalAccess', _8 => _8.culture]) }, - cloud_resource: { ...updatedContext.cloud_resource, ..._optionalChain([event, 'access', _9 => _9.contexts, 'optionalAccess', _10 => _10.cloud_resource]) }, - }; - - return event; - } - - /** Get the contexts from node. */ - async function _getContexts() { - const contexts = {}; - - if (_options.os) { - contexts.os = await getOsContext(); - } - - if (_options.app) { - contexts.app = getAppContext(); - } - - if (_options.device) { - contexts.device = getDeviceContext(_options.device); - } - - if (_options.culture) { - const culture = getCultureContext(); - - if (culture) { - contexts.culture = culture; - } - } - - if (_options.cloudResource) { - contexts.cloud_resource = getCloudResourceContext(); - } - - return contexts; - } - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - return addContext(event); - }, - }; -}) ; - -const nodeContextIntegration = core.defineIntegration(_nodeContextIntegration); - -/** - * Add node modules / packages to the event. - * @deprecated Use `nodeContextIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Context = core.convertIntegrationFnToClass(INTEGRATION_NAME, nodeContextIntegration) - -; - -// eslint-disable-next-line deprecation/deprecation - -/** - * Updates the context with dynamic values that can change - */ -function _updateContext(contexts) { - // Only update properties if they exist - if (_optionalChain([contexts, 'optionalAccess', _11 => _11.app, 'optionalAccess', _12 => _12.app_memory])) { - contexts.app.app_memory = process.memoryUsage().rss; - } - - if (_optionalChain([contexts, 'optionalAccess', _13 => _13.device, 'optionalAccess', _14 => _14.free_memory])) { - contexts.device.free_memory = os.freemem(); - } - - return contexts; -} - -/** - * Returns the operating system context. - * - * Based on the current platform, this uses a different strategy to provide the - * most accurate OS information. Since this might involve spawning subprocesses - * or accessing the file system, this should only be executed lazily and cached. - * - * - On macOS (Darwin), this will execute the `sw_vers` utility. The context - * has a `name`, `version`, `build` and `kernel_version` set. - * - On Linux, this will try to load a distribution release from `/etc` and set - * the `name`, `version` and `kernel_version` fields. - * - On all other platforms, only a `name` and `version` will be returned. Note - * that `version` might actually be the kernel version. - */ -async function getOsContext() { - const platformId = os.platform(); - switch (platformId) { - case 'darwin': - return getDarwinInfo(); - case 'linux': - return getLinuxInfo(); - default: - return { - name: PLATFORM_NAMES[platformId] || platformId, - version: os.release(), - }; - } -} - -function getCultureContext() { - try { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - if (typeof (process.versions ).icu !== 'string') { - // Node was built without ICU support - return; - } - - // Check that node was built with full Intl support. Its possible it was built without support for non-English - // locales which will make resolvedOptions inaccurate - // - // https://nodejs.org/api/intl.html#detecting-internationalization-support - const january = new Date(9e8); - const spanish = new Intl.DateTimeFormat('es', { month: 'long' }); - if (spanish.format(january) === 'enero') { - const options = Intl.DateTimeFormat().resolvedOptions(); - - return { - locale: options.locale, - timezone: options.timeZone, - }; - } - } catch (err) { - // - } - - return; -} - -function getAppContext() { - const app_memory = process.memoryUsage().rss; - const app_start_time = new Date(Date.now() - process.uptime() * 1000).toISOString(); - - return { app_start_time, app_memory }; -} - -/** - * Gets device information from os - */ -function getDeviceContext(deviceOpt) { - const device = {}; - - // Sometimes os.uptime() throws due to lacking permissions: https://github.com/getsentry/sentry-javascript/issues/8202 - let uptime; - try { - uptime = os.uptime && os.uptime(); - } catch (e) { - // noop - } - - // os.uptime or its return value seem to be undefined in certain environments (e.g. Azure functions). - // Hence, we only set boot time, if we get a valid uptime value. - // @see https://github.com/getsentry/sentry-javascript/issues/5856 - if (typeof uptime === 'number') { - device.boot_time = new Date(Date.now() - uptime * 1000).toISOString(); - } - - device.arch = os.arch(); - - if (deviceOpt === true || deviceOpt.memory) { - device.memory_size = os.totalmem(); - device.free_memory = os.freemem(); - } - - if (deviceOpt === true || deviceOpt.cpu) { - const cpuInfo = os.cpus(); - if (cpuInfo && cpuInfo.length) { - const firstCpu = cpuInfo[0]; - - device.processor_count = cpuInfo.length; - device.cpu_description = firstCpu.model; - device.processor_frequency = firstCpu.speed; - } - } - - return device; -} - -/** Mapping of Node's platform names to actual OS names. */ -const PLATFORM_NAMES = { - aix: 'IBM AIX', - freebsd: 'FreeBSD', - openbsd: 'OpenBSD', - sunos: 'SunOS', - win32: 'Windows', -}; - -/** Linux version file to check for a distribution. */ - -/** Mapping of linux release files located in /etc to distributions. */ -const LINUX_DISTROS = [ - { name: 'fedora-release', distros: ['Fedora'] }, - { name: 'redhat-release', distros: ['Red Hat Linux', 'Centos'] }, - { name: 'redhat_version', distros: ['Red Hat Linux'] }, - { name: 'SuSE-release', distros: ['SUSE Linux'] }, - { name: 'lsb-release', distros: ['Ubuntu Linux', 'Arch Linux'] }, - { name: 'debian_version', distros: ['Debian'] }, - { name: 'debian_release', distros: ['Debian'] }, - { name: 'arch-release', distros: ['Arch Linux'] }, - { name: 'gentoo-release', distros: ['Gentoo Linux'] }, - { name: 'novell-release', distros: ['SUSE Linux'] }, - { name: 'alpine-release', distros: ['Alpine Linux'] }, -]; - -/** Functions to extract the OS version from Linux release files. */ -const LINUX_VERSIONS - - = { - alpine: content => content, - arch: content => matchFirst(/distrib_release=(.*)/, content), - centos: content => matchFirst(/release ([^ ]+)/, content), - debian: content => content, - fedora: content => matchFirst(/release (..)/, content), - mint: content => matchFirst(/distrib_release=(.*)/, content), - red: content => matchFirst(/release ([^ ]+)/, content), - suse: content => matchFirst(/VERSION = (.*)\n/, content), - ubuntu: content => matchFirst(/distrib_release=(.*)/, content), -}; - -/** - * Executes a regular expression with one capture group. - * - * @param regex A regular expression to execute. - * @param text Content to execute the RegEx on. - * @returns The captured string if matched; otherwise undefined. - */ -function matchFirst(regex, text) { - const match = regex.exec(text); - return match ? match[1] : undefined; -} - -/** Loads the macOS operating system context. */ -async function getDarwinInfo() { - // Default values that will be used in case no operating system information - // can be loaded. The default version is computed via heuristics from the - // kernel version, but the build ID is missing. - const darwinInfo = { - kernel_version: os.release(), - name: 'Mac OS X', - version: `10.${Number(os.release().split('.')[0]) - 4}`, - }; - - try { - // We try to load the actual macOS version by executing the `sw_vers` tool. - // This tool should be available on every standard macOS installation. In - // case this fails, we stick with the values computed above. - - const output = await new Promise((resolve, reject) => { - child_process.execFile('/usr/bin/sw_vers', (error, stdout) => { - if (error) { - reject(error); - return; - } - resolve(stdout); + resolve4(stdout); }); }); - darwinInfo.name = matchFirst(/^ProductName:\s+(.*)$/m, output); darwinInfo.version = matchFirst(/^ProductVersion:\s+(.*)$/m, output); darwinInfo.build = matchFirst(/^BuildVersion:\s+(.*)$/m, output); } catch (e) { - // ignore } - return darwinInfo; } - -/** Returns a distribution identifier to look up version callbacks. */ function getLinuxDistroId(name) { - return name.split(' ')[0].toLowerCase(); + return name.split(" ")[0].toLowerCase(); } - -/** Loads the Linux operating system context. */ async function getLinuxInfo() { - // By default, we cannot assume anything about the distribution or Linux - // version. `os.release()` returns the kernel version and we assume a generic - // "Linux" name, which will be replaced down below. const linuxInfo = { - kernel_version: os.release(), - name: 'Linux', + kernel_version: os2.release(), + name: "Linux" }; - try { - // We start guessing the distribution by listing files in the /etc - // directory. This is were most Linux distributions (except Knoppix) store - // release files with certain distribution-dependent meta data. We search - // for exactly one known file defined in `LINUX_DISTROS` and exit if none - // are found. In case there are more than one file, we just stick with the - // first one. - const etcFiles = await readDirAsync('/etc'); - const distroFile = LINUX_DISTROS.find(file => etcFiles.includes(file.name)); + const etcFiles = await readDirAsync("/etc"); + const distroFile = LINUX_DISTROS.find((file) => etcFiles.includes(file.name)); if (!distroFile) { return linuxInfo; } - - // Once that file is known, load its contents. To make searching in those - // files easier, we lowercase the file contents. Since these files are - // usually quite small, this should not allocate too much memory and we only - // hold on to it for a very short amount of time. - const distroPath = path.join('/etc', distroFile.name); - const contents = ((await readFileAsync(distroPath, { encoding: 'utf-8' })) ).toLowerCase(); - - // Some Linux distributions store their release information in the same file - // (e.g. RHEL and Centos). In those cases, we scan the file for an - // identifier, that basically consists of the first word of the linux - // distribution name (e.g. "red" for Red Hat). In case there is no match, we - // just assume the first distribution in our list. + const distroPath = join2("/etc", distroFile.name); + const contents = (await readFileAsync(distroPath, { encoding: "utf-8" })).toLowerCase(); const { distros } = distroFile; - linuxInfo.name = distros.find(d => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0]; - - // Based on the found distribution, we can now compute the actual version - // number. This is different for every distribution, so several strategies - // are computed in `LINUX_VERSIONS`. + linuxInfo.name = distros.find((d) => contents.indexOf(getLinuxDistroId(d)) >= 0) || distros[0]; const id = getLinuxDistroId(linuxInfo.name); linuxInfo.version = LINUX_VERSIONS[id](contents); } catch (e) { - // ignore } - return linuxInfo; } - -/** - * Grabs some information about hosting provider based on best effort. - */ function getCloudResourceContext() { if (process.env.VERCEL) { - // https://vercel.com/docs/concepts/projects/environment-variables/system-environment-variables#system-environment-variables return { - 'cloud.provider': 'vercel', - 'cloud.region': process.env.VERCEL_REGION, + "cloud.provider": "vercel", + "cloud.region": process.env.VERCEL_REGION }; } else if (process.env.AWS_REGION) { - // https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html return { - 'cloud.provider': 'aws', - 'cloud.region': process.env.AWS_REGION, - 'cloud.platform': process.env.AWS_EXECUTION_ENV, + "cloud.provider": "aws", + "cloud.region": process.env.AWS_REGION, + "cloud.platform": process.env.AWS_EXECUTION_ENV }; } else if (process.env.GCP_PROJECT) { - // https://cloud.google.com/composer/docs/how-to/managing/environment-variables#reserved_variables return { - 'cloud.provider': 'gcp', + "cloud.provider": "gcp" }; } else if (process.env.ALIYUN_REGION_ID) { - // TODO: find where I found these environment variables - at least gc.github.com returns something return { - 'cloud.provider': 'alibaba_cloud', - 'cloud.region': process.env.ALIYUN_REGION_ID, + "cloud.provider": "alibaba_cloud", + "cloud.region": process.env.ALIYUN_REGION_ID }; } else if (process.env.WEBSITE_SITE_NAME && process.env.REGION_NAME) { - // https://learn.microsoft.com/en-us/azure/app-service/reference-app-settings?tabs=kudu%2Cdotnet#app-environment return { - 'cloud.provider': 'azure', - 'cloud.region': process.env.REGION_NAME, + "cloud.provider": "azure", + "cloud.region": process.env.REGION_NAME }; } else if (process.env.IBM_CLOUD_REGION) { - // TODO: find where I found these environment variables - at least gc.github.com returns something return { - 'cloud.provider': 'ibm_cloud', - 'cloud.region': process.env.IBM_CLOUD_REGION, + "cloud.provider": "ibm_cloud", + "cloud.region": process.env.IBM_CLOUD_REGION }; } else if (process.env.TENCENTCLOUD_REGION) { - // https://www.tencentcloud.com/document/product/583/32748 return { - 'cloud.provider': 'tencent_cloud', - 'cloud.region': process.env.TENCENTCLOUD_REGION, - 'cloud.account.id': process.env.TENCENTCLOUD_APPID, - 'cloud.availability_zone': process.env.TENCENTCLOUD_ZONE, + "cloud.provider": "tencent_cloud", + "cloud.region": process.env.TENCENTCLOUD_REGION, + "cloud.account.id": process.env.TENCENTCLOUD_APPID, + "cloud.availability_zone": process.env.TENCENTCLOUD_ZONE }; } else if (process.env.NETLIFY) { - // https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables return { - 'cloud.provider': 'netlify', + "cloud.provider": "netlify" }; } else if (process.env.FLY_REGION) { - // https://fly.io/docs/reference/runtime-environment/ return { - 'cloud.provider': 'fly.io', - 'cloud.region': process.env.FLY_REGION, + "cloud.provider": "fly.io", + "cloud.region": process.env.FLY_REGION }; } else if (process.env.DYNO) { - // https://devcenter.heroku.com/articles/dynos#local-environment-variables return { - 'cloud.provider': 'heroku', + "cloud.provider": "heroku" }; } else { - return undefined; + return void 0; } } +var readFileAsync, readDirAsync, INTEGRATION_NAME7, _nodeContextIntegration, nodeContextIntegration, Context, PLATFORM_NAMES, LINUX_DISTROS, LINUX_VERSIONS; +var init_context = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/context.js"() { + init_esm(); + init_esm2(); + readFileAsync = promisify(readFile); + readDirAsync = promisify(readdir); + INTEGRATION_NAME7 = "Context"; + _nodeContextIntegration = (options2 = {}) => { + let cachedContext; + const _options = { + app: true, + os: true, + device: true, + culture: true, + cloudResource: true, + ...options2 + }; + async function addContext(event) { + if (cachedContext === void 0) { + cachedContext = _getContexts(); + } + const updatedContext = _updateContext(await cachedContext); + event.contexts = { + ...event.contexts, + app: { ...updatedContext.app, ..._optionalChain([event, "access", (_) => _.contexts, "optionalAccess", (_2) => _2.app]) }, + os: { ...updatedContext.os, ..._optionalChain([event, "access", (_3) => _3.contexts, "optionalAccess", (_4) => _4.os]) }, + device: { ...updatedContext.device, ..._optionalChain([event, "access", (_5) => _5.contexts, "optionalAccess", (_6) => _6.device]) }, + culture: { ...updatedContext.culture, ..._optionalChain([event, "access", (_7) => _7.contexts, "optionalAccess", (_8) => _8.culture]) }, + cloud_resource: { ...updatedContext.cloud_resource, ..._optionalChain([event, "access", (_9) => _9.contexts, "optionalAccess", (_10) => _10.cloud_resource]) } + }; + return event; + } + async function _getContexts() { + const contexts = {}; + if (_options.os) { + contexts.os = await getOsContext(); + } + if (_options.app) { + contexts.app = getAppContext(); + } + if (_options.device) { + contexts.device = getDeviceContext(_options.device); + } + if (_options.culture) { + const culture = getCultureContext(); + if (culture) { + contexts.culture = culture; + } + } + if (_options.cloudResource) { + contexts.cloud_resource = getCloudResourceContext(); + } + return contexts; + } + return { + name: INTEGRATION_NAME7, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event) { + return addContext(event); + } + }; + }; + nodeContextIntegration = defineIntegration(_nodeContextIntegration); + Context = convertIntegrationFnToClass(INTEGRATION_NAME7, nodeContextIntegration); + PLATFORM_NAMES = { + aix: "IBM AIX", + freebsd: "FreeBSD", + openbsd: "OpenBSD", + sunos: "SunOS", + win32: "Windows" + }; + LINUX_DISTROS = [ + { name: "fedora-release", distros: ["Fedora"] }, + { name: "redhat-release", distros: ["Red Hat Linux", "Centos"] }, + { name: "redhat_version", distros: ["Red Hat Linux"] }, + { name: "SuSE-release", distros: ["SUSE Linux"] }, + { name: "lsb-release", distros: ["Ubuntu Linux", "Arch Linux"] }, + { name: "debian_version", distros: ["Debian"] }, + { name: "debian_release", distros: ["Debian"] }, + { name: "arch-release", distros: ["Arch Linux"] }, + { name: "gentoo-release", distros: ["Gentoo Linux"] }, + { name: "novell-release", distros: ["SUSE Linux"] }, + { name: "alpine-release", distros: ["Alpine Linux"] } + ]; + LINUX_VERSIONS = { + alpine: (content) => content, + arch: (content) => matchFirst(/distrib_release=(.*)/, content), + centos: (content) => matchFirst(/release ([^ ]+)/, content), + debian: (content) => content, + fedora: (content) => matchFirst(/release (..)/, content), + mint: (content) => matchFirst(/distrib_release=(.*)/, content), + red: (content) => matchFirst(/release ([^ ]+)/, content), + suse: (content) => matchFirst(/VERSION = (.*)\n/, content), + ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content) + }; + } +}); -exports.Context = Context; -exports.getDeviceContext = getDeviceContext; -exports.nodeContextIntegration = nodeContextIntegration; -exports.readDirAsync = readDirAsync; -exports.readFileAsync = readFileAsync; -//# sourceMappingURL=context.js.map - - -/***/ }), - -/***/ 23781: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const fs = __nccwpck_require__(79896); -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const FILE_CONTENT_CACHE = new utils.LRUMap(100); -const DEFAULT_LINES_OF_CONTEXT = 7; -const INTEGRATION_NAME = 'ContextLines'; - -// TODO: Replace with promisify when minimum supported node >= v8 -function readTextFileAsync(path) { - return new Promise((resolve, reject) => { - fs.readFile(path, 'utf8', (err, data) => { +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/contextlines.js +import { readFile as readFile2 } from "fs"; +function readTextFileAsync(path2) { + return new Promise((resolve4, reject) => { + readFile2(path2, "utf8", (err, data) => { if (err) reject(err); - else resolve(data); + else resolve4(data); }); }); } - -const _contextLinesIntegration = ((options = {}) => { - const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - return addSourceContext(event, contextLines); - }, - }; -}) ; - -const contextLinesIntegration = core.defineIntegration(_contextLinesIntegration); - -/** - * Add node modules / packages to the event. - * @deprecated Use `contextLinesIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const ContextLines = core.convertIntegrationFnToClass(INTEGRATION_NAME, contextLinesIntegration) - -; - async function addSourceContext(event, contextLines) { - // keep a lookup map of which files we've already enqueued to read, - // so we don't enqueue the same file multiple times which would cause multiple i/o reads const enqueuedReadSourceFileTasks = {}; const readSourceFileTasks = []; - - if (contextLines > 0 && _optionalChain([event, 'access', _2 => _2.exception, 'optionalAccess', _3 => _3.values])) { - for (const exception of event.exception.values) { - if (!_optionalChain([exception, 'access', _4 => _4.stacktrace, 'optionalAccess', _5 => _5.frames])) { + if (contextLines > 0 && _optionalChain([event, "access", (_2) => _2.exception, "optionalAccess", (_3) => _3.values])) { + for (const exception2 of event.exception.values) { + if (!_optionalChain([exception2, "access", (_4) => _4.stacktrace, "optionalAccess", (_5) => _5.frames])) { continue; } - - // We want to iterate in reverse order as calling cache.get will bump the file in our LRU cache. - // This ends up prioritizes source context for frames at the top of the stack instead of the bottom. - for (let i = exception.stacktrace.frames.length - 1; i >= 0; i--) { - const frame = exception.stacktrace.frames[i]; - // Call cache.get to bump the file to the top of the cache and ensure we have not already - // enqueued a read operation for this filename + for (let i = exception2.stacktrace.frames.length - 1; i >= 0; i--) { + const frame = exception2.stacktrace.frames[i]; if (frame.filename && !enqueuedReadSourceFileTasks[frame.filename] && !FILE_CONTENT_CACHE.get(frame.filename)) { readSourceFileTasks.push(_readSourceFile(frame.filename)); enqueuedReadSourceFileTasks[frame.filename] = 1; @@ -23846,717 +21981,444 @@ async function addSourceContext(event, contextLines) { } } } - - // check if files to read > 0, if so, await all of them to be read before adding source contexts. - // Normally, Promise.all here could be short circuited if one of the promises rejects, but we - // are guarding from that by wrapping the i/o read operation in a try/catch. if (readSourceFileTasks.length > 0) { await Promise.all(readSourceFileTasks); } - - // Perform the same loop as above, but this time we can assume all files are in the cache - // and attempt to add source context to frames. - if (contextLines > 0 && _optionalChain([event, 'access', _6 => _6.exception, 'optionalAccess', _7 => _7.values])) { - for (const exception of event.exception.values) { - if (exception.stacktrace && exception.stacktrace.frames) { - await addSourceContextToFrames(exception.stacktrace.frames, contextLines); + if (contextLines > 0 && _optionalChain([event, "access", (_6) => _6.exception, "optionalAccess", (_7) => _7.values])) { + for (const exception2 of event.exception.values) { + if (exception2.stacktrace && exception2.stacktrace.frames) { + await addSourceContextToFrames(exception2.stacktrace.frames, contextLines); } } } - return event; } - -/** Adds context lines to frames */ function addSourceContextToFrames(frames, contextLines) { for (const frame of frames) { - // Only add context if we have a filename and it hasn't already been added - if (frame.filename && frame.context_line === undefined) { + if (frame.filename && frame.context_line === void 0) { const sourceFileLines = FILE_CONTENT_CACHE.get(frame.filename); - if (sourceFileLines) { try { - utils.addContextToFrame(sourceFileLines, frame, contextLines); + addContextToFrame(sourceFileLines, frame, contextLines); } catch (e) { - // anomaly, being defensive in case - // unlikely to ever happen in practice but can definitely happen in theory } } } } } - -// eslint-disable-next-line deprecation/deprecation - -/** - * Reads file contents and caches them in a global LRU cache. - * If reading fails, mark the file as null in the cache so we don't try again. - * - * @param filename filepath to read content from. - */ async function _readSourceFile(filename) { const cachedFile = FILE_CONTENT_CACHE.get(filename); - - // We have already attempted to read this file and failed, do not try again if (cachedFile === null) { return null; } - - // We have a cache hit, return it - if (cachedFile !== undefined) { + if (cachedFile !== void 0) { return cachedFile; } - - // Guard from throwing if readFile fails, this enables us to use Promise.all and - // not have it short circuiting if one of the promises rejects + since context lines are added - // on a best effort basis, we want to throw here anyways. - - // If we made it to here, it means that our file is not cache nor marked as failed, so attempt to read it let content = null; try { const rawFileContents = await readTextFileAsync(filename); - content = rawFileContents.split('\n'); + content = rawFileContents.split("\n"); } catch (_) { - // if we fail, we will mark the file as null in the cache and short circuit next time we try to read it } - FILE_CONTENT_CACHE.set(filename, content); return content; } +var FILE_CONTENT_CACHE, DEFAULT_LINES_OF_CONTEXT, INTEGRATION_NAME8, _contextLinesIntegration, contextLinesIntegration, ContextLines; +var init_contextlines = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/contextlines.js"() { + init_esm(); + init_esm2(); + init_esm(); + FILE_CONTENT_CACHE = new LRUMap(100); + DEFAULT_LINES_OF_CONTEXT = 7; + INTEGRATION_NAME8 = "ContextLines"; + _contextLinesIntegration = (options2 = {}) => { + const contextLines = options2.frameContextLines !== void 0 ? options2.frameContextLines : DEFAULT_LINES_OF_CONTEXT; + return { + name: INTEGRATION_NAME8, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event) { + return addSourceContext(event, contextLines); + } + }; + }; + contextLinesIntegration = defineIntegration(_contextLinesIntegration); + ContextLines = convertIntegrationFnToClass(INTEGRATION_NAME8, contextLinesIntegration); + } +}); -exports.ContextLines = ContextLines; -exports.contextLinesIntegration = contextLinesIntegration; -//# sourceMappingURL=contextlines.js.map - - -/***/ }), - -/***/ 88220: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/debug-build.js +var DEBUG_BUILD4; +var init_debug_build4 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/debug-build.js"() { + DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; + } +}); -function isResponseObject(response) { - return response && (response ).statusCode !== undefined; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/utils/http.js +import { URL as URL4 } from "url"; +function extractRawUrl(requestOptions) { + const { protocol, hostname: hostname2, port } = parseRequestOptions(requestOptions); + const path2 = requestOptions.path ? requestOptions.path : "/"; + return `${protocol}//${hostname2}${port}${path2}`; } - -function isErrorEvent(event) { - return event && (event ).error !== undefined; +function extractUrl(requestOptions) { + const { protocol, hostname: hostname2, port } = parseRequestOptions(requestOptions); + const path2 = requestOptions.pathname || "/"; + const authority = requestOptions.auth ? redactAuthority(requestOptions.auth) : ""; + return `${protocol}//${authority}${hostname2}${port}${path2}`; } - -function sendErrorToSentry(errorData) { - core.captureException(errorData, { - mechanism: { - type: 'hapi', - handled: false, - data: { - function: 'hapiErrorPlugin', - }, - }, - }); +function redactAuthority(auth7) { + const [user, password] = auth7.split(":"); + return `${user ? "[Filtered]" : ""}:${password ? "[Filtered]" : ""}@`; } - -const hapiErrorPlugin = { - name: 'SentryHapiErrorPlugin', - version: core.SDK_VERSION, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - register: async function (serverArg) { - const server = serverArg ; - - server.events.on('request', (request, event) => { - // eslint-disable-next-line deprecation/deprecation - const transaction = core.getActiveTransaction(); - - if (isErrorEvent(event)) { - sendErrorToSentry(event.error); - } - - if (transaction) { - transaction.setStatus('internal_error'); - transaction.end(); - } - }); - }, -}; - -const hapiTracingPlugin = { - name: 'SentryHapiTracingPlugin', - version: core.SDK_VERSION, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - register: async function (serverArg) { - const server = serverArg ; - - server.ext('onPreHandler', (request, h) => { - const transaction = core.continueTrace( - { - sentryTrace: request.headers['sentry-trace'] || undefined, - baggage: request.headers['baggage'] || undefined, - }, - transactionContext => { - // eslint-disable-next-line deprecation/deprecation - return core.startTransaction({ - ...transactionContext, - op: 'hapi.request', - name: request.route.path, - description: `${request.route.method} ${request.path}`, - }); - }, - ); - - // eslint-disable-next-line deprecation/deprecation - core.getCurrentScope().setSpan(transaction); - - return h.continue; - }); - - server.ext('onPreResponse', (request, h) => { - // eslint-disable-next-line deprecation/deprecation - const transaction = core.getActiveTransaction(); - - if (request.response && isResponseObject(request.response) && transaction) { - const response = request.response ; - response.header('sentry-trace', core.spanToTraceHeader(transaction)); - - const dynamicSamplingContext = utils.dynamicSamplingContextToSentryBaggageHeader( - core.getDynamicSamplingContextFromSpan(transaction), - ); - - if (dynamicSamplingContext) { - response.header('baggage', dynamicSamplingContext); - } - } - - return h.continue; - }); - - server.ext('onPostHandler', (request, h) => { - // eslint-disable-next-line deprecation/deprecation - const transaction = core.getActiveTransaction(); - - if (transaction) { - if (request.response && isResponseObject(request.response)) { - core.setHttpStatus(transaction, request.response.statusCode); - } - - transaction.end(); - } - - return h.continue; - }); - }, -}; - -const INTEGRATION_NAME = 'Hapi'; - -const _hapiIntegration = ((options = {}) => { - const server = options.server ; - - return { - name: INTEGRATION_NAME, - setupOnce() { - if (!server) { - return; - } - - utils.fill(server, 'start', (originalStart) => { - return async function () { - await this.register(hapiTracingPlugin); - await this.register(hapiErrorPlugin); - const result = originalStart.apply(this); - return result; - }; - }); - }, - }; -}) ; - -const hapiIntegration = core.defineIntegration(_hapiIntegration); - -/** - * Hapi Framework Integration. - * @deprecated Use `hapiIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Hapi = core.convertIntegrationFnToClass(INTEGRATION_NAME, hapiIntegration); - -// eslint-disable-next-line deprecation/deprecation - -exports.Hapi = Hapi; -exports.hapiErrorPlugin = hapiErrorPlugin; -exports.hapiIntegration = hapiIntegration; -exports.hapiTracingPlugin = hapiTracingPlugin; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 50475: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(35473); -const nodeVersion = __nccwpck_require__(68047); -const http = __nccwpck_require__(49381); - -const _httpIntegration = ((options = {}) => { - const { breadcrumbs, tracing, shouldCreateSpanForRequest } = options; - - const convertedOptions = { - breadcrumbs, - tracing: - tracing === false - ? false - : utils.dropUndefinedKeys({ - // If tracing is forced to `true`, we don't want to set `enableIfHasTracingEnabled` - enableIfHasTracingEnabled: tracing === true ? undefined : true, - shouldCreateSpanForRequest, - }), +function cleanSpanDescription(description, requestOptions, request2) { + if (!description) { + return description; + } + let [method, requestUrl] = description.split(" "); + if (requestOptions.host && !requestOptions.protocol) { + requestOptions.protocol = _optionalChain([request2, "optionalAccess", (_) => _.agent, "optionalAccess", (_2) => _2.protocol]); + requestUrl = extractUrl(requestOptions); + } + if (_optionalChain([requestUrl, "optionalAccess", (_3) => _3.startsWith, "call", (_4) => _4("///")])) { + requestUrl = requestUrl.slice(2); + } + return `${method} ${requestUrl}`; +} +function urlToOptions(url) { + const options2 = { + protocol: url.protocol, + hostname: typeof url.hostname === "string" && url.hostname.startsWith("[") ? url.hostname.slice(1, -1) : url.hostname, + hash: url.hash, + search: url.search, + pathname: url.pathname, + path: `${url.pathname || ""}${url.search || ""}`, + href: url.href }; - - // eslint-disable-next-line deprecation/deprecation - return new Http(convertedOptions) ; -}) ; - -/** - * The http module integration instruments Node's internal http module. It creates breadcrumbs, spans for outgoing - * http requests, and attaches trace data when tracing is enabled via its `tracing` option. - * - * By default, this will always create breadcrumbs, and will create spans if tracing is enabled. - */ -const httpIntegration = core.defineIntegration(_httpIntegration); - -/** - * The http module integration instruments Node's internal http module. It creates breadcrumbs, transactions for outgoing - * http requests and attaches trace data when tracing is enabled via its `tracing` option. - * - * @deprecated Use `httpIntegration()` instead. - */ -class Http { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Http';} - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - __init() {this.name = Http.id;} - - /** - * @inheritDoc - */ - constructor(options = {}) {Http.prototype.__init.call(this); - this._breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs; - this._tracing = !options.tracing ? undefined : options.tracing === true ? {} : options.tracing; - } - - /** - * @inheritDoc - */ - setupOnce( - _addGlobalEventProcessor, - // eslint-disable-next-line deprecation/deprecation - setupOnceGetCurrentHub, - ) { - // eslint-disable-next-line deprecation/deprecation - const clientOptions = _optionalChain([setupOnceGetCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]); - - // If `tracing` is not explicitly set, we default this based on whether or not tracing is enabled. - // But for compatibility, we only do that if `enableIfHasTracingEnabled` is set. - const shouldCreateSpans = _shouldCreateSpans(this._tracing, clientOptions); - - // No need to instrument if we don't want to track anything - if (!this._breadcrumbs && !shouldCreateSpans) { - return; + if (url.port !== "") { + options2.port = Number(url.port); + } + if (url.username || url.password) { + options2.auth = `${url.username}:${url.password}`; + } + return options2; +} +function normalizeRequestArgs(httpModule, requestArgs) { + let callback, requestOptions; + if (typeof requestArgs[requestArgs.length - 1] === "function") { + callback = requestArgs.pop(); + } + if (typeof requestArgs[0] === "string") { + requestOptions = urlToOptions(new URL4(requestArgs[0])); + } else if (requestArgs[0] instanceof URL4) { + requestOptions = urlToOptions(requestArgs[0]); + } else { + requestOptions = requestArgs[0]; + try { + const parsed = new URL4( + requestOptions.path || "", + `${requestOptions.protocol || "http:"}//${requestOptions.hostname}` + ); + requestOptions = { + pathname: parsed.pathname, + search: parsed.search, + hash: parsed.hash, + ...requestOptions + }; + } catch (e) { } - - // Do not auto-instrument for other instrumenter - if (clientOptions && clientOptions.instrumenter !== 'sentry') { - debugBuild.DEBUG_BUILD && utils.logger.log('HTTP Integration is skipped because of instrumenter configuration.'); - return; + } + if (requestArgs.length === 2) { + requestOptions = { ...requestOptions, ...requestArgs[1] }; + } + if (requestOptions.protocol === void 0) { + if (NODE_VERSION.major > 8) { + requestOptions.protocol = _optionalChain([_optionalChain([httpModule, "optionalAccess", (_5) => _5.globalAgent]), "optionalAccess", (_6) => _6.protocol]) || _optionalChain([requestOptions.agent, "optionalAccess", (_7) => _7.protocol]) || _optionalChain([requestOptions._defaultAgent, "optionalAccess", (_8) => _8.protocol]); + } else { + requestOptions.protocol = _optionalChain([requestOptions.agent, "optionalAccess", (_9) => _9.protocol]) || _optionalChain([requestOptions._defaultAgent, "optionalAccess", (_10) => _10.protocol]) || _optionalChain([_optionalChain([httpModule, "optionalAccess", (_11) => _11.globalAgent]), "optionalAccess", (_12) => _12.protocol]); } + } + if (callback) { + return [requestOptions, callback]; + } else { + return [requestOptions]; + } +} +function parseRequestOptions(requestOptions) { + const protocol = requestOptions.protocol || ""; + const hostname2 = requestOptions.hostname || requestOptions.host || ""; + const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname2) ? "" : `:${requestOptions.port}`; + return { protocol, hostname: hostname2, port }; +} +var init_http2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/utils/http.js"() { + init_esm(); + init_nodeVersion(); + } +}); - const shouldCreateSpanForRequest = _getShouldCreateSpanForRequest(shouldCreateSpans, this._tracing, clientOptions); - - // eslint-disable-next-line deprecation/deprecation - const tracePropagationTargets = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.tracePropagationTargets]) || _optionalChain([this, 'access', _7 => _7._tracing, 'optionalAccess', _8 => _8.tracePropagationTargets]); - - // eslint-disable-next-line @typescript-eslint/no-var-requires - const httpModule = __nccwpck_require__(58611); - const wrappedHttpHandlerMaker = _createWrappedRequestMethodFactory( - httpModule, - this._breadcrumbs, - shouldCreateSpanForRequest, - tracePropagationTargets, - ); - utils.fill(httpModule, 'get', wrappedHttpHandlerMaker); - utils.fill(httpModule, 'request', wrappedHttpHandlerMaker); - - // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. - // If we do, we'd get double breadcrumbs and double spans for `https` calls. - // It has been changed in Node 9, so for all versions equal and above, we patch `https` separately. - if (nodeVersion.NODE_VERSION.major > 8) { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const httpsModule = __nccwpck_require__(65692); - const wrappedHttpsHandlerMaker = _createWrappedRequestMethodFactory( - httpsModule, - this._breadcrumbs, - shouldCreateSpanForRequest, - tracePropagationTargets, - ); - utils.fill(httpsModule, 'get', wrappedHttpsHandlerMaker); - utils.fill(httpsModule, 'request', wrappedHttpsHandlerMaker); - } - } -}Http.__initStatic(); - -// for ease of reading below - -/** - * Function which creates a function which creates wrapped versions of internal `request` and `get` calls within `http` - * and `https` modules. (NB: Not a typo - this is a creator^2!) - * - * @param breadcrumbsEnabled Whether or not to record outgoing requests as breadcrumbs - * @param tracingEnabled Whether or not to record outgoing requests as tracing spans - * - * @returns A function which accepts the exiting handler and returns a wrapped handler - */ -function _createWrappedRequestMethodFactory( - httpModule, - breadcrumbsEnabled, - shouldCreateSpanForRequest, - tracePropagationTargets, -) { - // We're caching results so we don't have to recompute regexp every time we create a request. - const createSpanUrlMap = new utils.LRUMap(100); - const headersUrlMap = new utils.LRUMap(100); - +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/http.js +function _createWrappedRequestMethodFactory(httpModule, breadcrumbsEnabled, shouldCreateSpanForRequest, tracePropagationTargets) { + const createSpanUrlMap = new LRUMap(100); + const headersUrlMap = new LRUMap(100); const shouldCreateSpan = (url) => { - if (shouldCreateSpanForRequest === undefined) { + if (shouldCreateSpanForRequest === void 0) { return true; } - const cachedDecision = createSpanUrlMap.get(url); - if (cachedDecision !== undefined) { + if (cachedDecision !== void 0) { return cachedDecision; } - const decision = shouldCreateSpanForRequest(url); createSpanUrlMap.set(url, decision); return decision; }; - const shouldAttachTraceData = (url) => { - if (tracePropagationTargets === undefined) { + if (tracePropagationTargets === void 0) { return true; } - const cachedDecision = headersUrlMap.get(url); - if (cachedDecision !== undefined) { + if (cachedDecision !== void 0) { return cachedDecision; } - - const decision = utils.stringMatchesSomePattern(url, tracePropagationTargets); + const decision = stringMatchesSomePattern(url, tracePropagationTargets); headersUrlMap.set(url, decision); return decision; }; - - /** - * Captures Breadcrumb based on provided request/response pair - */ - function addRequestBreadcrumb( - event, - requestSpanData, - req, - res, - ) { - // eslint-disable-next-line deprecation/deprecation - if (!core.getCurrentHub().getIntegration(Http)) { + function addRequestBreadcrumb(event, requestSpanData, req, res) { + if (!getCurrentHub().getIntegration(Http)) { return; } - - core.addBreadcrumb( + addBreadcrumb( { - category: 'http', + category: "http", data: { status_code: res && res.statusCode, - ...requestSpanData, + ...requestSpanData }, - type: 'http', + type: "http" }, { event, request: req, - response: res, - }, + response: res + } ); } - return function wrappedRequestMethodFactory(originalRequestMethod) { - return function wrappedMethod( ...args) { - const requestArgs = http.normalizeRequestArgs(httpModule, args); + return function wrappedMethod(...args) { + const requestArgs = normalizeRequestArgs(httpModule, args); const requestOptions = requestArgs[0]; - // eslint-disable-next-line deprecation/deprecation - const rawRequestUrl = http.extractRawUrl(requestOptions); - const requestUrl = http.extractUrl(requestOptions); - const client = core.getClient(); - - // we don't want to record requests to Sentry as either breadcrumbs or spans, so just use the original method - if (core.isSentryRequestUrl(requestUrl, client)) { + const rawRequestUrl = extractRawUrl(requestOptions); + const requestUrl = extractUrl(requestOptions); + const client = getClient(); + if (isSentryRequestUrl(requestUrl, client)) { return originalRequestMethod.apply(httpModule, requestArgs); } - - const scope = core.getCurrentScope(); - const isolationScope = core.getIsolationScope(); - const parentSpan = core.getActiveSpan(); - + const scope = getCurrentScope(); + const isolationScope = getIsolationScope(); + const parentSpan = getActiveSpan(); const data = getRequestSpanData(requestUrl, requestOptions); - - const requestSpan = shouldCreateSpan(rawRequestUrl) - ? // eslint-disable-next-line deprecation/deprecation - _optionalChain([parentSpan, 'optionalAccess', _9 => _9.startChild, 'call', _10 => _10({ - op: 'http.client', - origin: 'auto.http.node.http', - description: `${data['http.method']} ${data.url}`, - data, - })]) - : undefined; - + const requestSpan = shouldCreateSpan(rawRequestUrl) ? ( + // eslint-disable-next-line deprecation/deprecation + _optionalChain([parentSpan, "optionalAccess", (_9) => _9.startChild, "call", (_10) => _10({ + op: "http.client", + origin: "auto.http.node.http", + description: `${data["http.method"]} ${data.url}`, + data + })]) + ) : void 0; if (client && shouldAttachTraceData(rawRequestUrl)) { const { traceId, spanId, sampled, dsc } = { ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext(), + ...scope.getPropagationContext() }; - - const sentryTraceHeader = requestSpan - ? core.spanToTraceHeader(requestSpan) - : utils.generateSentryTraceHeader(traceId, spanId, sampled); - - const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( - dsc || - (requestSpan - ? core.getDynamicSamplingContextFromSpan(requestSpan) - : core.getDynamicSamplingContextFromClient(traceId, client, scope)), + const sentryTraceHeader = requestSpan ? spanToTraceHeader(requestSpan) : generateSentryTraceHeader(traceId, spanId, sampled); + const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader( + dsc || (requestSpan ? getDynamicSamplingContextFromSpan(requestSpan) : getDynamicSamplingContextFromClient(traceId, client, scope)) ); - addHeadersToRequestOptions(requestOptions, requestUrl, sentryTraceHeader, sentryBaggageHeader); } else { - debugBuild.DEBUG_BUILD && - utils.logger.log( - `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.`, - ); + DEBUG_BUILD4 && logger.log( + `[Tracing] Not adding sentry-trace header to outgoing request (${requestUrl}) due to mismatching tracePropagationTargets option.` + ); } - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return originalRequestMethod - .apply(httpModule, requestArgs) - .once('response', function ( res) { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const req = this; - if (breadcrumbsEnabled) { - addRequestBreadcrumb('response', data, req, res); - } - if (requestSpan) { - if (res.statusCode) { - core.setHttpStatus(requestSpan, res.statusCode); - } - requestSpan.updateName( - http.cleanSpanDescription(core.spanToJSON(requestSpan).description || '', requestOptions, req) || '', - ); - requestSpan.end(); - } - }) - .once('error', function () { - // eslint-disable-next-line @typescript-eslint/no-this-alias - const req = this; - - if (breadcrumbsEnabled) { - addRequestBreadcrumb('error', data, req); - } - if (requestSpan) { - core.setHttpStatus(requestSpan, 500); - requestSpan.updateName( - http.cleanSpanDescription(core.spanToJSON(requestSpan).description || '', requestOptions, req) || '', - ); - requestSpan.end(); + return originalRequestMethod.apply(httpModule, requestArgs).once("response", function(res) { + const req = this; + if (breadcrumbsEnabled) { + addRequestBreadcrumb("response", data, req, res); + } + if (requestSpan) { + if (res.statusCode) { + setHttpStatus(requestSpan, res.statusCode); } - }); + requestSpan.updateName( + cleanSpanDescription(spanToJSON(requestSpan).description || "", requestOptions, req) || "" + ); + requestSpan.end(); + } + }).once("error", function() { + const req = this; + if (breadcrumbsEnabled) { + addRequestBreadcrumb("error", data, req); + } + if (requestSpan) { + setHttpStatus(requestSpan, 500); + requestSpan.updateName( + cleanSpanDescription(spanToJSON(requestSpan).description || "", requestOptions, req) || "" + ); + requestSpan.end(); + } + }); }; }; } - -function addHeadersToRequestOptions( - requestOptions, - requestUrl, - sentryTraceHeader, - sentryBaggageHeader, -) { - // Don't overwrite sentry-trace and baggage header if it's already set. +function addHeadersToRequestOptions(requestOptions, requestUrl, sentryTraceHeader, sentryBaggageHeader) { const headers = requestOptions.headers || {}; - if (headers['sentry-trace']) { + if (headers["sentry-trace"]) { return; } - - debugBuild.DEBUG_BUILD && - utils.logger.log(`[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to "${requestUrl}": `); - + DEBUG_BUILD4 && logger.log(`[Tracing] Adding sentry-trace header ${sentryTraceHeader} to outgoing request to "${requestUrl}": `); requestOptions.headers = { ...requestOptions.headers, - 'sentry-trace': sentryTraceHeader, + "sentry-trace": sentryTraceHeader, // Setting a header to `undefined` will crash in node so we only set the baggage header when it's defined - ...(sentryBaggageHeader && - sentryBaggageHeader.length > 0 && { baggage: normalizeBaggageHeader(requestOptions, sentryBaggageHeader) }), + ...sentryBaggageHeader && sentryBaggageHeader.length > 0 && { baggage: normalizeBaggageHeader(requestOptions, sentryBaggageHeader) } }; } - function getRequestSpanData(requestUrl, requestOptions) { - const method = requestOptions.method || 'GET'; + const method = requestOptions.method || "GET"; const data = { url: requestUrl, - 'http.method': method, + "http.method": method }; if (requestOptions.hash) { - // strip leading "#" - data['http.fragment'] = requestOptions.hash.substring(1); + data["http.fragment"] = requestOptions.hash.substring(1); } if (requestOptions.search) { - // strip leading "?" - data['http.query'] = requestOptions.search.substring(1); + data["http.query"] = requestOptions.search.substring(1); } return data; } - -function normalizeBaggageHeader( - requestOptions, - sentryBaggageHeader, -) { +function normalizeBaggageHeader(requestOptions, sentryBaggageHeader) { if (!requestOptions.headers || !requestOptions.headers.baggage) { return sentryBaggageHeader; } else if (!sentryBaggageHeader) { - return requestOptions.headers.baggage ; + return requestOptions.headers.baggage; } else if (Array.isArray(requestOptions.headers.baggage)) { return [...requestOptions.headers.baggage, sentryBaggageHeader]; } - // Type-cast explanation: - // Technically this the following could be of type `(number | string)[]` but for the sake of simplicity - // we say this is undefined behaviour, since it would not be baggage spec conform if the user did this. - return [requestOptions.headers.baggage, sentryBaggageHeader] ; -} - -/** Exported for tests only. */ -function _shouldCreateSpans( - tracingOptions, - clientOptions, -) { - return tracingOptions === undefined - ? false - : tracingOptions.enableIfHasTracingEnabled - ? core.hasTracingEnabled(clientOptions) - : true; -} - -/** Exported for tests only. */ -function _getShouldCreateSpanForRequest( - shouldCreateSpans, - tracingOptions, - clientOptions, -) { - const handler = shouldCreateSpans - ? // eslint-disable-next-line deprecation/deprecation - _optionalChain([tracingOptions, 'optionalAccess', _11 => _11.shouldCreateSpanForRequest]) || _optionalChain([clientOptions, 'optionalAccess', _12 => _12.shouldCreateSpanForRequest]) - : () => false; - - return handler; -} - -exports.Http = Http; -exports._getShouldCreateSpanForRequest = _getShouldCreateSpanForRequest; -exports._shouldCreateSpans = _shouldCreateSpans; -exports.httpIntegration = httpIntegration; -//# sourceMappingURL=http.js.map - - -/***/ }), - -/***/ 67455: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const console = __nccwpck_require__(48270); -const http = __nccwpck_require__(50475); -const onuncaughtexception = __nccwpck_require__(32820); -const onunhandledrejection = __nccwpck_require__(76668); -const modules = __nccwpck_require__(14550); -const contextlines = __nccwpck_require__(23781); -const context = __nccwpck_require__(49252); -const core = __nccwpck_require__(90155); -const index = __nccwpck_require__(4383); -const index$1 = __nccwpck_require__(7248); -const spotlight = __nccwpck_require__(5455); -const index$2 = __nccwpck_require__(87359); -const index$3 = __nccwpck_require__(88220); - -/* eslint-disable deprecation/deprecation */ - -exports.Console = console.Console; -exports.Http = http.Http; -exports.OnUncaughtException = onuncaughtexception.OnUncaughtException; -exports.OnUnhandledRejection = onunhandledrejection.OnUnhandledRejection; -exports.Modules = modules.Modules; -exports.ContextLines = contextlines.ContextLines; -exports.Context = context.Context; -exports.RequestData = core.RequestData; -exports.LocalVariables = index.LocalVariables; -exports.Undici = index$1.Undici; -exports.Spotlight = spotlight.Spotlight; -exports.Anr = index$2.Anr; -exports.Hapi = index$3.Hapi; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 83790: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback - * when a timeout has occurred. - * @param maxPerSecond Maximum number of calls per second - * @param enable Callback to enable capture - * @param disable Callback to disable capture - * @returns A function to call to increment the rate limiter count - */ -function createRateLimiter( - maxPerSecond, - enable, - disable, -) { + return [requestOptions.headers.baggage, sentryBaggageHeader]; +} +function _shouldCreateSpans(tracingOptions, clientOptions) { + return tracingOptions === void 0 ? false : tracingOptions.enableIfHasTracingEnabled ? hasTracingEnabled(clientOptions) : true; +} +function _getShouldCreateSpanForRequest(shouldCreateSpans, tracingOptions, clientOptions) { + const handler2 = shouldCreateSpans ? ( + // eslint-disable-next-line deprecation/deprecation + _optionalChain([tracingOptions, "optionalAccess", (_11) => _11.shouldCreateSpanForRequest]) || _optionalChain([clientOptions, "optionalAccess", (_12) => _12.shouldCreateSpanForRequest]) + ) : () => false; + return handler2; +} +var _httpIntegration, httpIntegration, Http; +var init_http3 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/http.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_debug_build4(); + init_nodeVersion(); + init_http2(); + _httpIntegration = (options2 = {}) => { + const { breadcrumbs, tracing, shouldCreateSpanForRequest } = options2; + const convertedOptions = { + breadcrumbs, + tracing: tracing === false ? false : dropUndefinedKeys({ + // If tracing is forced to `true`, we don't want to set `enableIfHasTracingEnabled` + enableIfHasTracingEnabled: tracing === true ? void 0 : true, + shouldCreateSpanForRequest + }) + }; + return new Http(convertedOptions); + }; + httpIntegration = defineIntegration(_httpIntegration); + Http = class _Http { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Http"; + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + __init() { + this.name = _Http.id; + } + /** + * @inheritDoc + */ + constructor(options2 = {}) { + _Http.prototype.__init.call(this); + this._breadcrumbs = typeof options2.breadcrumbs === "undefined" ? true : options2.breadcrumbs; + this._tracing = !options2.tracing ? void 0 : options2.tracing === true ? {} : options2.tracing; + } + /** + * @inheritDoc + */ + setupOnce(_addGlobalEventProcessor, setupOnceGetCurrentHub) { + const clientOptions = _optionalChain([setupOnceGetCurrentHub, "call", (_) => _(), "access", (_2) => _2.getClient, "call", (_3) => _3(), "optionalAccess", (_4) => _4.getOptions, "call", (_5) => _5()]); + const shouldCreateSpans = _shouldCreateSpans(this._tracing, clientOptions); + if (!this._breadcrumbs && !shouldCreateSpans) { + return; + } + if (clientOptions && clientOptions.instrumenter !== "sentry") { + DEBUG_BUILD4 && logger.log("HTTP Integration is skipped because of instrumenter configuration."); + return; + } + const shouldCreateSpanForRequest = _getShouldCreateSpanForRequest(shouldCreateSpans, this._tracing, clientOptions); + const tracePropagationTargets = _optionalChain([clientOptions, "optionalAccess", (_6) => _6.tracePropagationTargets]) || _optionalChain([this, "access", (_7) => _7._tracing, "optionalAccess", (_8) => _8.tracePropagationTargets]); + const httpModule = __require("http"); + const wrappedHttpHandlerMaker = _createWrappedRequestMethodFactory( + httpModule, + this._breadcrumbs, + shouldCreateSpanForRequest, + tracePropagationTargets + ); + fill(httpModule, "get", wrappedHttpHandlerMaker); + fill(httpModule, "request", wrappedHttpHandlerMaker); + if (NODE_VERSION.major > 8) { + const httpsModule = __require("https"); + const wrappedHttpsHandlerMaker = _createWrappedRequestMethodFactory( + httpsModule, + this._breadcrumbs, + shouldCreateSpanForRequest, + tracePropagationTargets + ); + fill(httpsModule, "get", wrappedHttpsHandlerMaker); + fill(httpsModule, "request", wrappedHttpsHandlerMaker); + } + } + }; + Http.__initStatic(); + } +}); + +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/common.js +function createRateLimiter(maxPerSecond, enable, disable) { let count = 0; let retrySeconds = 5; let disabledTimeout = 0; - setInterval(() => { if (disabledTimeout === 0) { if (count > maxPerSecond) { retrySeconds *= 2; disable(retrySeconds); - - // Cap at one day if (retrySeconds > 86400) { retrySeconds = 86400; } @@ -24564,110 +22426,42 @@ function createRateLimiter( } } else { disabledTimeout -= 1; - if (disabledTimeout === 0) { enable(); } } - count = 0; - }, 1000).unref(); - + }, 1e3).unref(); return () => { count += 1; }; } - -// Add types for the exception event data - -/** Could this be an anonymous function? */ function isAnonymous(name) { - return name !== undefined && (name.length === 0 || name === '?' || name === ''); + return name !== void 0 && (name.length === 0 || name === "?" || name === ""); } - -/** Do the function names appear to match? */ function functionNamesMatch(a, b) { - return a === b || (isAnonymous(a) && isAnonymous(b)); + return a === b || isAnonymous(a) && isAnonymous(b); } - -/** Creates a unique hash from stack frames */ function hashFrames(frames) { - if (frames === undefined) { + if (frames === void 0) { return; } - - // Only hash the 10 most recent frames (ie. the last 10) - return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, ''); + return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, ""); } - -/** - * We use the stack parser to create a unique hash from the exception stack trace - * This is used to lookup vars when the exception passes through the event processor - */ function hashFromStack(stackParser, stack) { - if (stack === undefined) { - return undefined; + if (stack === void 0) { + return void 0; } - return hashFrames(stackParser(stack, 1)); } +var init_common = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/common.js"() { + } +}); -exports.createRateLimiter = createRateLimiter; -exports.functionNamesMatch = functionNamesMatch; -exports.hashFrames = hashFrames; -exports.hashFromStack = hashFromStack; -exports.isAnonymous = isAnonymous; -//# sourceMappingURL=common.js.map - - -/***/ }), - -/***/ 4383: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const localVariablesSync = __nccwpck_require__(18722); - -/** - * Adds local variables to exception frames. - * - * @deprecated Use `localVariablesIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const LocalVariables = localVariablesSync.LocalVariablesSync; -// eslint-disable-next-line deprecation/deprecation - -const localVariablesIntegration = localVariablesSync.localVariablesSyncIntegration; - -exports.LocalVariables = LocalVariables; -exports.localVariablesIntegration = localVariablesIntegration; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 18722: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const nodeVersion = __nccwpck_require__(68047); -const common = __nccwpck_require__(83790); - -/* eslint-disable max-lines */ - -/** Creates a container for callbacks to be called sequentially */ +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js function createCallbackList(complete) { - // A collection of callbacks to be executed last to first let callbacks = []; - let completedCalled = false; function checkedComplete(result) { callbacks = []; @@ -24677,604 +22471,418 @@ function createCallbackList(complete) { completedCalled = true; complete(result); } - - // complete should be called last callbacks.push(checkedComplete); - function add(fn) { callbacks.push(fn); } - function next(result) { const popped = callbacks.pop() || checkedComplete; - try { popped(result); } catch (_) { - // If there is an error, we still want to call the complete callback checkedComplete(result); } } - return { add, next }; } - -/** - * Promise API is available as `Experimental` and in Node 19 only. - * - * Callback-based API is `Stable` since v14 and `Experimental` since v8. - * Because of that, we are creating our own `AsyncSession` class. - * - * https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api - * https://nodejs.org/docs/latest-v14.x/api/inspector.html - */ -class AsyncSession { - - /** Throws if inspector API is not available */ - constructor() { - /* - TODO: We really should get rid of this require statement below for a couple of reasons: - 1. It makes the integration unusable in the SvelteKit SDK, as it's not possible to use `require` - in SvelteKit server code (at least not by default). - 2. Throwing in a constructor is bad practice - - More context for a future attempt to fix this: - We already tried replacing it with import but didn't get it to work because of async problems. - We still called import in the constructor but assigned to a promise which we "awaited" in - `configureAndConnect`. However, this broke the Node integration tests as no local variables - were reported any more. We probably missed a place where we need to await the promise, too. - */ - - // Node can be built without inspector support so this can throw - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { Session } = __nccwpck_require__(50264); - this._session = new Session(); - } - - /** @inheritdoc */ - configureAndConnect(onPause, captureAll) { - this._session.connect(); - - this._session.on('Debugger.paused', event => { - onPause(event, () => { - // After the pause work is complete, resume execution or the exception context memory is leaked - this._session.post('Debugger.resume'); - }); - }); - - this._session.post('Debugger.enable'); - this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' }); - } - - setPauseOnExceptions(captureAll) { - this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' }); - } - - /** @inheritdoc */ - getLocalVariables(objectId, complete) { - this._getProperties(objectId, props => { - const { add, next } = createCallbackList(complete); - - for (const prop of props) { - if (_optionalChain([prop, 'optionalAccess', _2 => _2.value, 'optionalAccess', _3 => _3.objectId]) && _optionalChain([prop, 'optionalAccess', _4 => _4.value, 'access', _5 => _5.className]) === 'Array') { - const id = prop.value.objectId; - add(vars => this._unrollArray(id, prop.name, vars, next)); - } else if (_optionalChain([prop, 'optionalAccess', _6 => _6.value, 'optionalAccess', _7 => _7.objectId]) && _optionalChain([prop, 'optionalAccess', _8 => _8.value, 'optionalAccess', _9 => _9.className]) === 'Object') { - const id = prop.value.objectId; - add(vars => this._unrollObject(id, prop.name, vars, next)); - } else if (_optionalChain([prop, 'optionalAccess', _10 => _10.value, 'optionalAccess', _11 => _11.value]) != null || _optionalChain([prop, 'optionalAccess', _12 => _12.value, 'optionalAccess', _13 => _13.description]) != null) { - add(vars => this._unrollOther(prop, vars, next)); - } - } - - next({}); - }); - } - - /** - * Gets all the PropertyDescriptors of an object - */ - _getProperties(objectId, next) { - this._session.post( - 'Runtime.getProperties', - { - objectId, - ownProperties: true, - }, - (err, params) => { - if (err) { - next([]); - } else { - next(params.result); - } - }, - ); - } - - /** - * Unrolls an array property - */ - _unrollArray(objectId, name, vars, next) { - this._getProperties(objectId, props => { - vars[name] = props - .filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10))) - .sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)) - .map(v => _optionalChain([v, 'optionalAccess', _14 => _14.value, 'optionalAccess', _15 => _15.value])); - - next(vars); - }); - } - - /** - * Unrolls an object property - */ - _unrollObject(objectId, name, vars, next) { - this._getProperties(objectId, props => { - vars[name] = props - .map(v => [v.name, _optionalChain([v, 'optionalAccess', _16 => _16.value, 'optionalAccess', _17 => _17.value])]) - .reduce((obj, [key, val]) => { - obj[key] = val; - return obj; - }, {} ); - - next(vars); - }); - } - - /** - * Unrolls other properties - */ - _unrollOther(prop, vars, next) { - if (_optionalChain([prop, 'optionalAccess', _18 => _18.value, 'optionalAccess', _19 => _19.value]) != null) { - vars[prop.name] = prop.value.value; - } else if (_optionalChain([prop, 'optionalAccess', _20 => _20.value, 'optionalAccess', _21 => _21.description]) != null && _optionalChain([prop, 'optionalAccess', _22 => _22.value, 'optionalAccess', _23 => _23.type]) !== 'function') { - vars[prop.name] = `<${prop.value.description}>`; - } - - next(vars); - } -} - -/** - * When using Vercel pkg, the inspector module is not available. - * https://github.com/getsentry/sentry-javascript/issues/6769 - */ function tryNewAsyncSession() { try { return new AsyncSession(); } catch (e) { - return undefined; - } -} - -const INTEGRATION_NAME = 'LocalVariables'; - -/** - * Adds local variables to exception frames - */ -const _localVariablesSyncIntegration = (( - options = {}, - session = tryNewAsyncSession(), -) => { - const cachedFrames = new utils.LRUMap(20); - let rateLimiter; - let shouldProcessEvent = false; - - function handlePaused( - stackParser, - { params: { reason, data, callFrames } }, - complete, - ) { - if (reason !== 'exception' && reason !== 'promiseRejection') { - complete(); - return; - } - - _optionalChain([rateLimiter, 'optionalCall', _24 => _24()]); - - // data.description contains the original error.stack - const exceptionHash = common.hashFromStack(stackParser, _optionalChain([data, 'optionalAccess', _25 => _25.description])); - - if (exceptionHash == undefined) { - complete(); - return; - } - - const { add, next } = createCallbackList(frames => { - cachedFrames.set(exceptionHash, frames); - complete(); - }); - - // Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack - // For this reason we only attempt to get local variables for the first 5 frames - for (let i = 0; i < Math.min(callFrames.length, 5); i++) { - const { scopeChain, functionName, this: obj } = callFrames[i]; - - const localScope = scopeChain.find(scope => scope.type === 'local'); - - // obj.className is undefined in ESM modules - const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`; - - if (_optionalChain([localScope, 'optionalAccess', _26 => _26.object, 'access', _27 => _27.objectId]) === undefined) { - add(frames => { - frames[i] = { function: fn }; - next(frames); + return void 0; + } +} +var AsyncSession, INTEGRATION_NAME9, _localVariablesSyncIntegration, localVariablesSyncIntegration, LocalVariablesSync; +var init_local_variables_sync = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/local-variables-sync.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_nodeVersion(); + init_common(); + AsyncSession = class { + /** Throws if inspector API is not available */ + constructor() { + const { Session } = __require("inspector"); + this._session = new Session(); + } + /** @inheritdoc */ + configureAndConnect(onPause, captureAll) { + this._session.connect(); + this._session.on("Debugger.paused", (event) => { + onPause(event, () => { + this._session.post("Debugger.resume"); + }); }); - } else { - const id = localScope.object.objectId; - add(frames => - _optionalChain([session, 'optionalAccess', _28 => _28.getLocalVariables, 'call', _29 => _29(id, vars => { - frames[i] = { function: fn, vars }; - next(frames); - })]), + this._session.post("Debugger.enable"); + this._session.post("Debugger.setPauseOnExceptions", { state: captureAll ? "all" : "uncaught" }); + } + setPauseOnExceptions(captureAll) { + this._session.post("Debugger.setPauseOnExceptions", { state: captureAll ? "all" : "uncaught" }); + } + /** @inheritdoc */ + getLocalVariables(objectId, complete) { + this._getProperties(objectId, (props) => { + const { add, next } = createCallbackList(complete); + for (const prop of props) { + if (_optionalChain([prop, "optionalAccess", (_2) => _2.value, "optionalAccess", (_3) => _3.objectId]) && _optionalChain([prop, "optionalAccess", (_4) => _4.value, "access", (_5) => _5.className]) === "Array") { + const id = prop.value.objectId; + add((vars) => this._unrollArray(id, prop.name, vars, next)); + } else if (_optionalChain([prop, "optionalAccess", (_6) => _6.value, "optionalAccess", (_7) => _7.objectId]) && _optionalChain([prop, "optionalAccess", (_8) => _8.value, "optionalAccess", (_9) => _9.className]) === "Object") { + const id = prop.value.objectId; + add((vars) => this._unrollObject(id, prop.name, vars, next)); + } else if (_optionalChain([prop, "optionalAccess", (_10) => _10.value, "optionalAccess", (_11) => _11.value]) != null || _optionalChain([prop, "optionalAccess", (_12) => _12.value, "optionalAccess", (_13) => _13.description]) != null) { + add((vars) => this._unrollOther(prop, vars, next)); + } + } + next({}); + }); + } + /** + * Gets all the PropertyDescriptors of an object + */ + _getProperties(objectId, next) { + this._session.post( + "Runtime.getProperties", + { + objectId, + ownProperties: true + }, + (err, params) => { + if (err) { + next([]); + } else { + next(params.result); + } + } ); } - } - - next([]); - } - - function addLocalVariablesToException(exception) { - const hash = common.hashFrames(_optionalChain([exception, 'optionalAccess', _30 => _30.stacktrace, 'optionalAccess', _31 => _31.frames])); - - if (hash === undefined) { - return; - } - - // Check if we have local variables for an exception that matches the hash - // remove is identical to get but also removes the entry from the cache - const cachedFrame = cachedFrames.remove(hash); - - if (cachedFrame === undefined) { - return; - } - - // Filter out frames where the function name is `new Promise` since these are in the error.stack frames - // but do not appear in the debugger call frames - const frames = (_optionalChain([exception, 'access', _32 => _32.stacktrace, 'optionalAccess', _33 => _33.frames]) || []).filter(frame => frame.function !== 'new Promise'); - - for (let i = 0; i < frames.length; i++) { - // Sentry frames are in reverse order - const frameIndex = frames.length - i - 1; - - // Drop out if we run out of frames to match up - if (!frames[frameIndex] || !cachedFrame[i]) { - break; + /** + * Unrolls an array property + */ + _unrollArray(objectId, name, vars, next) { + this._getProperties(objectId, (props) => { + vars[name] = props.filter((v) => v.name !== "length" && !isNaN(parseInt(v.name, 10))).sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10)).map((v) => _optionalChain([v, "optionalAccess", (_14) => _14.value, "optionalAccess", (_15) => _15.value])); + next(vars); + }); } - - if ( - // We need to have vars to add - cachedFrame[i].vars === undefined || - // We're not interested in frames that are not in_app because the vars are not relevant - frames[frameIndex].in_app === false || - // The function names need to match - !common.functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function) - ) { - continue; + /** + * Unrolls an object property + */ + _unrollObject(objectId, name, vars, next) { + this._getProperties(objectId, (props) => { + vars[name] = props.map((v) => [v.name, _optionalChain([v, "optionalAccess", (_16) => _16.value, "optionalAccess", (_17) => _17.value])]).reduce((obj, [key, val]) => { + obj[key] = val; + return obj; + }, {}); + next(vars); + }); } - - frames[frameIndex].vars = cachedFrame[i].vars; - } - } - - function addLocalVariablesToEvent(event) { - for (const exception of _optionalChain([event, 'optionalAccess', _34 => _34.exception, 'optionalAccess', _35 => _35.values]) || []) { - addLocalVariablesToException(exception); - } - - return event; - } - - return { - name: INTEGRATION_NAME, - setupOnce() { - const client = core.getClient(); - const clientOptions = _optionalChain([client, 'optionalAccess', _36 => _36.getOptions, 'call', _37 => _37()]); - - if (session && _optionalChain([clientOptions, 'optionalAccess', _38 => _38.includeLocalVariables])) { - // Only setup this integration if the Node version is >= v18 - // https://github.com/getsentry/sentry-javascript/issues/7697 - const unsupportedNodeVersion = nodeVersion.NODE_VERSION.major < 18; - - if (unsupportedNodeVersion) { - utils.logger.log('The `LocalVariables` integration is only supported on Node >= v18.'); + /** + * Unrolls other properties + */ + _unrollOther(prop, vars, next) { + if (_optionalChain([prop, "optionalAccess", (_18) => _18.value, "optionalAccess", (_19) => _19.value]) != null) { + vars[prop.name] = prop.value.value; + } else if (_optionalChain([prop, "optionalAccess", (_20) => _20.value, "optionalAccess", (_21) => _21.description]) != null && _optionalChain([prop, "optionalAccess", (_22) => _22.value, "optionalAccess", (_23) => _23.type]) !== "function") { + vars[prop.name] = `<${prop.value.description}>`; + } + next(vars); + } + }; + INTEGRATION_NAME9 = "LocalVariables"; + _localVariablesSyncIntegration = (options2 = {}, session = tryNewAsyncSession()) => { + const cachedFrames = new LRUMap(20); + let rateLimiter; + let shouldProcessEvent = false; + function handlePaused(stackParser, { params: { reason, data, callFrames } }, complete) { + if (reason !== "exception" && reason !== "promiseRejection") { + complete(); return; } - - const captureAll = options.captureAllExceptions !== false; - - session.configureAndConnect( - (ev, complete) => - handlePaused(clientOptions.stackParser, ev , complete), - captureAll, - ); - - if (captureAll) { - const max = options.maxExceptionsPerSecond || 50; - - rateLimiter = common.createRateLimiter( - max, - () => { - utils.logger.log('Local variables rate-limit lifted.'); - _optionalChain([session, 'optionalAccess', _39 => _39.setPauseOnExceptions, 'call', _40 => _40(true)]); - }, - seconds => { - utils.logger.log( - `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`, - ); - _optionalChain([session, 'optionalAccess', _41 => _41.setPauseOnExceptions, 'call', _42 => _42(false)]); - }, - ); + _optionalChain([rateLimiter, "optionalCall", (_24) => _24()]); + const exceptionHash = hashFromStack(stackParser, _optionalChain([data, "optionalAccess", (_25) => _25.description])); + if (exceptionHash == void 0) { + complete(); + return; } - - shouldProcessEvent = true; + const { add, next } = createCallbackList((frames) => { + cachedFrames.set(exceptionHash, frames); + complete(); + }); + for (let i = 0; i < Math.min(callFrames.length, 5); i++) { + const { scopeChain, functionName, this: obj } = callFrames[i]; + const localScope = scopeChain.find((scope) => scope.type === "local"); + const fn = obj.className === "global" || !obj.className ? functionName : `${obj.className}.${functionName}`; + if (_optionalChain([localScope, "optionalAccess", (_26) => _26.object, "access", (_27) => _27.objectId]) === void 0) { + add((frames) => { + frames[i] = { function: fn }; + next(frames); + }); + } else { + const id = localScope.object.objectId; + add( + (frames) => _optionalChain([session, "optionalAccess", (_28) => _28.getLocalVariables, "call", (_29) => _29(id, (vars) => { + frames[i] = { function: fn, vars }; + next(frames); + })]) + ); + } + } + next([]); } - }, - processEvent(event) { - if (shouldProcessEvent) { - return addLocalVariablesToEvent(event); + function addLocalVariablesToException(exception2) { + const hash = hashFrames(_optionalChain([exception2, "optionalAccess", (_30) => _30.stacktrace, "optionalAccess", (_31) => _31.frames])); + if (hash === void 0) { + return; + } + const cachedFrame = cachedFrames.remove(hash); + if (cachedFrame === void 0) { + return; + } + const frames = (_optionalChain([exception2, "access", (_32) => _32.stacktrace, "optionalAccess", (_33) => _33.frames]) || []).filter((frame) => frame.function !== "new Promise"); + for (let i = 0; i < frames.length; i++) { + const frameIndex = frames.length - i - 1; + if (!frames[frameIndex] || !cachedFrame[i]) { + break; + } + if ( + // We need to have vars to add + cachedFrame[i].vars === void 0 || // We're not interested in frames that are not in_app because the vars are not relevant + frames[frameIndex].in_app === false || // The function names need to match + !functionNamesMatch(frames[frameIndex].function, cachedFrame[i].function) + ) { + continue; + } + frames[frameIndex].vars = cachedFrame[i].vars; + } } + function addLocalVariablesToEvent(event) { + for (const exception2 of _optionalChain([event, "optionalAccess", (_34) => _34.exception, "optionalAccess", (_35) => _35.values]) || []) { + addLocalVariablesToException(exception2); + } + return event; + } + return { + name: INTEGRATION_NAME9, + setupOnce() { + const client = getClient(); + const clientOptions = _optionalChain([client, "optionalAccess", (_36) => _36.getOptions, "call", (_37) => _37()]); + if (session && _optionalChain([clientOptions, "optionalAccess", (_38) => _38.includeLocalVariables])) { + const unsupportedNodeVersion = NODE_VERSION.major < 18; + if (unsupportedNodeVersion) { + logger.log("The `LocalVariables` integration is only supported on Node >= v18."); + return; + } + const captureAll = options2.captureAllExceptions !== false; + session.configureAndConnect( + (ev, complete) => handlePaused(clientOptions.stackParser, ev, complete), + captureAll + ); + if (captureAll) { + const max = options2.maxExceptionsPerSecond || 50; + rateLimiter = createRateLimiter( + max, + () => { + logger.log("Local variables rate-limit lifted."); + _optionalChain([session, "optionalAccess", (_39) => _39.setPauseOnExceptions, "call", (_40) => _40(true)]); + }, + (seconds) => { + logger.log( + `Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.` + ); + _optionalChain([session, "optionalAccess", (_41) => _41.setPauseOnExceptions, "call", (_42) => _42(false)]); + } + ); + } + shouldProcessEvent = true; + } + }, + processEvent(event) { + if (shouldProcessEvent) { + return addLocalVariablesToEvent(event); + } + return event; + }, + // These are entirely for testing + _getCachedFramesCount() { + return cachedFrames.size; + }, + _getFirstCachedFrame() { + return cachedFrames.values()[0]; + } + }; + }; + localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration); + LocalVariablesSync = convertIntegrationFnToClass( + INTEGRATION_NAME9, + localVariablesSyncIntegration + ); + } +}); - return event; - }, - // These are entirely for testing - _getCachedFramesCount() { - return cachedFrames.size; - }, - _getFirstCachedFrame() { - return cachedFrames.values()[0]; - }, - }; -}) ; - -const localVariablesSyncIntegration = core.defineIntegration(_localVariablesSyncIntegration); - -/** - * Adds local variables to exception frames. - * @deprecated Use `localVariablesSyncIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const LocalVariablesSync = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - localVariablesSyncIntegration, -) - -; - -// eslint-disable-next-line deprecation/deprecation - -exports.LocalVariablesSync = LocalVariablesSync; -exports.createCallbackList = createCallbackList; -exports.localVariablesSyncIntegration = localVariablesSyncIntegration; -//# sourceMappingURL=local-variables-sync.js.map - - -/***/ }), - -/***/ 14550: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const fs = __nccwpck_require__(79896); -const path = __nccwpck_require__(16928); -const core = __nccwpck_require__(90155); - -let moduleCache; - -const INTEGRATION_NAME = 'Modules'; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/index.js +var LocalVariables, localVariablesIntegration; +var init_local_variables = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/local-variables/index.js"() { + init_local_variables_sync(); + LocalVariables = LocalVariablesSync; + localVariablesIntegration = localVariablesSyncIntegration; + } +}); -/** Extract information about paths */ +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/modules.js +import { existsSync, readFileSync } from "fs"; +import { dirname as dirname2, join as join3 } from "path"; function getPaths() { try { - return require.cache ? Object.keys(require.cache ) : []; + return __require.cache ? Object.keys(__require.cache) : []; } catch (e) { return []; } } - -/** Extract information about package.json modules */ -function collectModules() - - { - const mainPaths = (require.main && require.main.paths) || []; +function collectModules() { + const mainPaths = __require.main && __require.main.paths || []; const paths = getPaths(); - const infos - - = {}; - const seen - - = {}; - - paths.forEach(path$1 => { - let dir = path$1; - - /** Traverse directories upward in the search of package.json file */ + const infos = {}; + const seen = {}; + paths.forEach((path2) => { + let dir = path2; const updir = () => { const orig = dir; - dir = path.dirname(orig); - + dir = dirname2(orig); if (!dir || orig === dir || seen[orig]) { - return undefined; + return void 0; } if (mainPaths.indexOf(dir) < 0) { return updir(); } - - const pkgfile = path.join(orig, 'package.json'); + const pkgfile = join3(orig, "package.json"); seen[orig] = true; - - if (!fs.existsSync(pkgfile)) { + if (!existsSync(pkgfile)) { return updir(); } - try { - const info = JSON.parse(fs.readFileSync(pkgfile, 'utf8')) - -; + const info = JSON.parse(readFileSync(pkgfile, "utf8")); infos[info.name] = info.version; } catch (_oO) { - // no-empty } }; - updir(); }); - return infos; } - -/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */ function _getModules() { if (!moduleCache) { moduleCache = collectModules(); } return moduleCache; } - -const _modulesIntegration = (() => { - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - processEvent(event) { - event.modules = { - ...event.modules, - ..._getModules(), +var moduleCache, INTEGRATION_NAME10, _modulesIntegration, modulesIntegration, Modules; +var init_modules = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/modules.js"() { + init_esm2(); + INTEGRATION_NAME10 = "Modules"; + _modulesIntegration = () => { + return { + name: INTEGRATION_NAME10, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event) { + event.modules = { + ...event.modules, + ..._getModules() + }; + return event; + } }; + }; + modulesIntegration = defineIntegration(_modulesIntegration); + Modules = convertIntegrationFnToClass(INTEGRATION_NAME10, modulesIntegration); + } +}); - return event; - }, - }; -}) ; - -const modulesIntegration = core.defineIntegration(_modulesIntegration); - -/** - * Add node modules / packages to the event. - * @deprecated Use `modulesIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Modules = core.convertIntegrationFnToClass(INTEGRATION_NAME, modulesIntegration) - -; - -// eslint-disable-next-line deprecation/deprecation - -exports.Modules = Modules; -exports.modulesIntegration = modulesIntegration; -//# sourceMappingURL=modules.js.map - - -/***/ }), - -/***/ 32820: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(35473); -const errorhandling = __nccwpck_require__(9222); - -const INTEGRATION_NAME = 'OnUncaughtException'; - -const _onUncaughtExceptionIntegration = ((options = {}) => { - const _options = { - exitEvenIfOtherHandlersAreRegistered: true, - ...options, - }; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - global.process.on('uncaughtException', makeErrorHandler(client, _options)); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/utils/errorhandling.js +function logAndExitProcess(error) { + consoleSandbox(() => { + console.error(error); + }); + const client = getClient(); + if (client === void 0) { + DEBUG_BUILD4 && logger.warn("No NodeClient was defined, we are exiting the process now."); + global.process.exit(1); + } + const options2 = client.getOptions(); + const timeout = options2 && options2.shutdownTimeout && options2.shutdownTimeout > 0 && options2.shutdownTimeout || DEFAULT_SHUTDOWN_TIMEOUT; + client.close(timeout).then( + (result) => { + if (!result) { + DEBUG_BUILD4 && logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"); + } + global.process.exit(1); }, - }; -}) ; - -const onUncaughtExceptionIntegration = core.defineIntegration(_onUncaughtExceptionIntegration); - -/** - * Global Exception handler. - * @deprecated Use `onUncaughtExceptionIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const OnUncaughtException = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - onUncaughtExceptionIntegration, -) - -; - -// eslint-disable-next-line deprecation/deprecation + (error2) => { + DEBUG_BUILD4 && logger.error(error2); + } + ); +} +var DEFAULT_SHUTDOWN_TIMEOUT; +var init_errorhandling = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/utils/errorhandling.js"() { + init_esm2(); + init_esm(); + init_debug_build4(); + DEFAULT_SHUTDOWN_TIMEOUT = 2e3; + } +}); -/** Exported only for tests */ -function makeErrorHandler(client, options) { - const timeout = 2000; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js +function makeErrorHandler(client, options2) { + const timeout = 2e3; let caughtFirstError = false; let caughtSecondError = false; let calledFatalError = false; let firstError; - const clientOptions = client.getOptions(); - return Object.assign( (error) => { - let onFatalError = errorhandling.logAndExitProcess; - - if (options.onFatalError) { - onFatalError = options.onFatalError; + let onFatalError = logAndExitProcess; + if (options2.onFatalError) { + onFatalError = options2.onFatalError; } else if (clientOptions.onFatalError) { - onFatalError = clientOptions.onFatalError ; + onFatalError = clientOptions.onFatalError; } - - // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not - // want to alter this behaviour so we check for other listeners that users may have attached themselves and adjust - // exit behaviour of the SDK accordingly: - // - If other listeners are attached, do not exit. - // - If the only listener attached is ours, exit. - const userProvidedListenersCount = ( - global.process.listeners('uncaughtException') - ).reduce((acc, listener) => { + const userProvidedListenersCount = global.process.listeners("uncaughtException").reduce((acc, listener) => { if ( // There are 3 listeners we ignore: - listener.name === 'domainUncaughtExceptionClear' || // as soon as we're using domains this listener is attached by node itself - (listener.tag && listener.tag === 'sentry_tracingErrorCallback') || // the handler we register for tracing - (listener )._errorHandler // the handler we register in this integration + listener.name === "domainUncaughtExceptionClear" || // as soon as we're using domains this listener is attached by node itself + listener.tag && listener.tag === "sentry_tracingErrorCallback" || // the handler we register for tracing + listener._errorHandler ) { return acc; } else { return acc + 1; } }, 0); - const processWouldExit = userProvidedListenersCount === 0; - const shouldApplyFatalHandlingLogic = options.exitEvenIfOtherHandlersAreRegistered || processWouldExit; - + const shouldApplyFatalHandlingLogic = options2.exitEvenIfOtherHandlersAreRegistered || processWouldExit; if (!caughtFirstError) { - // this is the first uncaught error and the ultimate reason for shutting down - // we want to do absolutely everything possible to ensure it gets captured - // also we want to make sure we don't go recursion crazy if more errors happen after this one firstError = error; caughtFirstError = true; - - if (core.getClient() === client) { - core.captureException(error, { + if (getClient() === client) { + captureException(error, { originalException: error, captureContext: { - level: 'fatal', + level: "fatal" }, mechanism: { handled: false, - type: 'onuncaughtexception', - }, + type: "onuncaughtexception" + } }); } - if (!calledFatalError && shouldApplyFatalHandlingLogic) { calledFatalError = true; onFatalError(error); @@ -25282,112257 +22890,80051 @@ function makeErrorHandler(client, options) { } else { if (shouldApplyFatalHandlingLogic) { if (calledFatalError) { - // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down - debugBuild.DEBUG_BUILD && - utils.logger.warn( - 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown', - ); - errorhandling.logAndExitProcess(error); + DEBUG_BUILD4 && logger.warn( + "uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown" + ); + logAndExitProcess(error); } else if (!caughtSecondError) { - // two cases for how we can hit this branch: - // - capturing of first error blew up and we just caught the exception from that - // - quit trying to capture, proceed with shutdown - // - a second independent error happened while waiting for first error to capture - // - want to avoid causing premature shutdown before first error capture finishes - // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff - // so let's instead just delay a bit before we proceed with our action here - // in case 1, we just wait a bit unnecessarily but ultimately do the same thing - // in case 2, the delay hopefully made us wait long enough for the capture to finish - // two potential nonideal outcomes: - // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError - // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error - // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) - // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish caughtSecondError = true; setTimeout(() => { if (!calledFatalError) { - // it was probably case 1, let's treat err as the sendErr and call onFatalError calledFatalError = true; onFatalError(firstError, error); } - }, timeout); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc + }, timeout); } } } }, - { _errorHandler: true }, + { _errorHandler: true } ); } +var INTEGRATION_NAME11, _onUncaughtExceptionIntegration, onUncaughtExceptionIntegration, OnUncaughtException; +var init_onuncaughtexception = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/onuncaughtexception.js"() { + init_esm2(); + init_esm(); + init_debug_build4(); + init_errorhandling(); + INTEGRATION_NAME11 = "OnUncaughtException"; + _onUncaughtExceptionIntegration = (options2 = {}) => { + const _options = { + exitEvenIfOtherHandlersAreRegistered: true, + ...options2 + }; + return { + name: INTEGRATION_NAME11, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + global.process.on("uncaughtException", makeErrorHandler(client, _options)); + } + }; + }; + onUncaughtExceptionIntegration = defineIntegration(_onUncaughtExceptionIntegration); + OnUncaughtException = convertIntegrationFnToClass( + INTEGRATION_NAME11, + onUncaughtExceptionIntegration + ); + } +}); -exports.OnUncaughtException = OnUncaughtException; -exports.makeErrorHandler = makeErrorHandler; -exports.onUncaughtExceptionIntegration = onUncaughtExceptionIntegration; -//# sourceMappingURL=onuncaughtexception.js.map - - -/***/ }), - -/***/ 76668: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const errorhandling = __nccwpck_require__(9222); - -const INTEGRATION_NAME = 'OnUnhandledRejection'; - -const _onUnhandledRejectionIntegration = ((options = {}) => { - const mode = options.mode || 'warn'; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - global.process.on('unhandledRejection', makeUnhandledPromiseHandler(client, { mode })); - }, - }; -}) ; - -const onUnhandledRejectionIntegration = core.defineIntegration(_onUnhandledRejectionIntegration); - -/** - * Global Promise Rejection handler. - * @deprecated Use `onUnhandledRejectionIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const OnUnhandledRejection = core.convertIntegrationFnToClass( - INTEGRATION_NAME, - onUnhandledRejectionIntegration, -) - -; - -// eslint-disable-next-line deprecation/deprecation - -/** - * Send an exception with reason - * @param reason string - * @param promise promise - * - * Exported only for tests. - */ -function makeUnhandledPromiseHandler( - client, - options, -) { +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js +function makeUnhandledPromiseHandler(client, options2) { return function sendUnhandledPromise(reason, promise) { - if (core.getClient() !== client) { + if (getClient() !== client) { return; } - - core.captureException(reason, { + captureException(reason, { originalException: promise, captureContext: { - extra: { unhandledPromiseRejection: true }, + extra: { unhandledPromiseRejection: true } }, mechanism: { handled: false, - type: 'onunhandledrejection', - }, + type: "onunhandledrejection" + } }); - - handleRejection(reason, options); + handleRejection(reason, options2); }; } - -/** - * Handler for `mode` option - - */ -function handleRejection( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - reason, - options, -) { - // https://github.com/nodejs/node/blob/7cf6f9e964aa00772965391c23acda6d71972a9a/lib/internal/process/promises.js#L234-L240 - const rejectionWarning = - 'This error originated either by ' + - 'throwing inside of an async function without a catch block, ' + - 'or by rejecting a promise which was not handled with .catch().' + - ' The promise rejected with the reason:'; - - /* eslint-disable no-console */ - if (options.mode === 'warn') { - utils.consoleSandbox(() => { +function handleRejection(reason, options2) { + const rejectionWarning = "This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:"; + if (options2.mode === "warn") { + consoleSandbox(() => { console.warn(rejectionWarning); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access console.error(reason && reason.stack ? reason.stack : reason); }); - } else if (options.mode === 'strict') { - utils.consoleSandbox(() => { + } else if (options2.mode === "strict") { + consoleSandbox(() => { console.warn(rejectionWarning); }); - errorhandling.logAndExitProcess(reason); + logAndExitProcess(reason); + } +} +var INTEGRATION_NAME12, _onUnhandledRejectionIntegration, onUnhandledRejectionIntegration, OnUnhandledRejection; +var init_onunhandledrejection = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/onunhandledrejection.js"() { + init_esm2(); + init_esm(); + init_errorhandling(); + INTEGRATION_NAME12 = "OnUnhandledRejection"; + _onUnhandledRejectionIntegration = (options2 = {}) => { + const mode = options2.mode || "warn"; + return { + name: INTEGRATION_NAME12, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + global.process.on("unhandledRejection", makeUnhandledPromiseHandler(client, { mode })); + } + }; + }; + onUnhandledRejectionIntegration = defineIntegration(_onUnhandledRejectionIntegration); + OnUnhandledRejection = convertIntegrationFnToClass( + INTEGRATION_NAME12, + onUnhandledRejectionIntegration + ); } - /* eslint-enable no-console */ -} - -exports.OnUnhandledRejection = OnUnhandledRejection; -exports.makeUnhandledPromiseHandler = makeUnhandledPromiseHandler; -exports.onUnhandledRejectionIntegration = onUnhandledRejectionIntegration; -//# sourceMappingURL=onunhandledrejection.js.map - - -/***/ }), - -/***/ 5455: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const http = __nccwpck_require__(58611); -const url = __nccwpck_require__(87016); -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -const INTEGRATION_NAME = 'Spotlight'; - -const _spotlightIntegration = ((options = {}) => { - const _options = { - sidecarUrl: options.sidecarUrl || 'http://localhost:8969/stream', - }; - - return { - name: INTEGRATION_NAME, - // TODO v8: Remove this - setupOnce() {}, // eslint-disable-line @typescript-eslint/no-empty-function - setup(client) { - if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') { - utils.logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"); - } - connectToSpotlight(client, _options); - }, - }; -}) ; - -const spotlightIntegration = core.defineIntegration(_spotlightIntegration); - -/** - * Use this integration to send errors and transactions to Spotlight. - * - * Learn more about spotlight at https://spotlightjs.com - * - * Important: This integration only works with Node 18 or newer. - * - * @deprecated Use `spotlightIntegration()` instead. - */ -// eslint-disable-next-line deprecation/deprecation -const Spotlight = core.convertIntegrationFnToClass(INTEGRATION_NAME, spotlightIntegration) - -; - -// eslint-disable-next-line deprecation/deprecation +}); -function connectToSpotlight(client, options) { - const spotlightUrl = parseSidecarUrl(options.sidecarUrl); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/spotlight.js +import * as http3 from "http"; +import { URL as URL5 } from "url"; +function connectToSpotlight(client, options2) { + const spotlightUrl = parseSidecarUrl(options2.sidecarUrl); if (!spotlightUrl) { return; } - let failedRequests = 0; - - if (typeof client.on !== 'function') { - utils.logger.warn('[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)'); + if (typeof client.on !== "function") { + logger.warn("[Spotlight] Cannot connect to spotlight due to missing method on SDK client (`client.on`)"); return; } - - client.on('beforeEnvelope', (envelope) => { + client.on("beforeEnvelope", (envelope) => { if (failedRequests > 3) { - utils.logger.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests'); + logger.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests"); return; } - - const serializedEnvelope = utils.serializeEnvelope(envelope); - - const request = getNativeHttpRequest(); - const req = request( + const serializedEnvelope = serializeEnvelope(envelope); + const request2 = getNativeHttpRequest(); + const req = request2( { - method: 'POST', + method: "POST", path: spotlightUrl.pathname, hostname: spotlightUrl.hostname, port: spotlightUrl.port, headers: { - 'Content-Type': 'application/x-sentry-envelope', - }, + "Content-Type": "application/x-sentry-envelope" + } }, - res => { - res.on('data', () => { - // Drain socket + (res) => { + res.on("data", () => { }); - - res.on('end', () => { - // Drain socket + res.on("end", () => { }); - res.setEncoding('utf8'); - }, + res.setEncoding("utf8"); + } ); - - req.on('error', () => { + req.on("error", () => { failedRequests++; - utils.logger.warn('[Spotlight] Failed to send envelope to Spotlight Sidecar'); + logger.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar"); }); req.write(serializedEnvelope); req.end(); }); } - -function parseSidecarUrl(url$1) { +function parseSidecarUrl(url) { try { - return new url.URL(`${url$1}`); + return new URL5(`${url}`); } catch (e) { - utils.logger.warn(`[Spotlight] Invalid sidecar URL: ${url$1}`); - return undefined; + logger.warn(`[Spotlight] Invalid sidecar URL: ${url}`); + return void 0; } } - -/** - * We want to get an unpatched http request implementation to avoid capturing our own calls. - */ function getNativeHttpRequest() { - const { request } = http; - if (isWrapped(request)) { - return request.__sentry_original__; + const { request: request2 } = http3; + if (isWrapped(request2)) { + return request2.__sentry_original__; } - - return request; + return request2; } - function isWrapped(impl) { - return '__sentry_original__' in impl; -} - -exports.Spotlight = Spotlight; -exports.getNativeHttpRequest = getNativeHttpRequest; -exports.spotlightIntegration = spotlightIntegration; -//# sourceMappingURL=spotlight.js.map - - -/***/ }), - -/***/ 7248: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const nodeVersion = __nccwpck_require__(68047); - -exports.ChannelName = void 0;(function (ChannelName) { - // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md#undicirequestcreate - const RequestCreate = 'undici:request:create'; ChannelName["RequestCreate"] = RequestCreate; - const RequestEnd = 'undici:request:headers'; ChannelName["RequestEnd"] = RequestEnd; - const RequestError = 'undici:request:error'; ChannelName["RequestError"] = RequestError; -})(exports.ChannelName || (exports.ChannelName = {})); - -// Please note that you cannot use `console.log` to debug the callbacks registered to the `diagnostics_channel` API. -// To debug, you can use `writeFileSync` to write to a file: -// https://nodejs.org/api/async_hooks.html#printing-in-asynchook-callbacks -// -// import { writeFileSync } from 'fs'; -// import { format } from 'util'; -// -// function debug(...args: any): void { -// // Use a function like this one when debugging inside an AsyncHook callback -// // @ts-expect-error any -// writeFileSync('log.out', `${format(...args)}\n`, { flag: 'a' }); -// } - -const _nativeNodeFetchintegration = ((options) => { - // eslint-disable-next-line deprecation/deprecation - return new Undici(options) ; -}) ; - -const nativeNodeFetchintegration = core.defineIntegration(_nativeNodeFetchintegration); - -/** - * Instruments outgoing HTTP requests made with the `undici` package via - * Node's `diagnostics_channel` API. - * - * Supports Undici 4.7.0 or higher. - * - * Requires Node 16.17.0 or higher. - * - * @deprecated Use `nativeNodeFetchintegration()` instead. - */ -class Undici { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Undici';} - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - __init() {this.name = Undici.id;} - - __init2() {this._createSpanUrlMap = new utils.LRUMap(100);} - __init3() {this._headersUrlMap = new utils.LRUMap(100);} - - constructor(_options = {}) {Undici.prototype.__init.call(this);Undici.prototype.__init2.call(this);Undici.prototype.__init3.call(this);Undici.prototype.__init4.call(this);Undici.prototype.__init5.call(this);Undici.prototype.__init6.call(this); - this._options = { - breadcrumbs: _options.breadcrumbs === undefined ? true : _options.breadcrumbs, - tracing: _options.tracing, - shouldCreateSpanForRequest: _options.shouldCreateSpanForRequest, - }; - } - - /** - * @inheritDoc - */ - setupOnce(_addGlobalEventProcessor) { - // Requires Node 16+ to use the diagnostics_channel API. - if (nodeVersion.NODE_VERSION.major < 16) { - return; - } - - let ds; - try { - // eslint-disable-next-line @typescript-eslint/no-var-requires - ds = __nccwpck_require__(31637) ; - } catch (e) { - // no-op - } - - if (!ds || !ds.subscribe) { - return; - } - - // https://github.com/nodejs/undici/blob/e6fc80f809d1217814c044f52ed40ef13f21e43c/docs/api/DiagnosticsChannel.md - ds.subscribe(exports.ChannelName.RequestCreate, this._onRequestCreate); - ds.subscribe(exports.ChannelName.RequestEnd, this._onRequestEnd); - ds.subscribe(exports.ChannelName.RequestError, this._onRequestError); - } - - /** Helper that wraps shouldCreateSpanForRequest option */ - _shouldCreateSpan(url) { - if (this._options.tracing === false || (this._options.tracing === undefined && !core.hasTracingEnabled())) { - return false; - } - - if (this._options.shouldCreateSpanForRequest === undefined) { - return true; - } - - const cachedDecision = this._createSpanUrlMap.get(url); - if (cachedDecision !== undefined) { - return cachedDecision; - } - - const decision = this._options.shouldCreateSpanForRequest(url); - this._createSpanUrlMap.set(url, decision); - return decision; - } - - __init4() {this._onRequestCreate = (message) => { - // eslint-disable-next-line deprecation/deprecation - if (!_optionalChain([core.getClient, 'call', _10 => _10(), 'optionalAccess', _11 => _11.getIntegration, 'call', _12 => _12(Undici)])) { - return; - } - - const { request } = message ; - - const stringUrl = request.origin ? request.origin.toString() + request.path : request.path; - - const client = core.getClient(); - if (!client) { - return; - } - - if (core.isSentryRequestUrl(stringUrl, client) || request.__sentry_span__ !== undefined) { - return; - } - - const clientOptions = client.getOptions(); - const scope = core.getCurrentScope(); - const isolationScope = core.getIsolationScope(); - const parentSpan = core.getActiveSpan(); - - const span = this._shouldCreateSpan(stringUrl) ? createRequestSpan(parentSpan, request, stringUrl) : undefined; - if (span) { - request.__sentry_span__ = span; - } - - const shouldAttachTraceData = (url) => { - if (clientOptions.tracePropagationTargets === undefined) { - return true; - } - - const cachedDecision = this._headersUrlMap.get(url); - if (cachedDecision !== undefined) { - return cachedDecision; - } - - const decision = utils.stringMatchesSomePattern(url, clientOptions.tracePropagationTargets); - this._headersUrlMap.set(url, decision); - return decision; - }; - - if (shouldAttachTraceData(stringUrl)) { - const { traceId, spanId, sampled, dsc } = { - ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext(), + return "__sentry_original__" in impl; +} +var INTEGRATION_NAME13, _spotlightIntegration, spotlightIntegration, Spotlight; +var init_spotlight = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/spotlight.js"() { + init_esm2(); + init_esm(); + INTEGRATION_NAME13 = "Spotlight"; + _spotlightIntegration = (options2 = {}) => { + const _options = { + sidecarUrl: options2.sidecarUrl || "http://localhost:8969/stream" }; - - const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled); - - const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( - dsc || - (span - ? core.getDynamicSamplingContextFromSpan(span) - : core.getDynamicSamplingContextFromClient(traceId, client, scope)), - ); - - setHeadersOnRequest(request, sentryTraceHeader, sentryBaggageHeader); - } - };} - - __init5() {this._onRequestEnd = (message) => { - // eslint-disable-next-line deprecation/deprecation - if (!_optionalChain([core.getClient, 'call', _13 => _13(), 'optionalAccess', _14 => _14.getIntegration, 'call', _15 => _15(Undici)])) { - return; - } - - const { request, response } = message ; - - const stringUrl = request.origin ? request.origin.toString() + request.path : request.path; - - if (core.isSentryRequestUrl(stringUrl, core.getClient())) { - return; - } - - const span = request.__sentry_span__; - if (span) { - core.setHttpStatus(span, response.statusCode); - span.end(); - } - - if (this._options.breadcrumbs) { - core.addBreadcrumb( - { - category: 'http', - data: { - method: request.method, - status_code: response.statusCode, - url: stringUrl, - }, - type: 'http', - }, - { - event: 'response', - request, - response, - }, - ); - } - };} - - __init6() {this._onRequestError = (message) => { - // eslint-disable-next-line deprecation/deprecation - if (!_optionalChain([core.getClient, 'call', _16 => _16(), 'optionalAccess', _17 => _17.getIntegration, 'call', _18 => _18(Undici)])) { - return; - } - - const { request } = message ; - - const stringUrl = request.origin ? request.origin.toString() + request.path : request.path; - - if (core.isSentryRequestUrl(stringUrl, core.getClient())) { - return; - } - - const span = request.__sentry_span__; - if (span) { - span.setStatus('internal_error'); - span.end(); - } - - if (this._options.breadcrumbs) { - core.addBreadcrumb( - { - category: 'http', - data: { - method: request.method, - url: stringUrl, - }, - level: 'error', - type: 'http', - }, - { - event: 'error', - request, + return { + name: INTEGRATION_NAME13, + // TODO v8: Remove this + setupOnce() { }, - ); - } - };} -}Undici.__initStatic(); + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + if (typeof process === "object" && process.env && process.env.NODE_ENV !== "development") { + logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"); + } + connectToSpotlight(client, _options); + } + }; + }; + spotlightIntegration = defineIntegration(_spotlightIntegration); + Spotlight = convertIntegrationFnToClass(INTEGRATION_NAME13, spotlightIntegration); + } +}); -function setHeadersOnRequest( - request, - sentryTrace, - sentryBaggageHeader, -) { +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/undici/index.js +function setHeadersOnRequest(request2, sentryTrace, sentryBaggageHeader) { let hasSentryHeaders; - if (Array.isArray(request.headers)) { - hasSentryHeaders = request.headers.some(headerLine => headerLine === 'sentry-trace'); + if (Array.isArray(request2.headers)) { + hasSentryHeaders = request2.headers.some((headerLine) => headerLine === "sentry-trace"); } else { - const headerLines = request.headers.split('\r\n'); - hasSentryHeaders = headerLines.some(headerLine => headerLine.startsWith('sentry-trace:')); + const headerLines = request2.headers.split("\r\n"); + hasSentryHeaders = headerLines.some((headerLine) => headerLine.startsWith("sentry-trace:")); } - if (hasSentryHeaders) { return; } - - request.addHeader('sentry-trace', sentryTrace); + request2.addHeader("sentry-trace", sentryTrace); if (sentryBaggageHeader) { - request.addHeader('baggage', sentryBaggageHeader); + request2.addHeader("baggage", sentryBaggageHeader); } } - -function createRequestSpan( - activeSpan, - request, - stringUrl, -) { - const url = utils.parseUrl(stringUrl); - - const method = request.method || 'GET'; +function createRequestSpan(activeSpan, request2, stringUrl) { + const url = parseUrl2(stringUrl); + const method = request2.method || "GET"; const data = { - 'http.method': method, + "http.method": method }; if (url.search) { - data['http.query'] = url.search; + data["http.query"] = url.search; } if (url.hash) { - data['http.fragment'] = url.hash; + data["http.fragment"] = url.hash; } - // eslint-disable-next-line deprecation/deprecation - return _optionalChain([activeSpan, 'optionalAccess', _19 => _19.startChild, 'call', _20 => _20({ - op: 'http.client', - origin: 'auto.http.node.undici', - description: `${method} ${utils.getSanitizedUrlString(url)}`, - data, + return _optionalChain([activeSpan, "optionalAccess", (_19) => _19.startChild, "call", (_20) => _20({ + op: "http.client", + origin: "auto.http.node.undici", + description: `${method} ${getSanitizedUrlString(url)}`, + data })]); } - -exports.Undici = Undici; -exports.nativeNodeFetchintegration = nativeNodeFetchintegration; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 9222: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(35473); - -const DEFAULT_SHUTDOWN_TIMEOUT = 2000; - -/** - * @hidden - */ -function logAndExitProcess(error) { - utils.consoleSandbox(() => { - // eslint-disable-next-line no-console - console.error(error); - }); - - const client = core.getClient(); - - if (client === undefined) { - debugBuild.DEBUG_BUILD && utils.logger.warn('No NodeClient was defined, we are exiting the process now.'); - global.process.exit(1); +var ChannelName, _nativeNodeFetchintegration, nativeNodeFetchintegration, Undici; +var init_undici = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/undici/index.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_nodeVersion(); + (function(ChannelName2) { + const RequestCreate = "undici:request:create"; + ChannelName2["RequestCreate"] = RequestCreate; + const RequestEnd = "undici:request:headers"; + ChannelName2["RequestEnd"] = RequestEnd; + const RequestError2 = "undici:request:error"; + ChannelName2["RequestError"] = RequestError2; + })(ChannelName || (ChannelName = {})); + _nativeNodeFetchintegration = (options2) => { + return new Undici(options2); + }; + nativeNodeFetchintegration = defineIntegration(_nativeNodeFetchintegration); + Undici = class _Undici { + /** + * @inheritDoc + */ + static __initStatic() { + this.id = "Undici"; + } + /** + * @inheritDoc + */ + // eslint-disable-next-line deprecation/deprecation + __init() { + this.name = _Undici.id; + } + __init2() { + this._createSpanUrlMap = new LRUMap(100); + } + __init3() { + this._headersUrlMap = new LRUMap(100); + } + constructor(_options = {}) { + _Undici.prototype.__init.call(this); + _Undici.prototype.__init2.call(this); + _Undici.prototype.__init3.call(this); + _Undici.prototype.__init4.call(this); + _Undici.prototype.__init5.call(this); + _Undici.prototype.__init6.call(this); + this._options = { + breadcrumbs: _options.breadcrumbs === void 0 ? true : _options.breadcrumbs, + tracing: _options.tracing, + shouldCreateSpanForRequest: _options.shouldCreateSpanForRequest + }; + } + /** + * @inheritDoc + */ + setupOnce(_addGlobalEventProcessor) { + if (NODE_VERSION.major < 16) { + return; + } + let ds; + try { + ds = __require("diagnostics_channel"); + } catch (e) { + } + if (!ds || !ds.subscribe) { + return; + } + ds.subscribe(ChannelName.RequestCreate, this._onRequestCreate); + ds.subscribe(ChannelName.RequestEnd, this._onRequestEnd); + ds.subscribe(ChannelName.RequestError, this._onRequestError); + } + /** Helper that wraps shouldCreateSpanForRequest option */ + _shouldCreateSpan(url) { + if (this._options.tracing === false || this._options.tracing === void 0 && !hasTracingEnabled()) { + return false; + } + if (this._options.shouldCreateSpanForRequest === void 0) { + return true; + } + const cachedDecision = this._createSpanUrlMap.get(url); + if (cachedDecision !== void 0) { + return cachedDecision; + } + const decision = this._options.shouldCreateSpanForRequest(url); + this._createSpanUrlMap.set(url, decision); + return decision; + } + __init4() { + this._onRequestCreate = (message) => { + if (!_optionalChain([getClient, "call", (_10) => _10(), "optionalAccess", (_11) => _11.getIntegration, "call", (_12) => _12(_Undici)])) { + return; + } + const { request: request2 } = message; + const stringUrl = request2.origin ? request2.origin.toString() + request2.path : request2.path; + const client = getClient(); + if (!client) { + return; + } + if (isSentryRequestUrl(stringUrl, client) || request2.__sentry_span__ !== void 0) { + return; + } + const clientOptions = client.getOptions(); + const scope = getCurrentScope(); + const isolationScope = getIsolationScope(); + const parentSpan = getActiveSpan(); + const span = this._shouldCreateSpan(stringUrl) ? createRequestSpan(parentSpan, request2, stringUrl) : void 0; + if (span) { + request2.__sentry_span__ = span; + } + const shouldAttachTraceData = (url) => { + if (clientOptions.tracePropagationTargets === void 0) { + return true; + } + const cachedDecision = this._headersUrlMap.get(url); + if (cachedDecision !== void 0) { + return cachedDecision; + } + const decision = stringMatchesSomePattern(url, clientOptions.tracePropagationTargets); + this._headersUrlMap.set(url, decision); + return decision; + }; + if (shouldAttachTraceData(stringUrl)) { + const { traceId, spanId, sampled, dsc } = { + ...isolationScope.getPropagationContext(), + ...scope.getPropagationContext() + }; + const sentryTraceHeader = span ? spanToTraceHeader(span) : generateSentryTraceHeader(traceId, spanId, sampled); + const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader( + dsc || (span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromClient(traceId, client, scope)) + ); + setHeadersOnRequest(request2, sentryTraceHeader, sentryBaggageHeader); + } + }; + } + __init5() { + this._onRequestEnd = (message) => { + if (!_optionalChain([getClient, "call", (_13) => _13(), "optionalAccess", (_14) => _14.getIntegration, "call", (_15) => _15(_Undici)])) { + return; + } + const { request: request2, response } = message; + const stringUrl = request2.origin ? request2.origin.toString() + request2.path : request2.path; + if (isSentryRequestUrl(stringUrl, getClient())) { + return; + } + const span = request2.__sentry_span__; + if (span) { + setHttpStatus(span, response.statusCode); + span.end(); + } + if (this._options.breadcrumbs) { + addBreadcrumb( + { + category: "http", + data: { + method: request2.method, + status_code: response.statusCode, + url: stringUrl + }, + type: "http" + }, + { + event: "response", + request: request2, + response + } + ); + } + }; + } + __init6() { + this._onRequestError = (message) => { + if (!_optionalChain([getClient, "call", (_16) => _16(), "optionalAccess", (_17) => _17.getIntegration, "call", (_18) => _18(_Undici)])) { + return; + } + const { request: request2 } = message; + const stringUrl = request2.origin ? request2.origin.toString() + request2.path : request2.path; + if (isSentryRequestUrl(stringUrl, getClient())) { + return; + } + const span = request2.__sentry_span__; + if (span) { + span.setStatus("internal_error"); + span.end(); + } + if (this._options.breadcrumbs) { + addBreadcrumb( + { + category: "http", + data: { + method: request2.method, + url: stringUrl + }, + level: "error", + type: "http" + }, + { + event: "error", + request: request2 + } + ); + } + }; + } + }; + Undici.__initStatic(); } +}); - const options = client.getOptions(); - const timeout = - (options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) || - DEFAULT_SHUTDOWN_TIMEOUT; - client.close(timeout).then( - (result) => { - if (!result) { - debugBuild.DEBUG_BUILD && utils.logger.warn('We reached the timeout for emptying the request buffer, still exiting now!'); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/module.js +import { posix, sep } from "path"; +function normalizeWindowsPath(path2) { + return path2.replace(/^[A-Z]:/, "").replace(/\\/g, "/"); +} +function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows = sep === "\\") { + const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath; + return (filename) => { + if (!filename) { + return; + } + const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename; + let { dir, base: file, ext } = posix.parse(normalizedFilename); + if (ext === ".js" || ext === ".mjs" || ext === ".cjs") { + file = file.slice(0, ext.length * -1); + } + if (!dir) { + dir = "."; + } + const n = dir.lastIndexOf("/node_modules"); + if (n > -1) { + return `${dir.slice(n + 14).replace(/\//g, ".")}:${file}`; + } + if (dir.startsWith(normalizedBase)) { + let moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, "."); + if (moduleName) { + moduleName += ":"; } - global.process.exit(1); - }, - error => { - debugBuild.DEBUG_BUILD && utils.logger.error(error); - }, - ); + moduleName += file; + return moduleName; + } + return file; + }; } +var init_module = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/module.js"() { + init_esm(); + } +}); -exports.logAndExitProcess = logAndExitProcess; -//# sourceMappingURL=errorhandling.js.map - - -/***/ }), - -/***/ 49381: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const url = __nccwpck_require__(87016); -const nodeVersion = __nccwpck_require__(68047); - -/** - * Assembles a URL that's passed to the users to filter on. - * It can include raw (potentially PII containing) data, which we'll allow users to access to filter - * but won't include in spans or breadcrumbs. - * - * @param requestOptions RequestOptions object containing the component parts for a URL - * @returns Fully-formed URL - */ -// TODO (v8): This function should include auth, query and fragment (it's breaking, so we need to wait for v8) -function extractRawUrl(requestOptions) { - const { protocol, hostname, port } = parseRequestOptions(requestOptions); - const path = requestOptions.path ? requestOptions.path : '/'; - return `${protocol}//${hostname}${port}${path}`; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/sdk.js +function getDefaultIntegrations(_options) { + const carrier = getMainCarrier(); + const autoloadedIntegrations = _optionalChain([carrier, "access", (_) => _.__SENTRY__, "optionalAccess", (_2) => _2.integrations]) || []; + return [ + // eslint-disable-next-line deprecation/deprecation + ...defaultIntegrations, + ...autoloadedIntegrations + ]; } - -/** - * Assemble a URL to be used for breadcrumbs and spans. - * - * @param requestOptions RequestOptions object containing the component parts for a URL - * @returns Fully-formed URL - */ -function extractUrl(requestOptions) { - const { protocol, hostname, port } = parseRequestOptions(requestOptions); - - const path = requestOptions.pathname || '/'; - - // always filter authority, see https://develop.sentry.dev/sdk/data-handling/#structuring-data - const authority = requestOptions.auth ? redactAuthority(requestOptions.auth) : ''; - - return `${protocol}//${authority}${hostname}${port}${path}`; -} - -function redactAuthority(auth) { - const [user, password] = auth.split(':'); - return `${user ? '[Filtered]' : ''}:${password ? '[Filtered]' : ''}@`; -} - -/** - * Handle various edge cases in the span description (for spans representing http(s) requests). - * - * @param description current `description` property of the span representing the request - * @param requestOptions Configuration data for the request - * @param Request Request object - * - * @returns The cleaned description - */ -function cleanSpanDescription( - description, - requestOptions, - request, -) { - // nothing to clean - if (!description) { - return description; - } - - // eslint-disable-next-line prefer-const - let [method, requestUrl] = description.split(' '); - - // superagent sticks the protocol in a weird place (we check for host because if both host *and* protocol are missing, - // we're likely dealing with an internal route and this doesn't apply) - if (requestOptions.host && !requestOptions.protocol) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - requestOptions.protocol = _optionalChain([(request ), 'optionalAccess', _ => _.agent, 'optionalAccess', _2 => _2.protocol]); // worst comes to worst, this is undefined and nothing changes - // This URL contains the filtered authority ([filtered]:[filtered]@example.com) but no fragment or query params - requestUrl = extractUrl(requestOptions); - } - - // internal routes can end up starting with a triple slash rather than a single one - if (_optionalChain([requestUrl, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4('///')])) { - requestUrl = requestUrl.slice(2); - } - - return `${method} ${requestUrl}`; -} - -// the node types are missing a few properties which node's `urlToOptions` function spits out - -/** - * Convert a URL object into a RequestOptions object. - * - * Copied from Node's internals (where it's used in http(s).request() and http(s).get()), modified only to use the - * RequestOptions type above. - * - * See https://github.com/nodejs/node/blob/master/lib/internal/url.js. - */ -function urlToOptions(url) { - const options = { - protocol: url.protocol, - hostname: - typeof url.hostname === 'string' && url.hostname.startsWith('[') ? url.hostname.slice(1, -1) : url.hostname, - hash: url.hash, - search: url.search, - pathname: url.pathname, - path: `${url.pathname || ''}${url.search || ''}`, - href: url.href, - }; - if (url.port !== '') { - options.port = Number(url.port); - } - if (url.username || url.password) { - options.auth = `${url.username}:${url.password}`; - } - return options; -} - -/** - * Normalize inputs to `http(s).request()` and `http(s).get()`. - * - * Legal inputs to `http(s).request()` and `http(s).get()` can take one of ten forms: - * [ RequestOptions | string | URL ], - * [ RequestOptions | string | URL, RequestCallback ], - * [ string | URL, RequestOptions ], and - * [ string | URL, RequestOptions, RequestCallback ]. - * - * This standardizes to one of two forms: [ RequestOptions ] and [ RequestOptions, RequestCallback ]. A similar thing is - * done as the first step of `http(s).request()` and `http(s).get()`; this just does it early so that we can interact - * with the args in a standard way. - * - * @param requestArgs The inputs to `http(s).request()` or `http(s).get()`, as an array. - * - * @returns Equivalent args of the form [ RequestOptions ] or [ RequestOptions, RequestCallback ]. - */ -function normalizeRequestArgs( - httpModule, - requestArgs, -) { - let callback, requestOptions; - - // pop off the callback, if there is one - if (typeof requestArgs[requestArgs.length - 1] === 'function') { - callback = requestArgs.pop() ; - } - - // create a RequestOptions object of whatever's at index 0 - if (typeof requestArgs[0] === 'string') { - requestOptions = urlToOptions(new url.URL(requestArgs[0])); - } else if (requestArgs[0] instanceof url.URL) { - requestOptions = urlToOptions(requestArgs[0]); - } else { - requestOptions = requestArgs[0]; - - try { - const parsed = new url.URL( - requestOptions.path || '', - `${requestOptions.protocol || 'http:'}//${requestOptions.hostname}`, - ); - requestOptions = { - pathname: parsed.pathname, - search: parsed.search, - hash: parsed.hash, - ...requestOptions, - }; - } catch (e) { - // ignore - } - } - - // if the options were given separately from the URL, fold them in - if (requestArgs.length === 2) { - requestOptions = { ...requestOptions, ...requestArgs[1] }; - } - - // Figure out the protocol if it's currently missing - if (requestOptions.protocol === undefined) { - // Worst case we end up populating protocol with undefined, which it already is - /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ - - // NOTE: Prior to Node 9, `https` used internals of `http` module, thus we don't patch it. - // Because of that, we cannot rely on `httpModule` to provide us with valid protocol, - // as it will always return `http`, even when using `https` module. - // - // See test/integrations/http.test.ts for more details on Node <=v8 protocol issue. - if (nodeVersion.NODE_VERSION.major > 8) { - requestOptions.protocol = - _optionalChain([(_optionalChain([httpModule, 'optionalAccess', _5 => _5.globalAgent]) ), 'optionalAccess', _6 => _6.protocol]) || - _optionalChain([(requestOptions.agent ), 'optionalAccess', _7 => _7.protocol]) || - _optionalChain([(requestOptions._defaultAgent ), 'optionalAccess', _8 => _8.protocol]); - } else { - requestOptions.protocol = - _optionalChain([(requestOptions.agent ), 'optionalAccess', _9 => _9.protocol]) || - _optionalChain([(requestOptions._defaultAgent ), 'optionalAccess', _10 => _10.protocol]) || - _optionalChain([(_optionalChain([httpModule, 'optionalAccess', _11 => _11.globalAgent]) ), 'optionalAccess', _12 => _12.protocol]); - } - /* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ - } - - // return args in standardized form - if (callback) { - return [requestOptions, callback]; - } else { - return [requestOptions]; - } -} - -function parseRequestOptions(requestOptions) - - { - const protocol = requestOptions.protocol || ''; - const hostname = requestOptions.hostname || requestOptions.host || ''; - // Don't log standard :80 (http) and :443 (https) ports to reduce the noise - // Also don't add port if the hostname already includes a port - const port = - !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname) - ? '' - : `:${requestOptions.port}`; - - return { protocol, hostname, port }; -} - -exports.cleanSpanDescription = cleanSpanDescription; -exports.extractRawUrl = extractRawUrl; -exports.extractUrl = extractUrl; -exports.normalizeRequestArgs = normalizeRequestArgs; -exports.urlToOptions = urlToOptions; -//# sourceMappingURL=http.js.map - - -/***/ }), - -/***/ 59055: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const path = __nccwpck_require__(16928); -const utils = __nccwpck_require__(79565); - -/** normalizes Windows paths */ -function normalizeWindowsPath(path) { - return path - .replace(/^[A-Z]:/, '') // remove Windows-style prefix - .replace(/\\/g, '/'); // replace all `\` instances with `/` -} - -/** Creates a function that gets the module name from a filename */ -function createGetModuleFromFilename( - basePath = process.argv[1] ? utils.dirname(process.argv[1]) : process.cwd(), - isWindows = path.sep === '\\', -) { - const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath; - - return (filename) => { - if (!filename) { - return; - } - - const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename; - - // eslint-disable-next-line prefer-const - let { dir, base: file, ext } = path.posix.parse(normalizedFilename); - - if (ext === '.js' || ext === '.mjs' || ext === '.cjs') { - file = file.slice(0, ext.length * -1); - } - - if (!dir) { - // No dirname whatsoever - dir = '.'; - } - - const n = dir.lastIndexOf('/node_modules'); - if (n > -1) { - return `${dir.slice(n + 14).replace(/\//g, '.')}:${file}`; - } - - // Let's see if it's a part of the main module - // To be a part of main module, it has to share the same base - if (dir.startsWith(normalizedBase)) { - let moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, '.'); - - if (moduleName) { - moduleName += ':'; - } - moduleName += file; - - return moduleName; - } - - return file; - }; -} - -exports.createGetModuleFromFilename = createGetModuleFromFilename; -//# sourceMappingURL=module.js.map - - -/***/ }), - -/***/ 68047: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -const NODE_VERSION = utils.parseSemver(process.versions.node) ; - -exports.NODE_VERSION = NODE_VERSION; -//# sourceMappingURL=nodeVersion.js.map - - -/***/ }), - -/***/ 52367: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _nullishCoalesce -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const http = __nccwpck_require__(58611); -__nccwpck_require__(65692); - -/** -* This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7 -* With the following licence: -* -* (The MIT License) -* -* Copyright (c) 2013 Nathan Rajlich * -* -* Permission is hereby granted, free of charge, to any person obtaining -* a copy of this software and associated documentation files (the -* 'Software'), to deal in the Software without restriction, including -* without limitation the rights to use, copy, modify, merge, publish, -* distribute, sublicense, and/or sell copies of the Software, and to -* permit persons to whom the Software is furnished to do so, subject to -* the following conditions:* -* -* The above copyright notice and this permission notice shall be -* included in all copies or substantial portions of the Software.* -* -* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -const INTERNAL = Symbol('AgentBaseInternalState'); - -class Agent extends http.Agent { - - // Set by `http.Agent` - missing from `@types/node` - - constructor(opts) { - super(opts); - this[INTERNAL] = {}; - } - - /** - * Determine whether this is an `http` or `https` request. - */ - isSecureEndpoint(options) { - if (options) { - // First check the `secureEndpoint` property explicitly, since this - // means that a parent `Agent` is "passing through" to this instance. - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access - if (typeof (options ).secureEndpoint === 'boolean') { - return options.secureEndpoint; - } - - // If no explicit `secure` endpoint, check if `protocol` property is - // set. This will usually be the case since using a full string URL - // or `URL` instance should be the most common usage. - if (typeof options.protocol === 'string') { - return options.protocol === 'https:'; - } - } - - // Finally, if no `protocol` property was set, then fall back to - // checking the stack trace of the current call stack, and try to - // detect the "https" module. - const { stack } = new Error(); - if (typeof stack !== 'string') return false; - return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); - } - - createSocket(req, options, cb) { - const connectOpts = { - ...options, - secureEndpoint: this.isSecureEndpoint(options), - }; - Promise.resolve() - .then(() => this.connect(req, connectOpts)) - .then(socket => { - if (socket instanceof http.Agent) { - // @ts-expect-error `addRequest()` isn't defined in `@types/node` - return socket.addRequest(req, connectOpts); - } - this[INTERNAL].currentSocket = socket; - // @ts-expect-error `createSocket()` isn't defined in `@types/node` - super.createSocket(req, options, cb); - }, cb); - } - - createConnection() { - const socket = this[INTERNAL].currentSocket; - this[INTERNAL].currentSocket = undefined; - if (!socket) { - throw new Error('No socket was returned in the `connect()` function'); - } - return socket; - } - - get defaultPort() { - return _nullishCoalesce(this[INTERNAL].defaultPort, () => ( (this.protocol === 'https:' ? 443 : 80))); - } - - set defaultPort(v) { - if (this[INTERNAL]) { - this[INTERNAL].defaultPort = v; - } - } - - get protocol() { - return _nullishCoalesce(this[INTERNAL].protocol, () => ( (this.isSecureEndpoint() ? 'https:' : 'http:'))); - } - - set protocol(v) { - if (this[INTERNAL]) { - this[INTERNAL].protocol = v; - } - } -} - -exports.Agent = Agent; -//# sourceMappingURL=base.js.map - - -/***/ }), - -/***/ 38512: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _nullishCoalesce, - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const net = __nccwpck_require__(69278); -const tls = __nccwpck_require__(64756); -const url = __nccwpck_require__(87016); -const utils = __nccwpck_require__(79565); -const base = __nccwpck_require__(52367); -const parseProxyResponse = __nccwpck_require__(54716); - -function debug(...args) { - utils.logger.log('[https-proxy-agent]', ...args); -} - -/** - * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to - * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. - * - * Outgoing HTTP requests are first tunneled through the proxy server using the - * `CONNECT` HTTP request method to establish a connection to the proxy server, - * and then the proxy server connects to the destination target and issues the - * HTTP request from the proxy server. - * - * `https:` requests have their socket connection upgraded to TLS once - * the connection to the proxy server has been established. - */ -class HttpsProxyAgent extends base.Agent { - static __initStatic() {this.protocols = ['http', 'https']; } - - constructor(proxy, opts) { - super(opts); - this.options = {}; - this.proxy = typeof proxy === 'string' ? new url.URL(proxy) : proxy; - this.proxyHeaders = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _2 => _2.headers]), () => ( {})); - debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href); - - // Trim off the brackets from IPv6 addresses - const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ''); - const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === 'https:' ? 443 : 80; - this.connectOpts = { - // Attempt to negotiate http/1.1 for proxy servers that support http/2 - ALPNProtocols: ['http/1.1'], - ...(opts ? omit(opts, 'headers') : null), - host, - port, - }; - } - - /** - * Called when the node-core HTTP client library is creating a - * new HTTP request. - */ - async connect(req, opts) { - const { proxy } = this; - - if (!opts.host) { - throw new TypeError('No "host" provided'); - } - - // Create a socket connection to the proxy server. - let socket; - if (proxy.protocol === 'https:') { - debug('Creating `tls.Socket`: %o', this.connectOpts); - const servername = this.connectOpts.servername || this.connectOpts.host; - socket = tls.connect({ - ...this.connectOpts, - servername: servername && net.isIP(servername) ? undefined : servername, - }); - } else { - debug('Creating `net.Socket`: %o', this.connectOpts); - socket = net.connect(this.connectOpts); - } - - const headers = - typeof this.proxyHeaders === 'function' ? this.proxyHeaders() : { ...this.proxyHeaders }; - const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host; - let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`; - - // Inject the `Proxy-Authorization` header if necessary. - if (proxy.username || proxy.password) { - const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; - headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`; - } - - headers.Host = `${host}:${opts.port}`; - - if (!headers['Proxy-Connection']) { - headers['Proxy-Connection'] = this.keepAlive ? 'Keep-Alive' : 'close'; - } - for (const name of Object.keys(headers)) { - payload += `${name}: ${headers[name]}\r\n`; - } - - const proxyResponsePromise = parseProxyResponse.parseProxyResponse(socket); - - socket.write(`${payload}\r\n`); - - const { connect, buffered } = await proxyResponsePromise; - req.emit('proxyConnect', connect); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore Not EventEmitter in Node types - this.emit('proxyConnect', connect, req); - - if (connect.statusCode === 200) { - req.once('socket', resume); - - if (opts.secureEndpoint) { - // The proxy is connecting to a TLS server, so upgrade - // this socket connection to a TLS connection. - debug('Upgrading socket connection to TLS'); - const servername = opts.servername || opts.host; - return tls.connect({ - ...omit(opts, 'host', 'path', 'port'), - socket, - servername: net.isIP(servername) ? undefined : servername, - }); - } - - return socket; - } - - // Some other status code that's not 200... need to re-play the HTTP - // header "data" events onto the socket once the HTTP machinery is - // attached so that the node core `http` can parse and handle the - // error status code. - - // Close the original socket, and a new "fake" socket is returned - // instead, so that the proxy doesn't get the HTTP request - // written to it (which may contain `Authorization` headers or other - // sensitive data). - // - // See: https://hackerone.com/reports/541502 - socket.destroy(); - - const fakeSocket = new net.Socket({ writable: false }); - fakeSocket.readable = true; - - // Need to wait for the "socket" event to re-play the "data" events. - req.once('socket', (s) => { - debug('Replaying proxy buffer for failed request'); - // Replay the "buffered" Buffer onto the fake `socket`, since at - // this point the HTTP module machinery has been hooked up for - // the user. - s.push(buffered); - s.push(null); - }); - - return fakeSocket; - } -}HttpsProxyAgent.__initStatic(); - -function resume(socket) { - socket.resume(); -} - -function omit( - obj, - ...keys -) - - { - const ret = {} - -; - let key; - for (key in obj) { - if (!keys.includes(key)) { - ret[key] = obj[key]; - } +function init(options2 = {}) { + setNodeAsyncContextStrategy(); + if (options2.defaultIntegrations === void 0) { + options2.defaultIntegrations = getDefaultIntegrations(); } - return ret; -} - -exports.HttpsProxyAgent = HttpsProxyAgent; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 54716: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -function debug(...args) { - utils.logger.log('[https-proxy-agent:parse-proxy-response]', ...args); -} - -function parseProxyResponse(socket) { - return new Promise((resolve, reject) => { - // we need to buffer any HTTP traffic that happens with the proxy before we get - // the CONNECT response, so that if the response is anything other than an "200" - // response code, then we can re-play the "data" events on the socket once the - // HTTP parser is hooked up... - let buffersLength = 0; - const buffers = []; - - function read() { - const b = socket.read(); - if (b) ondata(b); - else socket.once('readable', read); - } - - function cleanup() { - socket.removeListener('end', onend); - socket.removeListener('error', onerror); - socket.removeListener('readable', read); - } - - function onend() { - cleanup(); - debug('onend'); - reject(new Error('Proxy connection ended before receiving CONNECT response')); - } - - function onerror(err) { - cleanup(); - debug('onerror %o', err); - reject(err); - } - - function ondata(b) { - buffers.push(b); - buffersLength += b.length; - - const buffered = Buffer.concat(buffers, buffersLength); - const endOfHeaders = buffered.indexOf('\r\n\r\n'); - - if (endOfHeaders === -1) { - // keep buffering - debug('have not received end of HTTP headers yet...'); - read(); - return; - } - - const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n'); - const firstLine = headerParts.shift(); - if (!firstLine) { - socket.destroy(); - return reject(new Error('No header received from proxy CONNECT response')); - } - const firstLineParts = firstLine.split(' '); - const statusCode = +firstLineParts[1]; - const statusText = firstLineParts.slice(2).join(' '); - const headers = {}; - for (const header of headerParts) { - if (!header) continue; - const firstColon = header.indexOf(':'); - if (firstColon === -1) { - socket.destroy(); - return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`)); - } - const key = header.slice(0, firstColon).toLowerCase(); - const value = header.slice(firstColon + 1).trimStart(); - const current = headers[key]; - if (typeof current === 'string') { - headers[key] = [current, value]; - } else if (Array.isArray(current)) { - current.push(value); - } else { - headers[key] = value; - } - } - debug('got proxy server response: %o %o', firstLine, headers); - cleanup(); - resolve({ - connect: { - statusCode, - statusText, - headers, - }, - buffered, - }); - } - - socket.on('error', onerror); - socket.on('end', onend); - - read(); - }); -} - -exports.parseProxyResponse = parseProxyResponse; -//# sourceMappingURL=parse-proxy-response.js.map - - -/***/ }), - -/***/ 60671: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -/** - * @deprecated `Handlers.ExpressRequest` is deprecated and will be removed in v8. Use `PolymorphicRequest` instead. - */ - -/** - * Normalizes data from the request object, accounting for framework differences. - * - * @deprecated `Handlers.extractRequestData` is deprecated and will be removed in v8. Use `extractRequestData` instead. - * - * @param req The request object from which to extract data - * @param keys An optional array of keys to include in the normalized data. - * @returns An object containing normalized request data - */ -function extractRequestData(req, keys) { - return utils.extractRequestData(req, { include: keys }); -} - -/** - * Options deciding what parts of the request to use when enhancing an event - * - * @deprecated `Handlers.ParseRequestOptions` is deprecated and will be removed in v8. Use - * `AddRequestDataToEventOptions` in `@sentry/utils` instead. - */ - -/** - * Enriches passed event with request data. - * - * @deprecated `Handlers.parseRequest` is deprecated and will be removed in v8. Use `addRequestDataToEvent` instead. - * - * @param event Will be mutated and enriched with req data - * @param req Request object - * @param options object containing flags to enable functionality - * @hidden - */ -function parseRequest(event, req, options = {}) { - return utils.addRequestDataToEvent(event, req, { include: options }); -} - -exports.extractRequestData = extractRequestData; -exports.parseRequest = parseRequest; -//# sourceMappingURL=requestDataDeprecated.js.map - - -/***/ }), - -/***/ 58563: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const index$2 = __nccwpck_require__(98732); -const client = __nccwpck_require__(51684); -const console = __nccwpck_require__(48270); -const context = __nccwpck_require__(49252); -const contextlines = __nccwpck_require__(23781); -const http = __nccwpck_require__(50475); -const index$1 = __nccwpck_require__(4383); -const modules = __nccwpck_require__(14550); -const onuncaughtexception = __nccwpck_require__(32820); -const onunhandledrejection = __nccwpck_require__(76668); -const spotlight = __nccwpck_require__(5455); -const index = __nccwpck_require__(7248); -const module$1 = __nccwpck_require__(59055); -const http$1 = __nccwpck_require__(24636); - -/* eslint-disable max-lines */ - -/** @deprecated Use `getDefaultIntegrations(options)` instead. */ -const defaultIntegrations = [ - // Common - core.inboundFiltersIntegration(), - core.functionToStringIntegration(), - core.linkedErrorsIntegration(), - core.requestDataIntegration(), - // Native Wrappers - console.consoleIntegration(), - http.httpIntegration(), - index.nativeNodeFetchintegration(), - // Global Handlers - onuncaughtexception.onUncaughtExceptionIntegration(), - onunhandledrejection.onUnhandledRejectionIntegration(), - // Event Info - contextlines.contextLinesIntegration(), - index$1.localVariablesIntegration(), - context.nodeContextIntegration(), - modules.modulesIntegration(), -]; - -/** Get the default integrations for the Node SDK. */ -function getDefaultIntegrations(_options) { - const carrier = core.getMainCarrier(); - - const autoloadedIntegrations = _optionalChain([carrier, 'access', _ => _.__SENTRY__, 'optionalAccess', _2 => _2.integrations]) || []; - - return [ - // eslint-disable-next-line deprecation/deprecation - ...defaultIntegrations, - ...autoloadedIntegrations, - ]; -} - -/** - * The Sentry Node SDK Client. - * - * To use this SDK, call the {@link init} function as early as possible in the - * main entry module. To set context information or send manual events, use the - * provided methods. - * - * @example - * ``` - * - * const { init } = require('@sentry/node'); - * - * init({ - * dsn: '__DSN__', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const { configureScope } = require('@sentry/node'); - * configureScope((scope: Scope) => { - * scope.setExtra({ battery: 0.7 }); - * scope.setTag({ user_mode: 'admin' }); - * scope.setUser({ id: '4711' }); - * }); - * ``` - * - * @example - * ``` - * - * const { addBreadcrumb } = require('@sentry/node'); - * addBreadcrumb({ - * message: 'My Breadcrumb', - * // ... - * }); - * ``` - * - * @example - * ``` - * - * const Sentry = require('@sentry/node'); - * Sentry.captureMessage('Hello, world!'); - * Sentry.captureException(new Error('Good bye')); - * Sentry.captureEvent({ - * message: 'Manual', - * stacktrace: [ - * // ... - * ], - * }); - * ``` - * - * @see {@link NodeOptions} for documentation on configuration options. - */ -// eslint-disable-next-line complexity -function init(options = {}) { - index$2.setNodeAsyncContextStrategy(); - - if (options.defaultIntegrations === undefined) { - options.defaultIntegrations = getDefaultIntegrations(); - } - - if (options.dsn === undefined && process.env.SENTRY_DSN) { - options.dsn = process.env.SENTRY_DSN; + if (options2.dsn === void 0 && process.env.SENTRY_DSN) { + options2.dsn = process.env.SENTRY_DSN; } - const sentryTracesSampleRate = process.env.SENTRY_TRACES_SAMPLE_RATE; - if (options.tracesSampleRate === undefined && sentryTracesSampleRate) { + if (options2.tracesSampleRate === void 0 && sentryTracesSampleRate) { const tracesSampleRate = parseFloat(sentryTracesSampleRate); if (isFinite(tracesSampleRate)) { - options.tracesSampleRate = tracesSampleRate; + options2.tracesSampleRate = tracesSampleRate; } } - - if (options.release === undefined) { + if (options2.release === void 0) { const detectedRelease = getSentryRelease(); - if (detectedRelease !== undefined) { - options.release = detectedRelease; + if (detectedRelease !== void 0) { + options2.release = detectedRelease; } else { - // If release is not provided, then we should disable autoSessionTracking - options.autoSessionTracking = false; + options2.autoSessionTracking = false; } } - - if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) { - options.environment = process.env.SENTRY_ENVIRONMENT; + if (options2.environment === void 0 && process.env.SENTRY_ENVIRONMENT) { + options2.environment = process.env.SENTRY_ENVIRONMENT; } - - if (options.autoSessionTracking === undefined && options.dsn !== undefined) { - options.autoSessionTracking = true; + if (options2.autoSessionTracking === void 0 && options2.dsn !== void 0) { + options2.autoSessionTracking = true; } - - if (options.instrumenter === undefined) { - options.instrumenter = 'sentry'; + if (options2.instrumenter === void 0) { + options2.instrumenter = "sentry"; } - - // TODO(v7): Refactor this to reduce the logic above const clientOptions = { - ...options, - stackParser: utils.stackParserFromStackParserOptions(options.stackParser || defaultStackParser), - integrations: core.getIntegrationsToSetup(options), - transport: options.transport || http$1.makeNodeTransport, + ...options2, + stackParser: stackParserFromStackParserOptions(options2.stackParser || defaultStackParser), + integrations: getIntegrationsToSetup(options2), + transport: options2.transport || makeNodeTransport }; - - core.initAndBind(options.clientClass || client.NodeClient, clientOptions); - - if (options.autoSessionTracking) { + initAndBind(options2.clientClass || NodeClient, clientOptions); + if (options2.autoSessionTracking) { startSessionTracking(); } - updateScopeFromEnvVariables(); - - if (options.spotlight) { - const client = core.getClient(); + if (options2.spotlight) { + const client = getClient(); if (client && client.addIntegration) { - // force integrations to be setup even if no DSN was set - // If they have already been added before, they will be ignored anyhow const integrations = client.getOptions().integrations; for (const integration of integrations) { client.addIntegration(integration); } client.addIntegration( - spotlight.spotlightIntegration({ sidecarUrl: typeof options.spotlight === 'string' ? options.spotlight : undefined }), + spotlightIntegration({ sidecarUrl: typeof options2.spotlight === "string" ? options2.spotlight : void 0 }) ); } } } - -/** - * Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client - */ function isAutoSessionTrackingEnabled(client) { - if (client === undefined) { + if (client === void 0) { return false; } const clientOptions = client && client.getOptions(); - if (clientOptions && clientOptions.autoSessionTracking !== undefined) { + if (clientOptions && clientOptions.autoSessionTracking !== void 0) { return clientOptions.autoSessionTracking; } return false; } - -/** - * Returns a release dynamically from environment variables. - */ function getSentryRelease(fallback) { - // Always read first as Sentry takes this as precedence if (process.env.SENTRY_RELEASE) { return process.env.SENTRY_RELEASE; } - - // This supports the variable that sentry-webpack-plugin injects - if (utils.GLOBAL_OBJ.SENTRY_RELEASE && utils.GLOBAL_OBJ.SENTRY_RELEASE.id) { - return utils.GLOBAL_OBJ.SENTRY_RELEASE.id; + if (GLOBAL_OBJ.SENTRY_RELEASE && GLOBAL_OBJ.SENTRY_RELEASE.id) { + return GLOBAL_OBJ.SENTRY_RELEASE.id; } - return ( // GitHub Actions - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables - process.env.GITHUB_SHA || - // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata - process.env.COMMIT_REF || - // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables - process.env.VERCEL_GIT_COMMIT_SHA || - process.env.VERCEL_GITHUB_COMMIT_SHA || - process.env.VERCEL_GITLAB_COMMIT_SHA || - process.env.VERCEL_BITBUCKET_COMMIT_SHA || - // Zeit (now known as Vercel) - process.env.ZEIT_GITHUB_COMMIT_SHA || - process.env.ZEIT_GITLAB_COMMIT_SHA || - process.env.ZEIT_BITBUCKET_COMMIT_SHA || - // Cloudflare Pages - https://developers.cloudflare.com/pages/platform/build-configuration/#environment-variables - process.env.CF_PAGES_COMMIT_SHA || - fallback + process.env.GITHUB_SHA || // Netlify - https://docs.netlify.com/configure-builds/environment-variables/#build-metadata + process.env.COMMIT_REF || // Vercel - https://vercel.com/docs/v2/build-step#system-environment-variables + process.env.VERCEL_GIT_COMMIT_SHA || process.env.VERCEL_GITHUB_COMMIT_SHA || process.env.VERCEL_GITLAB_COMMIT_SHA || process.env.VERCEL_BITBUCKET_COMMIT_SHA || // Zeit (now known as Vercel) + process.env.ZEIT_GITHUB_COMMIT_SHA || process.env.ZEIT_GITLAB_COMMIT_SHA || process.env.ZEIT_BITBUCKET_COMMIT_SHA || // Cloudflare Pages - https://developers.cloudflare.com/pages/platform/build-configuration/#environment-variables + process.env.CF_PAGES_COMMIT_SHA || fallback ); } - -/** Node.js stack parser */ -const defaultStackParser = utils.createStackParser(utils.nodeStackLineParser(module$1.createGetModuleFromFilename())); - -/** - * Enable automatic Session Tracking for the node process. - */ function startSessionTracking() { - core.startSession(); - // Emitted in the case of healthy sessions, error of `mechanism.handled: true` and unhandledrejections because - // The 'beforeExit' event is not emitted for conditions causing explicit termination, - // such as calling process.exit() or uncaught exceptions. - // Ref: https://nodejs.org/api/process.html#process_event_beforeexit - process.on('beforeExit', () => { - const session = core.getIsolationScope().getSession(); - const terminalStates = ['exited', 'crashed']; - // Only call endSession, if the Session exists on Scope and SessionStatus is not a - // Terminal Status i.e. Exited or Crashed because - // "When a session is moved away from ok it must not be updated anymore." - // Ref: https://develop.sentry.dev/sdk/sessions/ + startSession(); + process.on("beforeExit", () => { + const session = getIsolationScope().getSession(); + const terminalStates = ["exited", "crashed"]; if (session && !terminalStates.includes(session.status)) { - core.endSession(); + endSession(); } }); } - -/** - * Update scope and propagation context based on environmental variables. - * - * See https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md - * for more details. - */ function updateScopeFromEnvVariables() { - const sentryUseEnvironment = (process.env.SENTRY_USE_ENVIRONMENT || '').toLowerCase(); - if (!['false', 'n', 'no', 'off', '0'].includes(sentryUseEnvironment)) { + const sentryUseEnvironment = (process.env.SENTRY_USE_ENVIRONMENT || "").toLowerCase(); + if (!["false", "n", "no", "off", "0"].includes(sentryUseEnvironment)) { const sentryTraceEnv = process.env.SENTRY_TRACE; const baggageEnv = process.env.SENTRY_BAGGAGE; - const propagationContext = utils.propagationContextFromHeaders(sentryTraceEnv, baggageEnv); - core.getCurrentScope().setPropagationContext(propagationContext); + const propagationContext = propagationContextFromHeaders(sentryTraceEnv, baggageEnv); + getCurrentScope().setPropagationContext(propagationContext); + } +} +var defaultIntegrations, defaultStackParser; +var init_sdk2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/sdk.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_async(); + init_client(); + init_console2(); + init_context(); + init_contextlines(); + init_http3(); + init_local_variables(); + init_modules(); + init_onuncaughtexception(); + init_onunhandledrejection(); + init_spotlight(); + init_undici(); + init_module(); + init_http(); + defaultIntegrations = [ + // Common + inboundFiltersIntegration(), + functionToStringIntegration(), + linkedErrorsIntegration(), + requestDataIntegration(), + // Native Wrappers + consoleIntegration(), + httpIntegration(), + nativeNodeFetchintegration(), + // Global Handlers + onUncaughtExceptionIntegration(), + onUnhandledRejectionIntegration(), + // Event Info + contextLinesIntegration(), + localVariablesIntegration(), + nodeContextIntegration(), + modulesIntegration() + ]; + defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename())); } -} - -exports.defaultIntegrations = defaultIntegrations; -exports.defaultStackParser = defaultStackParser; -exports.getDefaultIntegrations = getDefaultIntegrations; -exports.getSentryRelease = getSentryRelease; -exports.init = init; -exports.isAutoSessionTrackingEnabled = isAutoSessionTrackingEnabled; -//# sourceMappingURL=sdk.js.map - - -/***/ }), - -/***/ 45662: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const tracing = __nccwpck_require__(99303); -const utils = __nccwpck_require__(79565); +}); -/** - * Automatically detects and returns integrations that will work with your dependencies. - */ -function autoDiscoverNodePerformanceMonitoringIntegrations() { - const loadedIntegrations = tracing.lazyLoadedNodePerformanceMonitoringIntegrations - .map(tryLoad => { - try { - return tryLoad(); - } catch (_) { - return undefined; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/utils.js +import * as fs from "fs"; +import * as path from "path"; +function deepReadDirSync(targetDir) { + const targetDirAbsPath = path.resolve(targetDir); + if (!fs.existsSync(targetDirAbsPath)) { + throw new Error(`Cannot read contents of ${targetDirAbsPath}. Directory does not exist.`); + } + if (!fs.statSync(targetDirAbsPath).isDirectory()) { + throw new Error(`Cannot read contents of ${targetDirAbsPath}, because it is not a directory.`); + } + const deepReadCurrentDir = (currentDirAbsPath) => { + return fs.readdirSync(currentDirAbsPath).reduce((absPaths, itemName) => { + const itemAbsPath = path.join(currentDirAbsPath, itemName); + if (fs.statSync(itemAbsPath).isDirectory()) { + return absPaths.concat(deepReadCurrentDir(itemAbsPath)); } - }) - .filter(integration => !!integration) ; + absPaths.push(itemAbsPath); + return absPaths; + }, []); + }; + return deepReadCurrentDir(targetDirAbsPath).map((absPath) => path.relative(targetDirAbsPath, absPath)); +} +var init_utils3 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/utils.js"() { + } +}); - if (loadedIntegrations.length === 0) { - utils.logger.warn('Performance monitoring integrations could not be automatically loaded.'); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/worker-script.js +var base64WorkerScript; +var init_worker_script = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/worker-script.js"() { + base64WorkerScript = "aW1wb3J0IHsgU2Vzc2lvbiB9IGZyb20gJ2luc3BlY3Rvcic7CmltcG9ydCB7IHdvcmtlckRhdGEsIHBhcmVudFBvcnQgfSBmcm9tICd3b3JrZXJfdGhyZWFkcyc7CmltcG9ydCB7IHBvc2l4LCBzZXAgfSBmcm9tICdwYXRoJzsKaW1wb3J0ICogYXMgaHR0cCBmcm9tICdodHRwJzsKaW1wb3J0ICogYXMgaHR0cHMgZnJvbSAnaHR0cHMnOwppbXBvcnQgeyBSZWFkYWJsZSB9IGZyb20gJ3N0cmVhbSc7CmltcG9ydCB7IFVSTCB9IGZyb20gJ3VybCc7CmltcG9ydCB7IGNyZWF0ZUd6aXAgfSBmcm9tICd6bGliJzsKaW1wb3J0ICogYXMgbmV0IGZyb20gJ25ldCc7CmltcG9ydCAqIGFzIHRscyBmcm9tICd0bHMnOwoKLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC91bmJvdW5kLW1ldGhvZApjb25zdCBvYmplY3RUb1N0cmluZyA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmc7CgovKioKICogQ2hlY2tzIHd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dWlsZGVyKCkgewogIGNvbnN0IGhhc1dlYWtTZXQgPSB0eXBlb2YgV2Vha1NldCA9PT0gJ2Z1bmN0aW9uJzsKICBjb25zdCBpbm5lciA9IGhhc1dlYWtTZXQgPyBuZXcgV2Vha1NldCgpIDogW107CiAgZnVuY3Rpb24gbWVtb2l6ZShvYmopIHsKICAgIGlmIChoYXNXZWFrU2V0KSB7CiAgICAgIGlmIChpbm5lci5oYXMob2JqKSkgewogICAgICAgIHJldHVybiB0cnVlOwogICAgICB9CiAgICAgIGlubmVyLmFkZChvYmopOwogICAgICByZXR1cm4gZmFsc2U7CiAgICB9CiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L3ByZWZlci1mb3Itb2YKICAgIGZvciAobGV0IGkgPSAwOyBpIDwgaW5uZXIubGVuZ3RoOyBpKyspIHsKICAgICAgY29uc3QgdmFsdWUgPSBpbm5lcltpXTsKICAgICAgaWYgKHZhbHVlID09PSBvYmopIHsKICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgfQogICAgfQogICAgaW5uZXIucHVzaChvYmopOwogICAgcmV0dXJuIGZhbHNlOwogIH0KCiAgZnVuY3Rpb24gdW5tZW1vaXplKG9iaikgewogICAgaWYgKGhhc1dlYWtTZXQpIHsKICAgICAgaW5uZXIuZGVsZXRlKG9iaik7CiAgICB9IGVsc2UgewogICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGlubmVyLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgaWYgKGlubmVyW2ldID09PSBvYmopIHsKICAgICAgICAgIGlubmVyLnNwbGljZShpLCAxKTsKICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgfQogICAgfQogIH0KICByZXR1cm4gW21lbW9pemUsIHVubWVtb2l6ZV07Cn0KCi8qKgogKiBSZWN1cnNpdmVseSBub3JtYWxpemVzIHRoZSBnaXZlbiBvYmplY3QuCiAqCiAqIC0gQ3JlYXRlcy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gfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgIHJlamVjdChlKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgcmVhc29uID0+IHsKICAgICAgICAgIGlmICghb25yZWplY3RlZCkgewogICAgICAgICAgICByZWplY3QocmVhc29uKTsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgcmVzb2x2ZShvbnJlamVjdGVkKHJlYXNvbikpOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgcmVqZWN0KGUpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgXSk7CiAgICAgIHRoaXMuX2V4ZWN1dGVIYW5kbGVycygpOwogICAgfSk7CiAgfQoKICAvKiogSlNEb2MgKi8KICAgY2F0Y2goCiAgICBvbnJlamVjdGVkLAogICkgewogICAgcmV0dXJuIHRoaXMudGhlbih2YWwgPT4gdmFsLCBvbnJlamVjdGVkKTsKICB9CgogIC8qKiBKU0RvYyAqLwogICBmaW5hbGx5KG9uZmluYWxseSkgewogICAgcmV0dXJuIG5ldyBTeW5jUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgIGxldCB2YWw7CiAgICAgIGxldCBpc1JlamVjdGVkOwoKICAgICAgcmV0dXJuIHRoaXMudGhlbigKICAgICAgICB2YWx1ZSA9PiB7CiAgICAgICAgICBpc1JlamVjdGVkID0gZmFsc2U7CiAgICAgICAgICB2YWwgPSB2YWx1ZTsKICAgICAgICAgIGlmIChvbmZpbmFsbHkpIHsKICAgICAgICAgICAgb25maW5hbGx5KCk7CiAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICByZWFzb24gPT4gewogICAgICAgICAgaXNSZWplY3RlZCA9IHRydWU7CiAgICAgICAgICB2YWwgPSByZWFzb247CiAgICAgICAgICBpZiAob25maW5hbGx5KSB7CiAgICAgICAgICAgIG9uZmlu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c3Npb24pIHsKICAgICAgdXBkYXRlU2Vzc2lvbih0aGlzLl9zZXNzaW9uLCB7IHVzZXIgfSk7CiAgICB9CgogICAgdGhpcy5fbm90aWZ5U2NvcGVMaXN0ZW5lcnMoKTsKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgZ2V0VXNlcigpIHsKICAgIHJldHVybiB0aGlzLl91c2VyOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgZ2V0UmVxdWVzdFNlc3Npb24oKSB7CiAgICByZXR1cm4gdGhpcy5fcmVxdWVzdFNlc3Npb247CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRSZXF1ZXN0U2Vzc2lvbihyZXF1ZXN0U2Vzc2lvbikgewogICAgdGhpcy5fcmVxdWVzdFNlc3Npb24gPSByZXF1ZXN0U2Vzc2lvbjsKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgc2V0VGFncyh0YWdzKSB7CiAgICB0aGlzLl90YWdzID0gewogICAgICAuLi50aGlzLl90YWdzLAogICAgICAuLi50YWdzLAogICAgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldFRhZyhrZXksIHZhbHVlKSB7CiAgICB0aGlzLl90YWdzID0geyAuLi50aGlzLl90YWdzLCBba2V5XTogdmFsdWUgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldEV4dHJhcyhleHRyYXMpIHsKICAgIHRoaXMuX2V4dHJhID0gewogICAgICAuLi50aGlzLl9leHRyYSwKICAgICAgLi4uZXh0cmFzLAogICAgfTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldEV4dHJhKGtleSwgZXh0cmEpIHsKICAgIHRoaXMuX2V4dHJhID0geyAuLi50aGlzLl9leHRyYSwgW2tleV06IGV4dHJhIH07CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRGaW5nZXJwcmludChmaW5nZXJwcmludCkgewogICAgdGhpcy5fZmluZ2VycHJpbnQgPSBmaW5nZXJwcmludDsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIHNldExldmVsKAogICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIGRlcHJlY2F0aW9uL2RlcHJlY2F0aW9uCiAgICBsZXZlbCwKICApIHsKICAgIHRoaXMuX2xldmVsID0gbGV2ZWw7CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBTZXRzIHRoZSB0cmFuc2FjdGlvbiBuYW1lIG9uIHRoZSBzY29wZSBmb3IgZnV0dXJlIGV2ZW50cy4KICAgKi8KICAgc2V0VHJhbnNhY3Rpb25OYW1lKG5hbWUpIHsKICAgIHRoaXMuX3RyYW5zYWN0aW9uTmFtZSA9IG5hbWU7CiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwogICAgcmV0dXJuIHRoaXM7CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBzZXRDb250ZXh0KGtleSwgY29udGV4dCkgewogICAgaWYgKGNvbnRleHQgPT09I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aWYgKG1heENydW1icyA8PSAwKSB7CiAgICAgIHJldHVybiB0aGlzOwogICAgfQoKICAgIGNvbnN0IG1lcmdlZEJyZWFkY3J1bWIgPSB7CiAgICAgIHRpbWVzdGFtcDogZGF0ZVRpbWVzdGFtcEluU2Vjb25kcygpLAogICAgICAuLi5icmVhZGNydW1iLAogICAgfTsKCiAgICBjb25zdCBicmVhZGNydW1icyA9IHRoaXMuX2JyZWFkY3J1bWJzOwogICAgYnJlYWRjcnVtYnMucHVzaChtZXJnZWRCcmVhZGNydW1iKTsKICAgIHRoaXMuX2JyZWFkY3J1bWJzID0gYnJlYWRjcnVtYnMubGVuZ3RoID4gbWF4Q3J1bWJzID8gYnJlYWRjcnVtYnMuc2xpY2UoLW1heENydW1icykgOiBicmVhZGNydW1iczsKCiAgICB0aGlzLl9ub3RpZnlTY29wZUxpc3RlbmVycygpOwoKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgZ2V0TGFzdEJyZWFkY3J1bWIoKSB7CiAgICByZXR1cm4gdGhpcy5fYnJlYWRjcnVtYnNbdGhpcy5fYnJlYWRjcnVtYnMubGVuZ3RoIC0gMV07CiAgfQoKICAvKioKICAgKiBAaW5oZXJpdERvYwogICAqLwogICBjbGVhckJyZWFkY3J1bWJzKCkgewogICAgdGhpcy5fYnJlYWRjcnVtYnMgPSBbXTsKICAgIHRoaXMuX25vdGlmeVNjb3BlTGlzdGVuZXJzKCk7CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKgogICAqIEBpbmhlcml0RG9jCiAgICovCiAgIGFkZEF0dGFjaG1lbnQoYXR0YWNobWVudCkgewogICAgdGhpcy5fYXR0YWNobWVudHMucHVzaChhdHRhY2htZW50KTsKICAgIHJldHVybiB0aGlzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKiBAZGVwcmVjYXRlZCBVc2UgYGdldFNjb3BlRGF0YSgpYCBpbnN0ZWFkLgogICAqLwogICBnZXRBdHRhY2htZW50cygpIHsKICAgIGNvbnN0IGRhdGEgPSB0aGlzLmdldFNjb3BlRGF0YSgpOwoKICAgIHJldHVybiBkYXRhLmF0dGFjaG1lbnRzOwogIH0KCiAgLyoqCiAgICogQGluaGVyaXREb2MKICAgKi8KICAgY2xlYXJBdHRhY2htZW50cygpIHsKICAgIHRoaXMuX2F0dGFjaG1lbnRzID0gW107CiAgICByZXR1cm4gdGhpczsKICB9CgogIC8qKiBAaW5oZXJpdERvYyAqLwogICBnZXRTY29wZURhdGEoKSB7CiAgICBjb25zdCB7CiAgICAgIF9icmVhZGNydW1icywKICAgICAgX2F0dGFjaG1lbnRzLAogICAgICBfY29udGV4dHMsCiAgICAgIF90YWdzLAogICAgICBfZXh0cmEsCiAgICAgIF91c2VyLAogICAgICBfbGV2ZWwsCiAgICAgIF9maW5nZXJwcmludCwKICAgICAgX2V2ZW50UHJvY2Vzc29ycywKICAgICAgX3Byb3BhZ2F0aW9uQ29udGV4dCwKICAgICAgX3Nka1Byb2Nlc3NpbmdNZXRhZGF0YSwKICAgICAgX3RyYW5zYWN0aW9uTmFtZSwKICAgICAgX3NwYW4sCiAgICB9ID0gdGhpczsKCiAgICByZXR1cm4gewogICAgICBicmVhZGNydW1iczogX2JyZWFkY3J1bWJzLAogICAgICBhdHRhY2htZW50czogX2F0dGFjaG1lbnRzLAogICAgICBjb250ZXh0czogX2NvbnRleHRzLAogICAgICB0YWdzOiBfdGFncywKICAgICAgZXh0cmE6IF9leHRyYSwKICAgICAgdXNlcjogX3VzZXIsCiAgICAgIGxldmVsOiBfbGV2ZWwsCiAgICAgIGZpbmdlcnByaW50OiBfZmluZ2VycHJpbnQgfHwgW10sCiAgICAgIGV2ZW50UHJvY2Vzc29yczogX2V2ZW50UHJvY2Vzc29ycywKICAgICAgcHJvcGFnYXRpb25Db250ZXh0OiBfcHJvcGFnYXRpb25Db250ZXh0LAogICAgICBzZGtQcm9jZXNzaW5nTWV0YWRhdGE6IF9zZG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FzIGZvbGxvd3M6CiAgICoKICAgKiBgYGAKICAgKiAvLyBORVcKICAgKiBjb25zdCBjbGllbnQgPSBuZXcgQ2xpZW50KCk7CiAgICogY29uc3Qgc2NvcGUgPSBuZXcgU2NvcGUoKTsKICAgKiBzY29wZS5zZXRDbGllbnQoY2xpZW50KTsKICAgKiBzY29wZS5jYXB0dXJlRXhjZXB0aW9uKCk7CiAgICogYGBgCiAgICovCiAgIGNvbnN0cnVjdG9yKAogICAgY2xpZW50LAogICAgc2NvcGUsCiAgICBpc29sYXRpb25TY29wZSwKICAgICAgX3ZlcnNpb24gPSBBUElfVkVSU0lPTiwKICApIHt0aGlzLl92ZXJzaW9uID0gX3ZlcnNpb247CiAgICBsZXQgYXNzaWduZWRTY29wZTsKICAgIGlmICghc2NvcGUpIHsKICAgICAgYXNzaWduZWRTY29wZSA9IG5ldyBTY29wZSgpOwogICAgICBhc3NpZ25lZFNjb3BlLnNldENsaWVudChjbGllbnQpOwogICAgfSBlbHNlIHsKICAgICAgYXNzaWduZWRTY29wZSA9IHNjb3BlOwogICAgfQoKICAgIGxldCBhc3NpZ25lZElzb2xhdGlvblNjb3BlOwogICAgaWYgKCFpc29sYXRpb25TY29wZSkgewogICAgICBhc3NpZ25lZElzb2xhdGlvblNjb3BlID0gbmV3IFNjb3BlKCk7CiAgICAgIGFzc2lnbmVkSXNvbGF0aW9uU2NvcGUuc2V0Q2xpZW50KGNsaWVudCk7CiAgICB9IGVsc2UgewogICAgICBhc3NpZ25lZElzb2xhdGlvblNjb3BlID0gaXNvbGF0aW9uU2NvcGU7CiAgICB9CgogICAgdGhpcy5fc3RhY2sgPSBbeyBzY29wZTogYXNzaWduZWRTY29wZSB9XTsKCiAgICBpZiAoY2xpZW50KSB7CiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBkZXByZWNhdGlvbi9kZXByZWNhdGlvbgogICAgICB0aGlzLmJpbmRDbGllbnQoY2xpZW50KTsKICAgIH0KCiAgICB0aGlzL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yc3RMaW5lLnNwbGl0KCcgJyk7CiAgICAgIGNvbnN0IHN0YXR1c0NvZGUgPSArZmlyc3RMaW5lUGFydHNbMV07CiAgICAgIGNvbnN0IHN0YXR1c1RleHQgPSBmaXJzdExpbmVQYXJ0cy5zbGljZSgyKS5qb2luKCcgJyk7CiAgICAgIGNvbnN0IGhlYWRlcnMgPSB7fTsKICAgICAgZm9yIChjb25zdCBoZWFkZXIgb2YgaGVhZGVyUGFydHMpIHsKICAgICAgICBpZiAoIWhlYWRlcikgY29udGludWU7CiAgICAgICAgY29uc3QgZmlyc3RDb2xvbiA9IGhlYWRlci5pbmRleE9mKCc6Jyk7CiAgICAgICAgaWYgKGZpcnN0Q29sb24gPT09IC0xKSB7CiAgICAgICAgICBzb2NrZXQuZGVzdHJveSgpOwogICAgICAgICAgcmV0dXJuIHJlamVjdChuZXcgRXJyb3IoYEludmFsaWQgaGVhZGVyIGZyb20gcHJveHkgQ09OTkVDVCByZXNwb25zZTogIiR7aGVhZGVyfSJgKSk7CiAgICAgICAgfQogICAgICAgIGNvbnN0IGtleSA9IGhlYWRlci5zbGljZSgwLCBmaXJzdENvbG9uKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIGNvbnN0IHZhbHVlID0gaGVhZGVyLnNsaWNlKGZpcnN0Q29sb24gKyAxKS50cmltU3RhcnQoKTsKICAgICAgICBjb25zdCBjdXJyZW50ID0gaGVhZGVyc1trZXldOwogICAgICAgIGlmICh0eXBlb2YgY3VycmVudCA9PT0gJ3N0cmluZycpIHsKICAgICAgICAgIGhlYWRlcnNba2V5XSA9IFtjdXJyZW50LCB2YWx1ZV07CiAgICAgICAgfSBlbHNlIGlmIChBcnJheS5pc0FycmF5KGN1cnJlbnQpKSB7CiAgICAgICAgICBjdXJyZW50LnB1c2godmFsdWUpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZGVidWckMSgnZ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RgLgogKi8KZnVuY3Rpb24gY3JlYXRlUmVxdWVzdEV4ZWN1dG9yKAogIG9wdGlvbnMsCiAgaHR0cE1vZHVsZSwKICBhZ2VudCwKKSB7CiAgY29uc3QgeyBob3N0bmFtZSwgcGF0aG5hbWUsIHBvcnQsIHByb3RvY29sLCBzZWFyY2ggfSA9IG5ldyBVUkwob3B0aW9ucy51cmwpOwogIHJldHVybiBmdW5jdGlvbiBtYWtlUmVxdWVzdChyZXF1ZXN0KSB7CiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4gewogICAgICBsZXQgYm9keSA9IHN0cmVhbUZyb21Cb2R5KHJlcXVlc3QuYm9keSk7CgogICAgICBjb25zdCBoZWFkZXJzID0geyAuLi5vcHRpb25zLmhlYWRlcnMgfTsKCiAgICAgIGlmIChyZXF1ZXN0LmJvZHkubGVuZ3RoID4gR1pJUF9USFJFU0hPTEQpIHsKICAgICAgICBoZWFkZXJzWydjb250ZW50LWVuY29kaW5nJ10gPSAnZ3ppcCc7CiAgICAgICAgYm9keSA9IGJvZHkucGlwZShjcmVhdGVHemlwKCkpOwogICAgICB9CgogICAgICBjb25zdCByZXEgPSBodHRwTW9kdWxlLnJlcXVlc3QoCiAgICAgICAgewogICAgICAgICAgbWV0aG9kOiAnUE9TVCcsCiAgICAgICAgICBhZ2VudCwKICAgICAgICAgIGhlYWRlcnMsCiAgICAgICAgICBob3N0bmFtZSwKICAgICAgICAgIHBhdGg6IGAke3BhdGhuYW1lfSR7c2VhcmNofWAsCiAgICAgICAgICBwb3J0LAogICAgICAgICAgcHJvdG9jb2wsCiAgICAgICAgICBjYTogb3B0aW9ucy5jYUNlcnRzLAogICAgICAgIH0sCiAgICAgICAgcmVzID0+IHsKICAgICAgICAgIHJlcy5vbignZGF0YScsICgpID0+IHsKICAgICAgICAgICAgLy8gRHJhaW4gc29ja2V0CiAgICAgICAgICB9KTsKCiAgICAgICAgICByZXMub24oJ2VuZCcsICgpID0+IH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lLnByb3BhZ2F0aW9uQ29udGV4dDsKICAgIGV2ZW50LmNvbnRleHRzID0gewogICAgICB0cmFjZTogewogICAgICAgIHRyYWNlX2lkOiB0cmFjZUlkLAogICAgICAgIHNwYW5faWQ6IHNwYW5JZCwKICAgICAgICBwYXJlbnRfc3Bhbl9pZDogcGFyZW50U3BhbklkLAogICAgICB9LAogICAgICAuLi5ldmVudC5jb250ZXh0cywKICAgIH07CiAgfQp9Cgphc3luYyBmdW5jdGlvbiBzZW5kQW5yRXZlbnQoZnJhbWVzLCBzY29wZSkgewogIGlmIChoYXNTZW50QW5yRXZlbnQpIHsKICAgIHJldHVybjsKICB9CgogIGhhc1NlbnRBbnJFdmVudCA9IHRydWU7CgogIGF3YWl0IHNlbmRBYm5vcm1hbFNlc3Npb24oKTsKCiAgbG9nKCdTZW5kaW5nIGV2ZW50Jyk7CgogIGNvbnN0IGV2ZW50ID0gewogICAgZXZlbnRfaWQ6IHV1aWQ0KCksCiAgICBjb250ZXh0czogb3B0aW9ucy5jb250ZXh0cywKICAgIHJlbGVhc2U6IG9wdGlvbnMucmVsZWFzZSwKICAgIGVudmlyb25tZW50OiBvcHRpb25zLmVudmlyb25tZW50LAogICAgZGlzdDogb3B0aW9ucy5kaXN0LAogICAgcGxhdGZvcm06ICdub2RlJywKICAgIGxldmVsOiAnZXJyb3InLAogICAgZXhjZXB0aW9uOiB7CiAgICAgIHZhbHVlczogWwogICAgICAgIHsKICAgICAgICAgIHR5cGU6ICdBcHBsaWNhdGlvbk5vdFJlc3BvbmRpbmcnLAogICAgICAgICAgdmFsdWU6IGBBcHBsaWNhdGlvbiBOb3QgUmVzcG9uZGluZyBmb3IgYXQgbGVhc3QgJHtvcHRpb25zLmFuclRocmVzaG9sZH0gbXNgLAogICAgICAgICAgc3RhY2t0cmFjZTogeyBmcmFtZXM6IHByZXBhcmVTdGFja0ZyYW1lcyhmcmFtZXMpIH0sCiAgICAgICAgICAvLyBUaGlzIGVuc3VyZXMgdGhlIFVJIGR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gKICAgICAgICAnUnVudGltZS5ldmFsdWF0ZScsCiAgICAgICAgewogICAgICAgICAgLy8gR3JhYiB0aGUgdHJhY2UgY29udGV4dCBmcm9tIHRoZSBjdXJyZW50IHNjb3BlCiAgICAgICAgICBleHByZXNzaW9uOiAnZ2xvYmFsLl9fU0VOVFJZX0dFVF9TQ09QRVNfXygpOycsCiAgICAgICAgICAvLyBEb24ndCByZS10cmlnZ2VyIHRoZSBkZWJ1Z2dlciBpZiB0aGlzIGNhdXNlcyBhbiBlcnJvcgogICAgICAgICAgc2lsZW50OiB0cnVlLAogICAgICAgICAgLy8gU2VyaWFsaXplIHRoZSByZXN1bHQgdG8ganNvbiBvdGhlcndpc2Ugb25seSBwcmltaXRpdmVzIGFyZSBzdXBwb3J0ZWQKICAgICAgICAgIHJldHVybkJ5VmFsdWU6IHRydWUsCiAgICAgICAgfSwKICAgICAgICAoZXJyLCBwYXJhbSkgPT4gewogICAgICAgICAgaWYgKGVycikgewogICAgICAgICAgICBsb2coYEVycm9yIGV4ZWN1dGluZyBzY3JpcHQ6ICcke2Vyci5tZXNzYWdlfSdgKTsKICAgICAgICAgIH0KCiAgICAgICAgICBjb25zdCBzY29wZXMgPSBwYXJhbSAmJiBwYXJhbS5yZXN1bHQgPyAocGFyYW0ucmVzdWx0LnZhbHVlICkgOiB1bmRlZmluZWQ7CgogICAgICAgICAgc2Vzc2lvbi5wb3N0KCdEZWJ1Z2dlci5yZXN1bWUnKTsKICAgICAgICAgIHNlc3Npb24ucG9zdCgnRGVidWdnZXIuZGlzYWJsZScpOwoKICAgICAgICAgIHNlbmRBbnJFdmVudChzdGFja0ZyYW1lcywgc2NvcGVzKS50aGVuKG51bGwsICgpID0+IHsKICAgICAgICAgICAgbG9nKCdTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQuJyk7CiAgICAgICAgICB9KTsKICAgICAgICB9LAogICAgICApOwogICAgfSBjYXRjaCAoZSkgewogICAgICBzZXNzaW9uLnBvc3QoJ0RlYnVnZ2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hIHN0YWNrIHRyYWNlJyk7CiAgICBzZW5kQW5yRXZlbnQoKS50aGVuKG51bGwsICgpID0+IHsKICAgICAgbG9nKCdTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQgb24gd2F0Y2hkb2cgdGltZW91dC4nKTsKICAgIH0pOwogIH0KfQoKY29uc3QgeyBwb2xsIH0gPSB3YXRjaGRvZ1RpbWVyKGNyZWF0ZUhyVGltZXIsIG9wdGlvbnMucG9sbEludGVydmFsLCBvcHRpb25zLmFuclRocmVzaG9sZCwgd2F0Y2hkb2dUaW1lb3V0KTsKCl9vcHRpb25hbENoYWluKFtwYXJlbnRQb3J0LCAnb3B0aW9uYWxBY2Nlc3MnLCBfNiA9PiBfNi5vbiwgJ2NhbGwnLCBfNyA9PiBfNygnbWVzc2FnZScsIChtc2cpID0+IHsKICBpZiAobXNnLnNlc3Npb24pIHsKICAgIHNlc3Npb24gPSBtYWtlU2Vzc2lvbihtc2cuc2Vzc2lvbik7CiAgfQoKICBwb2xsKCk7Cn0pXSk7"; } +}); - // Only return integrations where their dependencies loaded successfully. - return loadedIntegrations.filter(integration => !!integration.loadDependency()); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/index.js +import { URL as URL6 } from "url"; +function log(message, ...args) { + logger.log(`[ANR] ${message}`, ...args); } - -exports.autoDiscoverNodePerformanceMonitoringIntegrations = autoDiscoverNodePerformanceMonitoringIntegrations; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 29243: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const tracing = __nccwpck_require__(99303); - - - -exports.Apollo = tracing.Apollo; -exports.Express = tracing.Express; -exports.GraphQL = tracing.GraphQL; -exports.Mongo = tracing.Mongo; -exports.Mysql = tracing.Mysql; -exports.Postgres = tracing.Postgres; -exports.Prisma = tracing.Prisma; -//# sourceMappingURL=integrations.js.map - - -/***/ }), - -/***/ 24636: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _nullishCoalesce -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const http = __nccwpck_require__(58611); -const https = __nccwpck_require__(65692); -const stream = __nccwpck_require__(2203); -const url = __nccwpck_require__(87016); -const zlib = __nccwpck_require__(43106); -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const index = __nccwpck_require__(38512); - -// Estimated maximum size for reasonable standalone event -const GZIP_THRESHOLD = 1024 * 32; - -/** - * Gets a stream from a Uint8Array or string - * Readable.from is ideal but was added in node.js v12.3.0 and v10.17.0 - */ -function streamFromBody(body) { - return new stream.Readable({ - read() { - this.push(body); - this.push(null); - }, - }); +function globalWithScopeFetchFn() { + return GLOBAL_OBJ; } - -/** - * Creates a Transport that uses native the native 'http' and 'https' modules to send events to Sentry. - */ -function makeNodeTransport(options) { - let urlSegments; - - try { - urlSegments = new url.URL(options.url); - } catch (e) { - utils.consoleSandbox(() => { - // eslint-disable-next-line no-console - console.warn( - '[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.', - ); - }); - return core.createTransport(options, () => Promise.resolve({})); +function getScopeData() { + const scope = getGlobalScope().getScopeData(); + mergeScopeData(scope, getIsolationScope().getScopeData()); + mergeScopeData(scope, getCurrentScope().getScopeData()); + scope.attachments = []; + scope.eventProcessors = []; + return scope; +} +function getWorkerThreads() { + return dynamicRequire(module, "worker_threads"); +} +async function getContexts(client) { + let event = { message: "ANR" }; + const eventHint = {}; + for (const processor of client.getEventProcessors()) { + if (event === null) break; + event = await processor(event, eventHint); } - - const isHttps = urlSegments.protocol === 'https:'; - - // Proxy prioritization: http => `options.proxy` | `process.env.http_proxy` - // Proxy prioritization: https => `options.proxy` | `process.env.https_proxy` | `process.env.http_proxy` - const proxy = applyNoProxyOption( - urlSegments, - options.proxy || (isHttps ? process.env.https_proxy : undefined) || process.env.http_proxy, - ); - - const nativeHttpModule = isHttps ? https : http; - const keepAlive = options.keepAlive === undefined ? false : options.keepAlive; - - // TODO(v7): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node - // versions(>= 8) as they had memory leaks when using it: #2555 - const agent = proxy - ? (new index.HttpsProxyAgent(proxy) ) - : new nativeHttpModule.Agent({ keepAlive, maxSockets: 30, timeout: 2000 }); - - const requestExecutor = createRequestExecutor(options, _nullishCoalesce(options.httpModule, () => ( nativeHttpModule)), agent); - return core.createTransport(options, requestExecutor); + return _optionalChain([event, "optionalAccess", (_2) => _2.contexts]) || {}; } - -/** - * Honors the `no_proxy` env variable with the highest priority to allow for hosts exclusion. - * - * @param transportUrl The URL the transport intends to send events to. - * @param proxy The client configured proxy. - * @returns A proxy the transport should use. - */ -function applyNoProxyOption(transportUrlSegments, proxy) { - const { no_proxy } = process.env; - - const urlIsExemptFromProxy = - no_proxy && - no_proxy - .split(',') - .some( - exemption => transportUrlSegments.host.endsWith(exemption) || transportUrlSegments.hostname.endsWith(exemption), - ); - - if (urlIsExemptFromProxy) { - return undefined; - } else { - return proxy; +async function _startWorker(client, integrationOptions) { + const dsn = client.getDsn(); + if (!dsn) { + return () => { + }; + } + const contexts = await getContexts(client); + _optionalChainDelete([contexts, "access", (_3) => _3.app, "optionalAccess", (_4) => delete _4.app_memory]); + _optionalChainDelete([contexts, "access", (_5) => _5.device, "optionalAccess", (_6) => delete _6.free_memory]); + const initOptions = client.getOptions(); + const sdkMetadata = client.getSdkMetadata() || {}; + if (sdkMetadata.sdk) { + sdkMetadata.sdk.integrations = initOptions.integrations.map((i) => i.name); + } + const options2 = { + debug: logger.isEnabled(), + dsn, + environment: initOptions.environment || "production", + release: initOptions.release, + dist: initOptions.dist, + sdkMetadata, + appRootPath: integrationOptions.appRootPath, + pollInterval: integrationOptions.pollInterval || DEFAULT_INTERVAL, + anrThreshold: integrationOptions.anrThreshold || DEFAULT_HANG_THRESHOLD, + captureStackTrace: !!integrationOptions.captureStackTrace, + staticTags: integrationOptions.staticTags || {}, + contexts + }; + if (options2.captureStackTrace) { + const inspector = __require("inspector"); + if (!inspector.url()) { + inspector.open(0); + } } + const { Worker } = getWorkerThreads(); + const worker = new Worker(new URL6(`data:application/javascript;base64,${base64WorkerScript}`), { + workerData: options2 + }); + process.on("exit", () => { + worker.terminate(); + }); + const timer = setInterval(() => { + try { + const currentSession = getCurrentScope().getSession(); + const session = currentSession ? { ...currentSession, toJSON: void 0 } : void 0; + worker.postMessage({ session }); + } catch (_) { + } + }, options2.pollInterval); + timer.unref(); + worker.on("message", (msg) => { + if (msg === "session-ended") { + log("ANR event sent from ANR worker. Clearing session in this thread."); + getCurrentScope().setSession(void 0); + } + }); + worker.once("error", (err) => { + clearInterval(timer); + log("ANR worker error", err); + }); + worker.once("exit", (code) => { + clearInterval(timer); + log("ANR worker exit", code); + }); + worker.unref(); + return () => { + worker.terminate(); + clearInterval(timer); + }; } - -/** - * Creates a RequestExecutor to be used with `createTransport`. - */ -function createRequestExecutor( - options, - httpModule, - agent, -) { - const { hostname, pathname, port, protocol, search } = new url.URL(options.url); - return function makeRequest(request) { - return new Promise((resolve, reject) => { - let body = streamFromBody(request.body); - - const headers = { ...options.headers }; - - if (request.body.length > GZIP_THRESHOLD) { - headers['content-encoding'] = 'gzip'; - body = body.pipe(zlib.createGzip()); - } - - const req = httpModule.request( - { - method: 'POST', - agent, - headers, - hostname, - path: `${pathname}${search}`, - port, - protocol, - ca: options.caCerts, +var DEFAULT_INTERVAL, DEFAULT_HANG_THRESHOLD, INTEGRATION_NAME14, _anrIntegration, anrIntegration, Anr; +var init_anr = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/index.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_nodeVersion(); + init_worker_script(); + DEFAULT_INTERVAL = 50; + DEFAULT_HANG_THRESHOLD = 5e3; + INTEGRATION_NAME14 = "Anr"; + _anrIntegration = (options2 = {}) => { + if (NODE_VERSION.major < 16 || NODE_VERSION.major === 16 && NODE_VERSION.minor < 17) { + throw new Error("ANR detection requires Node 16.17.0 or later"); + } + let worker; + let client; + const gbl = globalWithScopeFetchFn(); + gbl.__SENTRY_GET_SCOPES__ = getScopeData; + return { + name: INTEGRATION_NAME14, + // TODO v8: Remove this + setupOnce() { }, - res => { - res.on('data', () => { - // Drain socket - }); - - res.on('end', () => { - // Drain socket - }); - - res.setEncoding('utf8'); - - // "Key-value pairs of header names and values. Header names are lower-cased." - // https://nodejs.org/api/http.html#http_message_headers - const retryAfterHeader = _nullishCoalesce(res.headers['retry-after'], () => ( null)); - const rateLimitsHeader = _nullishCoalesce(res.headers['x-sentry-rate-limits'], () => ( null)); - - resolve({ - statusCode: res.statusCode, - headers: { - 'retry-after': retryAfterHeader, - 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader, - }, - }); + // eslint-disable-line @typescript-eslint/no-empty-function + startWorker: () => { + if (worker) { + return; + } + if (client) { + worker = _startWorker(client, options2); + } }, - ); + stopWorker: () => { + if (worker) { + worker.then((stop) => { + stop(); + worker = void 0; + }); + } + }, + setup(initClient) { + client = initClient; + setImmediate(() => this.startWorker()); + } + }; + }; + anrIntegration = defineIntegration(_anrIntegration); + Anr = convertIntegrationFnToClass(INTEGRATION_NAME14, anrIntegration); + } +}); - req.on('error', reject); - body.pipe(req); - }); - }; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/legacy.js +function enableAnrDetection(options2) { + const client = getClient(); + const integration = new Anr(options2); + integration.setup(client); + return Promise.resolve(); } +var init_legacy = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/anr/legacy.js"() { + init_esm2(); + init_anr(); + } +}); -exports.makeNodeTransport = makeNodeTransport; -//# sourceMappingURL=http.js.map - - -/***/ }), - -/***/ 87524: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -/** - * Sentry tRPC middleware that names the handling transaction after the called procedure. - * - * Use the Sentry tRPC middleware in combination with the Sentry server integration, - * e.g. Express Request Handlers or Next.js SDK. - */ -function trpcMiddleware(options = {}) { - return function ({ path, type, next, rawInput }) { - const clientOptions = _optionalChain([core.getClient, 'call', _ => _(), 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3()]); - // eslint-disable-next-line deprecation/deprecation - const sentryTransaction = core.getCurrentScope().getTransaction(); - +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/trpc.js +function trpcMiddleware(options2 = {}) { + return function({ path: path2, type: type2, next, rawInput }) { + const clientOptions = _optionalChain([getClient, "call", (_) => _(), "optionalAccess", (_2) => _2.getOptions, "call", (_3) => _3()]); + const sentryTransaction = getCurrentScope().getTransaction(); if (sentryTransaction) { - sentryTransaction.updateName(`trpc/${path}`); - sentryTransaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, 'route'); - sentryTransaction.op = 'rpc.server'; - + sentryTransaction.updateName(`trpc/${path2}`); + sentryTransaction.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, "route"); + sentryTransaction.op = "rpc.server"; const trpcContext = { - procedure_type: type, + procedure_type: type2 }; - - if (options.attachRpcInput !== undefined ? options.attachRpcInput : _optionalChain([clientOptions, 'optionalAccess', _4 => _4.sendDefaultPii])) { - trpcContext.input = utils.normalize(rawInput); + if (options2.attachRpcInput !== void 0 ? options2.attachRpcInput : _optionalChain([clientOptions, "optionalAccess", (_4) => _4.sendDefaultPii])) { + trpcContext.input = normalize(rawInput); } - - // TODO: Can we rewrite this to an attribute? Or set this on the scope? - // eslint-disable-next-line deprecation/deprecation - sentryTransaction.setContext('trpc', trpcContext); + sentryTransaction.setContext("trpc", trpcContext); } - function captureIfError(nextResult) { if (!nextResult.ok) { - core.captureException(nextResult.error, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } }); + captureException(nextResult.error, { mechanism: { handled: false, data: { function: "trpcMiddleware" } } }); } } - let maybePromiseResult; try { maybePromiseResult = next(); } catch (e) { - core.captureException(e, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } }); + captureException(e, { mechanism: { handled: false, data: { function: "trpcMiddleware" } } }); throw e; } - - if (utils.isThenable(maybePromiseResult)) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access + if (isThenable(maybePromiseResult)) { Promise.resolve(maybePromiseResult).then( - nextResult => { - captureIfError(nextResult ); - }, - e => { - core.captureException(e, { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } }); + (nextResult) => { + captureIfError(nextResult); }, + (e) => { + captureException(e, { mechanism: { handled: false, data: { function: "trpcMiddleware" } } }); + } ); } else { - captureIfError(maybePromiseResult ); + captureIfError(maybePromiseResult); } - - // We return the original promise just to be safe. return maybePromiseResult; }; } - -exports.trpcMiddleware = trpcMiddleware; -//# sourceMappingURL=trpc.js.map - - -/***/ }), - -/***/ 6230: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const fs = __nccwpck_require__(79896); -const path = __nccwpck_require__(16928); - -/** - * Recursively read the contents of a directory. - * - * @param targetDir Absolute or relative path of the directory to scan. All returned paths will be relative to this - * directory. - * @returns Array holding all relative paths - * @deprecated This function will be removed in the next major version. - */ -function deepReadDirSync(targetDir) { - const targetDirAbsPath = path.resolve(targetDir); - - if (!fs.existsSync(targetDirAbsPath)) { - throw new Error(`Cannot read contents of ${targetDirAbsPath}. Directory does not exist.`); - } - - if (!fs.statSync(targetDirAbsPath).isDirectory()) { - throw new Error(`Cannot read contents of ${targetDirAbsPath}, because it is not a directory.`); +var init_trpc = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/trpc.js"() { + init_esm(); + init_esm2(); + init_esm(); } +}); - // This does the same thing as its containing function, `deepReadDirSync` (except that - purely for convenience - it - // deals in absolute paths rather than relative ones). We need this to be separate from the outer function to preserve - // the difference between `targetDirAbsPath` and `currentDirAbsPath`. - const deepReadCurrentDir = (currentDirAbsPath) => { - return fs.readdirSync(currentDirAbsPath).reduce((absPaths, itemName) => { - const itemAbsPath = path.join(currentDirAbsPath, itemName); - - if (fs.statSync(itemAbsPath).isDirectory()) { - return absPaths.concat(deepReadCurrentDir(itemAbsPath)); - } - - absPaths.push(itemAbsPath); - return absPaths; - }, []); - }; - - return deepReadCurrentDir(targetDirAbsPath).map(absPath => path.relative(targetDirAbsPath, absPath)); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/requestDataDeprecated.js +function extractRequestData2(req, keys) { + return extractRequestData(req, { include: keys }); } - -exports.deepReadDirSync = deepReadDirSync; -//# sourceMappingURL=utils.js.map - - -/***/ }), - -/***/ 35748: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); -const string = __nccwpck_require__(1308); - -/** - * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter. - */ -function applyAggregateErrorsToEvent( - exceptionFromErrorImplementation, - parser, - maxValueLimit = 250, - key, - limit, - event, - hint, -) { - if (!event.exception || !event.exception.values || !hint || !is.isInstanceOf(hint.originalException, Error)) { - return; +function parseRequest(event, req, options2 = {}) { + return addRequestDataToEvent(event, req, { include: options2 }); +} +var init_requestDataDeprecated = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/requestDataDeprecated.js"() { + init_esm(); } +}); - // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error - const originalException = - event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined; - - // We only create exception grouping if there is an exception in the event. - if (originalException) { - event.exception.values = truncateAggregateExceptions( - aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - hint.originalException , - key, - event.exception.values, - originalException, - 0, - ), - maxValueLimit, +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/handlers.js +var handlers_exports = {}; +__export(handlers_exports, { + errorHandler: () => errorHandler, + extractRequestData: () => extractRequestData2, + parseRequest: () => parseRequest, + requestHandler: () => requestHandler, + tracingHandler: () => tracingHandler, + trpcMiddleware: () => trpcMiddleware2 +}); +function tracingHandler() { + return function sentryTracingMiddleware(req, res, next) { + const options2 = _optionalChain([getClient, "call", (_) => _(), "optionalAccess", (_2) => _2.getOptions, "call", (_3) => _3()]); + if (!options2 || options2.instrumenter !== "sentry" || _optionalChain([req, "access", (_4) => _4.method, "optionalAccess", (_5) => _5.toUpperCase, "call", (_6) => _6()]) === "OPTIONS" || _optionalChain([req, "access", (_7) => _7.method, "optionalAccess", (_8) => _8.toUpperCase, "call", (_9) => _9()]) === "HEAD") { + return next(); + } + const sentryTrace = req.headers && isString(req.headers["sentry-trace"]) ? req.headers["sentry-trace"] : void 0; + const baggage = _optionalChain([req, "access", (_10) => _10.headers, "optionalAccess", (_11) => _11.baggage]); + if (!hasTracingEnabled(options2)) { + return next(); + } + const [name, source] = extractPathForTransaction(req, { path: true, method: true }); + const transaction = continueTrace( + { sentryTrace, baggage }, + (ctx) => ( + // TODO: Refactor this to use `startSpan()` + // eslint-disable-next-line deprecation/deprecation + startTransaction( + { + name, + op: "http.server", + origin: "auto.http.node.tracingHandler", + ...ctx, + data: { + [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source + }, + metadata: { + // eslint-disable-next-line deprecation/deprecation + ...ctx.metadata, + // The request should already have been stored in `scope.sdkProcessingMetadata` (which will become + // `event.sdkProcessingMetadata` the same way the metadata here will) by `sentryRequestMiddleware`, but on the + // off chance someone is using `sentryTracingMiddleware` without `sentryRequestMiddleware`, it doesn't hurt to + // be sure + request: req + } + }, + // extra context passed to the tracesSampler + { request: extractRequestData(req) } + ) + ) ); - } + getCurrentScope().setSpan(transaction); + res.__sentry_transaction = transaction; + res.once("finish", () => { + setImmediate(() => { + addRequestDataToTransaction(transaction, req); + setHttpStatus(transaction, res.statusCode); + transaction.end(); + }); + }); + next(); + }; } - -function aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - error, - key, - prevExceptions, - exception, - exceptionId, -) { - if (prevExceptions.length >= limit + 1) { - return prevExceptions; +function convertReqHandlerOptsToAddReqDataOpts(reqHandlerOptions = {}) { + let addRequestDataOptions; + if ("include" in reqHandlerOptions) { + addRequestDataOptions = { include: reqHandlerOptions.include }; + } else { + const { ip, request: request2, transaction, user } = reqHandlerOptions; + if (ip || request2 || transaction || user) { + addRequestDataOptions = { include: dropUndefinedKeys({ ip, request: request2, transaction, user }) }; + } } - - let newExceptions = [...prevExceptions]; - - // Recursively call this function in order to walk down a chain of errors - if (is.isInstanceOf(error[key], Error)) { - applyExceptionGroupFieldsForParentException(exception, exceptionId); - const newException = exceptionFromErrorImplementation(parser, error[key]); - const newExceptionId = newExceptions.length; - applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId); - newExceptions = aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - error[key], - key, - [newException, ...newExceptions], - newException, - newExceptionId, - ); + return addRequestDataOptions; +} +function requestHandler(options2) { + const requestDataOptions = convertReqHandlerOptsToAddReqDataOpts(options2); + const client = getClient(); + if (client && isAutoSessionTrackingEnabled(client)) { + client.initSessionFlusher(); + const scope = getCurrentScope(); + if (scope.getSession()) { + scope.setSession(); + } } - - // This will create exception grouping for AggregateErrors - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError - if (Array.isArray(error.errors)) { - error.errors.forEach((childError, i) => { - if (is.isInstanceOf(childError, Error)) { - applyExceptionGroupFieldsForParentException(exception, exceptionId); - const newException = exceptionFromErrorImplementation(parser, childError); - const newExceptionId = newExceptions.length; - applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId); - newExceptions = aggregateExceptionsFromError( - exceptionFromErrorImplementation, - parser, - limit, - childError, - key, - [newException, ...newExceptions], - newException, - newExceptionId, - ); + return function sentryRequestMiddleware(req, res, next) { + if (options2 && options2.flushTimeout && options2.flushTimeout > 0) { + const _end = res.end; + res.end = function(chunk, encoding, cb) { + void flush(options2.flushTimeout).then(() => { + _end.call(this, chunk, encoding, cb); + }).then(null, (e) => { + DEBUG_BUILD4 && logger.error(e); + _end.call(this, chunk, encoding, cb); + }); + }; + } + runWithAsyncContext(() => { + const scope = getCurrentScope(); + scope.setSDKProcessingMetadata({ + request: req, + // TODO (v8): Stop passing this + requestDataOptionsFromExpressHandler: requestDataOptions + }); + const client2 = getClient(); + if (isAutoSessionTrackingEnabled(client2)) { + scope.setRequestSession({ status: "ok" }); } + res.once("finish", () => { + const client3 = getClient(); + if (isAutoSessionTrackingEnabled(client3)) { + setImmediate(() => { + if (client3 && client3._captureRequestSession) { + client3._captureRequestSession(); + } + }); + } + }); + next(); }); - } - - return newExceptions; -} - -function applyExceptionGroupFieldsForParentException(exception, exceptionId) { - // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default. - exception.mechanism = exception.mechanism || { type: 'generic', handled: true }; - - exception.mechanism = { - ...exception.mechanism, - ...(exception.type === 'AggregateError' && { is_exception_group: true }), - exception_id: exceptionId, }; } - -function applyExceptionGroupFieldsForChildException( - exception, - source, - exceptionId, - parentId, -) { - // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default. - exception.mechanism = exception.mechanism || { type: 'generic', handled: true }; - - exception.mechanism = { - ...exception.mechanism, - type: 'chained', - source, - exception_id: exceptionId, - parent_id: parentId, +function getStatusCodeFromResponse(error) { + const statusCode = error.status || error.statusCode || error.status_code || error.output && error.output.statusCode; + return statusCode ? parseInt(statusCode, 10) : 500; +} +function defaultShouldHandleError(error) { + const status = getStatusCodeFromResponse(error); + return status >= 500; +} +function errorHandler(options2) { + return function sentryErrorMiddleware(error, _req, res, next) { + const shouldHandleError = options2 && options2.shouldHandleError || defaultShouldHandleError; + if (shouldHandleError(error)) { + withScope((_scope) => { + _scope.setSDKProcessingMetadata({ request: _req }); + const transaction = res.__sentry_transaction; + if (transaction && !getActiveSpan()) { + _scope.setSpan(transaction); + } + const client = getClient(); + if (client && isAutoSessionTrackingEnabled(client)) { + const isSessionAggregatesMode = client._sessionFlusher !== void 0; + if (isSessionAggregatesMode) { + const requestSession = _scope.getRequestSession(); + if (requestSession && requestSession.status !== void 0) { + requestSession.status = "crashed"; + } + } + } + const eventId = captureException(error, { mechanism: { type: "middleware", handled: false } }); + res.sentry = eventId; + next(error); + }); + return; + } + next(error); }; } +var trpcMiddleware2; +var init_handlers2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/handlers.js"() { + init_esm(); + init_esm2(); + init_esm(); + init_debug_build4(); + init_sdk2(); + init_trpc(); + init_requestDataDeprecated(); + trpcMiddleware2 = trpcMiddleware; + } +}); -/** - * Truncate the message (exception.value) of all exceptions in the event. - * Because this event processor is ran after `applyClientOptions`, - * we need to truncate the message of the added exceptions here. - */ -function truncateAggregateExceptions(exceptions, maxValueLength) { - return exceptions.map(exception => { - if (exception.value) { - exception.value = string.truncate(exception.value, maxValueLength); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/hapi/index.js +function isResponseObject(response) { + return response && response.statusCode !== void 0; +} +function isErrorEvent3(event) { + return event && event.error !== void 0; +} +function sendErrorToSentry(errorData) { + captureException(errorData, { + mechanism: { + type: "hapi", + handled: false, + data: { + function: "hapiErrorPlugin" + } } - return exception; }); } +var hapiErrorPlugin, hapiTracingPlugin, INTEGRATION_NAME15, _hapiIntegration, hapiIntegration, Hapi; +var init_hapi = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/hapi/index.js"() { + init_esm2(); + init_esm(); + hapiErrorPlugin = { + name: "SentryHapiErrorPlugin", + version: SDK_VERSION, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + register: async function(serverArg) { + const server = serverArg; + server.events.on("request", (request2, event) => { + const transaction = getActiveTransaction(); + if (isErrorEvent3(event)) { + sendErrorToSentry(event.error); + } + if (transaction) { + transaction.setStatus("internal_error"); + transaction.end(); + } + }); + } + }; + hapiTracingPlugin = { + name: "SentryHapiTracingPlugin", + version: SDK_VERSION, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + register: async function(serverArg) { + const server = serverArg; + server.ext("onPreHandler", (request2, h) => { + const transaction = continueTrace( + { + sentryTrace: request2.headers["sentry-trace"] || void 0, + baggage: request2.headers["baggage"] || void 0 + }, + (transactionContext) => { + return startTransaction({ + ...transactionContext, + op: "hapi.request", + name: request2.route.path, + description: `${request2.route.method} ${request2.path}` + }); + } + ); + getCurrentScope().setSpan(transaction); + return h.continue; + }); + server.ext("onPreResponse", (request2, h) => { + const transaction = getActiveTransaction(); + if (request2.response && isResponseObject(request2.response) && transaction) { + const response = request2.response; + response.header("sentry-trace", spanToTraceHeader(transaction)); + const dynamicSamplingContext = dynamicSamplingContextToSentryBaggageHeader( + getDynamicSamplingContextFromSpan(transaction) + ); + if (dynamicSamplingContext) { + response.header("baggage", dynamicSamplingContext); + } + } + return h.continue; + }); + server.ext("onPostHandler", (request2, h) => { + const transaction = getActiveTransaction(); + if (transaction) { + if (request2.response && isResponseObject(request2.response)) { + setHttpStatus(transaction, request2.response.statusCode); + } + transaction.end(); + } + return h.continue; + }); + } + }; + INTEGRATION_NAME15 = "Hapi"; + _hapiIntegration = (options2 = {}) => { + const server = options2.server; + return { + name: INTEGRATION_NAME15, + setupOnce() { + if (!server) { + return; + } + fill(server, "start", (originalStart) => { + return async function() { + await this.register(hapiTracingPlugin); + await this.register(hapiErrorPlugin); + const result = originalStart.apply(this); + return result; + }; + }); + } + }; + }; + hapiIntegration = defineIntegration(_hapiIntegration); + Hapi = convertIntegrationFnToClass(INTEGRATION_NAME15, hapiIntegration); + } +}); -exports.applyAggregateErrorsToEvent = applyAggregateErrorsToEvent; -//# sourceMappingURL=aggregate-errors.js.map - - -/***/ }), - -/***/ 27730: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const object = __nccwpck_require__(92062); -const nodeStackTrace = __nccwpck_require__(78592); - -/** - * A node.js watchdog timer - * @param pollInterval The interval that we expect to get polled at - * @param anrThreshold The threshold for when we consider ANR - * @param callback The callback to call for ANR - * @returns An object with `poll` and `enabled` functions {@link WatchdogReturn} - */ -function watchdogTimer( - createTimer, - pollInterval, - anrThreshold, - callback, -) { - const timer = createTimer(); - let triggered = false; - let enabled = true; - - setInterval(() => { - const diffMs = timer.getTimeMs(); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/index.js +var integrations_exports2 = {}; +__export(integrations_exports2, { + Anr: () => Anr, + Console: () => Console, + Context: () => Context, + ContextLines: () => ContextLines, + Hapi: () => Hapi, + Http: () => Http, + LocalVariables: () => LocalVariables, + Modules: () => Modules, + OnUncaughtException: () => OnUncaughtException, + OnUnhandledRejection: () => OnUnhandledRejection, + RequestData: () => RequestData, + Spotlight: () => Spotlight, + Undici: () => Undici +}); +var init_integrations2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/integrations/index.js"() { + init_console2(); + init_http3(); + init_onuncaughtexception(); + init_onunhandledrejection(); + init_modules(); + init_contextlines(); + init_context(); + init_esm2(); + init_local_variables(); + init_undici(); + init_spotlight(); + init_anr(); + init_hapi(); + } +}); - if (triggered === false && diffMs > pollInterval + anrThreshold) { - triggered = true; - if (enabled) { - callback(); - } - } +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/tracing/integrations.js +var integrations_exports3 = {}; +__export(integrations_exports3, { + Apollo: () => Apollo, + Express: () => Express, + GraphQL: () => GraphQL, + Mongo: () => Mongo, + Mysql: () => Mysql, + Postgres: () => Postgres, + Prisma: () => Prisma +}); +var init_integrations3 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/tracing/integrations.js"() { + init_esm3(); + } +}); - if (diffMs < pollInterval + anrThreshold) { - triggered = false; +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/captureconsole.js +function consoleHandler(args, level) { + const captureContext = { + level: severityLevelFromString(level), + extra: { + arguments: args } - }, 20); - - return { - poll: () => { - timer.reset(); - }, - enabled: (state) => { - enabled = state; - }, }; -} - -// types copied from inspector.d.ts - -/** - * Converts Debugger.CallFrame to Sentry StackFrame - */ -function callFrameToStackFrame( - frame, - url, - getModuleFromFilename, -) { - const filename = url ? url.replace(/^file:\/\//, '') : undefined; - - // CallFrame row/col are 0 based, whereas StackFrame are 1 based - const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined; - const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined; - - return object.dropUndefinedKeys({ - filename, - module: getModuleFromFilename(filename), - function: frame.functionName || '?', - colno, - lineno, - in_app: filename ? nodeStackTrace.filenameIsInApp(filename) : undefined, + withScope((scope) => { + scope.addEventProcessor((event) => { + event.logger = "console"; + addExceptionMechanism(event, { + handled: false, + type: "console" + }); + return event; + }); + if (level === "assert" && args[0] === false) { + const message2 = `Assertion failed: ${safeJoin(args.slice(1), " ") || "console.assert"}`; + scope.setExtra("arguments", args.slice(1)); + captureMessage(message2, captureContext); + return; + } + const error = args.find((arg) => arg instanceof Error); + if (level === "error" && error) { + captureException(error, captureContext); + return; + } + const message = safeJoin(args, " "); + captureMessage(message, captureContext); }); } - -exports.callFrameToStackFrame = callFrameToStackFrame; -exports.watchdogTimer = watchdogTimer; -//# sourceMappingURL=anr.js.map - - -/***/ }), - -/***/ 25915: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const is = __nccwpck_require__(25789); -const logger = __nccwpck_require__(6661); - -const BAGGAGE_HEADER_NAME = 'baggage'; - -const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-'; - -const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; - -/** - * Max length of a serialized baggage string - * - * https://www.w3.org/TR/baggage/#limits - */ -const MAX_BAGGAGE_STRING_LENGTH = 8192; - -/** - * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the "sentry-" prefixed values - * from it. - * - * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks. - * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise. - */ -function baggageHeaderToDynamicSamplingContext( - // Very liberal definition of what any incoming header might look like - baggageHeader, -) { - if (!is.isString(baggageHeader) && !Array.isArray(baggageHeader)) { - return undefined; +var INTEGRATION_NAME16, _captureConsoleIntegration, captureConsoleIntegration, CaptureConsole; +var init_captureconsole = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/captureconsole.js"() { + init_esm2(); + init_esm(); + INTEGRATION_NAME16 = "CaptureConsole"; + _captureConsoleIntegration = (options2 = {}) => { + const levels = options2.levels || CONSOLE_LEVELS; + return { + name: INTEGRATION_NAME16, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + if (!("console" in GLOBAL_OBJ)) { + return; + } + addConsoleInstrumentationHandler(({ args, level }) => { + if (getClient() !== client || !levels.includes(level)) { + return; + } + consoleHandler(args, level); + }); + } + }; + }; + captureConsoleIntegration = defineIntegration(_captureConsoleIntegration); + CaptureConsole = convertIntegrationFnToClass( + INTEGRATION_NAME16, + captureConsoleIntegration + ); } +}); - // Intermediary object to store baggage key value pairs of incoming baggage headers on. - // It is later used to read Sentry-DSC-values from. - let baggageObject = {}; - - if (Array.isArray(baggageHeader)) { - // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it - baggageObject = baggageHeader.reduce((acc, curr) => { - const currBaggageObject = baggageHeaderToObject(curr); - for (const key of Object.keys(currBaggageObject)) { - acc[key] = currBaggageObject[key]; - } - return acc; - }, {}); - } else { - // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but - // this is how we choose to handle it) - if (!baggageHeader) { - return undefined; - } - - baggageObject = baggageHeaderToObject(baggageHeader); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/debug.js +var INTEGRATION_NAME17, _debugIntegration, debugIntegration, Debug; +var init_debug = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/debug.js"() { + init_esm2(); + init_esm(); + INTEGRATION_NAME17 = "Debug"; + _debugIntegration = (options2 = {}) => { + const _options = { + debugger: false, + stringify: false, + ...options2 + }; + return { + name: INTEGRATION_NAME17, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + if (!client.on) { + return; + } + client.on("beforeSendEvent", (event, hint) => { + if (_options.debugger) { + debugger; + } + consoleSandbox(() => { + if (_options.stringify) { + console.log(JSON.stringify(event, null, 2)); + if (hint && Object.keys(hint).length) { + console.log(JSON.stringify(hint, null, 2)); + } + } else { + console.log(event); + if (hint && Object.keys(hint).length) { + console.log(hint); + } + } + }); + }); + } + }; + }; + debugIntegration = defineIntegration(_debugIntegration); + Debug = convertIntegrationFnToClass(INTEGRATION_NAME17, debugIntegration); } +}); - // Read all "sentry-" prefixed values out of the baggage object and put it onto a dynamic sampling context object. - const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => { - if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) { - const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length); - acc[nonPrefixedKey] = value; - } - return acc; - }, {}); - - // Only return a dynamic sampling context object if there are keys in it. - // A keyless object means there were no sentry values on the header, which means that there is no DSC. - if (Object.keys(dynamicSamplingContext).length > 0) { - return dynamicSamplingContext ; - } else { - return undefined; - } -} - -/** - * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with "sentry-". - * - * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility - * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is - * `undefined` the function will return `undefined`. - * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext` - * was `undefined`, or if `dynamicSamplingContext` didn't contain any values. - */ -function dynamicSamplingContextToSentryBaggageHeader( - // this also takes undefined for convenience and bundle size in other places - dynamicSamplingContext, -) { - if (!dynamicSamplingContext) { - return undefined; +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/debug-build.js +var DEBUG_BUILD5; +var init_debug_build5 = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/debug-build.js"() { + DEBUG_BUILD5 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__; } +}); - // Prefix all DSC keys with "sentry-" and put them into a new object - const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce( - (acc, [dscKey, dscValue]) => { - if (dscValue) { - acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue; - } - return acc; - }, - {}, - ); - - return objectToBaggageHeader(sentryPrefixedDSC); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/dedupe.js +function _shouldDropEvent2(currentEvent, previousEvent) { + if (!previousEvent) { + return false; + } + if (_isSameMessageEvent(currentEvent, previousEvent)) { + return true; + } + if (_isSameExceptionEvent(currentEvent, previousEvent)) { + return true; + } + return false; } - -/** - * Will parse a baggage header, which is a simple key-value map, into a flat object. - * - * @param baggageHeader The baggage header to parse. - * @returns a flat object containing all the key-value pairs from `baggageHeader`. - */ -function baggageHeaderToObject(baggageHeader) { - return baggageHeader - .split(',') - .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim()))) - .reduce((acc, [key, value]) => { - acc[key] = value; - return acc; - }, {}); +function _isSameMessageEvent(currentEvent, previousEvent) { + const currentMessage = currentEvent.message; + const previousMessage = previousEvent.message; + if (!currentMessage && !previousMessage) { + return false; + } + if (currentMessage && !previousMessage || !currentMessage && previousMessage) { + return false; + } + if (currentMessage !== previousMessage) { + return false; + } + if (!_isSameFingerprint(currentEvent, previousEvent)) { + return false; + } + if (!_isSameStacktrace(currentEvent, previousEvent)) { + return false; + } + return true; } - -/** - * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs. - * - * @param object The object to turn into a baggage header. - * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header - * is not spec compliant. - */ -function objectToBaggageHeader(object) { - if (Object.keys(object).length === 0) { - // An empty baggage header is not spec compliant: We return undefined. - return undefined; +function _isSameExceptionEvent(currentEvent, previousEvent) { + const previousException = _getExceptionFromEvent(previousEvent); + const currentException = _getExceptionFromEvent(currentEvent); + if (!previousException || !currentException) { + return false; } - - return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => { - const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`; - const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`; - if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) { - debugBuild.DEBUG_BUILD && - logger.logger.warn( - `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`, - ); - return baggageHeader; - } else { - return newBaggageHeader; + if (previousException.type !== currentException.type || previousException.value !== currentException.value) { + return false; + } + if (!_isSameFingerprint(currentEvent, previousEvent)) { + return false; + } + if (!_isSameStacktrace(currentEvent, previousEvent)) { + return false; + } + return true; +} +function _isSameStacktrace(currentEvent, previousEvent) { + let currentFrames = _getFramesFromEvent(currentEvent); + let previousFrames = _getFramesFromEvent(previousEvent); + if (!currentFrames && !previousFrames) { + return true; + } + if (currentFrames && !previousFrames || !currentFrames && previousFrames) { + return false; + } + currentFrames = currentFrames; + previousFrames = previousFrames; + if (previousFrames.length !== currentFrames.length) { + return false; + } + for (let i = 0; i < previousFrames.length; i++) { + const frameA = previousFrames[i]; + const frameB = currentFrames[i]; + if (frameA.filename !== frameB.filename || frameA.lineno !== frameB.lineno || frameA.colno !== frameB.colno || frameA.function !== frameB.function) { + return false; } - }, ''); + } + return true; } - -exports.BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME; -exports.MAX_BAGGAGE_STRING_LENGTH = MAX_BAGGAGE_STRING_LENGTH; -exports.SENTRY_BAGGAGE_KEY_PREFIX = SENTRY_BAGGAGE_KEY_PREFIX; -exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = SENTRY_BAGGAGE_KEY_PREFIX_REGEX; -exports.baggageHeaderToDynamicSamplingContext = baggageHeaderToDynamicSamplingContext; -exports.dynamicSamplingContextToSentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader; -//# sourceMappingURL=baggage.js.map - - -/***/ }), - -/***/ 81597: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); -const worldwide = __nccwpck_require__(77822); - -// eslint-disable-next-line deprecation/deprecation -const WINDOW = worldwide.getGlobalObject(); - -const DEFAULT_MAX_STRING_LENGTH = 80; - -/** - * Given a child DOM element, returns a query-selector statement describing that - * and its ancestors - * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz] - * @returns generated DOM path - */ -function htmlTreeAsString( - elem, - options = {}, -) { - if (!elem) { - return ''; +function _isSameFingerprint(currentEvent, previousEvent) { + let currentFingerprint = currentEvent.fingerprint; + let previousFingerprint = previousEvent.fingerprint; + if (!currentFingerprint && !previousFingerprint) { + return true; } - - // try/catch both: - // - accessing event.target (see getsentry/raven-js#838, #768) - // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly - // - can throw an exception in some circumstances. + if (currentFingerprint && !previousFingerprint || !currentFingerprint && previousFingerprint) { + return false; + } + currentFingerprint = currentFingerprint; + previousFingerprint = previousFingerprint; try { - let currentElem = elem ; - const MAX_TRAVERSE_HEIGHT = 5; - const out = []; - let height = 0; - let len = 0; - const separator = ' > '; - const sepLength = separator.length; - let nextStr; - const keyAttrs = Array.isArray(options) ? options : options.keyAttrs; - const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH; - - while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { - nextStr = _htmlElementAsString(currentElem, keyAttrs); - // bail out if - // - nextStr is the 'html' element - // - the length of the string that would be created exceeds maxStringLength - // (ignore this limit if we are on the first iteration) - if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) { - break; - } - - out.push(nextStr); - - len += nextStr.length; - currentElem = currentElem.parentNode; - } - - return out.reverse().join(separator); + return !!(currentFingerprint.join("") === previousFingerprint.join("")); } catch (_oO) { - return ''; + return false; } } - -/** - * Returns a simple, query-selector representation of a DOM element - * e.g. [HTMLElement] => input#foo.btn[name=baz] - * @returns generated DOM path - */ -function _htmlElementAsString(el, keyAttrs) { - const elem = el - -; - - const out = []; - let className; - let classes; - let key; - let attr; - let i; - - if (!elem || !elem.tagName) { - return ''; - } - - // @ts-expect-error WINDOW has HTMLElement - if (WINDOW.HTMLElement) { - // If using the component name annotation plugin, this value may be available on the DOM node - if (elem instanceof HTMLElement && elem.dataset && elem.dataset['sentryComponent']) { - return elem.dataset['sentryComponent']; +function _getExceptionFromEvent(event) { + return event.exception && event.exception.values && event.exception.values[0]; +} +function _getFramesFromEvent(event) { + const exception2 = event.exception; + if (exception2) { + try { + return exception2.values[0].stacktrace.frames; + } catch (_oO) { + return void 0; } } + return void 0; +} +var INTEGRATION_NAME18, _dedupeIntegration, dedupeIntegration, Dedupe; +var init_dedupe = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/dedupe.js"() { + init_esm2(); + init_esm(); + init_debug_build5(); + INTEGRATION_NAME18 = "Dedupe"; + _dedupeIntegration = () => { + let previousEvent; + return { + name: INTEGRATION_NAME18, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(currentEvent) { + if (currentEvent.type) { + return currentEvent; + } + try { + if (_shouldDropEvent2(currentEvent, previousEvent)) { + DEBUG_BUILD5 && logger.warn("Event dropped due to being a duplicate of previously captured event."); + return null; + } + } catch (_oO) { + } + return previousEvent = currentEvent; + } + }; + }; + dedupeIntegration = defineIntegration(_dedupeIntegration); + Dedupe = convertIntegrationFnToClass(INTEGRATION_NAME18, dedupeIntegration); + } +}); - out.push(elem.tagName.toLowerCase()); - - // Pairs of attribute keys defined in `serializeAttribute` and their values on element. - const keyAttrPairs = - keyAttrs && keyAttrs.length - ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)]) - : null; - - if (keyAttrPairs && keyAttrPairs.length) { - keyAttrPairs.forEach(keyAttrPair => { - out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`); - }); - } else { - if (elem.id) { - out.push(`#${elem.id}`); - } - - // eslint-disable-next-line prefer-const - className = elem.className; - if (className && is.isString(className)) { - classes = className.split(/\s+/); - for (i = 0; i < classes.length; i++) { - out.push(`.${classes[i]}`); - } - } +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/extraerrordata.js +function _enhanceEventWithErrorData(event, hint = {}, depth, captureErrorCause) { + if (!hint.originalException || !isError(hint.originalException)) { + return event; } - const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt']; - for (i = 0; i < allowedAttrs.length; i++) { - key = allowedAttrs[i]; - attr = elem.getAttribute(key); - if (attr) { - out.push(`[${key}="${attr}"]`); + const exceptionName = hint.originalException.name || hint.originalException.constructor.name; + const errorData = _extractErrorData(hint.originalException, captureErrorCause); + if (errorData) { + const contexts = { + ...event.contexts + }; + const normalizedErrorData = normalize(errorData, depth); + if (isPlainObject(normalizedErrorData)) { + addNonEnumerableProperty(normalizedErrorData, "__sentry_skip_normalization__", true); + contexts[exceptionName] = normalizedErrorData; } + return { + ...event, + contexts + }; } - return out.join(''); + return event; } - -/** - * A safe form of location.href - */ -function getLocationHref() { +function _extractErrorData(error, captureErrorCause) { try { - return WINDOW.document.location.href; + const nativeKeys = [ + "name", + "message", + "stack", + "line", + "column", + "fileName", + "lineNumber", + "columnNumber", + "toJSON" + ]; + const extraErrorInfo = {}; + for (const key of Object.keys(error)) { + if (nativeKeys.indexOf(key) !== -1) { + continue; + } + const value = error[key]; + extraErrorInfo[key] = isError(value) ? value.toString() : value; + } + if (captureErrorCause && error.cause !== void 0) { + extraErrorInfo.cause = isError(error.cause) ? error.cause.toString() : error.cause; + } + if (typeof error.toJSON === "function") { + const serializedError = error.toJSON(); + for (const key of Object.keys(serializedError)) { + const value = serializedError[key]; + extraErrorInfo[key] = isError(value) ? value.toString() : value; + } + } + return extraErrorInfo; } catch (oO) { - return ''; - } -} - -/** - * Gets a DOM element by using document.querySelector. - * - * This wrapper will first check for the existance of the function before - * actually calling it so that we don't have to take care of this check, - * every time we want to access the DOM. - * - * Reason: DOM/querySelector is not available in all environments. - * - * We have to cast to any because utils can be consumed by a variety of environments, - * and we don't want to break TS users. If you know what element will be selected by - * `document.querySelector`, specify it as part of the generic call. For example, - * `const element = getDomElement('selector');` - * - * @param selector the selector string passed on to document.querySelector - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function getDomElement(selector) { - if (WINDOW.document && WINDOW.document.querySelector) { - return WINDOW.document.querySelector(selector) ; + DEBUG_BUILD5 && logger.error("Unable to extract extra data from the Error object:", oO); } return null; } - -/** - * Given a DOM element, traverses up the tree until it finds the first ancestor node - * that has the `data-sentry-component` attribute. This attribute is added at build-time - * by projects that have the component name annotation plugin installed. - * - * @returns a string representation of the component for the provided DOM element, or `null` if not found - */ -function getComponentName(elem) { - // @ts-expect-error WINDOW has HTMLElement - if (!WINDOW.HTMLElement) { - return null; - } - - let currentElem = elem ; - const MAX_TRAVERSE_HEIGHT = 5; - for (let i = 0; i < MAX_TRAVERSE_HEIGHT; i++) { - if (!currentElem) { - return null; - } - - if (currentElem instanceof HTMLElement && currentElem.dataset['sentryComponent']) { - return currentElem.dataset['sentryComponent']; - } - - currentElem = currentElem.parentNode; +var INTEGRATION_NAME19, _extraErrorDataIntegration, extraErrorDataIntegration, ExtraErrorData; +var init_extraerrordata = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/extraerrordata.js"() { + init_esm2(); + init_esm(); + init_debug_build5(); + INTEGRATION_NAME19 = "ExtraErrorData"; + _extraErrorDataIntegration = (options2 = {}) => { + const depth = options2.depth || 3; + const captureErrorCause = options2.captureErrorCause || false; + return { + name: INTEGRATION_NAME19, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event, hint) { + return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause); + } + }; + }; + extraErrorDataIntegration = defineIntegration(_extraErrorDataIntegration); + ExtraErrorData = convertIntegrationFnToClass( + INTEGRATION_NAME19, + extraErrorDataIntegration + ); } +}); - return null; -} - -exports.getComponentName = getComponentName; -exports.getDomElement = getDomElement; -exports.getLocationHref = getLocationHref; -exports.htmlTreeAsString = htmlTreeAsString; -//# sourceMappingURL=browser.js.map - - -/***/ }), - -/***/ 15267: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/reportingobserver.js +var WINDOW4, INTEGRATION_NAME20, SETUP_CLIENTS2, _reportingObserverIntegration, reportingObserverIntegration, ReportingObserver; +var init_reportingobserver = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/reportingobserver.js"() { + init_esm2(); + init_esm(); + WINDOW4 = GLOBAL_OBJ; + INTEGRATION_NAME20 = "ReportingObserver"; + SETUP_CLIENTS2 = /* @__PURE__ */ new WeakMap(); + _reportingObserverIntegration = (options2 = {}) => { + const types2 = options2.types || ["crash", "deprecation", "intervention"]; + function handler2(reports) { + if (!SETUP_CLIENTS2.has(getClient())) { + return; + } + for (const report of reports) { + withScope((scope) => { + scope.setExtra("url", report.url); + const label = `ReportingObserver [${report.type}]`; + let details = "No details available"; + if (report.body) { + const plainBody = {}; + for (const prop in report.body) { + plainBody[prop] = report.body[prop]; + } + scope.setExtra("body", plainBody); + if (report.type === "crash") { + const body = report.body; + details = [body.crashId || "", body.reason || ""].join(" ").trim() || details; + } else { + const body = report.body; + details = body.message || details; + } + } + captureMessage(`${label}: ${details}`); + }); + } + } + return { + name: INTEGRATION_NAME20, + setupOnce() { + if (!supportsReportingObserver()) { + return; + } + const observer = new WINDOW4.ReportingObserver(handler2, { + buffered: true, + types: types2 + }); + observer.observe(); + }, + setup(client) { + SETUP_CLIENTS2.set(client, true); + } + }; + }; + reportingObserverIntegration = defineIntegration(_reportingObserverIntegration); + ReportingObserver = convertIntegrationFnToClass( + INTEGRATION_NAME20, + reportingObserverIntegration + ); + } +}); -const _nullishCoalesce = __nccwpck_require__(57679); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/rewriteframes.js +var INTEGRATION_NAME21, _rewriteFramesIntegration, rewriteFramesIntegration, RewriteFrames; +var init_rewriteframes = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/rewriteframes.js"() { + init_esm2(); + init_esm(); + INTEGRATION_NAME21 = "RewriteFrames"; + _rewriteFramesIntegration = (options2 = {}) => { + const root = options2.root; + const prefix = options2.prefix || "app:///"; + const iteratee = options2.iteratee || ((frame) => { + if (!frame.filename) { + return frame; + } + const isWindowsFrame = /^[a-zA-Z]:\\/.test(frame.filename) || // or the presence of a backslash without a forward slash (which are not allowed on Windows) + frame.filename.includes("\\") && !frame.filename.includes("/"); + const startsWithSlash = /^\//.test(frame.filename); + if (isWindowsFrame || startsWithSlash) { + const filename = isWindowsFrame ? frame.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : frame.filename; + const base = root ? relative(root, filename) : basename(filename); + frame.filename = `${prefix}${base}`; + } + return frame; + }); + function _processExceptionsEvent(event) { + try { + return { + ...event, + exception: { + ...event.exception, + // The check for this is performed inside `process` call itself, safe to skip here + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + values: event.exception.values.map((value) => ({ + ...value, + ...value.stacktrace && { stacktrace: _processStacktrace(value.stacktrace) } + })) + } + }; + } catch (_oO) { + return event; + } + } + function _processStacktrace(stacktrace) { + return { + ...stacktrace, + frames: stacktrace && stacktrace.frames && stacktrace.frames.map((f) => iteratee(f)) + }; + } + return { + name: INTEGRATION_NAME21, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(originalEvent) { + let processedEvent = originalEvent; + if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) { + processedEvent = _processExceptionsEvent(processedEvent); + } + return processedEvent; + } + }; + }; + rewriteFramesIntegration = defineIntegration(_rewriteFramesIntegration); + RewriteFrames = convertIntegrationFnToClass( + INTEGRATION_NAME21, + rewriteFramesIntegration + ); + } +}); -// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/sessiontiming.js +var INTEGRATION_NAME22, _sessionTimingIntegration, sessionTimingIntegration, SessionTiming; +var init_sessiontiming = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/sessiontiming.js"() { + init_esm2(); + INTEGRATION_NAME22 = "SessionTiming"; + _sessionTimingIntegration = () => { + const startTime = Date.now(); + return { + name: INTEGRATION_NAME22, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + processEvent(event) { + const now = Date.now(); + return { + ...event, + extra: { + ...event.extra, + ["session:start"]: startTime, + ["session:duration"]: now - startTime, + ["session:end"]: now + } + }; + } + }; + }; + sessionTimingIntegration = defineIntegration(_sessionTimingIntegration); + SessionTiming = convertIntegrationFnToClass( + INTEGRATION_NAME22, + sessionTimingIntegration + ); + } +}); -/** - * Polyfill for the nullish coalescing operator (`??`), when used in situations where at least one of the values is the - * result of an async operation. - * - * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the - * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) - * - * @param lhs The value of the expression to the left of the `??` - * @param rhsFn A function returning the value of the expression to the right of the `??` - * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value - */ -async function _asyncNullishCoalesce(lhs, rhsFn) { - return _nullishCoalesce._nullishCoalesce(lhs, rhsFn); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/httpclient.js +function _fetchResponseHandler(options2, requestInfo, response, requestInit) { + if (_shouldCaptureResponse(options2, response.status, response.url)) { + const request2 = _getRequest(requestInfo, requestInit); + let requestHeaders, responseHeaders, requestCookies, responseCookies; + if (_shouldSendDefaultPii()) { + [{ headers: requestHeaders, cookies: requestCookies }, { headers: responseHeaders, cookies: responseCookies }] = [ + { cookieHeader: "Cookie", obj: request2 }, + { cookieHeader: "Set-Cookie", obj: response } + ].map(({ cookieHeader, obj }) => { + const headers = _extractFetchHeaders(obj.headers); + let cookies; + try { + const cookieString = headers[cookieHeader] || headers[cookieHeader.toLowerCase()] || void 0; + if (cookieString) { + cookies = _parseCookieString(cookieString); + } + } catch (e) { + DEBUG_BUILD5 && logger.log(`Could not extract cookies from header ${cookieHeader}`); + } + return { + headers, + cookies + }; + }); + } + const event = _createEvent({ + url: request2.url, + method: request2.method, + status: response.status, + requestHeaders, + responseHeaders, + requestCookies, + responseCookies + }); + captureEvent(event); + } } - -// Sucrase version: -// async function _asyncNullishCoalesce(lhs, rhsFn) { -// if (lhs != null) { -// return lhs; -// } else { -// return await rhsFn(); -// } -// } - -exports._asyncNullishCoalesce = _asyncNullishCoalesce; -//# sourceMappingURL=_asyncNullishCoalesce.js.map - - -/***/ }), - -/***/ 18414: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, - * descriptors, and functions, for situations in which at least one part of the expression is async. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See - * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 - * - * @param ops Array result of expression conversion - * @returns The value of the expression - */ -async function _asyncOptionalChain(ops) { - let lastAccessLHS = undefined; - let value = ops[0]; - let i = 1; - while (i < ops.length) { - const op = ops[i] ; - const fn = ops[i + 1] ; - i += 2; - // by checking for loose equality to `null`, we catch both `null` and `undefined` - if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { - // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it - return; +function _xhrResponseHandler(options2, xhr, method, headers) { + if (_shouldCaptureResponse(options2, xhr.status, xhr.responseURL)) { + let requestHeaders, responseCookies, responseHeaders; + if (_shouldSendDefaultPii()) { + try { + const cookieString = xhr.getResponseHeader("Set-Cookie") || xhr.getResponseHeader("set-cookie") || void 0; + if (cookieString) { + responseCookies = _parseCookieString(cookieString); + } + } catch (e) { + DEBUG_BUILD5 && logger.log("Could not extract cookies from response headers"); + } + try { + responseHeaders = _getXHRResponseHeaders(xhr); + } catch (e) { + DEBUG_BUILD5 && logger.log("Could not extract headers from response"); + } + requestHeaders = headers; } - if (op === 'access' || op === 'optionalAccess') { - lastAccessLHS = value; - value = await fn(value); - } else if (op === 'call' || op === 'optionalCall') { - value = await fn((...args) => (value ).call(lastAccessLHS, ...args)); - lastAccessLHS = undefined; + const event = _createEvent({ + url: xhr.responseURL, + method, + status: xhr.status, + requestHeaders, + // Can't access request cookies from XHR + responseHeaders, + responseCookies + }); + captureEvent(event); + } +} +function _getResponseSizeFromHeaders(headers) { + if (headers) { + const contentLength = headers["Content-Length"] || headers["content-length"]; + if (contentLength) { + return parseInt(contentLength, 10); } } - return value; + return void 0; } - -// Sucrase version: -// async function _asyncOptionalChain(ops) { -// let lastAccessLHS = undefined; -// let value = ops[0]; -// let i = 1; -// while (i < ops.length) { -// const op = ops[i]; -// const fn = ops[i + 1]; -// i += 2; -// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { -// return undefined; -// } -// if (op === 'access' || op === 'optionalAccess') { -// lastAccessLHS = value; -// value = await fn(value); -// } else if (op === 'call' || op === 'optionalCall') { -// value = await fn((...args) => value.call(lastAccessLHS, ...args)); -// lastAccessLHS = undefined; -// } -// } -// return value; -// } - -exports._asyncOptionalChain = _asyncOptionalChain; -//# sourceMappingURL=_asyncOptionalChain.js.map - - -/***/ }), - -/***/ 33445: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const _asyncOptionalChain = __nccwpck_require__(18414); - -// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f - -/** - * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, - * descriptors, and functions, in cases where the value of the expression is to be deleted. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See - * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 - * - * @param ops Array result of expression conversion - * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable - * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which - * case `false`. - */ -async function _asyncOptionalChainDelete(ops) { - const result = (await _asyncOptionalChain._asyncOptionalChain(ops)) ; - // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case, - // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in - // which case we return whatever the `delete` returned, which will be a boolean. - return result == null ? true : (result ); -} - -// Sucrase version: -// async function asyncOptionalChainDelete(ops) { -// const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops); -// return result == null ? true : result; -// } - -exports._asyncOptionalChainDelete = _asyncOptionalChainDelete; -//# sourceMappingURL=_asyncOptionalChainDelete.js.map - - -/***/ }), - -/***/ 57679: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f -// -// The MIT License (MIT) -// -// Copyright (c) 2012-2018 various contributors (see AUTHORS) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -/** - * Polyfill for the nullish coalescing operator (`??`). - * - * Note that the RHS is wrapped in a function so that if it's a computed value, that evaluation won't happen unless the - * LHS evaluates to a nullish value, to mimic the operator's short-circuiting behavior. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) - * - * @param lhs The value of the expression to the left of the `??` - * @param rhsFn A function returning the value of the expression to the right of the `??` - * @returns The LHS value, unless it's `null` or `undefined`, in which case, the RHS value - */ -function _nullishCoalesce(lhs, rhsFn) { - // by checking for loose equality to `null`, we catch both `null` and `undefined` - return lhs != null ? lhs : rhsFn(); +function _parseCookieString(cookieString) { + return cookieString.split("; ").reduce((acc, cookie) => { + const [key, value] = cookie.split("="); + acc[key] = value; + return acc; + }, {}); } - -// Sucrase version: -// function _nullishCoalesce(lhs, rhsFn) { -// if (lhs != null) { -// return lhs; -// } else { -// return rhsFn(); -// } -// } - -exports._nullishCoalesce = _nullishCoalesce; -//# sourceMappingURL=_nullishCoalesce.js.map - - -/***/ }), - -/***/ 91706: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, - * descriptors, and functions. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) - * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 - * - * @param ops Array result of expression conversion - * @returns The value of the expression - */ -function _optionalChain(ops) { - let lastAccessLHS = undefined; - let value = ops[0]; - let i = 1; - while (i < ops.length) { - const op = ops[i] ; - const fn = ops[i + 1] ; - i += 2; - // by checking for loose equality to `null`, we catch both `null` and `undefined` - if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { - // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it +function _extractFetchHeaders(headers) { + const result = {}; + headers.forEach((value, key) => { + result[key] = value; + }); + return result; +} +function _getXHRResponseHeaders(xhr) { + const headers = xhr.getAllResponseHeaders(); + if (!headers) { + return {}; + } + return headers.split("\r\n").reduce((acc, line) => { + const [key, value] = line.split(": "); + acc[key] = value; + return acc; + }, {}); +} +function _isInGivenRequestTargets(failedRequestTargets, target) { + return failedRequestTargets.some((givenRequestTarget) => { + if (typeof givenRequestTarget === "string") { + return target.includes(givenRequestTarget); + } + return givenRequestTarget.test(target); + }); +} +function _isInGivenStatusRanges(failedRequestStatusCodes, status) { + return failedRequestStatusCodes.some((range) => { + if (typeof range === "number") { + return range === status; + } + return status >= range[0] && status <= range[1]; + }); +} +function _wrapFetch(client, options2) { + if (!supportsNativeFetch()) { + return; + } + addFetchInstrumentationHandler((handlerData) => { + if (getClient() !== client) { return; } - if (op === 'access' || op === 'optionalAccess') { - lastAccessLHS = value; - value = fn(value); - } else if (op === 'call' || op === 'optionalCall') { - value = fn((...args) => (value ).call(lastAccessLHS, ...args)); - lastAccessLHS = undefined; + const { response, args } = handlerData; + const [requestInfo, requestInit] = args; + if (!response) { + return; } + _fetchResponseHandler(options2, requestInfo, response, requestInit); + }); +} +function _wrapXHR(client, options2) { + if (!("XMLHttpRequest" in GLOBAL_OBJ)) { + return; } - return value; + addXhrInstrumentationHandler((handlerData) => { + if (getClient() !== client) { + return; + } + const xhr = handlerData.xhr; + const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY]; + if (!sentryXhrData) { + return; + } + const { method, request_headers: headers } = sentryXhrData; + try { + _xhrResponseHandler(options2, xhr, method, headers); + } catch (e) { + DEBUG_BUILD5 && logger.warn("Error while extracting response event form XHR response", e); + } + }); } - -// Sucrase version -// function _optionalChain(ops) { -// let lastAccessLHS = undefined; -// let value = ops[0]; -// let i = 1; -// while (i < ops.length) { -// const op = ops[i]; -// const fn = ops[i + 1]; -// i += 2; -// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { -// return undefined; -// } -// if (op === 'access' || op === 'optionalAccess') { -// lastAccessLHS = value; -// value = fn(value); -// } else if (op === 'call' || op === 'optionalCall') { -// value = fn((...args) => value.call(lastAccessLHS, ...args)); -// lastAccessLHS = undefined; -// } -// } -// return value; -// } - -exports._optionalChain = _optionalChain; -//# sourceMappingURL=_optionalChain.js.map - - -/***/ }), - -/***/ 11121: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const _optionalChain = __nccwpck_require__(91706); - -// https://github.com/alangpierce/sucrase/tree/265887868966917f3b924ce38dfad01fbab1329f - -/** - * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values, - * descriptors, and functions, in cases where the value of the expression is to be deleted. - * - * Adapted from Sucrase (https://github.com/alangpierce/sucrase) See - * https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15 - * - * @param ops Array result of expression conversion - * @returns The return value of the `delete` operator: `true`, unless the deletion target is an own, non-configurable - * property (one which can't be deleted or turned into an accessor, and whose enumerability can't be changed), in which - * case `false`. - */ -function _optionalChainDelete(ops) { - const result = _optionalChain._optionalChain(ops) ; - // If `result` is `null`, it means we didn't get to the end of the chain and so nothing was deleted (in which case, - // return `true` since that's what `delete` does when it no-ops). If it's non-null, we know the delete happened, in - // which case we return whatever the `delete` returned, which will be a boolean. - return result == null ? true : result; +function _shouldCaptureResponse(options2, status, url) { + return _isInGivenStatusRanges(options2.failedRequestStatusCodes, status) && _isInGivenRequestTargets(options2.failedRequestTargets, url) && !isSentryRequestUrl(url, getClient()); } - -// Sucrase version: -// function _optionalChainDelete(ops) { -// const result = _optionalChain(ops); -// // by checking for loose equality to `null`, we catch both `null` and `undefined` -// return result == null ? true : result; -// } - -exports._optionalChainDelete = _optionalChainDelete; -//# sourceMappingURL=_optionalChainDelete.js.map - - -/***/ }), - -/***/ 5659: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Creates a cache that evicts keys in fifo order - * @param size {Number} - */ -function makeFifoCache( - size, -) - - { - // Maintain a fifo queue of keys, we cannot rely on Object.keys as the browser may not support it. - let evictionOrder = []; - let cache = {}; - - return { - add(key, value) { - while (evictionOrder.length >= size) { - // shift is O(n) but this is small size and only happens if we are - // exceeding the cache size so it should be fine. - const evictCandidate = evictionOrder.shift(); - - if (evictCandidate !== undefined) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete cache[evictCandidate]; +function _createEvent(data) { + const message = `HTTP Client Error with status code: ${data.status}`; + const event = { + message, + exception: { + values: [ + { + type: "Error", + value: message } - } - - // in case we have a collision, delete the old key. - if (cache[key]) { - this.delete(key); - } - - evictionOrder.push(key); - cache[key] = value; - }, - clear() { - cache = {}; - evictionOrder = []; - }, - get(key) { - return cache[key]; + ] }, - size() { - return evictionOrder.length; + request: { + url: data.url, + method: data.method, + headers: data.requestHeaders, + cookies: data.requestCookies }, - // Delete cache key and return true if it existed, false otherwise. - delete(key) { - if (!cache[key]) { - return false; - } - - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete cache[key]; - - for (let i = 0; i < evictionOrder.length; i++) { - if (evictionOrder[i] === key) { - evictionOrder.splice(i, 1); - break; - } + contexts: { + response: { + status_code: data.status, + headers: data.responseHeaders, + cookies: data.responseCookies, + body_size: _getResponseSizeFromHeaders(data.responseHeaders) } - - return true; - }, + } }; + addExceptionMechanism(event, { + type: "http.client", + handled: false + }); + return event; } +function _getRequest(requestInfo, requestInit) { + if (!requestInit && requestInfo instanceof Request) { + return requestInfo; + } + if (requestInfo instanceof Request && requestInfo.bodyUsed) { + return requestInfo; + } + return new Request(requestInfo, requestInit); +} +function _shouldSendDefaultPii() { + const client = getClient(); + return client ? Boolean(client.getOptions().sendDefaultPii) : false; +} +var INTEGRATION_NAME23, _httpClientIntegration, httpClientIntegration, HttpClient; +var init_httpclient = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/httpclient.js"() { + init_esm2(); + init_esm(); + init_debug_build5(); + INTEGRATION_NAME23 = "HttpClient"; + _httpClientIntegration = (options2 = {}) => { + const _options = { + failedRequestStatusCodes: [[500, 599]], + failedRequestTargets: [/.*/], + ...options2 + }; + return { + name: INTEGRATION_NAME23, + // TODO v8: Remove this + setupOnce() { + }, + // eslint-disable-line @typescript-eslint/no-empty-function + setup(client) { + _wrapFetch(client, _options); + _wrapXHR(client, _options); + } + }; + }; + httpClientIntegration = defineIntegration(_httpClientIntegration); + HttpClient = convertIntegrationFnToClass(INTEGRATION_NAME23, httpClientIntegration); + } +}); -exports.makeFifoCache = makeFifoCache; -//# sourceMappingURL=cache.js.map - - -/***/ }), - -/***/ 47720: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); +// node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/index.js +var init_esm4 = __esm({ + "node_modules/.pnpm/@sentry+integrations@7.120.0/node_modules/@sentry/integrations/esm/index.js"() { + init_captureconsole(); + init_debug(); + init_dedupe(); + init_extraerrordata(); + init_reportingobserver(); + init_rewriteframes(); + init_sessiontiming(); + init_httpclient(); + } +}); -const envelope = __nccwpck_require__(3761); -const time = __nccwpck_require__(22948); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/common.js +function replaceCronNames(cronExpression) { + return replacements.reduce( + // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor + (acc, [name, replacement]) => acc.replace(new RegExp(name, "gi"), replacement), + cronExpression + ); +} +var replacements; +var init_common2 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/common.js"() { + replacements = [ + ["january", "1"], + ["february", "2"], + ["march", "3"], + ["april", "4"], + ["may", "5"], + ["june", "6"], + ["july", "7"], + ["august", "8"], + ["september", "9"], + ["october", "10"], + ["november", "11"], + ["december", "12"], + ["jan", "1"], + ["feb", "2"], + ["mar", "3"], + ["apr", "4"], + ["may", "5"], + ["jun", "6"], + ["jul", "7"], + ["aug", "8"], + ["sep", "9"], + ["oct", "10"], + ["nov", "11"], + ["dec", "12"], + ["sunday", "0"], + ["monday", "1"], + ["tuesday", "2"], + ["wednesday", "3"], + ["thursday", "4"], + ["friday", "5"], + ["saturday", "6"], + ["sun", "0"], + ["mon", "1"], + ["tue", "2"], + ["wed", "3"], + ["thu", "4"], + ["fri", "5"], + ["sat", "6"] + ]; + } +}); -/** - * Creates client report envelope - * @param discarded_events An array of discard events - * @param dsn A DSN that can be set on the header. Optional. - */ -function createClientReportEnvelope( - discarded_events, - dsn, - timestamp, -) { - const clientReportItem = [ - { type: 'client_report' }, - { - timestamp: timestamp || time.dateTimestampInSeconds(), - discarded_events, +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/cron.js +function instrumentCron(lib, monitorSlug) { + let jobScheduled = false; + return new Proxy(lib, { + construct(target, args) { + const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args; + if (typeof cronTime !== "string") { + throw new Error(ERROR_TEXT); + } + if (jobScheduled) { + throw new Error(`A job named '${monitorSlug}' has already been scheduled`); + } + jobScheduled = true; + const cronString = replaceCronNames(cronTime); + function monitoredTick(context, onComplete2) { + return withMonitor( + monitorSlug, + () => { + return onTick(context, onComplete2); + }, + { + schedule: { type: "crontab", value: cronString }, + timezone: timeZone || void 0 + } + ); + } + return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest); }, - ]; - return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]); -} - -exports.createClientReportEnvelope = createClientReportEnvelope; -//# sourceMappingURL=clientreport.js.map - - -/***/ }), - -/***/ 40203: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This code was originally copied from the 'cookie` module at v0.5.0 and was simplified for our use case. - * https://github.com/jshttp/cookie/blob/a0c84147aab6266bdb3996cf4062e93907c0b0fc/index.js - * It had the following license: - * - * (The MIT License) - * - * Copyright (c) 2012-2014 Roman Shtylman - * Copyright (c) 2015 Douglas Christopher Wilson - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * 'Software'), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * Parses a cookie string - */ -function parseCookie(str) { - const obj = {}; - let index = 0; - - while (index < str.length) { - const eqIdx = str.indexOf('=', index); - - // no more cookie pairs - if (eqIdx === -1) { - break; + get(target, prop) { + if (prop === "from") { + return (param) => { + const { cronTime, onTick, timeZone } = param; + if (typeof cronTime !== "string") { + throw new Error(ERROR_TEXT); + } + if (jobScheduled) { + throw new Error(`A job named '${monitorSlug}' has already been scheduled`); + } + jobScheduled = true; + const cronString = replaceCronNames(cronTime); + param.onTick = (context, onComplete) => { + return withMonitor( + monitorSlug, + () => { + return onTick(context, onComplete); + }, + { + schedule: { type: "crontab", value: cronString }, + timezone: timeZone || void 0 + } + ); + }; + return target.from(param); + }; + } else { + return target[prop]; + } } + }); +} +var ERROR_TEXT; +var init_cron = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/cron.js"() { + init_esm2(); + init_common2(); + ERROR_TEXT = "Automatic instrumentation of CronJob only supports crontab string"; + } +}); - let endIdx = str.indexOf(';', index); - - if (endIdx === -1) { - endIdx = str.length; - } else if (endIdx < eqIdx) { - // backtrack on prior semicolon - index = str.lastIndexOf(';', eqIdx - 1) + 1; - continue; +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/node-cron.js +function instrumentNodeCron(lib) { + return new Proxy(lib, { + get(target, prop) { + if (prop === "schedule" && target.schedule) { + return new Proxy(target.schedule, { + apply(target2, thisArg, argArray) { + const [expression, , options2] = argArray; + if (!_optionalChain([options2, "optionalAccess", (_) => _.name])) { + throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.'); + } + return withMonitor( + options2.name, + () => { + return target2.apply(thisArg, argArray); + }, + { + schedule: { type: "crontab", value: replaceCronNames(expression) }, + timezone: _optionalChain([options2, "optionalAccess", (_2) => _2.timezone]) + } + ); + } + }); + } else { + return target[prop]; + } } + }); +} +var init_node_cron = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/node-cron.js"() { + init_esm(); + init_esm2(); + init_common2(); + } +}); - const key = str.slice(index, eqIdx).trim(); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/node-schedule.js +function instrumentNodeSchedule(lib) { + return new Proxy(lib, { + get(target, prop) { + if (prop === "scheduleJob") { + return new Proxy(target.scheduleJob, { + apply(target2, thisArg, argArray) { + const [nameOrExpression, expressionOrCallback] = argArray; + if (typeof nameOrExpression !== "string" || typeof expressionOrCallback !== "string") { + throw new Error( + "Automatic instrumentation of 'node-schedule' requires the first parameter of 'scheduleJob' to be a job name string and the second parameter to be a crontab string" + ); + } + const monitorSlug = nameOrExpression; + const expression = expressionOrCallback; + return withMonitor( + monitorSlug, + () => { + return target2.apply(thisArg, argArray); + }, + { + schedule: { type: "crontab", value: replaceCronNames(expression) } + } + ); + } + }); + } + return target[prop]; + } + }); +} +var init_node_schedule = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/cron/node-schedule.js"() { + init_esm2(); + init_common2(); + } +}); - // only assign once - if (undefined === obj[key]) { - let val = str.slice(eqIdx + 1, endIdx).trim(); +// node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/index.js +var esm_exports = {}; +__export(esm_exports, { + DEFAULT_USER_INCLUDES: () => DEFAULT_USER_INCLUDES, + Handlers: () => handlers_exports, + Http: () => Http, + Hub: () => Hub, + Integrations: () => Integrations2, + NodeClient: () => NodeClient, + SDK_VERSION: () => SDK_VERSION, + SEMANTIC_ATTRIBUTE_SENTRY_OP: () => SEMANTIC_ATTRIBUTE_SENTRY_OP, + SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN: () => SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, + SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE: () => SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, + SEMANTIC_ATTRIBUTE_SENTRY_SOURCE: () => SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + Scope: () => Scope, + Undici: () => Undici, + addBreadcrumb: () => addBreadcrumb, + addEventProcessor: () => addEventProcessor, + addGlobalEventProcessor: () => addGlobalEventProcessor, + addIntegration: () => addIntegration, + addRequestDataToEvent: () => addRequestDataToEvent, + anrIntegration: () => anrIntegration, + autoDiscoverNodePerformanceMonitoringIntegrations: () => autoDiscoverNodePerformanceMonitoringIntegrations, + captureCheckIn: () => captureCheckIn, + captureConsoleIntegration: () => captureConsoleIntegration, + captureEvent: () => captureEvent, + captureException: () => captureException, + captureMessage: () => captureMessage, + captureSession: () => captureSession, + close: () => close, + configureScope: () => configureScope, + consoleIntegration: () => consoleIntegration, + contextLinesIntegration: () => contextLinesIntegration, + continueTrace: () => continueTrace, + createGetModuleFromFilename: () => createGetModuleFromFilename, + createTransport: () => createTransport, + cron: () => cron, + debugIntegration: () => debugIntegration, + dedupeIntegration: () => dedupeIntegration, + deepReadDirSync: () => deepReadDirSync, + defaultIntegrations: () => defaultIntegrations, + defaultStackParser: () => defaultStackParser, + enableAnrDetection: () => enableAnrDetection, + endSession: () => endSession, + extraErrorDataIntegration: () => extraErrorDataIntegration, + extractRequestData: () => extractRequestData, + extractTraceparentData: () => extractTraceparentData2, + flush: () => flush, + functionToStringIntegration: () => functionToStringIntegration, + getActiveSpan: () => getActiveSpan, + getActiveTransaction: () => getActiveTransaction, + getClient: () => getClient, + getCurrentHub: () => getCurrentHub, + getCurrentScope: () => getCurrentScope, + getDefaultIntegrations: () => getDefaultIntegrations, + getGlobalScope: () => getGlobalScope, + getHubFromCarrier: () => getHubFromCarrier, + getIsolationScope: () => getIsolationScope, + getModuleFromFilename: () => getModuleFromFilename, + getSentryRelease: () => getSentryRelease, + getSpanStatusFromHttpCode: () => getSpanStatusFromHttpCode, + hapiErrorPlugin: () => hapiErrorPlugin, + hapiIntegration: () => hapiIntegration, + httpClientIntegration: () => httpClientIntegration, + httpIntegration: () => httpIntegration, + inboundFiltersIntegration: () => inboundFiltersIntegration, + init: () => init, + isInitialized: () => isInitialized, + lastEventId: () => lastEventId, + linkedErrorsIntegration: () => linkedErrorsIntegration, + localVariablesIntegration: () => localVariablesIntegration, + makeMain: () => makeMain, + makeNodeTransport: () => makeNodeTransport, + metrics: () => metrics, + modulesIntegration: () => modulesIntegration, + nativeNodeFetchintegration: () => nativeNodeFetchintegration, + nodeContextIntegration: () => nodeContextIntegration, + onUncaughtExceptionIntegration: () => onUncaughtExceptionIntegration, + onUnhandledRejectionIntegration: () => onUnhandledRejectionIntegration, + parameterize: () => parameterize, + reportingObserverIntegration: () => reportingObserverIntegration, + requestDataIntegration: () => requestDataIntegration, + rewriteFramesIntegration: () => rewriteFramesIntegration, + runWithAsyncContext: () => runWithAsyncContext, + sessionTimingIntegration: () => sessionTimingIntegration, + setContext: () => setContext, + setCurrentClient: () => setCurrentClient, + setExtra: () => setExtra, + setExtras: () => setExtras, + setHttpStatus: () => setHttpStatus, + setMeasurement: () => setMeasurement, + setTag: () => setTag, + setTags: () => setTags, + setUser: () => setUser, + spanStatusfromHttpCode: () => spanStatusfromHttpCode, + spotlightIntegration: () => spotlightIntegration, + startActiveSpan: () => startActiveSpan, + startInactiveSpan: () => startInactiveSpan, + startSession: () => startSession, + startSpan: () => startSpan, + startSpanManual: () => startSpanManual, + startTransaction: () => startTransaction, + trace: () => trace, + trpcMiddleware: () => trpcMiddleware, + withActiveSpan: () => withActiveSpan, + withIsolationScope: () => withIsolationScope, + withMonitor: () => withMonitor, + withScope: () => withScope +}); +var getModuleFromFilename, Integrations2, cron; +var init_esm5 = __esm({ + "node_modules/.pnpm/@sentry+node@7.120.0/node_modules/@sentry/node/esm/index.js"() { + init_esm2(); + init_esm2(); + init_tracing2(); + init_client(); + init_http(); + init_sdk2(); + init_esm(); + init_utils3(); + init_module(); + init_module(); + init_legacy(); + init_handlers2(); + init_integrations2(); + init_integrations3(); + init_esm4(); + init_console2(); + init_onuncaughtexception(); + init_onunhandledrejection(); + init_modules(); + init_contextlines(); + init_context(); + init_local_variables(); + init_spotlight(); + init_anr(); + init_hapi(); + init_undici(); + init_http3(); + init_trpc(); + init_cron(); + init_node_cron(); + init_node_schedule(); + getModuleFromFilename = createGetModuleFromFilename(); + Integrations2 = { + // eslint-disable-next-line deprecation/deprecation + ...Integrations, + ...integrations_exports2, + ...integrations_exports3 + }; + cron = { + instrumentCron, + instrumentNodeCron, + instrumentNodeSchedule + }; + } +}); - // quoted values - if (val.charCodeAt(0) === 0x22) { - val = val.slice(1, -1); +// node_modules/.pnpm/@probot+pino@2.5.0/node_modules/@probot/pino/index.js +var require_pino2 = __commonJS({ + "node_modules/.pnpm/@probot+pino@2.5.0/node_modules/@probot/pino/index.js"(exports2, module2) { + module2.exports = { getTransformStream }; + var { Transform } = require_readable(); + var prettyFactory = require_pino_pretty(); + var Sentry = (init_esm5(), __toCommonJS(esm_exports)); + var LEVEL_MAP = { + 10: "trace", + 20: "debug", + 30: "info", + 40: "warn", + 50: "error", + 60: "fatal" + }; + function getTransformStream(options2 = {}) { + const formattingEnabled = options2.logFormat !== "json"; + const levelAsString = options2.logLevelInString; + const sentryEnabled = !!options2.sentryDsn; + if (sentryEnabled) { + Sentry.init({ + dsn: options2.sentryDsn, + // See https://github.com/getsentry/sentry-javascript/issues/1964#issuecomment-688482615 + // 6 is enough to serialize the deepest property across all GitHub Event payloads + normalizeDepth: 6 + }); } + const pretty = prettyFactory({ + ignore: [ + // default pino keys + "time", + "pid", + "hostname", + // remove keys from pino-http + "req", + "res", + "responseTime" + ].join(","), + errorProps: ["event", "status", "headers", "request", "sentryEventId"].join( + "," + ) + }); + return new Transform({ + objectMode: true, + transform(chunk, enc, cb) { + const line = chunk.toString().trim(); + if (line === void 0) return cb(); + const data = sentryEnabled ? JSON.parse(line) : null; + if (!sentryEnabled || data.level < 50) { + if (formattingEnabled) { + return cb(null, pretty(line)); + } + if (levelAsString) { + return cb(null, stringifyLogLevel(JSON.parse(line))); + } + cb(null, line + "\n"); + return; + } + Sentry.withScope(function(scope) { + const sentryLevelName = data.level === 50 ? "error" : "fatal"; + scope.setLevel(sentryLevelName); + for (const extra of ["event", "headers", "request", "status"]) { + if (!data[extra]) continue; + scope.setExtra(extra, data[extra]); + } + if (data.event && data.event.payload) { + const { + // When GitHub App is installed organization wide + installation: { id, account: { login: account } = {} } = {}, + // When the repository belongs to an organization + organization: { login: organization } = {}, + // When the repository belongs to a user + repository: { owner: { login: owner } = {} } = {} + } = data.event.payload; + scope.setUser({ + id, + username: account || organization || owner + }); + } + const sentryEventId = Sentry.captureException(toSentryError(data)); + if (data.event) { + data.event = { id: data.event.id }; + } + if (data.request) { + data.request = { + method: data.request.method, + url: data.request.url + }; + } + data.sentryEventId = sentryEventId; + if (formattingEnabled) { + return cb(null, pretty(data)); + } + if (levelAsString) { + return cb(null, stringifyLogLevel(data)); + } + cb(null, JSON.stringify(data) + "\n"); + }); + } + }); + } + function stringifyLogLevel(data) { + data.level = LEVEL_MAP[data.level]; + return JSON.stringify(data) + "\n"; + } + function toSentryError(data) { + const error = new Error(data.msg); + error.name = data.type; + error.stack = data.stack; + return error; + } + } +}); - try { - obj[key] = val.indexOf('%') !== -1 ? decodeURIComponent(val) : val; - } catch (e) { - obj[key] = val; +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/rebind-log.js +var require_rebind_log = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/rebind-log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rebindLog = rebindLog; + var kIsBound = Symbol("is-bound"); + function rebindLog(log2) { + if (log2[kIsBound]) + return log2; + for (const key in log2) { + if (typeof log2[key] !== "function") + continue; + log2[key] = log2[key].bind(log2); } + log2[kIsBound] = true; + return log2; } + } +}); - index = endIdx + 1; +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/get-log.js +var require_get_log = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/get-log.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getLog = getLog; + var pino_1 = require_pino(); + var pino_2 = require_pino2(); + var rebind_log_js_1 = require_rebind_log(); + function getLog(options2 = {}) { + const { level, logMessageKey, ...getTransformStreamOptions } = options2; + const pinoOptions = { + level: level || "info", + name: "probot", + messageKey: logMessageKey || "msg" + }; + const transform = (0, pino_2.getTransformStream)(getTransformStreamOptions); + transform.pipe(pino_1.pino.destination(1)); + return (0, rebind_log_js_1.rebindLog)((0, pino_1.pino)(pinoOptions, transform)); + } } +}); - return obj; +// node_modules/.pnpm/universal-user-agent@6.0.1/node_modules/universal-user-agent/dist-web/index.js +var dist_web_exports = {}; +__export(dist_web_exports, { + getUserAgent: () => getUserAgent +}); +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + if (typeof process === "object" && process.version !== void 0) { + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + return ""; } +var init_dist_web = __esm({ + "node_modules/.pnpm/universal-user-agent@6.0.1/node_modules/universal-user-agent/dist-web/index.js"() { + } +}); -exports.parseCookie = parseCookie; -//# sourceMappingURL=cookie.js.map - - -/***/ }), - -/***/ 35523: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code. - * - * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking. - */ -const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__); - -exports.DEBUG_BUILD = DEBUG_BUILD; -//# sourceMappingURL=debug-build.js.map - - -/***/ }), - -/***/ 24880: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const logger = __nccwpck_require__(6661); +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/version.js +var VERSION; +var init_version2 = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/version.js"() { + VERSION = "9.0.5"; + } +}); -/** Regular expression used to parse a Dsn. */ -const DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/defaults.js +var userAgent, DEFAULTS; +var init_defaults = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/defaults.js"() { + init_dist_web(); + init_version2(); + userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; + DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } + }; + } +}); -function isValidProtocol(protocol) { - return protocol === 'http' || protocol === 'https'; -} - -/** - * Renders the string representation of this Dsn. - * - * By default, this will render the public representation without the password - * component. To get the deprecated private representation, set `withPassword` - * to true. - * - * @param withPassword When set to true, the password will be included. - */ -function dsnToString(dsn, withPassword = false) { - const { host, path, pass, port, projectId, protocol, publicKey } = dsn; - return ( - `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` + - `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}` - ); +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); } - -/** - * Parses a Dsn from a given string. - * - * @param str A Dsn as string - * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string - */ -function dsnFromString(str) { - const match = DSN_REGEX.exec(str); - - if (!match) { - // This should be logged to the console - logger.consoleSandbox(() => { - // eslint-disable-next-line no-console - console.error(`Invalid Sentry Dsn: ${str}`); - }); - return undefined; +var init_lowercase_keys = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js"() { } +}); - const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1); - let path = ''; - let projectId = lastPath; - - const split = projectId.split('/'); - if (split.length > 1) { - path = split.slice(0, -1).join('/'); - projectId = split.pop() ; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/is-plain-object.js +function isPlainObject2(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +var init_is_plain_object = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/is-plain-object.js"() { } +}); - if (projectId) { - const projectMatch = projectId.match(/^\d+/); - if (projectMatch) { - projectId = projectMatch[0]; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js +function mergeDeep(defaults, options2) { + const result = Object.assign({}, defaults); + Object.keys(options2).forEach((key) => { + if (isPlainObject2(options2[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options2[key] }); + else + result[key] = mergeDeep(defaults[key], options2[key]); + } else { + Object.assign(result, { [key]: options2[key] }); } + }); + return result; +} +var init_merge_deep = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js"() { + init_is_plain_object(); } +}); - return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey }); -} - -function dsnFromComponents(components) { - return { - protocol: components.protocol, - publicKey: components.publicKey || '', - pass: components.pass || '', - host: components.host, - port: components.port || '', - path: components.path || '', - projectId: components.projectId, - }; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; + } + } + return obj; } - -function validateDsn(dsn) { - if (!debugBuild.DEBUG_BUILD) { - return true; +var init_remove_undefined_properties = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js"() { } +}); - const { port, projectId, protocol } = dsn; - - const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId']; - const hasMissingRequiredComponent = requiredComponents.find(component => { - if (!dsn[component]) { - logger.logger.error(`Invalid Sentry Dsn: ${component} missing`); - return true; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/merge.js +function merge(defaults, route, options2) { + var _a2; + if (typeof route === "string") { + let [method, url] = route.split(" "); + options2 = Object.assign(url ? { method, url } : { url: method }, options2); + } else { + options2 = Object.assign({}, route); + } + options2.headers = lowercaseKeys(options2.headers); + removeUndefinedProperties(options2); + removeUndefinedProperties(options2.headers); + const mergedOptions = mergeDeep(defaults || {}, options2); + if (options2.url === "/graphql") { + if (defaults && ((_a2 = defaults.mediaType.previews) == null ? void 0 : _a2.length)) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); } - return false; - }); - - if (hasMissingRequiredComponent) { - return false; + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); } - - if (!projectId.match(/^\d+$/)) { - logger.logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`); - return false; + return mergedOptions; +} +var init_merge = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/merge.js"() { + init_lowercase_keys(); + init_merge_deep(); + init_remove_undefined_properties(); } +}); - if (!isValidProtocol(protocol)) { - logger.logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`); - return false; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; } - - if (port && isNaN(parseInt(port, 10))) { - logger.logger.error(`Invalid Sentry Dsn: Invalid port ${port}`); - return false; + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} +var init_add_query_parameters = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js"() { } +}); - return true; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - -/** - * Creates a valid Sentry Dsn object, identifying a Sentry instance and project. - * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source - */ -function makeDsn(from) { - const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from); - if (!components || !validateDsn(components)) { - return undefined; +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; } - return components; + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } +var urlVariableRegex; +var init_extract_url_variable_names = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js"() { + urlVariableRegex = /\{[^}]+\}/g; + } +}); -exports.dsnFromString = dsnFromString; -exports.dsnToString = dsnToString; -exports.makeDsn = makeDsn; -//# sourceMappingURL=dsn.js.map - - -/***/ }), - -/***/ 83570: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/* - * This module exists for optimizations in the build process through rollup and terser. We define some global - * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these - * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will - * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to - * `logger` and preventing node-related code from appearing in browser bundles. - * - * Attention: - * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by - * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack) - * having issues tree-shaking these constants across package boundaries. - * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want - * users to be able to shake away expressions that it guards. - */ - -/** - * Figures out if we're building a browser bundle. - * - * @returns true if this is a browser bundle build. - */ -function isBrowserBundle() { - return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/omit.js +function omit2(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; } +var init_omit = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/omit.js"() { + } +}); -/** - * Get source of SDK. - */ -function getSDKSource() { - // @ts-expect-error "npm" is injected by rollup during build process - return "npm"; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/url-template.js +function encodeReserved(str2) { + return str2.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); } - -exports.getSDKSource = getSDKSource; -exports.isBrowserBundle = isBrowserBundle; -//# sourceMappingURL=env.js.map - - -/***/ }), - -/***/ 3761: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const dsn = __nccwpck_require__(24880); -const normalize = __nccwpck_require__(89870); -const object = __nccwpck_require__(92062); - -/** - * Creates an envelope. - * Make sure to always explicitly provide the generic to this function - * so that the envelope types resolve correctly. - */ -function createEnvelope(headers, items = []) { - return [headers, items] ; +function encodeUnreserved(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); } - -/** - * Add an item to an envelope. - * Make sure to always explicitly provide the generic to this function - * so that the envelope types resolve correctly. - */ -function addItemToEnvelope(envelope, newItem) { - const [headers, items] = envelope; - return [headers, [...items, newItem]] ; -} - -/** - * Convenience function to loop through the items and item types of an envelope. - * (This function was mostly created because working with envelope types is painful at the moment) - * - * If the callback returns true, the rest of the items will be skipped. - */ -function forEachEnvelopeItem( - envelope, - callback, -) { - const envelopeItems = envelope[1]; - - for (const envelopeItem of envelopeItems) { - const envelopeItemType = envelopeItem[0].type; - const result = callback(envelopeItem, envelopeItemType); - - if (result) { - return true; - } +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; } - - return false; } - -/** - * Returns true if the envelope contains any of the given envelope item types - */ -function envelopeContainsItemType(envelope, types) { - return forEachEnvelopeItem(envelope, (_, type) => types.includes(type)); +function isDefined(value) { + return value !== void 0 && value !== null; } - -/** - * Encode a string to UTF8. - */ -function encodeUTF8(input, textEncoder) { - const utf8 = textEncoder || new TextEncoder(); - return utf8.encode(input); +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; } - -/** - * Serializes an envelope. - */ -function serializeEnvelope(envelope, textEncoder) { - const [envHeaders, items] = envelope; - - // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data - let parts = JSON.stringify(envHeaders); - - function append(next) { - if (typeof parts === 'string') { - parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next]; +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); } else { - parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next); + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } } - } - - for (const item of items) { - const [itemHeaders, payload] = item; - - append(`\n${JSON.stringify(itemHeaders)}\n`); - - if (typeof payload === 'string' || payload instanceof Uint8Array) { - append(payload); - } else { - let stringifiedPayload; - try { - stringifiedPayload = JSON.stringify(payload); - } catch (e) { - // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still - // fails, we try again after normalizing it again with infinite normalization depth. This of course has a - // performance impact but in this case a performance hit is better than throwing. - stringifiedPayload = JSON.stringify(normalize.normalize(payload)); + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); } - append(stringifiedPayload); + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); } } - - return typeof parts === 'string' ? parts : concatBuffers(parts); + return result; } - -function concatBuffers(buffers) { - const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0); - - const merged = new Uint8Array(totalLength); - let offset = 0; - for (const buffer of buffers) { - merged.set(buffer, offset); - offset += buffer.length; +function parseUrl3(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); } - - return merged; } - -/** - * Parses an envelope - */ -function parseEnvelope( - env, - textEncoder, - textDecoder, -) { - let buffer = typeof env === 'string' ? textEncoder.encode(env) : env; - - function readBinary(length) { - const bin = buffer.subarray(0, length); - // Replace the buffer with the remaining data excluding trailing newline - buffer = buffer.subarray(length + 1); - return bin; +var init_url_template = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/util/url-template.js"() { } +}); - function readJson() { - let i = buffer.indexOf(0xa); - // If we couldn't find a newline, we must have found the end of the buffer - if (i < 0) { - i = buffer.length; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/parse.js +function parse(options2) { + var _a2; + let method = options2.method.toUpperCase(); + let url = (options2.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options2.headers); + let body; + let parameters = omit2(options2, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl3(url).expand(parameters); + if (!/^http/.test(url)) { + url = options2.baseUrl + url; + } + const omittedParameters = Object.keys(options2).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit2(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options2.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format2) => format2.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options2.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if ((_a2 = options2.mediaType.previews) == null ? void 0 : _a2.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options2.mediaType.previews).map((preview) => { + const format2 = options2.mediaType.format ? `.${options2.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format2}`; + }).join(","); + } } - - return JSON.parse(textDecoder.decode(readBinary(i))) ; } - - const envelopeHeader = readJson(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const items = []; - - while (buffer.length) { - const itemHeader = readJson(); - const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined; - - items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]); + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } } - - return [envelopeHeader, items]; -} - -/** - * Creates attachment envelope items - */ -function createAttachmentEnvelopeItem( - attachment, - textEncoder, -) { - const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data; - - return [ - object.dropUndefinedKeys({ - type: 'attachment', - length: buffer.length, - filename: attachment.filename, - content_type: attachment.contentType, - attachment_type: attachment.attachmentType, - }), - buffer, - ]; -} - -const ITEM_TYPE_TO_DATA_CATEGORY_MAP = { - session: 'session', - sessions: 'session', - attachment: 'attachment', - transaction: 'transaction', - event: 'error', - client_report: 'internal', - user_report: 'default', - profile: 'profile', - replay_event: 'replay', - replay_recording: 'replay', - check_in: 'monitor', - feedback: 'feedback', - span: 'span', - statsd: 'metric_bucket', -}; - -/** - * Maps the type of an envelope item to a data category. - */ -function envelopeItemTypeToDataCategory(type) { - return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type]; -} - -/** Extracts the minimal SDK info from the metadata or an events */ -function getSdkMetadataForEnvelopeHeader(metadataOrEvent) { - if (!metadataOrEvent || !metadataOrEvent.sdk) { - return; + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; } - const { name, version } = metadataOrEvent.sdk; - return { name, version }; + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options2.request ? { request: options2.request } : null + ); } +var init_parse = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/parse.js"() { + init_add_query_parameters(); + init_extract_url_variable_names(); + init_omit(); + init_url_template(); + } +}); -/** - * Creates event envelope headers, based on event, sdk info and tunnel - * Note: This function was extracted from the core package to make it available in Replay - */ -function createEventEnvelopeHeaders( - event, - sdkInfo, - tunnel, - dsn$1, -) { - const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext; - return { - event_id: event.event_id , - sent_at: new Date().toISOString(), - ...(sdkInfo && { sdk: sdkInfo }), - ...(!!tunnel && dsn$1 && { dsn: dsn.dsnToString(dsn$1) }), - ...(dynamicSamplingContext && { - trace: object.dropUndefinedKeys({ ...dynamicSamplingContext }), - }), - }; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options2) { + return parse(merge(defaults, route, options2)); } - -exports.addItemToEnvelope = addItemToEnvelope; -exports.createAttachmentEnvelopeItem = createAttachmentEnvelopeItem; -exports.createEnvelope = createEnvelope; -exports.createEventEnvelopeHeaders = createEventEnvelopeHeaders; -exports.envelopeContainsItemType = envelopeContainsItemType; -exports.envelopeItemTypeToDataCategory = envelopeItemTypeToDataCategory; -exports.forEachEnvelopeItem = forEachEnvelopeItem; -exports.getSdkMetadataForEnvelopeHeader = getSdkMetadataForEnvelopeHeader; -exports.parseEnvelope = parseEnvelope; -exports.serializeEnvelope = serializeEnvelope; -//# sourceMappingURL=envelope.js.map - - -/***/ }), - -/***/ 34135: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** An error emitted by Sentry SDKs and related utilities. */ -class SentryError extends Error { - /** Display name of this error instance. */ - - constructor( message, logLevel = 'warn') { - super(message);this.message = message; - this.name = new.target.prototype.constructor.name; - // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line - // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes - // instances of `SentryError` fail `obj instanceof SentryError` checks. - Object.setPrototypeOf(this, new.target.prototype); - this.logLevel = logLevel; +var init_endpoint_with_defaults = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js"() { + init_merge(); + init_parse(); } -} - -exports.SentryError = SentryError; -//# sourceMappingURL=error.js.map - - -/***/ }), - -/***/ 33494: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); -const misc = __nccwpck_require__(56073); -const normalize = __nccwpck_require__(89870); -const object = __nccwpck_require__(92062); +}); -/** - * Extracts stack frames from the error.stack string - */ -function parseStackFrames(stackParser, error) { - return stackParser(error.stack || '', 1); +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); } +var init_with_defaults = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/with-defaults.js"() { + init_endpoint_with_defaults(); + init_merge(); + init_parse(); + } +}); -/** - * Extracts stack frames from the error and builds a Sentry Exception - */ -function exceptionFromError(stackParser, error) { - const exception = { - type: error.name || error.constructor.name, - value: error.message, - }; +// node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/index.js +var endpoint; +var init_dist_src = __esm({ + "node_modules/.pnpm/@octokit+endpoint@9.0.5/node_modules/@octokit/endpoint/dist-src/index.js"() { + init_with_defaults(); + init_defaults(); + endpoint = withDefaults(null, DEFAULTS); + } +}); - const frames = parseStackFrames(stackParser, error); - if (frames.length) { - exception.stacktrace = { frames }; +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/version.js +var VERSION2; +var init_version3 = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/version.js"() { + VERSION2 = "8.4.0"; } +}); - return exception; +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/is-plain-object.js +function isPlainObject3(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } - -function getMessageForObject(exception) { - if ('name' in exception && typeof exception.name === 'string') { - let message = `'${exception.name}' captured as exception`; - - if ('message' in exception && typeof exception.message === 'string') { - message += ` with message '${exception.message}'`; - } - - return message; - } else if ('message' in exception && typeof exception.message === 'string') { - return exception.message; - } else { - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - return `Object captured as exception with keys: ${object.extractExceptionKeysForMessage( - exception , - )}`; +var init_is_plain_object2 = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/is-plain-object.js"() { } -} - -/** - * Builds and Event from a Exception - * - * TODO(v8): Remove getHub fallback - * @hidden - */ -function eventFromUnknownInput( - // eslint-disable-next-line deprecation/deprecation - getHubOrClient, - stackParser, - exception, - hint, -) { - const client = - typeof getHubOrClient === 'function' - ? // eslint-disable-next-line deprecation/deprecation - getHubOrClient().getClient() - : getHubOrClient; - - let ex = exception; - const providedMechanism = - hint && hint.data && (hint.data ).mechanism; - const mechanism = providedMechanism || { - handled: true, - type: 'generic', - }; - - let extras; - - if (!is.isError(exception)) { - if (is.isPlainObject(exception)) { - const normalizeDepth = client && client.getOptions().normalizeDepth; - extras = { ['__serialized__']: normalize.normalizeToSize(exception , normalizeDepth) }; +}); - const message = getMessageForObject(exception); - ex = (hint && hint.syntheticException) || new Error(message); - (ex ).message = message; - } else { - // This handles when someone does: `throw "something awesome";` - // We use synthesized Error here so we can extract a (rough) stack trace. - ex = (hint && hint.syntheticException) || new Error(exception ); - (ex ).message = exception ; - } - mechanism.synthetic = true; +// node_modules/.pnpm/deprecation@2.3.1/node_modules/deprecation/dist-web/index.js +var dist_web_exports2 = {}; +__export(dist_web_exports2, { + Deprecation: () => Deprecation +}); +var Deprecation; +var init_dist_web2 = __esm({ + "node_modules/.pnpm/deprecation@2.3.1/node_modules/deprecation/dist-web/index.js"() { + Deprecation = class extends Error { + constructor(message) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "Deprecation"; + } + }; } +}); - const event = { - exception: { - values: [exceptionFromError(stackParser, ex )], - }, - }; - - if (extras) { - event.extra = extras; +// node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) { + module2.exports = wrappy; + function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn).forEach(function(k) { + wrapper[k] = fn[k]; + }); + return wrapper; + function wrapper() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + var ret = fn.apply(this, args); + var cb2 = args[args.length - 1]; + if (typeof ret === "function" && ret !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret[k] = cb2[k]; + }); + } + return ret; + } + } } +}); - misc.addExceptionTypeValue(event, undefined, undefined); - misc.addExceptionMechanism(event, mechanism); - - return { - ...event, - event_id: hint && hint.event_id, - }; -} - -/** - * Builds and Event from a Message - * @hidden - */ -function eventFromMessage( - stackParser, - message, - // eslint-disable-next-line deprecation/deprecation - level = 'info', - hint, - attachStacktrace, -) { - const event = { - event_id: hint && hint.event_id, - level, - }; - - if (attachStacktrace && hint && hint.syntheticException) { - const frames = parseStackFrames(stackParser, hint.syntheticException); - if (frames.length) { - event.exception = { - values: [ - { - value: message, - stacktrace: { frames }, - }, - ], +// node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +var require_once = __commonJS({ + "node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) { + var wrappy = require_wrappy(); + module2.exports = wrappy(once2); + module2.exports.strict = wrappy(onceStrict); + once2.proto = once2(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once2(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once2(fn) { + var f = function() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); }; + var name = fn.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; } } +}); - if (is.isParameterizedString(message)) { - const { __sentry_template_string__, __sentry_template_values__ } = message; - - event.logentry = { - message: __sentry_template_string__, - params: __sentry_template_values__, +// node_modules/.pnpm/@octokit+request-error@5.1.0/node_modules/@octokit/request-error/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +var import_once, logOnceCode, logOnceHeaders, RequestError; +var init_dist_src2 = __esm({ + "node_modules/.pnpm/@octokit+request-error@5.1.0/node_modules/@octokit/request-error/dist-src/index.js"() { + init_dist_web2(); + import_once = __toESM(require_once()); + logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); + logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); + RequestError = class extends Error { + constructor(message, statusCode, options2) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options2 && typeof options2.headers !== "undefined") { + headers = options2.headers; + } + if ("response" in options2) { + this.response = options2.response; + headers = options2.response.headers; + } + const requestCopy = Object.assign({}, options2.request); + if (options2.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options2.request.headers, { + authorization: options2.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + Object.defineProperty(this, "code", { + get() { + logOnceCode( + new Deprecation( + "[@octokit/request-error] `error.code` is deprecated, use `error.status`." + ) + ); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders( + new Deprecation( + "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." + ) + ); + return headers || {}; + } + }); + } }; - return event; } +}); - event.message = message; - return event; -} - -exports.eventFromMessage = eventFromMessage; -exports.eventFromUnknownInput = eventFromUnknownInput; -exports.exceptionFromError = exceptionFromError; -exports.parseStackFrames = parseStackFrames; -//# sourceMappingURL=eventbuilder.js.map - - -/***/ }), - -/***/ 79565: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const aggregateErrors = __nccwpck_require__(35748); -const browser = __nccwpck_require__(81597); -const dsn = __nccwpck_require__(24880); -const error = __nccwpck_require__(34135); -const worldwide = __nccwpck_require__(77822); -const index = __nccwpck_require__(94659); -const is = __nccwpck_require__(25789); -const isBrowser = __nccwpck_require__(58249); -const logger = __nccwpck_require__(6661); -const memo = __nccwpck_require__(28779); -const misc = __nccwpck_require__(56073); -const node = __nccwpck_require__(44469); -const normalize = __nccwpck_require__(89870); -const object = __nccwpck_require__(92062); -const path = __nccwpck_require__(46118); -const promisebuffer = __nccwpck_require__(71262); -const requestdata = __nccwpck_require__(86240); -const severity = __nccwpck_require__(57018); -const stacktrace = __nccwpck_require__(1464); -const string = __nccwpck_require__(1308); -const supports = __nccwpck_require__(31789); -const syncpromise = __nccwpck_require__(14669); -const time = __nccwpck_require__(22948); -const tracing = __nccwpck_require__(71267); -const env = __nccwpck_require__(83570); -const envelope = __nccwpck_require__(3761); -const clientreport = __nccwpck_require__(47720); -const ratelimit = __nccwpck_require__(14036); -const baggage = __nccwpck_require__(25915); -const url = __nccwpck_require__(24076); -const userIntegrations = __nccwpck_require__(95337); -const cache = __nccwpck_require__(5659); -const eventbuilder = __nccwpck_require__(33494); -const anr = __nccwpck_require__(27730); -const lru = __nccwpck_require__(78320); -const _asyncNullishCoalesce = __nccwpck_require__(15267); -const _asyncOptionalChain = __nccwpck_require__(18414); -const _asyncOptionalChainDelete = __nccwpck_require__(33445); -const _nullishCoalesce = __nccwpck_require__(57679); -const _optionalChain = __nccwpck_require__(91706); -const _optionalChainDelete = __nccwpck_require__(11121); -const console = __nccwpck_require__(15586); -const dom = __nccwpck_require__(13507); -const xhr = __nccwpck_require__(96153); -const fetch = __nccwpck_require__(2455); -const history = __nccwpck_require__(3823); -const globalError = __nccwpck_require__(87820); -const globalUnhandledRejection = __nccwpck_require__(15286); -const _handlers = __nccwpck_require__(71111); -const nodeStackTrace = __nccwpck_require__(78592); -const escapeStringForRegex = __nccwpck_require__(68138); -const supportsHistory = __nccwpck_require__(21012); - - - -exports.applyAggregateErrorsToEvent = aggregateErrors.applyAggregateErrorsToEvent; -exports.getComponentName = browser.getComponentName; -exports.getDomElement = browser.getDomElement; -exports.getLocationHref = browser.getLocationHref; -exports.htmlTreeAsString = browser.htmlTreeAsString; -exports.dsnFromString = dsn.dsnFromString; -exports.dsnToString = dsn.dsnToString; -exports.makeDsn = dsn.makeDsn; -exports.SentryError = error.SentryError; -exports.GLOBAL_OBJ = worldwide.GLOBAL_OBJ; -exports.getGlobalObject = worldwide.getGlobalObject; -exports.getGlobalSingleton = worldwide.getGlobalSingleton; -exports.addInstrumentationHandler = index.addInstrumentationHandler; -exports.isDOMError = is.isDOMError; -exports.isDOMException = is.isDOMException; -exports.isElement = is.isElement; -exports.isError = is.isError; -exports.isErrorEvent = is.isErrorEvent; -exports.isEvent = is.isEvent; -exports.isInstanceOf = is.isInstanceOf; -exports.isNaN = is.isNaN; -exports.isParameterizedString = is.isParameterizedString; -exports.isPlainObject = is.isPlainObject; -exports.isPrimitive = is.isPrimitive; -exports.isRegExp = is.isRegExp; -exports.isString = is.isString; -exports.isSyntheticEvent = is.isSyntheticEvent; -exports.isThenable = is.isThenable; -exports.isVueViewModel = is.isVueViewModel; -exports.isBrowser = isBrowser.isBrowser; -exports.CONSOLE_LEVELS = logger.CONSOLE_LEVELS; -exports.consoleSandbox = logger.consoleSandbox; -exports.logger = logger.logger; -exports.originalConsoleMethods = logger.originalConsoleMethods; -exports.memoBuilder = memo.memoBuilder; -exports.addContextToFrame = misc.addContextToFrame; -exports.addExceptionMechanism = misc.addExceptionMechanism; -exports.addExceptionTypeValue = misc.addExceptionTypeValue; -exports.arrayify = misc.arrayify; -exports.checkOrSetAlreadyCaught = misc.checkOrSetAlreadyCaught; -exports.getEventDescription = misc.getEventDescription; -exports.parseSemver = misc.parseSemver; -exports.uuid4 = misc.uuid4; -exports.dynamicRequire = node.dynamicRequire; -exports.isNodeEnv = node.isNodeEnv; -exports.loadModule = node.loadModule; -exports.normalize = normalize.normalize; -exports.normalizeToSize = normalize.normalizeToSize; -exports.normalizeUrlToBase = normalize.normalizeUrlToBase; -exports.walk = normalize.walk; -exports.addNonEnumerableProperty = object.addNonEnumerableProperty; -exports.convertToPlainObject = object.convertToPlainObject; -exports.dropUndefinedKeys = object.dropUndefinedKeys; -exports.extractExceptionKeysForMessage = object.extractExceptionKeysForMessage; -exports.fill = object.fill; -exports.getOriginalFunction = object.getOriginalFunction; -exports.markFunctionWrapped = object.markFunctionWrapped; -exports.objectify = object.objectify; -exports.urlEncode = object.urlEncode; -exports.basename = path.basename; -exports.dirname = path.dirname; -exports.isAbsolute = path.isAbsolute; -exports.join = path.join; -exports.normalizePath = path.normalizePath; -exports.relative = path.relative; -exports.resolve = path.resolve; -exports.makePromiseBuffer = promisebuffer.makePromiseBuffer; -exports.DEFAULT_USER_INCLUDES = requestdata.DEFAULT_USER_INCLUDES; -exports.addRequestDataToEvent = requestdata.addRequestDataToEvent; -exports.addRequestDataToTransaction = requestdata.addRequestDataToTransaction; -exports.extractPathForTransaction = requestdata.extractPathForTransaction; -exports.extractRequestData = requestdata.extractRequestData; -exports.winterCGHeadersToDict = requestdata.winterCGHeadersToDict; -exports.winterCGRequestToRequestData = requestdata.winterCGRequestToRequestData; -exports.severityFromString = severity.severityFromString; -exports.severityLevelFromString = severity.severityLevelFromString; -exports.validSeverityLevels = severity.validSeverityLevels; -exports.createStackParser = stacktrace.createStackParser; -exports.getFunctionName = stacktrace.getFunctionName; -exports.nodeStackLineParser = stacktrace.nodeStackLineParser; -exports.stackParserFromStackParserOptions = stacktrace.stackParserFromStackParserOptions; -exports.stripSentryFramesAndReverse = stacktrace.stripSentryFramesAndReverse; -exports.isMatchingPattern = string.isMatchingPattern; -exports.safeJoin = string.safeJoin; -exports.snipLine = string.snipLine; -exports.stringMatchesSomePattern = string.stringMatchesSomePattern; -exports.truncate = string.truncate; -exports.isNativeFetch = supports.isNativeFetch; -exports.supportsDOMError = supports.supportsDOMError; -exports.supportsDOMException = supports.supportsDOMException; -exports.supportsErrorEvent = supports.supportsErrorEvent; -exports.supportsFetch = supports.supportsFetch; -exports.supportsNativeFetch = supports.supportsNativeFetch; -exports.supportsReferrerPolicy = supports.supportsReferrerPolicy; -exports.supportsReportingObserver = supports.supportsReportingObserver; -exports.SyncPromise = syncpromise.SyncPromise; -exports.rejectedSyncPromise = syncpromise.rejectedSyncPromise; -exports.resolvedSyncPromise = syncpromise.resolvedSyncPromise; -Object.defineProperty(exports, "_browserPerformanceTimeOriginMode", ({ - enumerable: true, - get: () => time._browserPerformanceTimeOriginMode -})); -exports.browserPerformanceTimeOrigin = time.browserPerformanceTimeOrigin; -exports.dateTimestampInSeconds = time.dateTimestampInSeconds; -exports.timestampInSeconds = time.timestampInSeconds; -exports.timestampWithMs = time.timestampWithMs; -exports.TRACEPARENT_REGEXP = tracing.TRACEPARENT_REGEXP; -exports.extractTraceparentData = tracing.extractTraceparentData; -exports.generateSentryTraceHeader = tracing.generateSentryTraceHeader; -exports.propagationContextFromHeaders = tracing.propagationContextFromHeaders; -exports.tracingContextFromHeaders = tracing.tracingContextFromHeaders; -exports.getSDKSource = env.getSDKSource; -exports.isBrowserBundle = env.isBrowserBundle; -exports.addItemToEnvelope = envelope.addItemToEnvelope; -exports.createAttachmentEnvelopeItem = envelope.createAttachmentEnvelopeItem; -exports.createEnvelope = envelope.createEnvelope; -exports.createEventEnvelopeHeaders = envelope.createEventEnvelopeHeaders; -exports.envelopeContainsItemType = envelope.envelopeContainsItemType; -exports.envelopeItemTypeToDataCategory = envelope.envelopeItemTypeToDataCategory; -exports.forEachEnvelopeItem = envelope.forEachEnvelopeItem; -exports.getSdkMetadataForEnvelopeHeader = envelope.getSdkMetadataForEnvelopeHeader; -exports.parseEnvelope = envelope.parseEnvelope; -exports.serializeEnvelope = envelope.serializeEnvelope; -exports.createClientReportEnvelope = clientreport.createClientReportEnvelope; -exports.DEFAULT_RETRY_AFTER = ratelimit.DEFAULT_RETRY_AFTER; -exports.disabledUntil = ratelimit.disabledUntil; -exports.isRateLimited = ratelimit.isRateLimited; -exports.parseRetryAfterHeader = ratelimit.parseRetryAfterHeader; -exports.updateRateLimits = ratelimit.updateRateLimits; -exports.BAGGAGE_HEADER_NAME = baggage.BAGGAGE_HEADER_NAME; -exports.MAX_BAGGAGE_STRING_LENGTH = baggage.MAX_BAGGAGE_STRING_LENGTH; -exports.SENTRY_BAGGAGE_KEY_PREFIX = baggage.SENTRY_BAGGAGE_KEY_PREFIX; -exports.SENTRY_BAGGAGE_KEY_PREFIX_REGEX = baggage.SENTRY_BAGGAGE_KEY_PREFIX_REGEX; -exports.baggageHeaderToDynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext; -exports.dynamicSamplingContextToSentryBaggageHeader = baggage.dynamicSamplingContextToSentryBaggageHeader; -exports.getNumberOfUrlSegments = url.getNumberOfUrlSegments; -exports.getSanitizedUrlString = url.getSanitizedUrlString; -exports.parseUrl = url.parseUrl; -exports.stripUrlQueryAndFragment = url.stripUrlQueryAndFragment; -exports.addOrUpdateIntegration = userIntegrations.addOrUpdateIntegration; -exports.makeFifoCache = cache.makeFifoCache; -exports.eventFromMessage = eventbuilder.eventFromMessage; -exports.eventFromUnknownInput = eventbuilder.eventFromUnknownInput; -exports.exceptionFromError = eventbuilder.exceptionFromError; -exports.parseStackFrames = eventbuilder.parseStackFrames; -exports.callFrameToStackFrame = anr.callFrameToStackFrame; -exports.watchdogTimer = anr.watchdogTimer; -exports.LRUMap = lru.LRUMap; -exports._asyncNullishCoalesce = _asyncNullishCoalesce._asyncNullishCoalesce; -exports._asyncOptionalChain = _asyncOptionalChain._asyncOptionalChain; -exports._asyncOptionalChainDelete = _asyncOptionalChainDelete._asyncOptionalChainDelete; -exports._nullishCoalesce = _nullishCoalesce._nullishCoalesce; -exports._optionalChain = _optionalChain._optionalChain; -exports._optionalChainDelete = _optionalChainDelete._optionalChainDelete; -exports.addConsoleInstrumentationHandler = console.addConsoleInstrumentationHandler; -exports.addClickKeypressInstrumentationHandler = dom.addClickKeypressInstrumentationHandler; -exports.SENTRY_XHR_DATA_KEY = xhr.SENTRY_XHR_DATA_KEY; -exports.addXhrInstrumentationHandler = xhr.addXhrInstrumentationHandler; -exports.addFetchInstrumentationHandler = fetch.addFetchInstrumentationHandler; -exports.addHistoryInstrumentationHandler = history.addHistoryInstrumentationHandler; -exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; -exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; -exports.resetInstrumentationHandlers = _handlers.resetInstrumentationHandlers; -exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; -exports.escapeStringForRegex = escapeStringForRegex.escapeStringForRegex; -exports.supportsHistory = supportsHistory.supportsHistory; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 71111: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const logger = __nccwpck_require__(6661); -const stacktrace = __nccwpck_require__(1464); - -// We keep the handlers globally -const handlers = {}; -const instrumented = {}; - -/** Add a handler function. */ -function addHandler(type, handler) { - handlers[type] = handlers[type] || []; - (handlers[type] ).push(handler); -} - -/** - * Reset all instrumentation handlers. - * This can be used by tests to ensure we have a clean slate of instrumentation handlers. - */ -function resetInstrumentationHandlers() { - Object.keys(handlers).forEach(key => { - handlers[key ] = undefined; - }); +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); } - -/** Maybe run an instrumentation function, unless it was already called. */ -function maybeInstrument(type, instrumentFn) { - if (!instrumented[type]) { - instrumentFn(); - instrumented[type] = true; +var init_get_buffer_response = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/get-buffer-response.js"() { } -} +}); -/** Trigger handlers for a given instrumentation type. */ -function triggerHandlers(type, data) { - const typeHandlers = type && handlers[type]; - if (!typeHandlers) { - return; +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a2, _b, _c, _d; + const log2 = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a2 = requestOptions.request) == null ? void 0 : _a2.parseSuccessResponseBody) !== false; + if (isPlainObject3(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); } - - for (const handler of typeHandlers) { - try { - handler(data); - } catch (e) { - debugBuild.DEBUG_BUILD && - logger.logger.error( - `Error while triggering instrumentation handler.\nType: ${type}\nName: ${stacktrace.getFunctionName(handler)}\nError:`, - e, - ); - } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; } -} - -exports.addHandler = addHandler; -exports.maybeInstrument = maybeInstrument; -exports.resetInstrumentationHandlers = resetInstrumentationHandlers; -exports.triggerHandlers = triggerHandlers; -//# sourceMappingURL=_handlers.js.map - - -/***/ }), - -/***/ 15586: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const logger = __nccwpck_require__(6661); -const object = __nccwpck_require__(92062); -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -/** - * Add an instrumentation handler for when a console.xxx method is called. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addConsoleInstrumentationHandler(handler) { - const type = 'console'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentConsole); -} - -function instrumentConsole() { - if (!('console' in worldwide.GLOBAL_OBJ)) { - return; + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); } - - logger.CONSOLE_LEVELS.forEach(function (level) { - if (!(level in worldwide.GLOBAL_OBJ.console)) { - return; - } - - object.fill(worldwide.GLOBAL_OBJ.console, level, function (originalConsoleMethod) { - logger.originalConsoleMethods[level] = originalConsoleMethod; - - return function (...args) { - const handlerData = { args, level }; - _handlers.triggerHandlers('console', handlerData); - - const log = logger.originalConsoleMethods[level]; - log && log.apply(worldwide.GLOBAL_OBJ.console, args); - }; - }); - }); -} - -exports.addConsoleInstrumentationHandler = addConsoleInstrumentationHandler; -//# sourceMappingURL=console.js.map - - -/***/ }), - -/***/ 13507: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const misc = __nccwpck_require__(56073); -const object = __nccwpck_require__(92062); -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -const WINDOW = worldwide.GLOBAL_OBJ ; -const DEBOUNCE_DURATION = 1000; - -let debounceTimerID; -let lastCapturedEventType; -let lastCapturedEventTargetId; - -/** - * Add an instrumentation handler for when a click or a keypress happens. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addClickKeypressInstrumentationHandler(handler) { - const type = 'dom'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentDOM); -} - -/** Exported for tests only. */ -function instrumentDOM() { - if (!WINDOW.document) { - return; - } - - // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom - // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before - // we instrument `addEventListener` so that we don't end up attaching this handler twice. - const triggerDOMHandler = _handlers.triggerHandlers.bind(null, 'dom'); - const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true); - WINDOW.document.addEventListener('click', globalDOMEventHandler, false); - WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false); - - // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled - // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That - // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler - // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still - // guaranteed to fire at least once.) - ['EventTarget', 'Node'].forEach((target) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - const proto = (WINDOW )[target] && (WINDOW )[target].prototype; - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins - if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) { - return; - } - - object.fill(proto, 'addEventListener', function (originalAddEventListener) { - return function ( - - type, - listener, - options, - ) { - if (type === 'click' || type == 'keypress') { - try { - const el = this ; - const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {}); - const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 }); - - if (!handlerForType.handler) { - const handler = makeDOMEventHandler(triggerDOMHandler); - handlerForType.handler = handler; - originalAddEventListener.call(this, type, handler, options); - } - - handlerForType.refCount++; - } catch (e) { - // Accessing dom properties is always fragile. - // Also allows us to skip `addEventListenrs` calls with no proper `this` context. - } - } - - return originalAddEventListener.call(this, type, listener, options); - }; - }); - - object.fill( - proto, - 'removeEventListener', - function (originalRemoveEventListener) { - return function ( - - type, - listener, - options, - ) { - if (type === 'click' || type == 'keypress') { - try { - const el = this ; - const handlers = el.__sentry_instrumentation_handlers__ || {}; - const handlerForType = handlers[type]; - - if (handlerForType) { - handlerForType.refCount--; - // If there are no longer any custom handlers of the current type on this element, we can remove ours, too. - if (handlerForType.refCount <= 0) { - originalRemoveEventListener.call(this, type, handlerForType.handler, options); - handlerForType.handler = undefined; - delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete - } - - // If there are no longer any custom handlers of any type on this element, cleanup everything. - if (Object.keys(handlers).length === 0) { - delete el.__sentry_instrumentation_handlers__; - } - } - } catch (e) { - // Accessing dom properties is always fragile. - // Also allows us to skip `addEventListenrs` calls with no proper `this` context. - } - } - - return originalRemoveEventListener.call(this, type, listener, options); - }; - }, - ); - }); -} - -/** - * Check whether the event is similar to the last captured one. For example, two click events on the same button. - */ -function isSimilarToLastCapturedEvent(event) { - // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress. - if (event.type !== lastCapturedEventType) { - return false; - } - - try { - // If both events have the same type, it's still possible that actions were performed on different targets. - // e.g. 2 clicks on different buttons. - if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) { - return false; + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect, + headers: requestOptions.headers, + signal: (_d = requestOptions.request) == null ? void 0 : _d.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; } - } catch (e) { - // just accessing `target` property can throw an exception in some rare circumstances - // see: https://github.com/getsentry/sentry-javascript/issues/838 - } - - // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_ - // to which an event listener was attached), we treat them as the same action, as we want to capture - // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box. - return true; -} - -/** - * Decide whether an event should be captured. - * @param event event to be captured - */ -function shouldSkipDOMEvent(eventType, target) { - // We are only interested in filtering `keypress` events for now. - if (eventType !== 'keypress') { - return false; - } - - if (!target || !target.tagName) { - return true; - } - - // Only consider keypress events on actual input elements. This will disregard keypresses targeting body - // e.g.tabbing through elements, hotkeys, etc. - if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) { - return false; - } - - return true; -} - -/** - * Wraps addEventListener to capture UI breadcrumbs - */ -function makeDOMEventHandler( - handler, - globalListener = false, -) { - return (event) => { - // It's possible this handler might trigger multiple times for the same - // event (e.g. event propagation through node ancestors). - // Ignore if we've already captured that event. - if (!event || event['_sentryCaptured']) { - return; + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log2.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); } - - const target = getEventTarget(event); - - // We always want to skip _some_ events. - if (shouldSkipDOMEvent(event.type, target)) { + if (status === 204 || status === 205) { return; } - - // Mark event as "seen" - object.addNonEnumerableProperty(event, '_sentryCaptured', true); - - if (target && !target._sentryId) { - // Add UUID to event target so we can identify if - object.addNonEnumerableProperty(target, '_sentryId', misc.uuid4()); - } - - const name = event.type === 'keypress' ? 'input' : event.type; - - // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons. - // If there is a last captured event, see if the new event is different enough to treat it as a unique one. - // If that's the case, emit the previous event and store locally the newly-captured DOM event. - if (!isSimilarToLastCapturedEvent(event)) { - const handlerData = { event, name, global: globalListener }; - handler(handlerData); - lastCapturedEventType = event.type; - lastCapturedEventTargetId = target ? target._sentryId : undefined; - } - - // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together. - clearTimeout(debounceTimerID); - debounceTimerID = WINDOW.setTimeout(() => { - lastCapturedEventTargetId = undefined; - lastCapturedEventType = undefined; - }, DEBOUNCE_DURATION); - }; -} - -function getEventTarget(event) { - try { - return event.target ; - } catch (e) { - // just accessing `target` property can throw an exception in some rare circumstances - // see: https://github.com/getsentry/sentry-javascript/issues/838 - return null; - } -} - -exports.addClickKeypressInstrumentationHandler = addClickKeypressInstrumentationHandler; -exports.instrumentDOM = instrumentDOM; -//# sourceMappingURL=dom.js.map - - -/***/ }), - -/***/ 2455: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const object = __nccwpck_require__(92062); -const supports = __nccwpck_require__(31789); -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -/** - * Add an instrumentation handler for when a fetch request happens. - * The handler function is called once when the request starts and once when it ends, - * which can be identified by checking if it has an `endTimestamp`. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addFetchInstrumentationHandler(handler) { - const type = 'fetch'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentFetch); -} - -function instrumentFetch() { - if (!supports.supportsNativeFetch()) { - return; - } - - object.fill(worldwide.GLOBAL_OBJ, 'fetch', function (originalFetch) { - return function (...args) { - const { method, url } = parseFetchArgs(args); - - const handlerData = { - args, - fetchData: { - method, + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { url, + status, + headers, + data: void 0 }, - startTimestamp: Date.now(), - }; - - _handlers.triggerHandlers('fetch', { - ...handlerData, + request: requestOptions }); - - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return originalFetch.apply(worldwide.GLOBAL_OBJ, args).then( - (response) => { - const finishedHandlerData = { - ...handlerData, - endTimestamp: Date.now(), - response, - }; - - _handlers.triggerHandlers('fetch', finishedHandlerData); - return response; + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) }, - (error) => { - const erroredHandlerData = { - ...handlerData, - endTimestamp: Date.now(), - error, - }; - - _handlers.triggerHandlers('fetch', erroredHandlerData); - // NOTE: If you are a Sentry user, and you are seeing this stack frame, - // it means the sentry.javascript SDK caught an error invoking your application code. - // This is expected behavior and NOT indicative of a bug with sentry.javascript. - throw error; + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data }, - ); + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data }; + }).catch((error) => { + if (error instanceof RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new RequestError(message, 500, { + request: requestOptions + }); }); } - -function hasProp(obj, prop) { - return !!obj && typeof obj === 'object' && !!(obj )[prop]; -} - -function getUrlFromResource(resource) { - if (typeof resource === 'string') { - return resource; - } - - if (!resource) { - return ''; - } - - if (hasProp(resource, 'url')) { - return resource.url; +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); } - - if (resource.toString) { - return resource.toString(); + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); } - - return ''; + return getBufferResponse(response); } - -/** - * Parses the fetch arguments to find the used Http method and the url of the request. - * Exported for tests only. - */ -function parseFetchArgs(fetchArgs) { - if (fetchArgs.length === 0) { - return { method: 'GET', url: '' }; - } - - if (fetchArgs.length === 2) { - const [url, options] = fetchArgs ; - - return { - url: getUrlFromResource(url), - method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET', - }; +function toErrorMessage(data) { + if (typeof data === "string") + return data; + let suffix; + if ("documentation_url" in data) { + suffix = ` - ${data.documentation_url}`; + } else { + suffix = ""; } - - const arg = fetchArgs[0]; - return { - url: getUrlFromResource(arg ), - method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET', - }; -} - -exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler; -exports.parseFetchArgs = parseFetchArgs; -//# sourceMappingURL=fetch.js.map - - -/***/ }), - -/***/ 87820: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -let _oldOnErrorHandler = null; - -/** - * Add an instrumentation handler for when an error is captured by the global error handler. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addGlobalErrorInstrumentationHandler(handler) { - const type = 'error'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentError); -} - -function instrumentError() { - _oldOnErrorHandler = worldwide.GLOBAL_OBJ.onerror; - - worldwide.GLOBAL_OBJ.onerror = function ( - msg, - url, - line, - column, - error, - ) { - const handlerData = { - column, - error, - line, - msg, - url, - }; - _handlers.triggerHandlers('error', handlerData); - - if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) { - // eslint-disable-next-line prefer-rest-params - return _oldOnErrorHandler.apply(this, arguments); + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`; } - - return false; - }; - - worldwide.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true; -} - -exports.addGlobalErrorInstrumentationHandler = addGlobalErrorInstrumentationHandler; -//# sourceMappingURL=globalError.js.map - - -/***/ }), - -/***/ 15286: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -let _oldOnUnhandledRejectionHandler = null; - -/** - * Add an instrumentation handler for when an unhandled promise rejection is captured. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addGlobalUnhandledRejectionInstrumentationHandler( - handler, -) { - const type = 'unhandledrejection'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentUnhandledRejection); + return `${data.message}${suffix}`; + } + return `Unknown error: ${JSON.stringify(data)}`; } +var init_fetch_wrapper = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/fetch-wrapper.js"() { + init_is_plain_object2(); + init_dist_src2(); + init_get_buffer_response(); + } +}); -function instrumentUnhandledRejection() { - _oldOnUnhandledRejectionHandler = worldwide.GLOBAL_OBJ.onunhandledrejection; - - worldwide.GLOBAL_OBJ.onunhandledrejection = function (e) { - const handlerData = e; - _handlers.triggerHandlers('unhandledrejection', handlerData); - - if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) { - // eslint-disable-next-line prefer-rest-params - return _oldOnUnhandledRejectionHandler.apply(this, arguments); +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/with-defaults.js +function withDefaults2(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); } - - return true; + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); }; - - worldwide.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true; -} - -exports.addGlobalUnhandledRejectionInstrumentationHandler = addGlobalUnhandledRejectionInstrumentationHandler; -//# sourceMappingURL=globalUnhandledRejection.js.map - - -/***/ }), - -/***/ 3823: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const object = __nccwpck_require__(92062); -__nccwpck_require__(35523); -__nccwpck_require__(6661); -const worldwide = __nccwpck_require__(77822); -const supportsHistory = __nccwpck_require__(21012); -const _handlers = __nccwpck_require__(71111); - -const WINDOW = worldwide.GLOBAL_OBJ ; - -let lastHref; - -/** - * Add an instrumentation handler for when a fetch request happens. - * The handler function is called once when the request starts and once when it ends, - * which can be identified by checking if it has an `endTimestamp`. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addHistoryInstrumentationHandler(handler) { - const type = 'history'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentHistory); + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults2.bind(null, endpoint2) + }); } - -function instrumentHistory() { - if (!supportsHistory.supportsHistory()) { - return; +var init_with_defaults2 = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/with-defaults.js"() { + init_fetch_wrapper(); } +}); - const oldOnPopState = WINDOW.onpopstate; - WINDOW.onpopstate = function ( ...args) { - const to = WINDOW.location.href; - // keep track of the current URL state, as we always receive only the updated state - const from = lastHref; - lastHref = to; - const handlerData = { from, to }; - _handlers.triggerHandlers('history', handlerData); - if (oldOnPopState) { - // Apparently this can throw in Firefox when incorrectly implemented plugin is installed. - // https://github.com/getsentry/sentry-javascript/issues/3344 - // https://github.com/bugsnag/bugsnag-js/issues/469 - try { - return oldOnPopState.apply(this, args); - } catch (_oO) { - // no-empty +// node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/index.js +var dist_src_exports2 = {}; +__export(dist_src_exports2, { + request: () => request +}); +var request; +var init_dist_src3 = __esm({ + "node_modules/.pnpm/@octokit+request@8.4.0/node_modules/@octokit/request/dist-src/index.js"() { + init_dist_src(); + init_dist_web(); + init_version3(); + init_with_defaults2(); + request = withDefaults2(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}` } - } - }; - - function historyReplacementFunction(originalHistoryFunction) { - return function ( ...args) { - const url = args.length > 2 ? args[2] : undefined; - if (url) { - // coerce to string (this is what pushState does) - const from = lastHref; - const to = String(url); - // keep track of the current URL state, as we always receive only the updated state - lastHref = to; - const handlerData = { from, to }; - _handlers.triggerHandlers('history', handlerData); - } - return originalHistoryFunction.apply(this, args); - }; - } - - object.fill(WINDOW.history, 'pushState', historyReplacementFunction); - object.fill(WINDOW.history, 'replaceState', historyReplacementFunction); -} - -exports.addHistoryInstrumentationHandler = addHistoryInstrumentationHandler; -//# sourceMappingURL=history.js.map - - -/***/ }), - -/***/ 94659: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const logger = __nccwpck_require__(6661); -const console = __nccwpck_require__(15586); -const dom = __nccwpck_require__(13507); -const fetch = __nccwpck_require__(2455); -const globalError = __nccwpck_require__(87820); -const globalUnhandledRejection = __nccwpck_require__(15286); -const history = __nccwpck_require__(3823); -const xhr = __nccwpck_require__(96153); - -// TODO(v8): Consider moving this file (or at least parts of it) into the browser package. The registered handlers are mostly non-generic and we risk leaking runtime specific code into generic packages. - -/** - * Add handler that will be called when given type of instrumentation triggers. - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - * @deprecated Use the proper function per instrumentation type instead! - */ -function addInstrumentationHandler(type, callback) { - switch (type) { - case 'console': - return console.addConsoleInstrumentationHandler(callback); - case 'dom': - return dom.addClickKeypressInstrumentationHandler(callback); - case 'xhr': - return xhr.addXhrInstrumentationHandler(callback); - case 'fetch': - return fetch.addFetchInstrumentationHandler(callback); - case 'history': - return history.addHistoryInstrumentationHandler(callback); - case 'error': - return globalError.addGlobalErrorInstrumentationHandler(callback); - case 'unhandledrejection': - return globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler(callback); - default: - debugBuild.DEBUG_BUILD && logger.logger.warn('unknown instrumentation type:', type); + }); } -} - -exports.addConsoleInstrumentationHandler = console.addConsoleInstrumentationHandler; -exports.addClickKeypressInstrumentationHandler = dom.addClickKeypressInstrumentationHandler; -exports.addFetchInstrumentationHandler = fetch.addFetchInstrumentationHandler; -exports.addGlobalErrorInstrumentationHandler = globalError.addGlobalErrorInstrumentationHandler; -exports.addGlobalUnhandledRejectionInstrumentationHandler = globalUnhandledRejection.addGlobalUnhandledRejectionInstrumentationHandler; -exports.addHistoryInstrumentationHandler = history.addHistoryInstrumentationHandler; -exports.SENTRY_XHR_DATA_KEY = xhr.SENTRY_XHR_DATA_KEY; -exports.addXhrInstrumentationHandler = xhr.addXhrInstrumentationHandler; -exports.addInstrumentationHandler = addInstrumentationHandler; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 96153: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); -const object = __nccwpck_require__(92062); -const worldwide = __nccwpck_require__(77822); -const _handlers = __nccwpck_require__(71111); - -const WINDOW = worldwide.GLOBAL_OBJ ; - -const SENTRY_XHR_DATA_KEY = '__sentry_xhr_v3__'; - -/** - * Add an instrumentation handler for when an XHR request happens. - * The handler function is called once when the request starts and once when it ends, - * which can be identified by checking if it has an `endTimestamp`. - * - * Use at your own risk, this might break without changelog notice, only used internally. - * @hidden - */ -function addXhrInstrumentationHandler(handler) { - const type = 'xhr'; - _handlers.addHandler(type, handler); - _handlers.maybeInstrument(type, instrumentXHR); -} +}); -/** Exported only for tests. */ -function instrumentXHR() { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (!(WINDOW ).XMLHttpRequest) { - return; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/parser.js +var require_parser = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/parser.js"(exports2) { + "use strict"; + exports2.load = function(received, defaults, onto = {}) { + var k, ref, v; + for (k in defaults) { + v = defaults[k]; + onto[k] = (ref = received[k]) != null ? ref : v; + } + return onto; + }; + exports2.overwrite = function(received, defaults, onto = {}) { + var k, v; + for (k in received) { + v = received[k]; + if (defaults[k] !== void 0) { + onto[k] = v; + } + } + return onto; + }; } +}); - const xhrproto = XMLHttpRequest.prototype; - - object.fill(xhrproto, 'open', function (originalOpen) { - return function ( ...args) { - const startTimestamp = Date.now(); - - // open() should always be called with two or more arguments - // But to be on the safe side, we actually validate this and bail out if we don't have a method & url - const method = is.isString(args[0]) ? args[0].toUpperCase() : undefined; - const url = parseUrl(args[1]); - - if (!method || !url) { - return originalOpen.apply(this, args); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/DLList.js +var require_DLList = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/DLList.js"(exports2, module2) { + "use strict"; + var DLList; + DLList = class DLList { + constructor(incr, decr) { + this.incr = incr; + this.decr = decr; + this._first = null; + this._last = null; + this.length = 0; } - - this[SENTRY_XHR_DATA_KEY] = { - method, - url, - request_headers: {}, - }; - - // if Sentry key appears in URL, don't capture it as a request - if (method === 'POST' && url.match(/sentry_key/)) { - this.__sentry_own_request__ = true; + push(value) { + var node2; + this.length++; + if (typeof this.incr === "function") { + this.incr(); + } + node2 = { + value, + prev: this._last, + next: null + }; + if (this._last != null) { + this._last.next = node2; + this._last = node2; + } else { + this._first = this._last = node2; + } + return void 0; } - - const onreadystatechangeHandler = () => { - // For whatever reason, this is not the same instance here as from the outer method - const xhrInfo = this[SENTRY_XHR_DATA_KEY]; - - if (!xhrInfo) { + shift() { + var value; + if (this._first == null) { return; + } else { + this.length--; + if (typeof this.decr === "function") { + this.decr(); + } + } + value = this._first.value; + if ((this._first = this._first.next) != null) { + this._first.prev = null; + } else { + this._last = null; + } + return value; + } + first() { + if (this._first != null) { + return this._first.value; + } + } + getArray() { + var node2, ref, results; + node2 = this._first; + results = []; + while (node2 != null) { + results.push((ref = node2, node2 = node2.next, ref.value)); + } + return results; + } + forEachShift(cb) { + var node2; + node2 = this.shift(); + while (node2 != null) { + cb(node2), node2 = this.shift(); } + return void 0; + } + debug() { + var node2, ref, ref1, ref2, results; + node2 = this._first; + results = []; + while (node2 != null) { + results.push((ref = node2, node2 = node2.next, { + value: ref.value, + prev: (ref1 = ref.prev) != null ? ref1.value : void 0, + next: (ref2 = ref.next) != null ? ref2.value : void 0 + })); + } + return results; + } + }; + module2.exports = DLList; + } +}); - if (this.readyState === 4) { +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Events.js +var require_Events = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Events.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + var Events2; + Events2 = class Events { + constructor(instance) { + this.instance = instance; + this._events = {}; + if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { + throw new Error("An Emitter already exists for this object"); + } + this.instance.on = (name, cb) => { + return this._addListener(name, "many", cb); + }; + this.instance.once = (name, cb) => { + return this._addListener(name, "once", cb); + }; + this.instance.removeAllListeners = (name = null) => { + if (name != null) { + return delete this._events[name]; + } else { + return this._events = {}; + } + }; + } + _addListener(name, status, cb) { + var base; + if ((base = this._events)[name] == null) { + base[name] = []; + } + this._events[name].push({ + cb, + status + }); + return this.instance; + } + listenerCount(name) { + if (this._events[name] != null) { + return this._events[name].length; + } else { + return 0; + } + } + trigger(name, ...args) { + var _this = this; + return _asyncToGenerator2(function* () { + var e, promises; try { - // touching statusCode in some platforms throws - // an exception - xhrInfo.status_code = this.status; - } catch (e) { - /* do nothing */ + if (name !== "debug") { + _this.trigger("debug", `Event triggered: ${name}`, args); + } + if (_this._events[name] == null) { + return; + } + _this._events[name] = _this._events[name].filter(function(listener) { + return listener.status !== "none"; + }); + promises = _this._events[name].map( + /* @__PURE__ */ function() { + var _ref = _asyncToGenerator2(function* (listener) { + var e2, returned; + if (listener.status === "none") { + return; + } + if (listener.status === "once") { + listener.status = "none"; + } + try { + returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; + if (typeof (returned != null ? returned.then : void 0) === "function") { + return yield returned; + } else { + return returned; + } + } catch (error) { + e2 = error; + if (true) { + _this.trigger("error", e2); + } + return null; + } + }); + return function(_x) { + return _ref.apply(this, arguments); + }; + }() + ); + return (yield Promise.all(promises)).find(function(x) { + return x != null; + }); + } catch (error) { + e = error; + if (true) { + _this.trigger("error", e); + } + return null; } + })(); + } + }; + module2.exports = Events2; + } +}); - const handlerData = { - args: [method, url], - endTimestamp: Date.now(), - startTimestamp, - xhr: this, - }; - _handlers.triggerHandlers('xhr', handlerData); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Queues.js +var require_Queues = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Queues.js"(exports2, module2) { + "use strict"; + var DLList; + var Events2; + var Queues; + DLList = require_DLList(); + Events2 = require_Events(); + Queues = class Queues { + constructor(num_priorities) { + var i; + this.Events = new Events2(this); + this._length = 0; + this._lists = function() { + var j, ref, results; + results = []; + for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { + results.push(new DLList(() => { + return this.incr(); + }, () => { + return this.decr(); + })); + } + return results; + }.call(this); + } + incr() { + if (this._length++ === 0) { + return this.Events.trigger("leftzero"); } - }; - - if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') { - object.fill(this, 'onreadystatechange', function (original) { - return function ( ...readyStateArgs) { - onreadystatechangeHandler(); - return original.apply(this, readyStateArgs); - }; + } + decr() { + if (--this._length === 0) { + return this.Events.trigger("zero"); + } + } + push(job) { + return this._lists[job.options.priority].push(job); + } + queued(priority) { + if (priority != null) { + return this._lists[priority].length; + } else { + return this._length; + } + } + shiftAll(fn) { + return this._lists.forEach(function(list) { + return list.forEachShift(fn); }); - } else { - this.addEventListener('readystatechange', onreadystatechangeHandler); } - - // Intercepting `setRequestHeader` to access the request headers of XHR instance. - // This will only work for user/library defined headers, not for the default/browser-assigned headers. - // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`. - object.fill(this, 'setRequestHeader', function (original) { - return function ( ...setRequestHeaderArgs) { - const [header, value] = setRequestHeaderArgs; - - const xhrInfo = this[SENTRY_XHR_DATA_KEY]; - - if (xhrInfo && is.isString(header) && is.isString(value)) { - xhrInfo.request_headers[header.toLowerCase()] = value; + getFirst(arr = this._lists) { + var j, len, list; + for (j = 0, len = arr.length; j < len; j++) { + list = arr[j]; + if (list.length > 0) { + return list; } - - return original.apply(this, setRequestHeaderArgs); - }; - }); - - return originalOpen.apply(this, args); + } + return []; + } + shiftLastFrom(priority) { + return this.getFirst(this._lists.slice(priority).reverse()).shift(); + } }; - }); + module2.exports = Queues; + } +}); - object.fill(xhrproto, 'send', function (originalSend) { - return function ( ...args) { - const sentryXhrData = this[SENTRY_XHR_DATA_KEY]; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/BottleneckError.js +var require_BottleneckError = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/BottleneckError.js"(exports2, module2) { + "use strict"; + var BottleneckError; + BottleneckError = class BottleneckError extends Error { + }; + module2.exports = BottleneckError; + } +}); - if (!sentryXhrData) { - return originalSend.apply(this, args); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Job.js +var require_Job = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Job.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - - if (args[0] !== undefined) { - sentryXhrData.body = args[0]; + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); } - - const handlerData = { - args: [sentryXhrData.method, sentryXhrData.url], - startTimestamp: Date.now(), - xhr: this, + } + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); }; - _handlers.triggerHandlers('xhr', handlerData); - - return originalSend.apply(this, args); + } + var BottleneckError; + var DEFAULT_PRIORITY; + var Job; + var NUM_PRIORITIES; + var parser2; + NUM_PRIORITIES = 10; + DEFAULT_PRIORITY = 5; + parser2 = require_parser(); + BottleneckError = require_BottleneckError(); + Job = class Job { + constructor(task, args, options2, jobDefaults, rejectOnDrop, Events2, _states, Promise2) { + this.task = task; + this.args = args; + this.rejectOnDrop = rejectOnDrop; + this.Events = Events2; + this._states = _states; + this.Promise = Promise2; + this.options = parser2.load(options2, jobDefaults); + this.options.priority = this._sanitizePriority(this.options.priority); + if (this.options.id === jobDefaults.id) { + this.options.id = `${this.options.id}-${this._randomIndex()}`; + } + this.promise = new this.Promise((_resolve, _reject) => { + this._resolve = _resolve; + this._reject = _reject; + }); + this.retryCount = 0; + } + _sanitizePriority(priority) { + var sProperty; + sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; + if (sProperty < 0) { + return 0; + } else if (sProperty > NUM_PRIORITIES - 1) { + return NUM_PRIORITIES - 1; + } else { + return sProperty; + } + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + doDrop({ + error, + message = "This job has been dropped by Bottleneck" + } = {}) { + if (this._states.remove(this.options.id)) { + if (this.rejectOnDrop) { + this._reject(error != null ? error : new BottleneckError(message)); + } + this.Events.trigger("dropped", { + args: this.args, + options: this.options, + task: this.task, + promise: this.promise + }); + return true; + } else { + return false; + } + } + _assertStatus(expected) { + var status; + status = this._states.jobStatus(this.options.id); + if (!(status === expected || expected === "DONE" && status === null)) { + throw new BottleneckError(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); + } + } + doReceive() { + this._states.start(this.options.id); + return this.Events.trigger("received", { + args: this.args, + options: this.options + }); + } + doQueue(reachedHWM, blocked) { + this._assertStatus("RECEIVED"); + this._states.next(this.options.id); + return this.Events.trigger("queued", { + args: this.args, + options: this.options, + reachedHWM, + blocked + }); + } + doRun() { + if (this.retryCount === 0) { + this._assertStatus("QUEUED"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + return this.Events.trigger("scheduled", { + args: this.args, + options: this.options + }); + } + doExecute(chained, clearGlobalState, run2, free) { + var _this = this; + return _asyncToGenerator2(function* () { + var error, eventInfo, passed; + if (_this.retryCount === 0) { + _this._assertStatus("RUNNING"); + _this._states.next(_this.options.id); + } else { + _this._assertStatus("EXECUTING"); + } + eventInfo = { + args: _this.args, + options: _this.options, + retryCount: _this.retryCount + }; + _this.Events.trigger("executing", eventInfo); + try { + passed = yield chained != null ? chained.schedule(_this.options, _this.task, ..._this.args) : _this.task(..._this.args); + if (clearGlobalState()) { + _this.doDone(eventInfo); + yield free(_this.options, eventInfo); + _this._assertStatus("DONE"); + return _this._resolve(passed); + } + } catch (error1) { + error = error1; + return _this._onFailure(error, eventInfo, clearGlobalState, run2, free); + } + })(); + } + doExpire(clearGlobalState, run2, free) { + var error, eventInfo; + if (this._states.jobStatus(this.options.id === "RUNNING")) { + this._states.next(this.options.id); + } + this._assertStatus("EXECUTING"); + eventInfo = { + args: this.args, + options: this.options, + retryCount: this.retryCount + }; + error = new BottleneckError(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error, eventInfo, clearGlobalState, run2, free); + } + _onFailure(error, eventInfo, clearGlobalState, run2, free) { + var _this2 = this; + return _asyncToGenerator2(function* () { + var retry2, retryAfter; + if (clearGlobalState()) { + retry2 = yield _this2.Events.trigger("failed", error, eventInfo); + if (retry2 != null) { + retryAfter = ~~retry2; + _this2.Events.trigger("retry", `Retrying ${_this2.options.id} after ${retryAfter} ms`, eventInfo); + _this2.retryCount++; + return run2(retryAfter); + } else { + _this2.doDone(eventInfo); + yield free(_this2.options, eventInfo); + _this2._assertStatus("DONE"); + return _this2._reject(error); + } + } + })(); + } + doDone(eventInfo) { + this._assertStatus("EXECUTING"); + this._states.next(this.options.id); + return this.Events.trigger("done", eventInfo); + } }; - }); -} - -function parseUrl(url) { - if (is.isString(url)) { - return url; - } - - try { - // url can be a string or URL - // but since URL is not available in IE11, we do not check for it, - // but simply assume it is an URL and return `toString()` from it (which returns the full URL) - // If that fails, we just return undefined - return (url ).toString(); - } catch (e2) {} // eslint-disable-line no-empty - - return undefined; -} - -exports.SENTRY_XHR_DATA_KEY = SENTRY_XHR_DATA_KEY; -exports.addXhrInstrumentationHandler = addXhrInstrumentationHandler; -exports.instrumentXHR = instrumentXHR; -//# sourceMappingURL=xhr.js.map - - -/***/ }), - -/***/ 25789: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// eslint-disable-next-line @typescript-eslint/unbound-method -const objectToString = Object.prototype.toString; - -/** - * Checks whether given value's type is one of a few Error or Error-like - * {@link isError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isError(wat) { - switch (objectToString.call(wat)) { - case '[object Error]': - case '[object Exception]': - case '[object DOMException]': - return true; - default: - return isInstanceOf(wat, Error); + module2.exports = Job; } -} -/** - * Checks whether given value is an instance of the given built-in class. - * - * @param wat The value to be checked - * @param className - * @returns A boolean representing the result. - */ -function isBuiltin(wat, className) { - return objectToString.call(wat) === `[object ${className}]`; -} - -/** - * Checks whether given value's type is ErrorEvent - * {@link isErrorEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isErrorEvent(wat) { - return isBuiltin(wat, 'ErrorEvent'); -} - -/** - * Checks whether given value's type is DOMError - * {@link isDOMError}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMError(wat) { - return isBuiltin(wat, 'DOMError'); -} - -/** - * Checks whether given value's type is DOMException - * {@link isDOMException}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isDOMException(wat) { - return isBuiltin(wat, 'DOMException'); -} - -/** - * Checks whether given value's type is a string - * {@link isString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isString(wat) { - return isBuiltin(wat, 'String'); -} - -/** - * Checks whether given string is parameterized - * {@link isParameterizedString}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isParameterizedString(wat) { - return ( - typeof wat === 'object' && - wat !== null && - '__sentry_template_string__' in wat && - '__sentry_template_values__' in wat - ); -} - -/** - * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol) - * {@link isPrimitive}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPrimitive(wat) { - return wat === null || isParameterizedString(wat) || (typeof wat !== 'object' && typeof wat !== 'function'); -} - -/** - * Checks whether given value's type is an object literal, or a class instance. - * {@link isPlainObject}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isPlainObject(wat) { - return isBuiltin(wat, 'Object'); -} - -/** - * Checks whether given value's type is an Event instance - * {@link isEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isEvent(wat) { - return typeof Event !== 'undefined' && isInstanceOf(wat, Event); -} - -/** - * Checks whether given value's type is an Element instance - * {@link isElement}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isElement(wat) { - return typeof Element !== 'undefined' && isInstanceOf(wat, Element); -} - -/** - * Checks whether given value's type is an regexp - * {@link isRegExp}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isRegExp(wat) { - return isBuiltin(wat, 'RegExp'); -} - -/** - * Checks whether given value has a then function. - * @param wat A value to be checked. - */ -function isThenable(wat) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return Boolean(wat && wat.then && typeof wat.then === 'function'); -} +}); -/** - * Checks whether given value's type is a SyntheticEvent - * {@link isSyntheticEvent}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isSyntheticEvent(wat) { - return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat; -} - -/** - * Checks whether given value is NaN - * {@link isNaN}. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isNaN(wat) { - return typeof wat === 'number' && wat !== wat; -} - -/** - * Checks whether given value's type is an instance of provided constructor. - * {@link isInstanceOf}. - * - * @param wat A value to be checked. - * @param base A constructor to be used in a check. - * @returns A boolean representing the result. - */ -function isInstanceOf(wat, base) { - try { - return wat instanceof base; - } catch (_e) { - return false; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/LocalDatastore.js +var require_LocalDatastore = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/LocalDatastore.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + var BottleneckError; + var LocalDatastore; + var parser2; + parser2 = require_parser(); + BottleneckError = require_BottleneckError(); + LocalDatastore = class LocalDatastore { + constructor(instance, storeOptions, storeInstanceOptions) { + this.instance = instance; + this.storeOptions = storeOptions; + this.clientId = this.instance._randomIndex(); + parser2.load(storeInstanceOptions, storeInstanceOptions, this); + this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); + this._running = 0; + this._done = 0; + this._unblockTime = 0; + this.ready = this.Promise.resolve(); + this.clients = {}; + this._startHeartbeat(); + } + _startHeartbeat() { + var base; + if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { + return typeof (base = this.heartbeat = setInterval(() => { + var amount, incr, maximum, now, reservoir; + now = Date.now(); + if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { + this._lastReservoirRefresh = now; + this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; + this.instance._drainAll(this.computeCapacity()); + } + if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { + var _this$storeOptions = this.storeOptions; + amount = _this$storeOptions.reservoirIncreaseAmount; + maximum = _this$storeOptions.reservoirIncreaseMaximum; + reservoir = _this$storeOptions.reservoir; + this._lastReservoirIncrease = now; + incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; + if (incr > 0) { + this.storeOptions.reservoir += incr; + return this.instance._drainAll(this.computeCapacity()); + } + } + }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; + } else { + return clearInterval(this.heartbeat); + } + } + __publish__(message) { + var _this = this; + return _asyncToGenerator2(function* () { + yield _this.yieldLoop(); + return _this.instance.Events.trigger("message", message.toString()); + })(); + } + __disconnect__(flush2) { + var _this2 = this; + return _asyncToGenerator2(function* () { + yield _this2.yieldLoop(); + clearInterval(_this2.heartbeat); + return _this2.Promise.resolve(); + })(); + } + yieldLoop(t = 0) { + return new this.Promise(function(resolve4, reject) { + return setTimeout(resolve4, t); + }); + } + computePenalty() { + var ref; + return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5e3; + } + __updateSettings__(options2) { + var _this3 = this; + return _asyncToGenerator2(function* () { + yield _this3.yieldLoop(); + parser2.overwrite(options2, options2, _this3.storeOptions); + _this3._startHeartbeat(); + _this3.instance._drainAll(_this3.computeCapacity()); + return true; + })(); + } + __running__() { + var _this4 = this; + return _asyncToGenerator2(function* () { + yield _this4.yieldLoop(); + return _this4._running; + })(); + } + __queued__() { + var _this5 = this; + return _asyncToGenerator2(function* () { + yield _this5.yieldLoop(); + return _this5.instance.queued(); + })(); + } + __done__() { + var _this6 = this; + return _asyncToGenerator2(function* () { + yield _this6.yieldLoop(); + return _this6._done; + })(); + } + __groupCheck__(time) { + var _this7 = this; + return _asyncToGenerator2(function* () { + yield _this7.yieldLoop(); + return _this7._nextRequest + _this7.timeout < time; + })(); + } + computeCapacity() { + var maxConcurrent, reservoir; + var _this$storeOptions2 = this.storeOptions; + maxConcurrent = _this$storeOptions2.maxConcurrent; + reservoir = _this$storeOptions2.reservoir; + if (maxConcurrent != null && reservoir != null) { + return Math.min(maxConcurrent - this._running, reservoir); + } else if (maxConcurrent != null) { + return maxConcurrent - this._running; + } else if (reservoir != null) { + return reservoir; + } else { + return null; + } + } + conditionsCheck(weight) { + var capacity; + capacity = this.computeCapacity(); + return capacity == null || weight <= capacity; + } + __incrementReservoir__(incr) { + var _this8 = this; + return _asyncToGenerator2(function* () { + var reservoir; + yield _this8.yieldLoop(); + reservoir = _this8.storeOptions.reservoir += incr; + _this8.instance._drainAll(_this8.computeCapacity()); + return reservoir; + })(); + } + __currentReservoir__() { + var _this9 = this; + return _asyncToGenerator2(function* () { + yield _this9.yieldLoop(); + return _this9.storeOptions.reservoir; + })(); + } + isBlocked(now) { + return this._unblockTime >= now; + } + check(weight, now) { + return this.conditionsCheck(weight) && this._nextRequest - now <= 0; + } + __check__(weight) { + var _this10 = this; + return _asyncToGenerator2(function* () { + var now; + yield _this10.yieldLoop(); + now = Date.now(); + return _this10.check(weight, now); + })(); + } + __register__(index, weight, expiration) { + var _this11 = this; + return _asyncToGenerator2(function* () { + var now, wait2; + yield _this11.yieldLoop(); + now = Date.now(); + if (_this11.conditionsCheck(weight)) { + _this11._running += weight; + if (_this11.storeOptions.reservoir != null) { + _this11.storeOptions.reservoir -= weight; + } + wait2 = Math.max(_this11._nextRequest - now, 0); + _this11._nextRequest = now + wait2 + _this11.storeOptions.minTime; + return { + success: true, + wait: wait2, + reservoir: _this11.storeOptions.reservoir + }; + } else { + return { + success: false + }; + } + })(); + } + strategyIsBlock() { + return this.storeOptions.strategy === 3; + } + __submit__(queueLength, weight) { + var _this12 = this; + return _asyncToGenerator2(function* () { + var blocked, now, reachedHWM; + yield _this12.yieldLoop(); + if (_this12.storeOptions.maxConcurrent != null && weight > _this12.storeOptions.maxConcurrent) { + throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${_this12.storeOptions.maxConcurrent}`); + } + now = Date.now(); + reachedHWM = _this12.storeOptions.highWater != null && queueLength === _this12.storeOptions.highWater && !_this12.check(weight, now); + blocked = _this12.strategyIsBlock() && (reachedHWM || _this12.isBlocked(now)); + if (blocked) { + _this12._unblockTime = now + _this12.computePenalty(); + _this12._nextRequest = _this12._unblockTime + _this12.storeOptions.minTime; + _this12.instance._dropAllQueued(); + } + return { + reachedHWM, + blocked, + strategy: _this12.storeOptions.strategy + }; + })(); + } + __free__(index, weight) { + var _this13 = this; + return _asyncToGenerator2(function* () { + yield _this13.yieldLoop(); + _this13._running -= weight; + _this13._done += weight; + _this13.instance._drainAll(_this13.computeCapacity()); + return { + running: _this13._running + }; + })(); + } + }; + module2.exports = LocalDatastore; } -} - -/** - * Checks whether given value's type is a Vue ViewModel. - * - * @param wat A value to be checked. - * @returns A boolean representing the result. - */ -function isVueViewModel(wat) { - // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property. - return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue)); -} - -exports.isDOMError = isDOMError; -exports.isDOMException = isDOMException; -exports.isElement = isElement; -exports.isError = isError; -exports.isErrorEvent = isErrorEvent; -exports.isEvent = isEvent; -exports.isInstanceOf = isInstanceOf; -exports.isNaN = isNaN; -exports.isParameterizedString = isParameterizedString; -exports.isPlainObject = isPlainObject; -exports.isPrimitive = isPrimitive; -exports.isRegExp = isRegExp; -exports.isString = isString; -exports.isSyntheticEvent = isSyntheticEvent; -exports.isThenable = isThenable; -exports.isVueViewModel = isVueViewModel; -//# sourceMappingURL=is.js.map - - -/***/ }), - -/***/ 58249: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const node = __nccwpck_require__(44469); -const worldwide = __nccwpck_require__(77822); - -/** - * Returns true if we are in the browser. - */ -function isBrowser() { - // eslint-disable-next-line no-restricted-globals - return typeof window !== 'undefined' && (!node.isNodeEnv() || isElectronNodeRenderer()); -} - -// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them -function isElectronNodeRenderer() { - return ( - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any - (worldwide.GLOBAL_OBJ ).process !== undefined && ((worldwide.GLOBAL_OBJ ).process ).type === 'renderer' - ); -} - -exports.isBrowser = isBrowser; -//# sourceMappingURL=isBrowser.js.map - - -/***/ }), - -/***/ 6661: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const worldwide = __nccwpck_require__(77822); - -/** Prefix for logging strings */ -const PREFIX = 'Sentry Logger '; - -const CONSOLE_LEVELS = [ - 'debug', - 'info', - 'warn', - 'error', - 'log', - 'assert', - 'trace', -] ; - -/** This may be mutated by the console instrumentation. */ -const originalConsoleMethods - - = {}; +}); -/** JSDoc */ +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/lua.json +var require_lua = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/lua.json"(exports2, module2) { + module2.exports = { + "blacklist_client.lua": "local blacklist = ARGV[num_static_argv + 1]\n\nif redis.call('zscore', client_last_seen_key, blacklist) then\n redis.call('zadd', client_last_seen_key, 0, blacklist)\nend\n\n\nreturn {}\n", + "check.lua": "local weight = tonumber(ARGV[num_static_argv + 1])\n\nlocal capacity = process_tick(now, false)['capacity']\nlocal nextRequest = tonumber(redis.call('hget', settings_key, 'nextRequest'))\n\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\n", + "conditions_check.lua": "local conditions_check = function (capacity, weight)\n return capacity == nil or weight <= capacity\nend\n", + "current_reservoir.lua": "return process_tick(now, false)['reservoir']\n", + "done.lua": "process_tick(now, false)\n\nreturn tonumber(redis.call('hget', settings_key, 'done'))\n", + "free.lua": "local index = ARGV[num_static_argv + 1]\n\nredis.call('zadd', job_expirations_key, 0, index)\n\nreturn process_tick(now, false)['running']\n", + "get_time.lua": "redis.replicate_commands()\n\nlocal get_time = function ()\n local time = redis.call('time')\n\n return tonumber(time[1]..string.sub(time[2], 1, 3))\nend\n", + "group_check.lua": "return not (redis.call('exists', settings_key) == 1)\n", + "heartbeat.lua": "process_tick(now, true)\n", + "increment_reservoir.lua": "local incr = tonumber(ARGV[num_static_argv + 1])\n\nredis.call('hincrby', settings_key, 'reservoir', incr)\n\nlocal reservoir = process_tick(now, true)['reservoir']\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn reservoir\n", + "init.lua": `local clear = tonumber(ARGV[num_static_argv + 1]) +local limiter_version = ARGV[num_static_argv + 2] +local num_local_argv = num_static_argv + 2 + +if clear == 1 then + redis.call('del', unpack(KEYS)) +end + +if redis.call('exists', settings_key) == 0 then + -- Create + local args = {'hmset', settings_key} + + for i = num_local_argv + 1, #ARGV do + table.insert(args, ARGV[i]) + end + + redis.call(unpack(args)) + redis.call('hmset', settings_key, + 'nextRequest', now, + 'lastReservoirRefresh', now, + 'lastReservoirIncrease', now, + 'running', 0, + 'done', 0, + 'unblockTime', 0, + 'capacityPriorityCounter', 0 + ) -/** - * Temporarily disable sentry console instrumentations. - * - * @param callback The function to run against the original `console` messages - * @returns The results of the callback - */ -function consoleSandbox(callback) { - if (!('console' in worldwide.GLOBAL_OBJ)) { - return callback(); +else + -- Apply migrations + local settings = redis.call('hmget', settings_key, + 'id', + 'version' + ) + local id = settings[1] + local current_version = settings[2] + + if current_version ~= limiter_version then + local version_digits = {} + for k, v in string.gmatch(current_version, "([^.]+)") do + table.insert(version_digits, tonumber(k)) + end + + -- 2.10.0 + if version_digits[2] < 10 then + redis.call('hsetnx', settings_key, 'reservoirRefreshInterval', '') + redis.call('hsetnx', settings_key, 'reservoirRefreshAmount', '') + redis.call('hsetnx', settings_key, 'lastReservoirRefresh', '') + redis.call('hsetnx', settings_key, 'done', 0) + redis.call('hset', settings_key, 'version', '2.10.0') + end + + -- 2.11.1 + if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then + if redis.call('hstrlen', settings_key, 'lastReservoirRefresh') == 0 then + redis.call('hmset', settings_key, + 'lastReservoirRefresh', now, + 'version', '2.11.1' + ) + end + end + + -- 2.14.0 + if version_digits[2] < 14 then + local old_running_key = 'b_'..id..'_running' + local old_executing_key = 'b_'..id..'_executing' + + if redis.call('exists', old_running_key) == 1 then + redis.call('rename', old_running_key, job_weights_key) + end + if redis.call('exists', old_executing_key) == 1 then + redis.call('rename', old_executing_key, job_expirations_key) + end + redis.call('hset', settings_key, 'version', '2.14.0') + end + + -- 2.15.2 + if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then + redis.call('hsetnx', settings_key, 'capacityPriorityCounter', 0) + redis.call('hset', settings_key, 'version', '2.15.2') + end + + -- 2.17.0 + if version_digits[2] < 17 then + redis.call('hsetnx', settings_key, 'clientTimeout', 10000) + redis.call('hset', settings_key, 'version', '2.17.0') + end + + -- 2.18.0 + if version_digits[2] < 18 then + redis.call('hsetnx', settings_key, 'reservoirIncreaseInterval', '') + redis.call('hsetnx', settings_key, 'reservoirIncreaseAmount', '') + redis.call('hsetnx', settings_key, 'reservoirIncreaseMaximum', '') + redis.call('hsetnx', settings_key, 'lastReservoirIncrease', now) + redis.call('hset', settings_key, 'version', '2.18.0') + end + + end + + process_tick(now, false) +end + +local groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout')) +refresh_expiration(0, 0, groupTimeout) + +return {} +`, + "process_tick.lua": "local process_tick = function (now, always_publish)\n\n local compute_capacity = function (maxConcurrent, running, reservoir)\n if maxConcurrent ~= nil and reservoir ~= nil then\n return math.min((maxConcurrent - running), reservoir)\n elseif maxConcurrent ~= nil then\n return maxConcurrent - running\n elseif reservoir ~= nil then\n return reservoir\n else\n return nil\n end\n end\n\n local settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'running',\n 'reservoir',\n 'reservoirRefreshInterval',\n 'reservoirRefreshAmount',\n 'lastReservoirRefresh',\n 'reservoirIncreaseInterval',\n 'reservoirIncreaseAmount',\n 'reservoirIncreaseMaximum',\n 'lastReservoirIncrease',\n 'capacityPriorityCounter',\n 'clientTimeout'\n )\n local id = settings[1]\n local maxConcurrent = tonumber(settings[2])\n local running = tonumber(settings[3])\n local reservoir = tonumber(settings[4])\n local reservoirRefreshInterval = tonumber(settings[5])\n local reservoirRefreshAmount = tonumber(settings[6])\n local lastReservoirRefresh = tonumber(settings[7])\n local reservoirIncreaseInterval = tonumber(settings[8])\n local reservoirIncreaseAmount = tonumber(settings[9])\n local reservoirIncreaseMaximum = tonumber(settings[10])\n local lastReservoirIncrease = tonumber(settings[11])\n local capacityPriorityCounter = tonumber(settings[12])\n local clientTimeout = tonumber(settings[13])\n\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n --\n -- Process 'running' changes\n --\n local expired = redis.call('zrangebyscore', job_expirations_key, '-inf', '('..now)\n\n if #expired > 0 then\n redis.call('zremrangebyscore', job_expirations_key, '-inf', '('..now)\n\n local flush_batch = function (batch, acc)\n local weights = redis.call('hmget', job_weights_key, unpack(batch))\n redis.call('hdel', job_weights_key, unpack(batch))\n local clients = redis.call('hmget', job_clients_key, unpack(batch))\n redis.call('hdel', job_clients_key, unpack(batch))\n\n -- Calculate sum of removed weights\n for i = 1, #weights do\n acc['total'] = acc['total'] + (tonumber(weights[i]) or 0)\n end\n\n -- Calculate sum of removed weights by client\n local client_weights = {}\n for i = 1, #clients do\n local removed = tonumber(weights[i]) or 0\n if removed > 0 then\n acc['client_weights'][clients[i]] = (acc['client_weights'][clients[i]] or 0) + removed\n end\n end\n end\n\n local acc = {\n ['total'] = 0,\n ['client_weights'] = {}\n }\n local batch_size = 1000\n\n -- Compute changes to Zsets and apply changes to Hashes\n for i = 1, #expired, batch_size do\n local batch = {}\n for j = i, math.min(i + batch_size - 1, #expired) do\n table.insert(batch, expired[j])\n end\n\n flush_batch(batch, acc)\n end\n\n -- Apply changes to Zsets\n if acc['total'] > 0 then\n redis.call('hincrby', settings_key, 'done', acc['total'])\n running = tonumber(redis.call('hincrby', settings_key, 'running', -acc['total']))\n end\n\n for client, weight in pairs(acc['client_weights']) do\n redis.call('zincrby', client_running_key, -weight, client)\n end\n end\n\n --\n -- Process 'reservoir' changes\n --\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\n reservoir = reservoirRefreshAmount\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirRefresh', now\n )\n end\n\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\n local incr = reservoirIncreaseAmount * num_intervals\n if reservoirIncreaseMaximum ~= nil then\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\n end\n if incr > 0 then\n reservoir = (reservoir or 0) + incr\n end\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'lastReservoirIncrease', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\n )\n end\n\n --\n -- Clear unresponsive clients\n --\n local unresponsive = redis.call('zrangebyscore', client_last_seen_key, '-inf', (now - clientTimeout))\n local unresponsive_lookup = {}\n local terminated_clients = {}\n for i = 1, #unresponsive do\n unresponsive_lookup[unresponsive[i]] = true\n if tonumber(redis.call('zscore', client_running_key, unresponsive[i])) == 0 then\n table.insert(terminated_clients, unresponsive[i])\n end\n end\n if #terminated_clients > 0 then\n redis.call('zrem', client_running_key, unpack(terminated_clients))\n redis.call('hdel', client_num_queued_key, unpack(terminated_clients))\n redis.call('zrem', client_last_registered_key, unpack(terminated_clients))\n redis.call('zrem', client_last_seen_key, unpack(terminated_clients))\n end\n\n --\n -- Broadcast capacity changes\n --\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\n\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\n -- always_publish or was not unlimited, now unlimited\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\n -- capacity was increased\n -- send the capacity message to the limiter having the lowest number of running jobs\n -- the tiebreaker is the limiter having not registered a job in the longest time\n\n local lowest_concurrency_value = nil\n local lowest_concurrency_clients = {}\n local lowest_concurrency_last_registered = {}\n local client_concurrencies = redis.call('zrange', client_running_key, 0, -1, 'withscores')\n\n for i = 1, #client_concurrencies, 2 do\n local client = client_concurrencies[i]\n local concurrency = tonumber(client_concurrencies[i+1])\n\n if (\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\n ) and (\n not unresponsive_lookup[client]\n ) and (\n tonumber(redis.call('hget', client_num_queued_key, client)) > 0\n ) then\n lowest_concurrency_value = concurrency\n table.insert(lowest_concurrency_clients, client)\n local last_registered = tonumber(redis.call('zscore', client_last_registered_key, client))\n table.insert(lowest_concurrency_last_registered, last_registered)\n end\n end\n\n if #lowest_concurrency_clients > 0 then\n local position = 1\n local earliest = lowest_concurrency_last_registered[1]\n\n for i,v in ipairs(lowest_concurrency_last_registered) do\n if v < earliest then\n position = i\n earliest = v\n end\n end\n\n local next_client = lowest_concurrency_clients[position]\n redis.call('publish', 'b_'..id,\n 'capacity-priority:'..(final_capacity or '')..\n ':'..next_client..\n ':'..capacityPriorityCounter\n )\n redis.call('hincrby', settings_key, 'capacityPriorityCounter', '1')\n else\n redis.call('publish', 'b_'..id, 'capacity:'..(final_capacity or ''))\n end\n end\n\n return {\n ['capacity'] = final_capacity,\n ['running'] = running,\n ['reservoir'] = reservoir\n }\nend\n", + "queued.lua": "local clientTimeout = tonumber(redis.call('hget', settings_key, 'clientTimeout'))\nlocal valid_clients = redis.call('zrangebyscore', client_last_seen_key, (now - clientTimeout), 'inf')\nlocal client_queued = redis.call('hmget', client_num_queued_key, unpack(valid_clients))\n\nlocal sum = 0\nfor i = 1, #client_queued do\n sum = sum + tonumber(client_queued[i])\nend\n\nreturn sum\n", + "refresh_expiration.lua": "local refresh_expiration = function (now, nextRequest, groupTimeout)\n\n if groupTimeout ~= nil then\n local ttl = (nextRequest + groupTimeout) - now\n\n for i = 1, #KEYS do\n redis.call('pexpire', KEYS[i], ttl)\n end\n end\n\nend\n", + "refs.lua": "local settings_key = KEYS[1]\nlocal job_weights_key = KEYS[2]\nlocal job_expirations_key = KEYS[3]\nlocal job_clients_key = KEYS[4]\nlocal client_running_key = KEYS[5]\nlocal client_num_queued_key = KEYS[6]\nlocal client_last_registered_key = KEYS[7]\nlocal client_last_seen_key = KEYS[8]\n\nlocal now = tonumber(ARGV[1])\nlocal client = ARGV[2]\n\nlocal num_static_argv = 2\n", + "register.lua": "local index = ARGV[num_static_argv + 1]\nlocal weight = tonumber(ARGV[num_static_argv + 2])\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\n\nlocal state = process_tick(now, false)\nlocal capacity = state['capacity']\nlocal reservoir = state['reservoir']\n\nlocal settings = redis.call('hmget', settings_key,\n 'nextRequest',\n 'minTime',\n 'groupTimeout'\n)\nlocal nextRequest = tonumber(settings[1])\nlocal minTime = tonumber(settings[2])\nlocal groupTimeout = tonumber(settings[3])\n\nif conditions_check(capacity, weight) then\n\n redis.call('hincrby', settings_key, 'running', weight)\n redis.call('hset', job_weights_key, index, weight)\n if expiration ~= nil then\n redis.call('zadd', job_expirations_key, now + expiration, index)\n end\n redis.call('hset', job_clients_key, index, client)\n redis.call('zincrby', client_running_key, weight, client)\n redis.call('hincrby', client_num_queued_key, client, -1)\n redis.call('zadd', client_last_registered_key, now, client)\n\n local wait = math.max(nextRequest - now, 0)\n local newNextRequest = now + wait + minTime\n\n if reservoir == nil then\n redis.call('hset', settings_key,\n 'nextRequest', newNextRequest\n )\n else\n reservoir = reservoir - weight\n redis.call('hmset', settings_key,\n 'reservoir', reservoir,\n 'nextRequest', newNextRequest\n )\n end\n\n refresh_expiration(now, newNextRequest, groupTimeout)\n\n return {true, wait, reservoir}\n\nelse\n return {false}\nend\n", + "register_client.lua": "local queued = tonumber(ARGV[num_static_argv + 1])\n\n-- Could have been re-registered concurrently\nif not redis.call('zscore', client_last_seen_key, client) then\n redis.call('zadd', client_running_key, 0, client)\n redis.call('hset', client_num_queued_key, client, queued)\n redis.call('zadd', client_last_registered_key, 0, client)\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n\nreturn {}\n", + "running.lua": "return process_tick(now, false)['running']\n", + "submit.lua": "local queueLength = tonumber(ARGV[num_static_argv + 1])\nlocal weight = tonumber(ARGV[num_static_argv + 2])\n\nlocal capacity = process_tick(now, false)['capacity']\n\nlocal settings = redis.call('hmget', settings_key,\n 'id',\n 'maxConcurrent',\n 'highWater',\n 'nextRequest',\n 'strategy',\n 'unblockTime',\n 'penalty',\n 'minTime',\n 'groupTimeout'\n)\nlocal id = settings[1]\nlocal maxConcurrent = tonumber(settings[2])\nlocal highWater = tonumber(settings[3])\nlocal nextRequest = tonumber(settings[4])\nlocal strategy = tonumber(settings[5])\nlocal unblockTime = tonumber(settings[6])\nlocal penalty = tonumber(settings[7])\nlocal minTime = tonumber(settings[8])\nlocal groupTimeout = tonumber(settings[9])\n\nif maxConcurrent ~= nil and weight > maxConcurrent then\n return redis.error_reply('OVERWEIGHT:'..weight..':'..maxConcurrent)\nend\n\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\n and not (\n conditions_check(capacity, weight)\n and nextRequest - now <= 0\n )\n)\n\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\n\nif blocked then\n local computedPenalty = penalty\n if computedPenalty == nil then\n if minTime == 0 then\n computedPenalty = 5000\n else\n computedPenalty = 15 * minTime\n end\n end\n\n local newNextRequest = now + computedPenalty + minTime\n\n redis.call('hmset', settings_key,\n 'unblockTime', now + computedPenalty,\n 'nextRequest', newNextRequest\n )\n\n local clients_queued_reset = redis.call('hkeys', client_num_queued_key)\n local queued_reset = {}\n for i = 1, #clients_queued_reset do\n table.insert(queued_reset, clients_queued_reset[i])\n table.insert(queued_reset, 0)\n end\n redis.call('hmset', client_num_queued_key, unpack(queued_reset))\n\n redis.call('publish', 'b_'..id, 'blocked:')\n\n refresh_expiration(now, newNextRequest, groupTimeout)\nend\n\nif not blocked and not reachedHWM then\n redis.call('hincrby', client_num_queued_key, client, 1)\nend\n\nreturn {reachedHWM, blocked, strategy}\n", + "update_settings.lua": "local args = {'hmset', settings_key}\n\nfor i = num_static_argv + 1, #ARGV do\n table.insert(args, ARGV[i])\nend\n\nredis.call(unpack(args))\n\nprocess_tick(now, true)\n\nlocal groupTimeout = tonumber(redis.call('hget', settings_key, 'groupTimeout'))\nrefresh_expiration(0, 0, groupTimeout)\n\nreturn {}\n", + "validate_client.lua": "if not redis.call('zscore', client_last_seen_key, client) then\n return redis.error_reply('UNKNOWN_CLIENT')\nend\n\nredis.call('zadd', client_last_seen_key, now, client)\n", + "validate_keys.lua": "if not (redis.call('exists', settings_key) == 1) then\n return redis.error_reply('SETTINGS_KEY_NOT_FOUND')\nend\n" + }; } +}); - const console = worldwide.GLOBAL_OBJ.console ; - const wrappedFuncs = {}; - - const wrappedLevels = Object.keys(originalConsoleMethods) ; - - // Restore all wrapped console methods - wrappedLevels.forEach(level => { - const originalConsoleMethod = originalConsoleMethods[level] ; - wrappedFuncs[level] = console[level] ; - console[level] = originalConsoleMethod; - }); - - try { - return callback(); - } finally { - // Revert restoration to wrapped state - wrappedLevels.forEach(level => { - console[level] = wrappedFuncs[level] ; - }); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Scripts.js +var require_Scripts = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Scripts.js"(exports2) { + "use strict"; + var headers; + var lua; + var templates; + lua = require_lua(); + headers = { + refs: lua["refs.lua"], + validate_keys: lua["validate_keys.lua"], + validate_client: lua["validate_client.lua"], + refresh_expiration: lua["refresh_expiration.lua"], + process_tick: lua["process_tick.lua"], + conditions_check: lua["conditions_check.lua"], + get_time: lua["get_time.lua"] + }; + exports2.allKeys = function(id) { + return [ + /* + HASH + */ + `b_${id}_settings`, + /* + HASH + job index -> weight + */ + `b_${id}_job_weights`, + /* + ZSET + job index -> expiration + */ + `b_${id}_job_expirations`, + /* + HASH + job index -> client + */ + `b_${id}_job_clients`, + /* + ZSET + client -> sum running + */ + `b_${id}_client_running`, + /* + HASH + client -> num queued + */ + `b_${id}_client_num_queued`, + /* + ZSET + client -> last job registered + */ + `b_${id}_client_last_registered`, + /* + ZSET + client -> last seen + */ + `b_${id}_client_last_seen` + ]; + }; + templates = { + init: { + keys: exports2.allKeys, + headers: ["process_tick"], + refresh_expiration: true, + code: lua["init.lua"] + }, + group_check: { + keys: exports2.allKeys, + headers: [], + refresh_expiration: false, + code: lua["group_check.lua"] + }, + register_client: { + keys: exports2.allKeys, + headers: ["validate_keys"], + refresh_expiration: false, + code: lua["register_client.lua"] + }, + blacklist_client: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client"], + refresh_expiration: false, + code: lua["blacklist_client.lua"] + }, + heartbeat: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: false, + code: lua["heartbeat.lua"] + }, + update_settings: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: true, + code: lua["update_settings.lua"] + }, + running: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: false, + code: lua["running.lua"] + }, + queued: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client"], + refresh_expiration: false, + code: lua["queued.lua"] + }, + done: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: false, + code: lua["done.lua"] + }, + check: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], + refresh_expiration: false, + code: lua["check.lua"] + }, + submit: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], + refresh_expiration: true, + code: lua["submit.lua"] + }, + register: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], + refresh_expiration: true, + code: lua["register.lua"] + }, + free: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: true, + code: lua["free.lua"] + }, + current_reservoir: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: false, + code: lua["current_reservoir.lua"] + }, + increment_reservoir: { + keys: exports2.allKeys, + headers: ["validate_keys", "validate_client", "process_tick"], + refresh_expiration: true, + code: lua["increment_reservoir.lua"] + } + }; + exports2.names = Object.keys(templates); + exports2.keys = function(name, id) { + return templates[name].keys(id); + }; + exports2.payload = function(name) { + var template; + template = templates[name]; + return Array.prototype.concat(headers.refs, template.headers.map(function(h) { + return headers[h]; + }), template.refresh_expiration ? headers.refresh_expiration : "", template.code).join("\n"); + }; } -} - -function makeLogger() { - let enabled = false; - const logger = { - enable: () => { - enabled = true; - }, - disable: () => { - enabled = false; - }, - isEnabled: () => enabled, - }; +}); - if (debugBuild.DEBUG_BUILD) { - CONSOLE_LEVELS.forEach(name => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - logger[name] = (...args) => { - if (enabled) { - consoleSandbox(() => { - worldwide.GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/RedisConnection.js +var require_RedisConnection = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/RedisConnection.js"(exports, module) { + "use strict"; + function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } + } + function _asyncToGenerator(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + var Events; + var RedisConnection; + var Scripts; + var parser; + parser = require_parser(); + Events = require_Events(); + Scripts = require_Scripts(); + RedisConnection = function() { + class RedisConnection { + constructor(options = {}) { + parser.load(options, this.defaults, this); + if (this.Redis == null) { + this.Redis = eval("require")("redis"); + } + if (this.Events == null) { + this.Events = new Events(this); + } + this.terminated = false; + if (this.client == null) { + this.client = this.Redis.createClient(this.clientOptions); + } + this.subscriber = this.client.duplicate(); + this.limiters = {}; + this.shas = {}; + this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { + return this._loadScripts(); + }).then(() => { + return { + client: this.client, + subscriber: this.subscriber + }; }); } + _setup(client, sub) { + client.setMaxListeners(0); + return new this.Promise((resolve4, reject) => { + client.on("error", (e) => { + return this.Events.trigger("error", e); + }); + if (sub) { + client.on("message", (channel, message) => { + var ref; + return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; + }); + } + if (client.ready) { + return resolve4(); + } else { + return client.once("ready", resolve4); + } + }); + } + _loadScript(name) { + return new this.Promise((resolve4, reject) => { + var payload; + payload = Scripts.payload(name); + return this.client.multi([["script", "load", payload]]).exec((err, replies) => { + if (err != null) { + return reject(err); + } + this.shas[name] = replies[0]; + return resolve4(replies[0]); + }); + }); + } + _loadScripts() { + return this.Promise.all(Scripts.names.map((k) => { + return this._loadScript(k); + })); + } + __runCommand__(cmd) { + var _this = this; + return _asyncToGenerator(function* () { + yield _this.ready; + return new _this.Promise((resolve4, reject) => { + return _this.client.multi([cmd]).exec_atomic(function(err, replies) { + if (err != null) { + return reject(err); + } else { + return resolve4(replies[0]); + } + }); + }); + })(); + } + __addLimiter__(instance) { + return this.Promise.all([instance.channel(), instance.channel_client()].map((channel) => { + return new this.Promise((resolve4, reject) => { + var handler2; + handler2 = (chan) => { + if (chan === channel) { + this.subscriber.removeListener("subscribe", handler2); + this.limiters[channel] = instance; + return resolve4(); + } + }; + this.subscriber.on("subscribe", handler2); + return this.subscriber.subscribe(channel); + }); + })); + } + __removeLimiter__(instance) { + var _this2 = this; + return this.Promise.all([instance.channel(), instance.channel_client()].map( + /* @__PURE__ */ function() { + var _ref = _asyncToGenerator(function* (channel) { + if (!_this2.terminated) { + yield new _this2.Promise((resolve4, reject) => { + return _this2.subscriber.unsubscribe(channel, function(err, chan) { + if (err != null) { + return reject(err); + } + if (chan === channel) { + return resolve4(); + } + }); + }); + } + return delete _this2.limiters[channel]; + }); + return function(_x) { + return _ref.apply(this, arguments); + }; + }() + )); + } + __scriptArgs__(name, id, args, cb) { + var keys; + keys = Scripts.keys(name, id); + return [this.shas[name], keys.length].concat(keys, args, cb); + } + __scriptFn__(name) { + return this.client.evalsha.bind(this.client); + } + disconnect(flush2 = true) { + var i, k, len, ref; + ref = Object.keys(this.limiters); + for (i = 0, len = ref.length; i < len; i++) { + k = ref[i]; + clearInterval(this.limiters[k]._store.heartbeat); + } + this.limiters = {}; + this.terminated = true; + this.client.end(flush2); + this.subscriber.end(flush2); + return this.Promise.resolve(); + } + } + ; + RedisConnection.prototype.datastore = "redis"; + RedisConnection.prototype.defaults = { + Redis: null, + clientOptions: {}, + client: null, + Promise, + Events: null }; - }); - } else { - CONSOLE_LEVELS.forEach(name => { - logger[name] = () => undefined; - }); - } - - return logger ; -} - -const logger = makeLogger(); - -exports.CONSOLE_LEVELS = CONSOLE_LEVELS; -exports.consoleSandbox = consoleSandbox; -exports.logger = logger; -exports.originalConsoleMethods = originalConsoleMethods; -//# sourceMappingURL=logger.js.map - - -/***/ }), - -/***/ 78320: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** A simple Least Recently Used map */ -class LRUMap { - - constructor( _maxSize) {this._maxSize = _maxSize; - this._cache = new Map(); - } - - /** Get the current size of the cache */ - get size() { - return this._cache.size; - } - - /** Get an entry or undefined if it was not in the cache. Re-inserts to update the recently used order */ - get(key) { - const value = this._cache.get(key); - if (value === undefined) { - return undefined; - } - // Remove and re-insert to update the order - this._cache.delete(key); - this._cache.set(key, value); - return value; + return RedisConnection; + }.call(void 0); + module.exports = RedisConnection; } +}); - /** Insert an entry and evict an older entry if we've reached maxSize */ - set(key, value) { - if (this._cache.size >= this._maxSize) { - // keys() returns an iterator in insertion order so keys().next() gives us the oldest key - this._cache.delete(this._cache.keys().next().value); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/IORedisConnection.js +var require_IORedisConnection = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/IORedisConnection.js"(exports, module) { + "use strict"; + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + function _iterableToArrayLimit(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; } - this._cache.set(key, value); - } - - /** Remove an entry and return the entry if it was in the cache */ - remove(key) { - const value = this._cache.get(key); - if (value) { - this._cache.delete(key); + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; } - return value; - } - - /** Clear all entries */ - clear() { - this._cache.clear(); - } - - /** Get all the keys */ - keys() { - return Array.from(this._cache.keys()); - } - - /** Get all the values */ - values() { - const values = []; - this._cache.forEach(value => values.push(value)); - return values; - } -} - -exports.LRUMap = LRUMap; -//# sourceMappingURL=lru.js.map - - -/***/ }), - -/***/ 28779: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - -/** - * Helper to decycle json objects - */ -function memoBuilder() { - const hasWeakSet = typeof WeakSet === 'function'; - const inner = hasWeakSet ? new WeakSet() : []; - function memoize(obj) { - if (hasWeakSet) { - if (inner.has(obj)) { - return true; + function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; } - inner.add(obj); - return false; - } - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < inner.length; i++) { - const value = inner[i]; - if (value === obj) { - return true; + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); } } - inner.push(obj); - return false; + function _asyncToGenerator(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; + } + var Events; + var IORedisConnection; + var Scripts; + var parser; + parser = require_parser(); + Events = require_Events(); + Scripts = require_Scripts(); + IORedisConnection = function() { + class IORedisConnection { + constructor(options = {}) { + parser.load(options, this.defaults, this); + if (this.Redis == null) { + this.Redis = eval("require")("ioredis"); + } + if (this.Events == null) { + this.Events = new Events(this); + } + this.terminated = false; + if (this.clusterNodes != null) { + this.client = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); + this.subscriber = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); + } else if (this.client != null && this.client.duplicate == null) { + this.subscriber = new this.Redis.Cluster(this.client.startupNodes, this.client.options); + } else { + if (this.client == null) { + this.client = new this.Redis(this.clientOptions); + } + this.subscriber = this.client.duplicate(); + } + this.limiters = {}; + this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { + this._loadScripts(); + return { + client: this.client, + subscriber: this.subscriber + }; + }); + } + _setup(client, sub) { + client.setMaxListeners(0); + return new this.Promise((resolve4, reject) => { + client.on("error", (e) => { + return this.Events.trigger("error", e); + }); + if (sub) { + client.on("message", (channel, message) => { + var ref; + return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; + }); + } + if (client.status === "ready") { + return resolve4(); + } else { + return client.once("ready", resolve4); + } + }); + } + _loadScripts() { + return Scripts.names.forEach((name) => { + return this.client.defineCommand(name, { + lua: Scripts.payload(name) + }); + }); + } + __runCommand__(cmd) { + var _this = this; + return _asyncToGenerator(function* () { + var _, deleted; + yield _this.ready; + var _ref = yield _this.client.pipeline([cmd]).exec(); + var _ref2 = _slicedToArray(_ref, 1); + var _ref2$ = _slicedToArray(_ref2[0], 2); + _ = _ref2$[0]; + deleted = _ref2$[1]; + return deleted; + })(); + } + __addLimiter__(instance) { + return this.Promise.all([instance.channel(), instance.channel_client()].map((channel) => { + return new this.Promise((resolve4, reject) => { + return this.subscriber.subscribe(channel, () => { + this.limiters[channel] = instance; + return resolve4(); + }); + }); + })); + } + __removeLimiter__(instance) { + var _this2 = this; + return [instance.channel(), instance.channel_client()].forEach( + /* @__PURE__ */ function() { + var _ref3 = _asyncToGenerator(function* (channel) { + if (!_this2.terminated) { + yield _this2.subscriber.unsubscribe(channel); + } + return delete _this2.limiters[channel]; + }); + return function(_x) { + return _ref3.apply(this, arguments); + }; + }() + ); + } + __scriptArgs__(name, id, args, cb) { + var keys; + keys = Scripts.keys(name, id); + return [keys.length].concat(keys, args, cb); + } + __scriptFn__(name) { + return this.client[name].bind(this.client); + } + disconnect(flush2 = true) { + var i, k, len, ref; + ref = Object.keys(this.limiters); + for (i = 0, len = ref.length; i < len; i++) { + k = ref[i]; + clearInterval(this.limiters[k]._store.heartbeat); + } + this.limiters = {}; + this.terminated = true; + if (flush2) { + return this.Promise.all([this.client.quit(), this.subscriber.quit()]); + } else { + this.client.disconnect(); + this.subscriber.disconnect(); + return this.Promise.resolve(); + } + } + } + ; + IORedisConnection.prototype.datastore = "ioredis"; + IORedisConnection.prototype.defaults = { + Redis: null, + clientOptions: {}, + clusterNodes: null, + client: null, + Promise, + Events: null + }; + return IORedisConnection; + }.call(void 0); + module.exports = IORedisConnection; } +}); - function unmemoize(obj) { - if (hasWeakSet) { - inner.delete(obj); - } else { - for (let i = 0; i < inner.length; i++) { - if (inner[i] === obj) { - inner.splice(i, 1); - break; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/RedisDatastore.js +var require_RedisDatastore = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/RedisDatastore.js"(exports2, module2) { + "use strict"; + function _slicedToArray2(arr, i) { + return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _nonIterableRest2(); + } + function _nonIterableRest2() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + function _iterableToArrayLimit2(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; } } + return _arr; } - } - return [memoize, unmemoize]; -} - -exports.memoBuilder = memoBuilder; -//# sourceMappingURL=memo.js.map - - -/***/ }), - -/***/ 56073: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const object = __nccwpck_require__(92062); -const string = __nccwpck_require__(1308); -const worldwide = __nccwpck_require__(77822); - -/** - * UUID4 generator - * - * @returns string Generated UUID4. - */ -function uuid4() { - const gbl = worldwide.GLOBAL_OBJ ; - const crypto = gbl.crypto || gbl.msCrypto; - - let getRandomByte = () => Math.random() * 16; - try { - if (crypto && crypto.randomUUID) { - return crypto.randomUUID().replace(/-/g, ''); + function _arrayWithHoles2(arr) { + if (Array.isArray(arr)) return arr; } - if (crypto && crypto.getRandomValues) { - getRandomByte = () => { - // crypto.getRandomValues might return undefined instead of the typed array - // in old Chromium versions (e.g. 23.0.1235.0 (151422)) - // However, `typedArray` is still filled in-place. - // @see https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues#typedarray - const typedArray = new Uint8Array(1); - crypto.getRandomValues(typedArray); - return typedArray[0]; - }; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } } - } catch (_) { - // some runtimes can crash invoking crypto - // https://github.com/getsentry/sentry-javascript/issues/8935 - } - - // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523 - // Concatenating the following numbers as strings results in '10000000100040008000100000000000' - return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c => - // eslint-disable-next-line no-bitwise - ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16), - ); -} - -function getFirstException(event) { - return event.exception && event.exception.values ? event.exception.values[0] : undefined; -} - -/** - * Extracts either message or type+value from an event that can be used for user-facing logs - * @returns event's description - */ -function getEventDescription(event) { - const { message, event_id: eventId } = event; - if (message) { - return message; - } - - const firstException = getFirstException(event); - if (firstException) { - if (firstException.type && firstException.value) { - return `${firstException.type}: ${firstException.value}`; + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; } - return firstException.type || firstException.value || eventId || ''; - } - return eventId || ''; -} - -/** - * Adds exception values, type and value to an synthetic Exception. - * @param event The event to modify. - * @param value Value of the exception. - * @param type Type of the exception. - * @hidden - */ -function addExceptionTypeValue(event, value, type) { - const exception = (event.exception = event.exception || {}); - const values = (exception.values = exception.values || []); - const firstException = (values[0] = values[0] || {}); - if (!firstException.value) { - firstException.value = value || ''; - } - if (!firstException.type) { - firstException.type = type || 'Error'; - } -} - -/** - * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed. - * - * @param event The event to modify. - * @param newMechanism Mechanism data to add to the event. - * @hidden - */ -function addExceptionMechanism(event, newMechanism) { - const firstException = getFirstException(event); - if (!firstException) { - return; - } - - const defaultMechanism = { type: 'generic', handled: true }; - const currentMechanism = firstException.mechanism; - firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism }; - - if (newMechanism && 'data' in newMechanism) { - const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data }; - firstException.mechanism.data = mergedData; - } -} - -// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string -const SEMVER_REGEXP = - /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/; - -/** - * Represents Semantic Versioning object - */ - -/** - * Parses input into a SemVer interface - * @param input string representation of a semver version - */ -function parseSemver(input) { - const match = input.match(SEMVER_REGEXP) || []; - const major = parseInt(match[1], 10); - const minor = parseInt(match[2], 10); - const patch = parseInt(match[3], 10); - return { - buildmetadata: match[5], - major: isNaN(major) ? undefined : major, - minor: isNaN(minor) ? undefined : minor, - patch: isNaN(patch) ? undefined : patch, - prerelease: match[4], - }; -} - -/** - * This function adds context (pre/post/line) lines to the provided frame - * - * @param lines string[] containing all lines - * @param frame StackFrame that will be mutated - * @param linesOfContext number of context lines we want to add pre/post - */ -function addContextToFrame(lines, frame, linesOfContext = 5) { - // When there is no line number in the frame, attaching context is nonsensical and will even break grouping - if (frame.lineno === undefined) { - return; - } - - const maxLines = lines.length; - const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0); - - frame.pre_context = lines - .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) - .map((line) => string.snipLine(line, 0)); - - frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); - - frame.post_context = lines - .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) - .map((line) => string.snipLine(line, 0)); -} - -/** - * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object - * in question), and marks it captured if not. - * - * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and - * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so - * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because - * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not - * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This - * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we - * see it. - * - * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on - * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent - * object wrapper forms so that this check will always work. However, because we need to flag the exact object which - * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification - * must be done before the exception captured. - * - * @param A thrown exception to check or flag as having been seen - * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen) - */ -function checkOrSetAlreadyCaught(exception) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - if (exception && (exception ).__sentry_captured__) { - return true; - } - - try { - // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the - // `ExtraErrorData` integration - object.addNonEnumerableProperty(exception , '__sentry_captured__', true); - } catch (err) { - // `exception` is a primitive, so we can't mark it seen - } - - return false; -} - -/** - * Checks whether the given input is already an array, and if it isn't, wraps it in one. - * - * @param maybeArray Input to turn into an array, if necessary - * @returns The input, if already an array, or an array with the input as the only element, if not - */ -function arrayify(maybeArray) { - return Array.isArray(maybeArray) ? maybeArray : [maybeArray]; -} - -exports.addContextToFrame = addContextToFrame; -exports.addExceptionMechanism = addExceptionMechanism; -exports.addExceptionTypeValue = addExceptionTypeValue; -exports.arrayify = arrayify; -exports.checkOrSetAlreadyCaught = checkOrSetAlreadyCaught; -exports.getEventDescription = getEventDescription; -exports.parseSemver = parseSemver; -exports.uuid4 = uuid4; -//# sourceMappingURL=misc.js.map - - -/***/ }), - -/***/ 78592: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Does this filename look like it's part of the app code? - */ -function filenameIsInApp(filename, isNative = false) { - const isInternal = - isNative || - (filename && - // It's not internal if it's an absolute linux path - !filename.startsWith('/') && - // It's not internal if it's an absolute windows path - !filename.match(/^[A-Z]:/) && - // It's not internal if the path is starting with a dot - !filename.startsWith('.') && - // It's not internal if the frame has a protocol. In node, this is usually the case if the file got pre-processed with a bundler like webpack - !filename.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)); // Schema from: https://stackoverflow.com/a/3641782 - - // in_app is all that's not an internal Node function or a module within node_modules - // note that isNative appears to return true even for node core libraries - // see https://github.com/getsentry/raven-node/issues/176 - - return !isInternal && filename !== undefined && !filename.includes('node_modules/'); -} - -/** Node Stack line parser */ -// eslint-disable-next-line complexity -function node(getModule) { - const FILENAME_MATCH = /^\s*[-]{4,}$/; - const FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/; - - // eslint-disable-next-line complexity - return (line) => { - const lineMatch = line.match(FULL_MATCH); - - if (lineMatch) { - let object; - let method; - let functionName; - let typeName; - let methodName; - - if (lineMatch[1]) { - functionName = lineMatch[1]; - - let methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart - 1] === '.') { - methodStart--; + var BottleneckError; + var IORedisConnection2; + var RedisConnection2; + var RedisDatastore; + var parser2; + parser2 = require_parser(); + BottleneckError = require_BottleneckError(); + RedisConnection2 = require_RedisConnection(); + IORedisConnection2 = require_IORedisConnection(); + RedisDatastore = class RedisDatastore { + constructor(instance, storeOptions, storeInstanceOptions) { + this.instance = instance; + this.storeOptions = storeOptions; + this.originalId = this.instance.id; + this.clientId = this.instance._randomIndex(); + parser2.load(storeInstanceOptions, storeInstanceOptions, this); + this.clients = {}; + this.capacityPriorityCounters = {}; + this.sharedConnection = this.connection != null; + if (this.connection == null) { + this.connection = this.instance.datastore === "redis" ? new RedisConnection2({ + Redis: this.Redis, + clientOptions: this.clientOptions, + Promise: this.Promise, + Events: this.instance.Events + }) : this.instance.datastore === "ioredis" ? new IORedisConnection2({ + Redis: this.Redis, + clientOptions: this.clientOptions, + clusterNodes: this.clusterNodes, + Promise: this.Promise, + Events: this.instance.Events + }) : void 0; + } + this.instance.connection = this.connection; + this.instance.datastore = this.connection.datastore; + this.ready = this.connection.ready.then((clients) => { + this.clients = clients; + return this.runScript("init", this.prepareInitSettings(this.clearDatastore)); + }).then(() => { + return this.connection.__addLimiter__(this.instance); + }).then(() => { + return this.runScript("register_client", [this.instance.queued()]); + }).then(() => { + var base; + if (typeof (base = this.heartbeat = setInterval(() => { + return this.runScript("heartbeat", []).catch((e) => { + return this.instance.Events.trigger("error", e); + }); + }, this.heartbeatInterval)).unref === "function") { + base.unref(); + } + return this.clients; + }); + } + __publish__(message) { + var _this = this; + return _asyncToGenerator2(function* () { + var client; + var _ref = yield _this.ready; + client = _ref.client; + return client.publish(_this.instance.channel(), `message:${message.toString()}`); + })(); + } + onMessage(channel, message) { + var _this2 = this; + return _asyncToGenerator2(function* () { + var capacity, counter, data, drained, e, newCapacity, pos, priorityClient, rawCapacity, type2; + try { + pos = message.indexOf(":"); + var _ref2 = [message.slice(0, pos), message.slice(pos + 1)]; + type2 = _ref2[0]; + data = _ref2[1]; + if (type2 === "capacity") { + return yield _this2.instance._drainAll(data.length > 0 ? ~~data : void 0); + } else if (type2 === "capacity-priority") { + var _data$split = data.split(":"); + var _data$split2 = _slicedToArray2(_data$split, 3); + rawCapacity = _data$split2[0]; + priorityClient = _data$split2[1]; + counter = _data$split2[2]; + capacity = rawCapacity.length > 0 ? ~~rawCapacity : void 0; + if (priorityClient === _this2.clientId) { + drained = yield _this2.instance._drainAll(capacity); + newCapacity = capacity != null ? capacity - (drained || 0) : ""; + return yield _this2.clients.client.publish(_this2.instance.channel(), `capacity-priority:${newCapacity}::${counter}`); + } else if (priorityClient === "") { + clearTimeout(_this2.capacityPriorityCounters[counter]); + delete _this2.capacityPriorityCounters[counter]; + return _this2.instance._drainAll(capacity); + } else { + return _this2.capacityPriorityCounters[counter] = setTimeout( + /* @__PURE__ */ _asyncToGenerator2(function* () { + var e2; + try { + delete _this2.capacityPriorityCounters[counter]; + yield _this2.runScript("blacklist_client", [priorityClient]); + return yield _this2.instance._drainAll(capacity); + } catch (error) { + e2 = error; + return _this2.instance.Events.trigger("error", e2); + } + }), + 1e3 + ); + } + } else if (type2 === "message") { + return _this2.instance.Events.trigger("message", data); + } else if (type2 === "blocked") { + return yield _this2.instance._dropAllQueued(); + } + } catch (error) { + e = error; + return _this2.instance.Events.trigger("error", e); + } + })(); + } + __disconnect__(flush2) { + clearInterval(this.heartbeat); + if (this.sharedConnection) { + return this.connection.__removeLimiter__(this.instance); + } else { + return this.connection.disconnect(flush2); } - - if (methodStart > 0) { - object = functionName.slice(0, methodStart); - method = functionName.slice(methodStart + 1); - const objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.slice(objectEnd + 1); - object = object.slice(0, objectEnd); + } + runScript(name, args) { + var _this3 = this; + return _asyncToGenerator2(function* () { + if (!(name === "init" || name === "register_client")) { + yield _this3.ready; } + return new _this3.Promise((resolve4, reject) => { + var all_args, arr; + all_args = [Date.now(), _this3.clientId].concat(args); + _this3.instance.Events.trigger("debug", `Calling Redis script: ${name}.lua`, all_args); + arr = _this3.connection.__scriptArgs__(name, _this3.originalId, all_args, function(err, replies) { + if (err != null) { + return reject(err); + } + return resolve4(replies); + }); + return _this3.connection.__scriptFn__(name)(...arr); + }).catch((e) => { + if (e.message === "SETTINGS_KEY_NOT_FOUND") { + if (name === "heartbeat") { + return _this3.Promise.resolve(); + } else { + return _this3.runScript("init", _this3.prepareInitSettings(false)).then(() => { + return _this3.runScript(name, args); + }); + } + } else if (e.message === "UNKNOWN_CLIENT") { + return _this3.runScript("register_client", [_this3.instance.queued()]).then(() => { + return _this3.runScript(name, args); + }); + } else { + return _this3.Promise.reject(e); + } + }); + })(); + } + prepareArray(arr) { + var i, len, results, x; + results = []; + for (i = 0, len = arr.length; i < len; i++) { + x = arr[i]; + results.push(x != null ? x.toString() : ""); } - typeName = undefined; + return results; } - - if (method) { - typeName = object; - methodName = method; + prepareObject(obj) { + var arr, k, v; + arr = []; + for (k in obj) { + v = obj[k]; + arr.push(k, v != null ? v.toString() : ""); + } + return arr; } - - if (method === '') { - methodName = undefined; - functionName = undefined; + prepareInitSettings(clear) { + var args; + args = this.prepareObject(Object.assign({}, this.storeOptions, { + id: this.originalId, + version: this.instance.version, + groupTimeout: this.timeout, + clientTimeout: this.clientTimeout + })); + args.unshift(clear ? 1 : 0, this.instance.version); + return args; } - - if (functionName === undefined) { - methodName = methodName || ''; - functionName = typeName ? `${typeName}.${methodName}` : methodName; + convertBool(b) { + return !!b; } - - let filename = lineMatch[2] && lineMatch[2].startsWith('file://') ? lineMatch[2].slice(7) : lineMatch[2]; - const isNative = lineMatch[5] === 'native'; - - // If it's a Windows path, trim the leading slash so that `/C:/foo` becomes `C:/foo` - if (filename && filename.match(/\/[A-Z]:/)) { - filename = filename.slice(1); + __updateSettings__(options2) { + var _this4 = this; + return _asyncToGenerator2(function* () { + yield _this4.runScript("update_settings", _this4.prepareObject(options2)); + return parser2.overwrite(options2, options2, _this4.storeOptions); + })(); } - - if (!filename && lineMatch[5] && !isNative) { - filename = lineMatch[5]; + __running__() { + return this.runScript("running", []); } - - return { - filename, - module: getModule ? getModule(filename) : undefined, - function: functionName, - lineno: parseInt(lineMatch[3], 10) || undefined, - colno: parseInt(lineMatch[4], 10) || undefined, - in_app: filenameIsInApp(filename, isNative), - }; - } - - if (line.match(FILENAME_MATCH)) { - return { - filename: line, - }; - } - - return undefined; - }; -} - -exports.filenameIsInApp = filenameIsInApp; -exports.node = node; -//# sourceMappingURL=node-stack-trace.js.map - - -/***/ }), - -/***/ 44469: -/***/ ((module, exports, __nccwpck_require__) => { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const env = __nccwpck_require__(83570); - -/** - * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something, - * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere. - */ - -/** - * Checks whether we're in the Node.js or Browser environment - * - * @returns Answer to given question - */ -function isNodeEnv() { - // explicitly check for browser bundles as those can be optimized statically - // by terser/rollup. - return ( - !env.isBrowserBundle() && - Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]' - ); -} - -/** - * Requires a module which is protected against bundler minification. - * - * @param request The module path to resolve - */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -function dynamicRequire(mod, request) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return mod.require(request); -} - -/** - * Helper for dynamically loading module that should work with linked dependencies. - * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))` - * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during - * build time. `require.resolve` is also not available in any other way, so we cannot create, - * a fake helper like we do with `dynamicRequire`. - * - * We always prefer to use local package, thus the value is not returned early from each `try/catch` block. - * That is to mimic the behavior of `require.resolve` exactly. - * - * @param moduleName module name to require - * @returns possibly required module - */ -function loadModule(moduleName) { - let mod; - - try { - mod = dynamicRequire(module, moduleName); - } catch (e) { - // no-empty - } - - try { - const { cwd } = dynamicRequire(module, 'process'); - mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ; - } catch (e) { - // no-empty - } - - return mod; -} - -exports.dynamicRequire = dynamicRequire; -exports.isNodeEnv = isNodeEnv; -exports.loadModule = loadModule; -//# sourceMappingURL=node.js.map - - -/***/ }), - -/***/ 89870: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); -const memo = __nccwpck_require__(28779); -const object = __nccwpck_require__(92062); -const stacktrace = __nccwpck_require__(1464); - -/** - * Recursively normalizes the given object. - * - * - Creates a copy to prevent original input mutation - * - Skips non-enumerable properties - * - When stringifying, calls `toJSON` if implemented - * - Removes circular references - * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format - * - Translates known global objects/classes to a string representations - * - Takes care of `Error` object serialization - * - Optionally limits depth of final output - * - Optionally limits number of properties/elements included in any single object/array - * - * @param input The object to be normalized. - * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.) - * @param maxProperties The max number of elements or properties to be included in any single array or - * object in the normallized output. - * @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization. - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function normalize(input, depth = 100, maxProperties = +Infinity) { - try { - // since we're at the outermost level, we don't provide a key - return visit('', input, depth, maxProperties); - } catch (err) { - return { ERROR: `**non-serializable** (${err})` }; - } -} - -/** JSDoc */ -function normalizeToSize( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - object, - // Default Node.js REPL depth - depth = 3, - // 100kB, as 200kB is max payload size, so half sounds reasonable - maxSize = 100 * 1024, -) { - const normalized = normalize(object, depth); - - if (jsonSize(normalized) > maxSize) { - return normalizeToSize(object, depth - 1, maxSize); - } - - return normalized ; -} - -/** - * Visits a node to perform normalization on it - * - * @param key The key corresponding to the given node - * @param value The node to be visited - * @param depth Optional number indicating the maximum recursion depth - * @param maxProperties Optional maximum number of properties/elements included in any single object/array - * @param memo Optional Memo class handling decycling - */ -function visit( - key, - value, - depth = +Infinity, - maxProperties = +Infinity, - memo$1 = memo.memoBuilder(), -) { - const [memoize, unmemoize] = memo$1; - - // Get the simple cases out of the way first - if ( - value == null || // this matches null and undefined -> eqeq not eqeqeq - (['number', 'boolean', 'string'].includes(typeof value) && !is.isNaN(value)) - ) { - return value ; - } - - const stringified = stringifyValue(key, value); - - // Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`. - // Everything else will have already been serialized, so if we don't see that pattern, we're done. - if (!stringified.startsWith('[object ')) { - return stringified; - } - - // From here on, we can assert that `value` is either an object or an array. - - // Do not normalize objects that we know have already been normalized. As a general rule, the - // "__sentry_skip_normalization__" property should only be used sparingly and only should only be set on objects that - // have already been normalized. - if ((value )['__sentry_skip_normalization__']) { - return value ; - } - - // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there - // We keep a certain amount of depth. - // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state. - const remainingDepth = - typeof (value )['__sentry_override_normalization_depth__'] === 'number' - ? ((value )['__sentry_override_normalization_depth__'] ) - : depth; - - // We're also done if we've reached the max depth - if (remainingDepth === 0) { - // At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`. - return stringified.replace('object ', ''); - } - - // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now. - if (memoize(value)) { - return '[Circular ~]'; + __queued__() { + return this.runScript("queued", []); + } + __done__() { + return this.runScript("done", []); + } + __groupCheck__() { + var _this5 = this; + return _asyncToGenerator2(function* () { + return _this5.convertBool(yield _this5.runScript("group_check", [])); + })(); + } + __incrementReservoir__(incr) { + return this.runScript("increment_reservoir", [incr]); + } + __currentReservoir__() { + return this.runScript("current_reservoir", []); + } + __check__(weight) { + var _this6 = this; + return _asyncToGenerator2(function* () { + return _this6.convertBool(yield _this6.runScript("check", _this6.prepareArray([weight]))); + })(); + } + __register__(index, weight, expiration) { + var _this7 = this; + return _asyncToGenerator2(function* () { + var reservoir, success, wait2; + var _ref4 = yield _this7.runScript("register", _this7.prepareArray([index, weight, expiration])); + var _ref5 = _slicedToArray2(_ref4, 3); + success = _ref5[0]; + wait2 = _ref5[1]; + reservoir = _ref5[2]; + return { + success: _this7.convertBool(success), + wait: wait2, + reservoir + }; + })(); + } + __submit__(queueLength, weight) { + var _this8 = this; + return _asyncToGenerator2(function* () { + var blocked, e, maxConcurrent, overweight, reachedHWM, strategy; + try { + var _ref6 = yield _this8.runScript("submit", _this8.prepareArray([queueLength, weight])); + var _ref7 = _slicedToArray2(_ref6, 3); + reachedHWM = _ref7[0]; + blocked = _ref7[1]; + strategy = _ref7[2]; + return { + reachedHWM: _this8.convertBool(reachedHWM), + blocked: _this8.convertBool(blocked), + strategy + }; + } catch (error) { + e = error; + if (e.message.indexOf("OVERWEIGHT") === 0) { + var _e$message$split = e.message.split(":"); + var _e$message$split2 = _slicedToArray2(_e$message$split, 3); + overweight = _e$message$split2[0]; + weight = _e$message$split2[1]; + maxConcurrent = _e$message$split2[2]; + throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${maxConcurrent}`); + } else { + throw e; + } + } + })(); + } + __free__(index, weight) { + var _this9 = this; + return _asyncToGenerator2(function* () { + var running; + running = yield _this9.runScript("free", _this9.prepareArray([index])); + return { + running + }; + })(); + } + }; + module2.exports = RedisDatastore; } +}); - // If the value has a `toJSON` method, we call it to extract more information - const valueWithToJSON = value ; - if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') { - try { - const jsonValue = valueWithToJSON.toJSON(); - // We need to normalize the return value of `.toJSON()` in case it has circular references - return visit('', jsonValue, remainingDepth - 1, maxProperties, memo$1); - } catch (err) { - // pass (The built-in `toJSON` failed, but we can still try to do it ourselves) - } +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/States.js +var require_States = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/States.js"(exports2, module2) { + "use strict"; + var BottleneckError; + var States2; + BottleneckError = require_BottleneckError(); + States2 = class States { + constructor(status1) { + this.status = status1; + this._jobs = {}; + this.counts = this.status.map(function() { + return 0; + }); + } + next(id) { + var current, next; + current = this._jobs[id]; + next = current + 1; + if (current != null && next < this.status.length) { + this.counts[current]--; + this.counts[next]++; + return this._jobs[id]++; + } else if (current != null) { + this.counts[current]--; + return delete this._jobs[id]; + } + } + start(id) { + var initial; + initial = 0; + this._jobs[id] = initial; + return this.counts[initial]++; + } + remove(id) { + var current; + current = this._jobs[id]; + if (current != null) { + this.counts[current]--; + delete this._jobs[id]; + } + return current != null; + } + jobStatus(id) { + var ref; + return (ref = this.status[this._jobs[id]]) != null ? ref : null; + } + statusJobs(status) { + var k, pos, ref, results, v; + if (status != null) { + pos = this.status.indexOf(status); + if (pos < 0) { + throw new BottleneckError(`status must be one of ${this.status.join(", ")}`); + } + ref = this._jobs; + results = []; + for (k in ref) { + v = ref[k]; + if (v === pos) { + results.push(k); + } + } + return results; + } else { + return Object.keys(this._jobs); + } + } + statusCounts() { + return this.counts.reduce((acc, v, i) => { + acc[this.status[i]] = v; + return acc; + }, {}); + } + }; + module2.exports = States2; } +}); - // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse - // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each - // property/entry, and keep track of the number of items we add to it. - const normalized = (Array.isArray(value) ? [] : {}) ; - let numAdded = 0; - - // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant - // properties are non-enumerable and otherwise would get missed. - const visitable = object.convertToPlainObject(value ); - - for (const visitKey in visitable) { - // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration. - if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) { - continue; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Sync.js +var require_Sync = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Sync.js"(exports2, module2) { + "use strict"; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } } - - if (numAdded >= maxProperties) { - normalized[visitKey] = '[MaxProperties ~]'; - break; + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; } - - // Recursively visit all the child nodes - const visitValue = visitable[visitKey]; - normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo$1); - - numAdded++; + var DLList; + var Sync; + DLList = require_DLList(); + Sync = class Sync { + constructor(name, Promise2) { + this.schedule = this.schedule.bind(this); + this.name = name; + this.Promise = Promise2; + this._running = 0; + this._queue = new DLList(); + } + isEmpty() { + return this._queue.length === 0; + } + _tryToRun() { + var _this = this; + return _asyncToGenerator2(function* () { + var args, cb, error, reject, resolve4, returned, task; + if (_this._running < 1 && _this._queue.length > 0) { + _this._running++; + var _this$_queue$shift = _this._queue.shift(); + task = _this$_queue$shift.task; + args = _this$_queue$shift.args; + resolve4 = _this$_queue$shift.resolve; + reject = _this$_queue$shift.reject; + cb = yield _asyncToGenerator2(function* () { + try { + returned = yield task(...args); + return function() { + return resolve4(returned); + }; + } catch (error1) { + error = error1; + return function() { + return reject(error); + }; + } + })(); + _this._running--; + _this._tryToRun(); + return cb(); + } + })(); + } + schedule(task, ...args) { + var promise, reject, resolve4; + resolve4 = reject = null; + promise = new this.Promise(function(_resolve, _reject) { + resolve4 = _resolve; + return reject = _reject; + }); + this._queue.push({ + task, + args, + resolve: resolve4, + reject + }); + this._tryToRun(); + return promise; + } + }; + module2.exports = Sync; } +}); - // Once we've visited all the branches, remove the parent from memo storage - unmemoize(value); - - // Return accumulated values - return normalized; -} +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/version.json +var require_version = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/version.json"(exports2, module2) { + module2.exports = { version: "2.19.5" }; + } +}); -/* eslint-disable complexity */ -/** - * Stringify the given value. Handles various known special values and types. - * - * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn - * the number 1231 into "[Object Number]", nor on `null`, as it will throw. - * - * @param value The value to stringify - * @returns A stringified representation of the given value - */ -function stringifyValue( - key, - // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for - // our internal use, it'll do - value, -) { - try { - if (key === 'domain' && value && typeof value === 'object' && (value )._events) { - return '[Domain]'; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Group.js +var require_Group = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Group.js"(exports2, module2) { + "use strict"; + function _slicedToArray2(arr, i) { + return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _nonIterableRest2(); + } + function _nonIterableRest2() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); + } + function _iterableToArrayLimit2(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; } - - if (key === 'domainEmitter') { - return '[DomainEmitter]'; + function _arrayWithHoles2(arr) { + if (Array.isArray(arr)) return arr; } - - // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first - // which won't throw if they are not present. - - if (typeof global !== 'undefined' && value === global) { - return '[Global]'; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } } - - // eslint-disable-next-line no-restricted-globals - if (typeof window !== 'undefined' && value === window) { - return '[Window]'; + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; } + var Events2; + var Group; + var IORedisConnection2; + var RedisConnection2; + var Scripts2; + var parser2; + parser2 = require_parser(); + Events2 = require_Events(); + RedisConnection2 = require_RedisConnection(); + IORedisConnection2 = require_IORedisConnection(); + Scripts2 = require_Scripts(); + Group = function() { + class Group2 { + constructor(limiterOptions = {}) { + this.deleteKey = this.deleteKey.bind(this); + this.limiterOptions = limiterOptions; + parser2.load(this.limiterOptions, this.defaults, this); + this.Events = new Events2(this); + this.instances = {}; + this.Bottleneck = require_Bottleneck(); + this._startAutoCleanup(); + this.sharedConnection = this.connection != null; + if (this.connection == null) { + if (this.limiterOptions.datastore === "redis") { + this.connection = new RedisConnection2(Object.assign({}, this.limiterOptions, { + Events: this.Events + })); + } else if (this.limiterOptions.datastore === "ioredis") { + this.connection = new IORedisConnection2(Object.assign({}, this.limiterOptions, { + Events: this.Events + })); + } + } + } + key(key = "") { + var ref; + return (ref = this.instances[key]) != null ? ref : (() => { + var limiter; + limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { + id: `${this.id}-${key}`, + timeout: this.timeout, + connection: this.connection + })); + this.Events.trigger("created", limiter, key); + return limiter; + })(); + } + deleteKey(key = "") { + var _this = this; + return _asyncToGenerator2(function* () { + var deleted, instance; + instance = _this.instances[key]; + if (_this.connection) { + deleted = yield _this.connection.__runCommand__(["del", ...Scripts2.allKeys(`${_this.id}-${key}`)]); + } + if (instance != null) { + delete _this.instances[key]; + yield instance.disconnect(); + } + return instance != null || deleted > 0; + })(); + } + limiters() { + var k, ref, results, v; + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + results.push({ + key: k, + limiter: v + }); + } + return results; + } + keys() { + return Object.keys(this.instances); + } + clusterKeys() { + var _this2 = this; + return _asyncToGenerator2(function* () { + var cursor, end2, found, i, k, keys, len, next, start; + if (_this2.connection == null) { + return _this2.Promise.resolve(_this2.keys()); + } + keys = []; + cursor = null; + start = `b_${_this2.id}-`.length; + end2 = "_settings".length; + while (cursor !== 0) { + var _ref = yield _this2.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${_this2.id}-*_settings`, "count", 1e4]); + var _ref2 = _slicedToArray2(_ref, 2); + next = _ref2[0]; + found = _ref2[1]; + cursor = ~~next; + for (i = 0, len = found.length; i < len; i++) { + k = found[i]; + keys.push(k.slice(start, -end2)); + } + } + return keys; + })(); + } + _startAutoCleanup() { + var _this3 = this; + var base; + clearInterval(this.interval); + return typeof (base = this.interval = setInterval( + /* @__PURE__ */ _asyncToGenerator2(function* () { + var e, k, ref, results, time, v; + time = Date.now(); + ref = _this3.instances; + results = []; + for (k in ref) { + v = ref[k]; + try { + if (yield v._store.__groupCheck__(time)) { + results.push(_this3.deleteKey(k)); + } else { + results.push(void 0); + } + } catch (error) { + e = error; + results.push(v.Events.trigger("error", e)); + } + } + return results; + }), + this.timeout / 2 + )).unref === "function" ? base.unref() : void 0; + } + updateSettings(options2 = {}) { + parser2.overwrite(options2, this.defaults, this); + parser2.overwrite(options2, options2, this.limiterOptions); + if (options2.timeout != null) { + return this._startAutoCleanup(); + } + } + disconnect(flush2 = true) { + var ref; + if (!this.sharedConnection) { + return (ref = this.connection) != null ? ref.disconnect(flush2) : void 0; + } + } + } + ; + Group2.prototype.defaults = { + timeout: 1e3 * 60 * 5, + connection: null, + Promise, + id: "group-key" + }; + return Group2; + }.call(void 0); + module2.exports = Group; + } +}); - // eslint-disable-next-line no-restricted-globals - if (typeof document !== 'undefined' && value === document) { - return '[Document]'; - } +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Batcher.js +var require_Batcher = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Batcher.js"(exports2, module2) { + "use strict"; + var Batcher; + var Events2; + var parser2; + parser2 = require_parser(); + Events2 = require_Events(); + Batcher = function() { + class Batcher2 { + constructor(options2 = {}) { + this.options = options2; + parser2.load(this.options, this.defaults, this); + this.Events = new Events2(this); + this._arr = []; + this._resetPromise(); + this._lastFlush = Date.now(); + } + _resetPromise() { + return this._promise = new this.Promise((res, rej) => { + return this._resolve = res; + }); + } + _flush() { + clearTimeout(this._timeout); + this._lastFlush = Date.now(); + this._resolve(); + this.Events.trigger("batch", this._arr); + this._arr = []; + return this._resetPromise(); + } + add(data) { + var ret; + this._arr.push(data); + ret = this._promise; + if (this._arr.length === this.maxSize) { + this._flush(); + } else if (this.maxTime != null && this._arr.length === 1) { + this._timeout = setTimeout(() => { + return this._flush(); + }, this.maxTime); + } + return ret; + } + } + ; + Batcher2.prototype.defaults = { + maxTime: null, + maxSize: null, + Promise + }; + return Batcher2; + }.call(void 0); + module2.exports = Batcher; + } +}); - if (is.isVueViewModel(value)) { - return '[VueViewModel]'; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Bottleneck.js +var require_Bottleneck = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/Bottleneck.js"(exports2, module2) { + "use strict"; + function _slicedToArray2(arr, i) { + return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _nonIterableRest2(); + } + function _iterableToArrayLimit2(arr, i) { + var _arr = []; + var _n = true; + var _d = false; + var _e = void 0; + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; } - - // React's SyntheticEvent thingy - if (is.isSyntheticEvent(value)) { - return '[SyntheticEvent]'; + function _toArray(arr) { + return _arrayWithHoles2(arr) || _iterableToArray(arr) || _nonIterableRest2(); } - - if (typeof value === 'number' && value !== value) { - return '[NaN]'; + function _nonIterableRest2() { + throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - - if (typeof value === 'function') { - return `[Function: ${stacktrace.getFunctionName(value)}]`; + function _iterableToArray(iter) { + if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - - if (typeof value === 'symbol') { - return `[${String(value)}]`; + function _arrayWithHoles2(arr) { + if (Array.isArray(arr)) return arr; } - - // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion - if (typeof value === 'bigint') { - return `[BigInt: ${String(value)}]`; + function asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, key, arg) { + try { + var info = gen[key](arg); + var value = info.value; + } catch (error) { + reject(error); + return; + } + if (info.done) { + resolve4(value); + } else { + Promise.resolve(value).then(_next, _throw); + } } - - // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting - // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as - // `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class), - // we can make sure that only plain objects come out that way. - const objName = getConstructorName(value); - - // Handle HTML Elements - if (/^HTML(\w*)Element$/.test(objName)) { - return `[HTMLElement: ${objName}]`; + function _asyncToGenerator2(fn) { + return function() { + var self2 = this, args = arguments; + return new Promise(function(resolve4, reject) { + var gen = fn.apply(self2, args); + function _next(value) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "next", value); + } + function _throw(err) { + asyncGeneratorStep2(gen, resolve4, reject, _next, _throw, "throw", err); + } + _next(void 0); + }); + }; } - - return `[object ${objName}]`; - } catch (err) { - return `**non-serializable** (${err})`; - } -} -/* eslint-enable complexity */ - -function getConstructorName(value) { - const prototype = Object.getPrototypeOf(value); - - return prototype ? prototype.constructor.name : 'null prototype'; -} - -/** Calculates bytes size of input string */ -function utf8Length(value) { - // eslint-disable-next-line no-bitwise - return ~-encodeURI(value).split(/%..|./).length; -} - -/** Calculates bytes size of input object */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function jsonSize(value) { - return utf8Length(JSON.stringify(value)); -} - -/** - * Normalizes URLs in exceptions and stacktraces to a base path so Sentry can fingerprint - * across platforms and working directory. - * - * @param url The URL to be normalized. - * @param basePath The application base path. - * @returns The normalized URL. - */ -function normalizeUrlToBase(url, basePath) { - const escapedBase = basePath - // Backslash to forward - .replace(/\\/g, '/') - // Escape RegExp special characters - .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&'); - - let newUrl = url; - try { - newUrl = decodeURI(url); - } catch (_Oo) { - // Sometime this breaks + var Bottleneck2; + var DEFAULT_PRIORITY; + var Events2; + var Job; + var LocalDatastore; + var NUM_PRIORITIES; + var Queues; + var RedisDatastore; + var States2; + var Sync; + var parser2; + var splice = [].splice; + NUM_PRIORITIES = 10; + DEFAULT_PRIORITY = 5; + parser2 = require_parser(); + Queues = require_Queues(); + Job = require_Job(); + LocalDatastore = require_LocalDatastore(); + RedisDatastore = require_RedisDatastore(); + Events2 = require_Events(); + States2 = require_States(); + Sync = require_Sync(); + Bottleneck2 = function() { + class Bottleneck3 { + constructor(options2 = {}, ...invalid) { + var storeInstanceOptions, storeOptions; + this._addToQueue = this._addToQueue.bind(this); + this._validateOptions(options2, invalid); + parser2.load(options2, this.instanceDefaults, this); + this._queues = new Queues(NUM_PRIORITIES); + this._scheduled = {}; + this._states = new States2(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); + this._limiter = null; + this.Events = new Events2(this); + this._submitLock = new Sync("submit", this.Promise); + this._registerLock = new Sync("register", this.Promise); + storeOptions = parser2.load(options2, this.storeDefaults, {}); + this._store = function() { + if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { + storeInstanceOptions = parser2.load(options2, this.redisStoreDefaults, {}); + return new RedisDatastore(this, storeOptions, storeInstanceOptions); + } else if (this.datastore === "local") { + storeInstanceOptions = parser2.load(options2, this.localStoreDefaults, {}); + return new LocalDatastore(this, storeOptions, storeInstanceOptions); + } else { + throw new Bottleneck3.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); + } + }.call(this); + this._queues.on("leftzero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; + }); + this._queues.on("zero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; + }); + } + _validateOptions(options2, invalid) { + if (!(options2 != null && typeof options2 === "object" && invalid.length === 0)) { + throw new Bottleneck3.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); + } + } + ready() { + return this._store.ready; + } + clients() { + return this._store.clients; + } + channel() { + return `b_${this.id}`; + } + channel_client() { + return `b_${this.id}_${this._store.clientId}`; + } + publish(message) { + return this._store.__publish__(message); + } + disconnect(flush2 = true) { + return this._store.__disconnect__(flush2); + } + chain(_limiter) { + this._limiter = _limiter; + return this; + } + queued(priority) { + return this._queues.queued(priority); + } + clusterQueued() { + return this._store.__queued__(); + } + empty() { + return this.queued() === 0 && this._submitLock.isEmpty(); + } + running() { + return this._store.__running__(); + } + done() { + return this._store.__done__(); + } + jobStatus(id) { + return this._states.jobStatus(id); + } + jobs(status) { + return this._states.statusJobs(status); + } + counts() { + return this._states.statusCounts(); + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + check(weight = 1) { + return this._store.__check__(weight); + } + _clearGlobalState(index) { + if (this._scheduled[index] != null) { + clearTimeout(this._scheduled[index].expiration); + delete this._scheduled[index]; + return true; + } else { + return false; + } + } + _free(index, job, options2, eventInfo) { + var _this = this; + return _asyncToGenerator2(function* () { + var e, running; + try { + var _ref = yield _this._store.__free__(index, options2.weight); + running = _ref.running; + _this.Events.trigger("debug", `Freed ${options2.id}`, eventInfo); + if (running === 0 && _this.empty()) { + return _this.Events.trigger("idle"); + } + } catch (error1) { + e = error1; + return _this.Events.trigger("error", e); + } + })(); + } + _run(index, job, wait2) { + var clearGlobalState, free, run2; + job.doRun(); + clearGlobalState = this._clearGlobalState.bind(this, index); + run2 = this._run.bind(this, index, job); + free = this._free.bind(this, index, job); + return this._scheduled[index] = { + timeout: setTimeout(() => { + return job.doExecute(this._limiter, clearGlobalState, run2, free); + }, wait2), + expiration: job.options.expiration != null ? setTimeout(function() { + return job.doExpire(clearGlobalState, run2, free); + }, wait2 + job.options.expiration) : void 0, + job + }; + } + _drainOne(capacity) { + return this._registerLock.schedule(() => { + var args, index, next, options2, queue; + if (this.queued() === 0) { + return this.Promise.resolve(null); + } + queue = this._queues.getFirst(); + var _next2 = next = queue.first(); + options2 = _next2.options; + args = _next2.args; + if (capacity != null && options2.weight > capacity) { + return this.Promise.resolve(null); + } + this.Events.trigger("debug", `Draining ${options2.id}`, { + args, + options: options2 + }); + index = this._randomIndex(); + return this._store.__register__(index, options2.weight, options2.expiration).then(({ + success, + wait: wait2, + reservoir + }) => { + var empty; + this.Events.trigger("debug", `Drained ${options2.id}`, { + success, + args, + options: options2 + }); + if (success) { + queue.shift(); + empty = this.empty(); + if (empty) { + this.Events.trigger("empty"); + } + if (reservoir === 0) { + this.Events.trigger("depleted", empty); + } + this._run(index, next, wait2); + return this.Promise.resolve(options2.weight); + } else { + return this.Promise.resolve(null); + } + }); + }); + } + _drainAll(capacity, total = 0) { + return this._drainOne(capacity).then((drained) => { + var newCapacity; + if (drained != null) { + newCapacity = capacity != null ? capacity - drained : capacity; + return this._drainAll(newCapacity, total + drained); + } else { + return this.Promise.resolve(total); + } + }).catch((e) => { + return this.Events.trigger("error", e); + }); + } + _dropAllQueued(message) { + return this._queues.shiftAll(function(job) { + return job.doDrop({ + message + }); + }); + } + stop(options2 = {}) { + var done, waitForExecuting; + options2 = parser2.load(options2, this.stopDefaults); + waitForExecuting = (at) => { + var finished; + finished = () => { + var counts; + counts = this._states.counts; + return counts[0] + counts[1] + counts[2] + counts[3] === at; + }; + return new this.Promise((resolve4, reject) => { + if (finished()) { + return resolve4(); + } else { + return this.on("done", () => { + if (finished()) { + this.removeAllListeners("done"); + return resolve4(); + } + }); + } + }); + }; + done = options2.dropWaitingJobs ? (this._run = function(index, next) { + return next.doDrop({ + message: options2.dropErrorMessage + }); + }, this._drainOne = () => { + return this.Promise.resolve(null); + }, this._registerLock.schedule(() => { + return this._submitLock.schedule(() => { + var k, ref, v; + ref = this._scheduled; + for (k in ref) { + v = ref[k]; + if (this.jobStatus(v.job.options.id) === "RUNNING") { + clearTimeout(v.timeout); + clearTimeout(v.expiration); + v.job.doDrop({ + message: options2.dropErrorMessage + }); + } + } + this._dropAllQueued(options2.dropErrorMessage); + return waitForExecuting(0); + }); + })) : this.schedule({ + priority: NUM_PRIORITIES - 1, + weight: 0 + }, () => { + return waitForExecuting(1); + }); + this._receive = function(job) { + return job._reject(new Bottleneck3.prototype.BottleneckError(options2.enqueueErrorMessage)); + }; + this.stop = () => { + return this.Promise.reject(new Bottleneck3.prototype.BottleneckError("stop() has already been called")); + }; + return done; + } + _addToQueue(job) { + var _this2 = this; + return _asyncToGenerator2(function* () { + var args, blocked, error, options2, reachedHWM, shifted, strategy; + args = job.args; + options2 = job.options; + try { + var _ref2 = yield _this2._store.__submit__(_this2.queued(), options2.weight); + reachedHWM = _ref2.reachedHWM; + blocked = _ref2.blocked; + strategy = _ref2.strategy; + } catch (error1) { + error = error1; + _this2.Events.trigger("debug", `Could not queue ${options2.id}`, { + args, + options: options2, + error + }); + job.doDrop({ + error + }); + return false; + } + if (blocked) { + job.doDrop(); + return true; + } else if (reachedHWM) { + shifted = strategy === Bottleneck3.prototype.strategy.LEAK ? _this2._queues.shiftLastFrom(options2.priority) : strategy === Bottleneck3.prototype.strategy.OVERFLOW_PRIORITY ? _this2._queues.shiftLastFrom(options2.priority + 1) : strategy === Bottleneck3.prototype.strategy.OVERFLOW ? job : void 0; + if (shifted != null) { + shifted.doDrop(); + } + if (shifted == null || strategy === Bottleneck3.prototype.strategy.OVERFLOW) { + if (shifted == null) { + job.doDrop(); + } + return reachedHWM; + } + } + job.doQueue(reachedHWM, blocked); + _this2._queues.push(job); + yield _this2._drainAll(); + return reachedHWM; + })(); + } + _receive(job) { + if (this._states.jobStatus(job.options.id) != null) { + job._reject(new Bottleneck3.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); + return false; + } else { + job.doReceive(); + return this._submitLock.schedule(this._addToQueue, job); + } + } + submit(...args) { + var cb, fn, job, options2, ref, ref1, task; + if (typeof args[0] === "function") { + var _ref3, _ref4, _splice$call, _splice$call2; + ref = args, _ref3 = ref, _ref4 = _toArray(_ref3), fn = _ref4[0], args = _ref4.slice(1), _ref3, _splice$call = splice.call(args, -1), _splice$call2 = _slicedToArray2(_splice$call, 1), cb = _splice$call2[0], _splice$call; + options2 = parser2.load({}, this.jobDefaults); + } else { + var _ref5, _ref6, _splice$call3, _splice$call4; + ref1 = args, _ref5 = ref1, _ref6 = _toArray(_ref5), options2 = _ref6[0], fn = _ref6[1], args = _ref6.slice(2), _ref5, _splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray2(_splice$call3, 1), cb = _splice$call4[0], _splice$call3; + options2 = parser2.load(options2, this.jobDefaults); + } + task = (...args2) => { + return new this.Promise(function(resolve4, reject) { + return fn(...args2, function(...args3) { + return (args3[0] != null ? reject : resolve4)(args3); + }); + }); + }; + job = new Job(task, args, options2, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + job.promise.then(function(args2) { + return typeof cb === "function" ? cb(...args2) : void 0; + }).catch(function(args2) { + if (Array.isArray(args2)) { + return typeof cb === "function" ? cb(...args2) : void 0; + } else { + return typeof cb === "function" ? cb(args2) : void 0; + } + }); + return this._receive(job); + } + schedule(...args) { + var job, options2, task; + if (typeof args[0] === "function") { + var _args = args; + var _args2 = _toArray(_args); + task = _args2[0]; + args = _args2.slice(1); + options2 = {}; + } else { + var _args3 = args; + var _args4 = _toArray(_args3); + options2 = _args4[0]; + task = _args4[1]; + args = _args4.slice(2); + } + job = new Job(task, args, options2, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + this._receive(job); + return job.promise; + } + wrap(fn) { + var schedule, wrapped; + schedule = this.schedule.bind(this); + wrapped = function wrapped2(...args) { + return schedule(fn.bind(this), ...args); + }; + wrapped.withOptions = function(options2, ...args) { + return schedule(options2, fn, ...args); + }; + return wrapped; + } + updateSettings(options2 = {}) { + var _this3 = this; + return _asyncToGenerator2(function* () { + yield _this3._store.__updateSettings__(parser2.overwrite(options2, _this3.storeDefaults)); + parser2.overwrite(options2, _this3.instanceDefaults, _this3); + return _this3; + })(); + } + currentReservoir() { + return this._store.__currentReservoir__(); + } + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } + } + ; + Bottleneck3.default = Bottleneck3; + Bottleneck3.Events = Events2; + Bottleneck3.version = Bottleneck3.prototype.version = require_version().version; + Bottleneck3.strategy = Bottleneck3.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; + Bottleneck3.BottleneckError = Bottleneck3.prototype.BottleneckError = require_BottleneckError(); + Bottleneck3.Group = Bottleneck3.prototype.Group = require_Group(); + Bottleneck3.RedisConnection = Bottleneck3.prototype.RedisConnection = require_RedisConnection(); + Bottleneck3.IORedisConnection = Bottleneck3.prototype.IORedisConnection = require_IORedisConnection(); + Bottleneck3.Batcher = Bottleneck3.prototype.Batcher = require_Batcher(); + Bottleneck3.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY, + weight: 1, + expiration: null, + id: "" + }; + Bottleneck3.prototype.storeDefaults = { + maxConcurrent: null, + minTime: 0, + highWater: null, + strategy: Bottleneck3.prototype.strategy.LEAK, + penalty: null, + reservoir: null, + reservoirRefreshInterval: null, + reservoirRefreshAmount: null, + reservoirIncreaseInterval: null, + reservoirIncreaseAmount: null, + reservoirIncreaseMaximum: null + }; + Bottleneck3.prototype.localStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 250 + }; + Bottleneck3.prototype.redisStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 5e3, + clientTimeout: 1e4, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; + Bottleneck3.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise + }; + Bottleneck3.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; + return Bottleneck3; + }.call(void 0); + module2.exports = Bottleneck2; } - return ( - newUrl - .replace(/\\/g, '/') - .replace(/webpack:\/?/g, '') // Remove intermediate base path - // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor - .replace(new RegExp(`(file://)?/*${escapedBase}/*`, 'ig'), 'app:///') - ); -} - -exports.normalize = normalize; -exports.normalizeToSize = normalizeToSize; -exports.normalizeUrlToBase = normalizeUrlToBase; -exports.walk = visit; -//# sourceMappingURL=normalize.js.map - - -/***/ }), - -/***/ 92062: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const browser = __nccwpck_require__(81597); -const debugBuild = __nccwpck_require__(35523); -const is = __nccwpck_require__(25789); -const logger = __nccwpck_require__(6661); -const string = __nccwpck_require__(1308); +}); -/** - * Replace a method in an object with a wrapped version of itself. - * - * @param source An object that contains a method to be wrapped. - * @param name The name of the method to be wrapped. - * @param replacementFactory A higher-order function that takes the original version of the given method and returns a - * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to - * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, )` or `origMethod.apply(this, [])` (rather than being called directly), again to preserve `this`. - * @returns void - */ -function fill(source, name, replacementFactory) { - if (!(name in source)) { - return; +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/index.js +var require_lib2 = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_Bottleneck(); } +}); - const original = source[name] ; - const wrapped = replacementFactory(original) ; - - // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work - // otherwise it'll throw "TypeError: Object.defineProperties called on non-object" - if (typeof wrapped === 'function') { - markFunctionWrapped(wrapped, original); - } - - source[name] = wrapped; -} - -/** - * Defines a non-enumerable property on the given object. - * - * @param obj The object on which to set the property - * @param name The name of the property to be set - * @param value The value to which to set the property - */ -function addNonEnumerableProperty(obj, name, value) { - try { - Object.defineProperty(obj, name, { - // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it - value: value, - writable: true, - configurable: true, - }); - } catch (o_O) { - debugBuild.DEBUG_BUILD && logger.logger.log(`Failed to add non-enumerable property "${name}" to object`, obj); - } -} - -/** - * Remembers the original function on the wrapped function and - * patches up the prototype. - * - * @param wrapped the wrapper function - * @param original the original function that gets wrapped - */ -function markFunctionWrapped(wrapped, original) { - try { - const proto = original.prototype || {}; - wrapped.prototype = original.prototype = proto; - addNonEnumerableProperty(wrapped, '__sentry_original__', original); - } catch (o_O) {} // eslint-disable-line no-empty -} - -/** - * This extracts the original function if available. See - * `markFunctionWrapped` for more information. - * - * @param func the function to unwrap - * @returns the unwrapped version of the function if available. - */ -function getOriginalFunction(func) { - return func.__sentry_original__; -} - -/** - * Encodes given object into url-friendly format - * - * @param object An object that contains serializable values - * @returns string Encoded - */ -function urlEncode(object) { - return Object.keys(object) - .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`) - .join('&'); -} - -/** - * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their - * non-enumerable properties attached. - * - * @param value Initial source that we have to transform in order for it to be usable by the serializer - * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor - * an Error. - */ -function convertToPlainObject( - value, -) - - { - if (is.isError(value)) { - return { - message: value.message, - name: value.name, - stack: value.stack, - ...getOwnProperties(value), +// node_modules/.pnpm/@ioredis+commands@1.2.0/node_modules/@ioredis/commands/built/commands.json +var require_commands = __commonJS({ + "node_modules/.pnpm/@ioredis+commands@1.2.0/node_modules/@ioredis/commands/built/commands.json"(exports2, module2) { + module2.exports = { + acl: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + append: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + asking: { + arity: 1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + auth: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgrewriteaof: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bgsave: { + arity: -1, + flags: [ + "admin", + "noscript", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bitcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitfield_ro: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + bitop: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 2, + keyStop: -1, + step: 1 + }, + bitpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + blmove: { + arity: 6, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + blmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + blpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpop: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + brpoplpush: { + arity: 4, + flags: [ + "write", + "denyoom", + "noscript", + "blocking" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + bzmpop: { + arity: -5, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + bzpopmax: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + bzpopmin: { + arity: -3, + flags: [ + "write", + "noscript", + "blocking", + "fast" + ], + keyStart: 1, + keyStop: -2, + step: 1 + }, + client: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + cluster: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + command: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + config: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + copy: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + dbsize: { + arity: 1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + debug: { + arity: -2, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + decr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + decrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + del: { + arity: -2, + flags: [ + "write" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + discard: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + dump: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + echo: { + arity: 2, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + eval_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + evalsha_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exec: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "skip_slowlog" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + exists: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + expire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + expiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + failover: { + arity: -1, + flags: [ + "admin", + "noscript", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall: { + arity: -3, + flags: [ + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + fcall_ro: { + arity: -3, + flags: [ + "readonly", + "noscript", + "stale", + "skip_monitor", + "no_mandatory_keys", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushall: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + flushdb: { + arity: -1, + flags: [ + "write" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + function: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + geoadd: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geodist: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geohash: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geopos: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius: { + arity: -6, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadius_ro: { + arity: -6, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember: { + arity: -5, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + georadiusbymember_ro: { + arity: -5, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearch: { + arity: -7, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + geosearchstore: { + arity: -8, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + get: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getbit: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getdel: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getex: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + getset: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hello: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + hexists: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hget: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hgetall: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hincrbyfloat: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hkeys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmget: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hmset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hrandfield: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hset: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hsetnx: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hstrlen: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + hvals: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incr: { + arity: 2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrby: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + incrbyfloat: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + info: { + arity: -1, + flags: [ + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + keys: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lastsave: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + latency: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lcs: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lindex: { + arity: 3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + linsert: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + llen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lmove: { + arity: 5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + lmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lolwut: { + arity: -1, + flags: [ + "readonly", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + lpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpos: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrange: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lrem: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + lset: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ltrim: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + memory: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + mget: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + migrate: { + arity: -6, + flags: [ + "write", + "movablekeys" + ], + keyStart: 3, + keyStop: 3, + step: 1 + }, + module: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + monitor: { + arity: 1, + flags: [ + "admin", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + move: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + mset: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + msetnx: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 2 + }, + multi: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + object: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + persist: { + arity: 2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpire: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpireat: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pexpiretime: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfadd: { + arity: -2, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + pfcount: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfdebug: { + arity: 3, + flags: [ + "write", + "denyoom", + "admin" + ], + keyStart: 2, + keyStop: 2, + step: 1 + }, + pfmerge: { + arity: -2, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + pfselftest: { + arity: 1, + flags: [ + "admin" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + ping: { + arity: -1, + flags: [ + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psetex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + psubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + psync: { + arity: -3, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + publish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + pubsub: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + punsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + quit: { + arity: -1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + randomkey: { + arity: 1, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readonly: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + readwrite: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rename: { + arity: 3, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + renamenx: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + replconf: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + replicaof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + reset: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "no_auth", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + restore: { + arity: -4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + "restore-asking": { + arity: -4, + flags: [ + "write", + "denyoom", + "asking" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + role: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + rpop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpoplpush: { + arity: 3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + rpush: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + rpushx: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sadd: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + save: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scan: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + scard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + script: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sdiff: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sdiffstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + select: { + arity: 2, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + set: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setbit: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setex: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setnx: { + arity: 3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + setrange: { + arity: 4, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + shutdown: { + arity: -1, + flags: [ + "admin", + "noscript", + "loading", + "stale", + "no_multi", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinter: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sinterstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sismember: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + slaveof: { + arity: 3, + flags: [ + "admin", + "noscript", + "stale", + "no_async_loading" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + slowlog: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + smembers: { + arity: 2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smismember: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + smove: { + arity: 4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + sort: { + arity: -2, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sort_ro: { + arity: -2, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spop: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + spublish: { + arity: 3, + flags: [ + "pubsub", + "loading", + "stale", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + srem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + ssubscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + strlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + subscribe: { + arity: -2, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + substr: { + arity: 4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + sunion: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunionstore: { + arity: -3, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + sunsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + swapdb: { + arity: 3, + flags: [ + "write", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + sync: { + arity: 1, + flags: [ + "admin", + "noscript", + "no_async_loading", + "no_multi" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + time: { + arity: 1, + flags: [ + "loading", + "stale", + "fast" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + touch: { + arity: -2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + ttl: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + type: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + unlink: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + unsubscribe: { + arity: -1, + flags: [ + "pubsub", + "noscript", + "loading", + "stale" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + unwatch: { + arity: 1, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + wait: { + arity: 3, + flags: [ + "noscript" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + watch: { + arity: -2, + flags: [ + "noscript", + "loading", + "stale", + "fast", + "allow_busy" + ], + keyStart: 1, + keyStop: -1, + step: 1 + }, + xack: { + arity: -4, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xadd: { + arity: -5, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xautoclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xclaim: { + arity: -6, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xdel: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xgroup: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xinfo: { + arity: -2, + flags: [], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xlen: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xpending: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xread: { + arity: -4, + flags: [ + "readonly", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xreadgroup: { + arity: -7, + flags: [ + "write", + "blocking", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + xrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xsetid: { + arity: -3, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + xtrim: { + arity: -4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zadd: { + arity: -4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcard: { + arity: 2, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zdiff: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zdiffstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zincrby: { + arity: 4, + flags: [ + "write", + "denyoom", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zinter: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zintercard: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zinterstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zlexcount: { + arity: 4, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zmpop: { + arity: -4, + flags: [ + "write", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zmscore: { + arity: -3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmax: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zpopmin: { + arity: -2, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrandmember: { + arity: -2, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrangestore: { + arity: -5, + flags: [ + "write", + "denyoom" + ], + keyStart: 1, + keyStop: 2, + step: 1 + }, + zrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrem: { + arity: -3, + flags: [ + "write", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebylex: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyrank: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zremrangebyscore: { + arity: 4, + flags: [ + "write" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrange: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebylex: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrangebyscore: { + arity: -4, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zrevrank: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscan: { + arity: -3, + flags: [ + "readonly" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zscore: { + arity: 3, + flags: [ + "readonly", + "fast" + ], + keyStart: 1, + keyStop: 1, + step: 1 + }, + zunion: { + arity: -3, + flags: [ + "readonly", + "movablekeys" + ], + keyStart: 0, + keyStop: 0, + step: 0 + }, + zunionstore: { + arity: -4, + flags: [ + "write", + "denyoom", + "movablekeys" + ], + keyStart: 1, + keyStop: 1, + step: 1 + } }; - } else if (is.isEvent(value)) { - const newObj + } +}); - = { - type: value.type, - target: serializeEventTarget(value.target), - currentTarget: serializeEventTarget(value.currentTarget), - ...getOwnProperties(value), +// node_modules/.pnpm/@ioredis+commands@1.2.0/node_modules/@ioredis/commands/built/index.js +var require_built = __commonJS({ + "node_modules/.pnpm/@ioredis+commands@1.2.0/node_modules/@ioredis/commands/built/index.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; }; - - if (typeof CustomEvent !== 'undefined' && is.isInstanceOf(value, CustomEvent)) { - newObj.detail = value.detail; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getKeyIndexes = exports2.hasFlag = exports2.exists = exports2.list = void 0; + var commands_json_1 = __importDefault(require_commands()); + exports2.list = Object.keys(commands_json_1.default); + var flags = {}; + exports2.list.forEach((commandName) => { + flags[commandName] = commands_json_1.default[commandName].flags.reduce(function(flags2, flag) { + flags2[flag] = true; + return flags2; + }, {}); + }); + function exists(commandName) { + return Boolean(commands_json_1.default[commandName]); } - - return newObj; - } else { - return value; - } -} - -/** Creates a string representation of the target of an `Event` object */ -function serializeEventTarget(target) { - try { - return is.isElement(target) ? browser.htmlTreeAsString(target) : Object.prototype.toString.call(target); - } catch (_oO) { - return ''; - } -} - -/** Filters out all but an object's own properties */ -function getOwnProperties(obj) { - if (typeof obj === 'object' && obj !== null) { - const extractedProps = {}; - for (const property in obj) { - if (Object.prototype.hasOwnProperty.call(obj, property)) { - extractedProps[property] = (obj )[property]; + exports2.exists = exists; + function hasFlag(commandName, flag) { + if (!flags[commandName]) { + throw new Error("Unknown command " + commandName); } + return Boolean(flags[commandName][flag]); } - return extractedProps; - } else { - return {}; - } -} - -/** - * Given any captured exception, extract its keys and create a sorted - * and truncated list that will be used inside the event message. - * eg. `Non-error exception captured with keys: foo, bar, baz` - */ -function extractExceptionKeysForMessage(exception, maxLength = 40) { - const keys = Object.keys(convertToPlainObject(exception)); - keys.sort(); - - if (!keys.length) { - return '[object has no keys]'; - } - - if (keys[0].length >= maxLength) { - return string.truncate(keys[0], maxLength); - } - - for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) { - const serialized = keys.slice(0, includedKeys).join(', '); - if (serialized.length > maxLength) { - continue; + exports2.hasFlag = hasFlag; + function getKeyIndexes(commandName, args, options2) { + const command = commands_json_1.default[commandName]; + if (!command) { + throw new Error("Unknown command " + commandName); + } + if (!Array.isArray(args)) { + throw new Error("Expect args to be an array"); + } + const keys = []; + const parseExternalKey = Boolean(options2 && options2.parseExternalKey); + const takeDynamicKeys = (args2, startIndex) => { + const keys2 = []; + const keyStop = Number(args2[startIndex]); + for (let i = 0; i < keyStop; i++) { + keys2.push(i + startIndex + 1); + } + return keys2; + }; + const takeKeyAfterToken = (args2, startIndex, token) => { + for (let i = startIndex; i < args2.length - 1; i += 1) { + if (String(args2[i]).toLowerCase() === token.toLowerCase()) { + return i + 1; + } + } + return null; + }; + switch (commandName) { + case "zunionstore": + case "zinterstore": + case "zdiffstore": + keys.push(0, ...takeDynamicKeys(args, 1)); + break; + case "eval": + case "evalsha": + case "eval_ro": + case "evalsha_ro": + case "fcall": + case "fcall_ro": + case "blmpop": + case "bzmpop": + keys.push(...takeDynamicKeys(args, 1)); + break; + case "sintercard": + case "lmpop": + case "zunion": + case "zinter": + case "zmpop": + case "zintercard": + case "zdiff": { + keys.push(...takeDynamicKeys(args, 0)); + break; + } + case "georadius": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 5, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 5, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "georadiusbymember": { + keys.push(0); + const storeKey = takeKeyAfterToken(args, 4, "STORE"); + if (storeKey) + keys.push(storeKey); + const distKey = takeKeyAfterToken(args, 4, "STOREDIST"); + if (distKey) + keys.push(distKey); + break; + } + case "sort": + case "sort_ro": + keys.push(0); + for (let i = 1; i < args.length - 1; i++) { + let arg = args[i]; + if (typeof arg !== "string") { + continue; + } + const directive = arg.toUpperCase(); + if (directive === "GET") { + i += 1; + arg = args[i]; + if (arg !== "#") { + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(arg)]); + } else { + keys.push(i); + } + } + } else if (directive === "BY") { + i += 1; + if (parseExternalKey) { + keys.push([i, getExternalKeyNameLength(args[i])]); + } else { + keys.push(i); + } + } else if (directive === "STORE") { + i += 1; + keys.push(i); + } + } + break; + case "migrate": + if (args[2] === "") { + for (let i = 5; i < args.length - 1; i++) { + const arg = args[i]; + if (typeof arg === "string" && arg.toUpperCase() === "KEYS") { + for (let j = i + 1; j < args.length; j++) { + keys.push(j); + } + break; + } + } + } else { + keys.push(2); + } + break; + case "xreadgroup": + case "xread": + for (let i = commandName === "xread" ? 0 : 3; i < args.length - 1; i++) { + if (String(args[i]).toUpperCase() === "STREAMS") { + for (let j = i + 1; j <= i + (args.length - 1 - i) / 2; j++) { + keys.push(j); + } + break; + } + } + break; + default: + if (command.step > 0) { + const keyStart = command.keyStart - 1; + const keyStop = command.keyStop > 0 ? command.keyStop : args.length + command.keyStop + 1; + for (let i = keyStart; i < keyStop; i += command.step) { + keys.push(i); + } + } + break; + } + return keys; } - if (includedKeys === keys.length) { - return serialized; + exports2.getKeyIndexes = getKeyIndexes; + function getExternalKeyNameLength(key) { + if (typeof key !== "string") { + key = String(key); + } + const hashPos = key.indexOf("->"); + return hashPos === -1 ? key.length : hashPos; } - return string.truncate(serialized, maxLength); } +}); - return ''; -} - -/** - * Given any object, return a new object having removed all fields whose value was `undefined`. - * Works recursively on objects and arrays. - * - * Attention: This function keeps circular references in the returned object. - */ -function dropUndefinedKeys(inputValue) { - // This map keeps track of what already visited nodes map to. - // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular - // references as the input object. - const memoizationMap = new Map(); - - // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API - return _dropUndefinedKeys(inputValue, memoizationMap); -} - -function _dropUndefinedKeys(inputValue, memoizationMap) { - if (isPojo(inputValue)) { - // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== undefined) { - return memoVal ; - } - - const returnValue = {}; - // Store the mapping of this value in case we visit it again, in case of circular data - memoizationMap.set(inputValue, returnValue); - - for (const key of Object.keys(inputValue)) { - if (typeof inputValue[key] !== 'undefined') { - returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap); +// node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/utils.js +var require_utils2 = __commonJS({ + "node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tryCatch = exports2.errorObj = void 0; + exports2.errorObj = { e: {} }; + var tryCatchTarget; + function tryCatcher(err, val) { + try { + const target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + exports2.errorObj.e = e; + return exports2.errorObj; } } - - return returnValue ; - } - - if (Array.isArray(inputValue)) { - // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object - const memoVal = memoizationMap.get(inputValue); - if (memoVal !== undefined) { - return memoVal ; + function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; } - - const returnValue = []; - // Store the mapping of this value in case we visit it again, in case of circular data - memoizationMap.set(inputValue, returnValue); - - inputValue.forEach((item) => { - returnValue.push(_dropUndefinedKeys(item, memoizationMap)); - }); - - return returnValue ; - } - - return inputValue; -} - -function isPojo(input) { - if (!is.isPlainObject(input)) { - return false; - } - - try { - const name = (Object.getPrototypeOf(input) ).constructor.name; - return !name || name === 'Object'; - } catch (e) { - return true; + exports2.tryCatch = tryCatch; } -} - -/** - * Ensure that something is an object. - * - * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper - * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives. - * - * @param wat The subject of the objectification - * @returns A version of `wat` which can safely be used with `Object` class methods - */ -function objectify(wat) { - let objectified; - switch (true) { - case wat === undefined || wat === null: - objectified = new String(wat); - break; - - // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason - // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as - // an object in order to wrap it. - case typeof wat === 'symbol' || typeof wat === 'bigint': - objectified = Object(wat); - break; - - // this will catch the remaining primitives: `String`, `Number`, and `Boolean` - case is.isPrimitive(wat): - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - objectified = new (wat ).constructor(wat); - break; +}); - // by process of elimination, at this point we know that `wat` must already be an object - default: - objectified = wat; - break; - } - return objectified; -} - -exports.addNonEnumerableProperty = addNonEnumerableProperty; -exports.convertToPlainObject = convertToPlainObject; -exports.dropUndefinedKeys = dropUndefinedKeys; -exports.extractExceptionKeysForMessage = extractExceptionKeysForMessage; -exports.fill = fill; -exports.getOriginalFunction = getOriginalFunction; -exports.markFunctionWrapped = markFunctionWrapped; -exports.objectify = objectify; -exports.urlEncode = urlEncode; -//# sourceMappingURL=object.js.map - - -/***/ }), - -/***/ 46118: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript -// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js -// -// Copyright Joyent, Inc.and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -/** JSDoc */ -function normalizeArray(parts, allowAboveRoot) { - // if the path tries to go above the root, `up` ends up > 0 - let up = 0; - for (let i = parts.length - 1; i >= 0; i--) { - const last = parts[i]; - if (last === '.') { - parts.splice(i, 1); - } else if (last === '..') { - parts.splice(i, 1); - up++; - } else if (up) { - parts.splice(i, 1); - up--; +// node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/index.js +var require_built2 = __commonJS({ + "node_modules/.pnpm/standard-as-callback@2.1.0/node_modules/standard-as-callback/built/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils2(); + function throwLater(e) { + setTimeout(function() { + throw e; + }, 0); } - } - - // if the path is allowed to go above the root, restore leading ..s - if (allowAboveRoot) { - for (; up--; up) { - parts.unshift('..'); + function asCallback(promise, nodeback, options2) { + if (typeof nodeback === "function") { + promise.then((val) => { + let ret; + if (options2 !== void 0 && Object(options2).spread && Array.isArray(val)) { + ret = utils_1.tryCatch(nodeback).apply(void 0, [null].concat(val)); + } else { + ret = val === void 0 ? utils_1.tryCatch(nodeback)(null) : utils_1.tryCatch(nodeback)(null, val); + } + if (ret === utils_1.errorObj) { + throwLater(ret.e); + } + }, (cause) => { + if (!cause) { + const newReason = new Error(cause + ""); + Object.assign(newReason, { cause }); + cause = newReason; + } + const ret = utils_1.tryCatch(nodeback)(cause); + if (ret === utils_1.errorObj) { + throwLater(ret.e); + } + }); + } + return promise; } + exports2.default = asCallback; } +}); - return parts; -} - -// Split a filename into [root, dir, basename, ext], unix version -// 'root' is just a slash, or nothing. -const splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/; -/** JSDoc */ -function splitPath(filename) { - // Truncate files names greater than 1024 characters to avoid regex dos - // https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172 - const truncated = filename.length > 1024 ? `${filename.slice(-1024)}` : filename; - const parts = splitPathRe.exec(truncated); - return parts ? parts.slice(1) : []; -} - -// path.resolve([from ...], to) -// posix version -/** JSDoc */ -function resolve(...args) { - let resolvedPath = ''; - let resolvedAbsolute = false; - - for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { - const path = i >= 0 ? args[i] : '/'; - - // Skip empty entries - if (!path) { - continue; +// node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/old.js +var require_old = __commonJS({ + "node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/old.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var util2 = __require("util"); + function RedisError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); } - - resolvedPath = `${path}/${resolvedPath}`; - resolvedAbsolute = path.charAt(0) === '/'; - } - - // At this point the path should be resolved to a full absolute path, but - // handle relative paths to be safe (might happen when process.cwd() fails) - - // Normalize the path - resolvedPath = normalizeArray( - resolvedPath.split('/').filter(p => !!p), - !resolvedAbsolute, - ).join('/'); - - return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; -} - -/** JSDoc */ -function trim(arr) { - let start = 0; - for (; start < arr.length; start++) { - if (arr[start] !== '') { - break; + util2.inherits(RedisError, Error); + Object.defineProperty(RedisError.prototype, "name", { + value: "RedisError", + configurable: true, + writable: true + }); + function ParserError(message, buffer, offset) { + assert(buffer); + assert.strictEqual(typeof offset, "number"); + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; } - } - - let end = arr.length - 1; - for (; end >= 0; end--) { - if (arr[end] !== '') { - break; + util2.inherits(ParserError, RedisError); + Object.defineProperty(ParserError.prototype, "name", { + value: "ParserError", + configurable: true, + writable: true + }); + function ReplyError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + Error.captureStackTrace(this, this.constructor); + Error.stackTraceLimit = tmp; } - } - - if (start > end) { - return []; - } - return arr.slice(start, end - start + 1); -} - -// path.relative(from, to) -// posix version -/** JSDoc */ -function relative(from, to) { - /* eslint-disable no-param-reassign */ - from = resolve(from).slice(1); - to = resolve(to).slice(1); - /* eslint-enable no-param-reassign */ - - const fromParts = trim(from.split('/')); - const toParts = trim(to.split('/')); - - const length = Math.min(fromParts.length, toParts.length); - let samePartsLength = length; - for (let i = 0; i < length; i++) { - if (fromParts[i] !== toParts[i]) { - samePartsLength = i; - break; + util2.inherits(ReplyError, RedisError); + Object.defineProperty(ReplyError.prototype, "name", { + value: "ReplyError", + configurable: true, + writable: true + }); + function AbortError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); } + util2.inherits(AbortError, RedisError); + Object.defineProperty(AbortError.prototype, "name", { + value: "AbortError", + configurable: true, + writable: true + }); + function InterruptError(message) { + Object.defineProperty(this, "message", { + value: message || "", + configurable: true, + writable: true + }); + Error.captureStackTrace(this, this.constructor); + } + util2.inherits(InterruptError, AbortError); + Object.defineProperty(InterruptError.prototype, "name", { + value: "InterruptError", + configurable: true, + writable: true + }); + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError, + InterruptError + }; } +}); - let outputParts = []; - for (let i = samePartsLength; i < fromParts.length; i++) { - outputParts.push('..'); - } - - outputParts = outputParts.concat(toParts.slice(samePartsLength)); - - return outputParts.join('/'); -} - -// path.normalize(path) -// posix version -/** JSDoc */ -function normalizePath(path) { - const isPathAbsolute = isAbsolute(path); - const trailingSlash = path.slice(-1) === '/'; - - // Normalize the path - let normalizedPath = normalizeArray( - path.split('/').filter(p => !!p), - !isPathAbsolute, - ).join('/'); - - if (!normalizedPath && !isPathAbsolute) { - normalizedPath = '.'; - } - if (normalizedPath && trailingSlash) { - normalizedPath += '/'; - } - - return (isPathAbsolute ? '/' : '') + normalizedPath; -} - -// posix version -/** JSDoc */ -function isAbsolute(path) { - return path.charAt(0) === '/'; -} - -// posix version -/** JSDoc */ -function join(...args) { - return normalizePath(args.join('/')); -} - -/** JSDoc */ -function dirname(path) { - const result = splitPath(path); - const root = result[0]; - let dir = result[1]; - - if (!root && !dir) { - // No dirname whatsoever - return '.'; - } - - if (dir) { - // It has a dirname, strip trailing slash - dir = dir.slice(0, dir.length - 1); - } - - return root + dir; -} - -/** JSDoc */ -function basename(path, ext) { - let f = splitPath(path)[2]; - if (ext && f.slice(ext.length * -1) === ext) { - f = f.slice(0, f.length - ext.length); +// node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/modern.js +var require_modern = __commonJS({ + "node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/lib/modern.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var RedisError = class extends Error { + get name() { + return this.constructor.name; + } + }; + var ParserError = class extends RedisError { + constructor(message, buffer, offset) { + assert(buffer); + assert.strictEqual(typeof offset, "number"); + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message); + Error.stackTraceLimit = tmp; + this.offset = offset; + this.buffer = buffer; + } + get name() { + return this.constructor.name; + } + }; + var ReplyError = class extends RedisError { + constructor(message) { + const tmp = Error.stackTraceLimit; + Error.stackTraceLimit = 2; + super(message); + Error.stackTraceLimit = tmp; + } + get name() { + return this.constructor.name; + } + }; + var AbortError = class extends RedisError { + get name() { + return this.constructor.name; + } + }; + var InterruptError = class extends AbortError { + get name() { + return this.constructor.name; + } + }; + module2.exports = { + RedisError, + ParserError, + ReplyError, + AbortError, + InterruptError + }; } - return f; -} - -exports.basename = basename; -exports.dirname = dirname; -exports.isAbsolute = isAbsolute; -exports.join = join; -exports.normalizePath = normalizePath; -exports.relative = relative; -exports.resolve = resolve; -//# sourceMappingURL=path.js.map - - -/***/ }), - -/***/ 71262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const error = __nccwpck_require__(34135); -const syncpromise = __nccwpck_require__(14669); - -/** - * Creates an new PromiseBuffer object with the specified limit - * @param limit max number of promises that can be stored in the buffer - */ -function makePromiseBuffer(limit) { - const buffer = []; +}); - function isReady() { - return limit === undefined || buffer.length < limit; +// node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/index.js +var require_redis_errors = __commonJS({ + "node_modules/.pnpm/redis-errors@1.2.0/node_modules/redis-errors/index.js"(exports2, module2) { + "use strict"; + var Errors = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46 ? require_old() : require_modern(); + module2.exports = Errors; } +}); - /** - * Remove a promise from the queue. - * - * @param task Can be any PromiseLike - * @returns Removed promise. - */ - function remove(task) { - return buffer.splice(buffer.indexOf(task), 1)[0]; +// node_modules/.pnpm/cluster-key-slot@1.1.2/node_modules/cluster-key-slot/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/.pnpm/cluster-key-slot@1.1.2/node_modules/cluster-key-slot/lib/index.js"(exports2, module2) { + var lookup = [ + 0, + 4129, + 8258, + 12387, + 16516, + 20645, + 24774, + 28903, + 33032, + 37161, + 41290, + 45419, + 49548, + 53677, + 57806, + 61935, + 4657, + 528, + 12915, + 8786, + 21173, + 17044, + 29431, + 25302, + 37689, + 33560, + 45947, + 41818, + 54205, + 50076, + 62463, + 58334, + 9314, + 13379, + 1056, + 5121, + 25830, + 29895, + 17572, + 21637, + 42346, + 46411, + 34088, + 38153, + 58862, + 62927, + 50604, + 54669, + 13907, + 9842, + 5649, + 1584, + 30423, + 26358, + 22165, + 18100, + 46939, + 42874, + 38681, + 34616, + 63455, + 59390, + 55197, + 51132, + 18628, + 22757, + 26758, + 30887, + 2112, + 6241, + 10242, + 14371, + 51660, + 55789, + 59790, + 63919, + 35144, + 39273, + 43274, + 47403, + 23285, + 19156, + 31415, + 27286, + 6769, + 2640, + 14899, + 10770, + 56317, + 52188, + 64447, + 60318, + 39801, + 35672, + 47931, + 43802, + 27814, + 31879, + 19684, + 23749, + 11298, + 15363, + 3168, + 7233, + 60846, + 64911, + 52716, + 56781, + 44330, + 48395, + 36200, + 40265, + 32407, + 28342, + 24277, + 20212, + 15891, + 11826, + 7761, + 3696, + 65439, + 61374, + 57309, + 53244, + 48923, + 44858, + 40793, + 36728, + 37256, + 33193, + 45514, + 41451, + 53516, + 49453, + 61774, + 57711, + 4224, + 161, + 12482, + 8419, + 20484, + 16421, + 28742, + 24679, + 33721, + 37784, + 41979, + 46042, + 49981, + 54044, + 58239, + 62302, + 689, + 4752, + 8947, + 13010, + 16949, + 21012, + 25207, + 29270, + 46570, + 42443, + 38312, + 34185, + 62830, + 58703, + 54572, + 50445, + 13538, + 9411, + 5280, + 1153, + 29798, + 25671, + 21540, + 17413, + 42971, + 47098, + 34713, + 38840, + 59231, + 63358, + 50973, + 55100, + 9939, + 14066, + 1681, + 5808, + 26199, + 30326, + 17941, + 22068, + 55628, + 51565, + 63758, + 59695, + 39368, + 35305, + 47498, + 43435, + 22596, + 18533, + 30726, + 26663, + 6336, + 2273, + 14466, + 10403, + 52093, + 56156, + 60223, + 64286, + 35833, + 39896, + 43963, + 48026, + 19061, + 23124, + 27191, + 31254, + 2801, + 6864, + 10931, + 14994, + 64814, + 60687, + 56684, + 52557, + 48554, + 44427, + 40424, + 36297, + 31782, + 27655, + 23652, + 19525, + 15522, + 11395, + 7392, + 3265, + 61215, + 65342, + 53085, + 57212, + 44955, + 49082, + 36825, + 40952, + 28183, + 32310, + 20053, + 24180, + 11923, + 16050, + 3793, + 7920 + ]; + var toUTF8Array = function toUTF8Array2(str2) { + var char; + var i = 0; + var p = 0; + var utf8 = []; + var len = str2.length; + for (; i < len; i++) { + char = str2.charCodeAt(i); + if (char < 128) { + utf8[p++] = char; + } else if (char < 2048) { + utf8[p++] = char >> 6 | 192; + utf8[p++] = char & 63 | 128; + } else if ((char & 64512) === 55296 && i + 1 < str2.length && (str2.charCodeAt(i + 1) & 64512) === 56320) { + char = 65536 + ((char & 1023) << 10) + (str2.charCodeAt(++i) & 1023); + utf8[p++] = char >> 18 | 240; + utf8[p++] = char >> 12 & 63 | 128; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } else { + utf8[p++] = char >> 12 | 224; + utf8[p++] = char >> 6 & 63 | 128; + utf8[p++] = char & 63 | 128; + } + } + return utf8; + }; + var generate = module2.exports = function generate2(str2) { + var char; + var i = 0; + var start = -1; + var result = 0; + var resultHash = 0; + var utf8 = typeof str2 === "string" ? toUTF8Array(str2) : str2; + var len = utf8.length; + while (i < len) { + char = utf8[i++]; + if (start === -1) { + if (char === 123) { + start = i; + } + } else if (char !== 125) { + resultHash = lookup[(char ^ resultHash >> 8) & 255] ^ resultHash << 8; + } else if (i - 1 !== start) { + return resultHash & 16383; + } + result = lookup[(char ^ result >> 8) & 255] ^ result << 8; + } + return result & 16383; + }; + module2.exports.generateMulti = function generateMulti(keys) { + var i = 1; + var len = keys.length; + var base = generate(keys[0]); + while (i < len) { + if (generate(keys[i++]) !== base) return -1; + } + return base; + }; } +}); - /** - * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment. - * - * @param taskProducer A function producing any PromiseLike; In previous versions this used to be `task: - * PromiseLike`, but under that model, Promises were instantly created on the call-site and their executor - * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By - * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer - * limit check. - * @returns The original promise. - */ - function add(taskProducer) { - if (!isReady()) { - return syncpromise.rejectedSyncPromise(new error.SentryError('Not adding Promise because buffer limit was reached.')); +// node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js +var require_lodash = __commonJS({ + "node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; } - - // start the task and add its promise to the queue - const task = taskProducer(); - if (buffer.indexOf(task) === -1) { - buffer.push(task); + var objectProto = Object.prototype; + var hasOwnProperty2 = objectProto.hasOwnProperty; + var objectToString2 = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty2.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; } - void task - .then(() => remove(task)) - // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike` - // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't - // have promises, so TS has to polyfill when down-compiling.) - .then(null, () => - remove(task).then(null, () => { - // We have to add another catch here because `remove()` starts a new promise chain. - }), - ); - return task; - } - - /** - * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first. - * - * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or - * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to - * `true`. - * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and - * `false` otherwise - */ - function drain(timeout) { - return new syncpromise.SyncPromise((resolve, reject) => { - let counter = buffer.length; - - if (!counter) { - return resolve(true); + function assignInDefaults(objValue, srcValue, key, object) { + if (objValue === void 0 || eq(objValue, objectProto[key]) && !hasOwnProperty2.call(object, key)) { + return srcValue; } - - // wait for `timeout` ms and then resolve to `false` (if not cancelled first) - const capturedSetTimeout = setTimeout(() => { - if (timeout && timeout > 0) { - resolve(false); + return objValue; + } + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + object[key] = value; + } + } + function baseKeysIn(object) { + if (!isObject2(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty2.call(object, key)))) { + result.push(key); } - }, timeout); - - // if all promises resolve in time, cancel the timer and resolve to `true` - buffer.forEach(item => { - void syncpromise.resolvedSyncPromise(item).then(() => { - if (!--counter) { - clearTimeout(capturedSetTimeout); - resolve(true); + } + return result; + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function copyObject(source, props, object, customizer) { + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + assignValue(object, key, newValue === void 0 ? source[key] : newValue); + } + return object; + } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? void 0 : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); } - }, reject); + } + return object; }); + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isIterateeCall(value, index, object) { + if (!isObject2(object)) { + return false; + } + var type2 = typeof index; + if (type2 == "number" ? isArrayLike(object) && isIndex(index, object.length) : type2 == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString2.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type2 = typeof value; + return !!value && (type2 == "object" || type2 == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + var defaults = baseRest(function(args) { + args.push(void 0, assignInDefaults); + return apply(assignInWith, void 0, args); }); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = defaults; } +}); - return { - $: buffer, - add, - drain, - }; -} - -exports.makePromiseBuffer = makePromiseBuffer; -//# sourceMappingURL=promisebuffer.js.map - - -/***/ }), - -/***/ 14036: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend - -const DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds - -/** - * Extracts Retry-After value from the request header or returns default value - * @param header string representation of 'Retry-After' header - * @param now current unix timestamp - * - */ -function parseRetryAfterHeader(header, now = Date.now()) { - const headerDelay = parseInt(`${header}`, 10); - if (!isNaN(headerDelay)) { - return headerDelay * 1000; +// node_modules/.pnpm/lodash.isarguments@3.1.0/node_modules/lodash.isarguments/index.js +var require_lodash2 = __commonJS({ + "node_modules/.pnpm/lodash.isarguments@3.1.0/node_modules/lodash.isarguments/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var objectProto = Object.prototype; + var hasOwnProperty2 = objectProto.hasOwnProperty; + var objectToString2 = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag); + } + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString2.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type2 = typeof value; + return !!value && (type2 == "object" || type2 == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = isArguments; } +}); - const headerDate = Date.parse(`${header}`); - if (!isNaN(headerDate)) { - return headerDate - now; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/lodash.js +var require_lodash3 = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/lodash.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isArguments = exports2.defaults = exports2.noop = void 0; + var defaults = require_lodash(); + exports2.defaults = defaults; + var isArguments = require_lodash2(); + exports2.isArguments = isArguments; + function noop3() { + } + exports2.noop = noop3; } +}); - return DEFAULT_RETRY_AFTER; -} - -/** - * Gets the time that the given category is disabled until for rate limiting. - * In case no category-specific limit is set but a general rate limit across all categories is active, - * that time is returned. - * - * @return the time in ms that the category is disabled until or 0 if there's no active rate limit. - */ -function disabledUntil(limits, dataCategory) { - return limits[dataCategory] || limits.all || 0; -} - -/** - * Checks if a category is rate limited - */ -function isRateLimited(limits, dataCategory, now = Date.now()) { - return disabledUntil(limits, dataCategory) > now; -} - -/** - * Update ratelimits from incoming headers. - * - * @return the updated RateLimits object. - */ -function updateRateLimits( - limits, - { statusCode, headers }, - now = Date.now(), -) { - const updatedRateLimits = { - ...limits, - }; - - // "The name is case-insensitive." - // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get - const rateLimitHeader = headers && headers['x-sentry-rate-limits']; - const retryAfterHeader = headers && headers['retry-after']; +// node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +var require_ms = __commonJS({ + "node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) { + var s = 1e3; + var m = s * 60; + var h = m * 60; + var d = h * 24; + var w = d * 7; + var y = d * 365.25; + module2.exports = function(val, options2) { + options2 = options2 || {}; + var type2 = typeof val; + if (type2 === "string" && val.length > 0) { + return parse2(val); + } else if (type2 === "number" && isFinite(val)) { + return options2.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) + ); + }; + function parse2(str2) { + str2 = String(str2); + if (str2.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str2 + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type2 = (match[2] || "ms").toLowerCase(); + switch (type2) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return n * y; + case "weeks": + case "week": + case "w": + return n * w; + case "days": + case "day": + case "d": + return n * d; + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return n * h; + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return n * m; + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return n * s; + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return n; + default: + return void 0; + } + } + function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + "d"; + } + if (msAbs >= h) { + return Math.round(ms / h) + "h"; + } + if (msAbs >= m) { + return Math.round(ms / m) + "m"; + } + if (msAbs >= s) { + return Math.round(ms / s) + "s"; + } + return ms + "ms"; + } + function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, "day"); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, "hour"); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, "minute"); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, "second"); + } + return ms + " ms"; + } + function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); + } + } +}); - if (rateLimitHeader) { - /** - * rate limit headers are of the form - *
,
,.. - * where each
is of the form - * : : : : - * where - * is a delay in seconds - * is the event type(s) (error, transaction, etc) being rate limited and is of the form - * ;;... - * is what's being limited (org, project, or key) - ignored by SDK - * is an arbitrary string like "org_quota" - ignored by SDK - * Semicolon-separated list of metric namespace identifiers. Defines which namespace(s) will be affected. - * Only present if rate limit applies to the metric_bucket data category. - */ - for (const limit of rateLimitHeader.trim().split(',')) { - const [retryAfter, categories, , , namespaces] = limit.split(':', 5); - const headerDelay = parseInt(retryAfter, 10); - const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default - if (!categories) { - updatedRateLimits.all = now + delay; - } else { - for (const category of categories.split(';')) { - if (category === 'metric_bucket') { - // namespaces will be present when category === 'metric_bucket' - if (!namespaces || namespaces.split(';').includes('custom')) { - updatedRateLimits[category] = now + delay; +// node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js +var require_common = __commonJS({ + "node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js"(exports2, module2) { + function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require_ms(); + createDebug.destroy = destroy; + Object.keys(env).forEach((key) => { + createDebug[key] = env[key]; + }); + createDebug.names = []; + createDebug.skips = []; + createDebug.formatters = {}; + function selectColor(namespace) { + let hash = 0; + for (let i = 0; i < namespace.length; i++) { + hash = (hash << 5) - hash + namespace.charCodeAt(i); + hash |= 0; + } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + function debug3(...args) { + if (!debug3.enabled) { + return; + } + const self2 = debug3; + const curr = Number(/* @__PURE__ */ new Date()); + const ms = curr - (prevTime || curr); + self2.diff = ms; + self2.prev = prevTime; + self2.curr = curr; + prevTime = curr; + args[0] = createDebug.coerce(args[0]); + if (typeof args[0] !== "string") { + args.unshift("%O"); + } + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => { + if (match === "%%") { + return "%"; + } + index++; + const formatter = createDebug.formatters[format2]; + if (typeof formatter === "function") { + const val = args[index]; + match = formatter.call(self2, val); + args.splice(index, 1); + index--; } + return match; + }); + createDebug.formatArgs.call(self2, args); + const logFn = self2.log || createDebug.log; + logFn.apply(self2, args); + } + debug3.namespace = namespace; + debug3.useColors = createDebug.useColors(); + debug3.color = createDebug.selectColor(namespace); + debug3.extend = extend3; + debug3.destroy = createDebug.destroy; + Object.defineProperty(debug3, "enabled", { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + return enabledCache; + }, + set: (v) => { + enableOverride = v; + } + }); + if (typeof createDebug.init === "function") { + createDebug.init(debug3); + } + return debug3; + } + function extend3(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + createDebug.names = []; + createDebug.skips = []; + let i; + const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); + const len = split.length; + for (i = 0; i < len; i++) { + if (!split[i]) { + continue; + } + namespaces = split[i].replace(/\*/g, ".*?"); + if (namespaces[0] === "-") { + createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); } else { - updatedRateLimits[category] = now + delay; + createDebug.names.push(new RegExp("^" + namespaces + "$")); } } } + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) + ].join(","); + createDebug.enable(""); + return namespaces; + } + function enabled(name) { + if (name[name.length - 1] === "*") { + return true; + } + let i; + let len; + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + return false; + } + function toNamespace(regexp) { + return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); + } + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + function destroy() { + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); + } + createDebug.enable(createDebug.load()); + return createDebug; } - } else if (retryAfterHeader) { - updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now); - } else if (statusCode === 429) { - updatedRateLimits.all = now + 60 * 1000; - } - - return updatedRateLimits; -} - -exports.DEFAULT_RETRY_AFTER = DEFAULT_RETRY_AFTER; -exports.disabledUntil = disabledUntil; -exports.isRateLimited = isRateLimited; -exports.parseRetryAfterHeader = parseRetryAfterHeader; -exports.updateRateLimits = updateRateLimits; -//# sourceMappingURL=ratelimit.js.map - - -/***/ }), - -/***/ 86240: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const cookie = __nccwpck_require__(40203); -const debugBuild = __nccwpck_require__(35523); -const is = __nccwpck_require__(25789); -const logger = __nccwpck_require__(6661); -const normalize = __nccwpck_require__(89870); -const url = __nccwpck_require__(24076); - -const DEFAULT_INCLUDES = { - ip: false, - request: true, - transaction: true, - user: true, -}; -const DEFAULT_REQUEST_INCLUDES = ['cookies', 'data', 'headers', 'method', 'query_string', 'url']; -const DEFAULT_USER_INCLUDES = ['id', 'username', 'email']; - -/** - * Sets parameterized route as transaction name e.g.: `GET /users/:id` - * Also adds more context data on the transaction from the request. - * - * @deprecated This utility will be removed in v8. - */ -function addRequestDataToTransaction( - transaction, - req, - deps, -) { - if (!transaction) return; - // eslint-disable-next-line deprecation/deprecation - if (!transaction.metadata.source || transaction.metadata.source === 'url') { - // Attempt to grab a parameterized route off of the request - const [name, source] = extractPathForTransaction(req, { path: true, method: true }); - transaction.updateName(name); - // TODO: SEMANTIC_ATTRIBUTE_SENTRY_SOURCE is in core, align this once we merge utils & core - // eslint-disable-next-line deprecation/deprecation - transaction.setMetadata({ source }); - } - transaction.setAttribute('url', req.originalUrl || req.url); - if (req.baseUrl) { - transaction.setAttribute('baseUrl', req.baseUrl); - } - // TODO: We need to rewrite this to a flat format? - // eslint-disable-next-line deprecation/deprecation - transaction.setData('query', extractQueryParams(req, deps)); -} - -/** - * Extracts a complete and parameterized path from the request object and uses it to construct transaction name. - * If the parameterized transaction name cannot be extracted, we fall back to the raw URL. - * - * Additionally, this function determines and returns the transaction name source - * - * eg. GET /mountpoint/user/:id - * - * @param req A request object - * @param options What to include in the transaction name (method, path, or a custom route name to be - * used instead of the request's route) - * - * @returns A tuple of the fully constructed transaction name [0] and its source [1] (can be either 'route' or 'url') - */ -function extractPathForTransaction( - req, - options = {}, -) { - const method = req.method && req.method.toUpperCase(); - - let path = ''; - let source = 'url'; - - // Check to see if there's a parameterized route we can use (as there is in Express) - if (options.customRoute || req.route) { - path = options.customRoute || `${req.baseUrl || ''}${req.route && req.route.path}`; - source = 'route'; - } - - // Otherwise, just take the original URL - else if (req.originalUrl || req.url) { - path = url.stripUrlQueryAndFragment(req.originalUrl || req.url || ''); - } - - let name = ''; - if (options.method && method) { - name += method; - } - if (options.method && options.path) { - name += ' '; - } - if (options.path && path) { - name += path; - } - - return [name, source]; -} - -/** JSDoc */ -function extractTransaction(req, type) { - switch (type) { - case 'path': { - return extractPathForTransaction(req, { path: true })[0]; - } - case 'handler': { - return (req.route && req.route.stack && req.route.stack[0] && req.route.stack[0].name) || ''; - } - case 'methodPath': - default: { - // if exist _reconstructedRoute return that path instead of route.path - const customRoute = req._reconstructedRoute ? req._reconstructedRoute : undefined; - return extractPathForTransaction(req, { path: true, method: true, customRoute })[0]; - } + module2.exports = setup; } -} - -/** JSDoc */ -function extractUserData( - user - -, - keys, -) { - const extractedUser = {}; - const attributes = Array.isArray(keys) ? keys : DEFAULT_USER_INCLUDES; - - attributes.forEach(key => { - if (user && key in user) { - extractedUser[key] = user[key]; - } - }); - - return extractedUser; -} - -/** - * Normalize data from the request object, accounting for framework differences. - * - * @param req The request object from which to extract data - * @param options.include An optional array of keys to include in the normalized data. Defaults to - * DEFAULT_REQUEST_INCLUDES if not provided. - * @param options.deps Injected, platform-specific dependencies - * @returns An object containing normalized request data - */ -function extractRequestData( - req, - options - -, -) { - const { include = DEFAULT_REQUEST_INCLUDES, deps } = options || {}; - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const requestData = {}; - - // headers: - // node, express, koa, nextjs: req.headers - const headers = (req.headers || {}) - -; - // method: - // node, express, koa, nextjs: req.method - const method = req.method; - // host: - // express: req.hostname in > 4 and req.host in < 4 - // koa: req.host - // node, nextjs: req.headers.host - // Express 4 mistakenly strips off port number from req.host / req.hostname so we can't rely on them - // See: https://github.com/expressjs/express/issues/3047#issuecomment-236653223 - // Also: https://github.com/getsentry/sentry-javascript/issues/1917 - const host = headers.host || req.hostname || req.host || ''; - // protocol: - // node, nextjs: - // express, koa: req.protocol - const protocol = req.protocol === 'https' || (req.socket && req.socket.encrypted) ? 'https' : 'http'; - // url (including path and query string): - // node, express: req.originalUrl - // koa, nextjs: req.url - const originalUrl = req.originalUrl || req.url || ''; - // absolute url - const absoluteUrl = originalUrl.startsWith(protocol) ? originalUrl : `${protocol}://${host}${originalUrl}`; - include.forEach(key => { - switch (key) { - case 'headers': { - requestData.headers = headers; +}); - // Remove the Cookie header in case cookie data should not be included in the event - if (!include.includes('cookies')) { - delete (requestData.headers ).cookie; +// node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js +var require_browser = __commonJS({ + "node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js"(exports2, module2) { + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load2; + exports2.useColors = useColors; + exports2.storage = localstorage(); + exports2.destroy = /* @__PURE__ */ (() => { + let warned = false; + return () => { + if (!warned) { + warned = true; + console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); } - - break; - } - case 'method': { - requestData.method = method; - break; - } - case 'url': { - requestData.url = absoluteUrl; - break; + }; + })(); + exports2.colors = [ + "#0000CC", + "#0000FF", + "#0033CC", + "#0033FF", + "#0066CC", + "#0066FF", + "#0099CC", + "#0099FF", + "#00CC00", + "#00CC33", + "#00CC66", + "#00CC99", + "#00CCCC", + "#00CCFF", + "#3300CC", + "#3300FF", + "#3333CC", + "#3333FF", + "#3366CC", + "#3366FF", + "#3399CC", + "#3399FF", + "#33CC00", + "#33CC33", + "#33CC66", + "#33CC99", + "#33CCCC", + "#33CCFF", + "#6600CC", + "#6600FF", + "#6633CC", + "#6633FF", + "#66CC00", + "#66CC33", + "#9900CC", + "#9900FF", + "#9933CC", + "#9933FF", + "#99CC00", + "#99CC33", + "#CC0000", + "#CC0033", + "#CC0066", + "#CC0099", + "#CC00CC", + "#CC00FF", + "#CC3300", + "#CC3333", + "#CC3366", + "#CC3399", + "#CC33CC", + "#CC33FF", + "#CC6600", + "#CC6633", + "#CC9900", + "#CC9933", + "#CCCC00", + "#CCCC33", + "#FF0000", + "#FF0033", + "#FF0066", + "#FF0099", + "#FF00CC", + "#FF00FF", + "#FF3300", + "#FF3333", + "#FF3366", + "#FF3399", + "#FF33CC", + "#FF33FF", + "#FF6600", + "#FF6633", + "#FF9900", + "#FF9933", + "#FFCC00", + "#FFCC33" + ]; + function useColors() { + if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { + return true; } - case 'cookies': { - // cookies: - // node, express, koa: req.headers.cookie - // vercel, sails.js, express (w/ cookie middleware), nextjs: req.cookies - requestData.cookies = - // TODO (v8 / #5257): We're only sending the empty object for backwards compatibility, so the last bit can - // come off in v8 - req.cookies || (headers.cookie && cookie.parseCookie(headers.cookie)) || {}; - break; + if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; } - case 'query_string': { - // query string: - // node: req.url (raw) - // express, koa, nextjs: req.query - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - requestData.query_string = extractQueryParams(req, deps); - break; + let m; + return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 + typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker + typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); + } + function formatArgs(args) { + args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); + if (!this.useColors) { + return; } - case 'data': { - if (method === 'GET' || method === 'HEAD') { - break; + const c = "color: " + this.color; + args.splice(1, 0, c, "color: inherit"); + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, (match) => { + if (match === "%%") { + return; } - // body data: - // express, koa, nextjs: req.body - // - // when using node by itself, you have to read the incoming stream(see - // https://nodejs.dev/learn/get-http-request-body-data-using-nodejs); if a user is doing that, we can't know - // where they're going to store the final result, so they'll have to capture this data themselves - if (req.body !== undefined) { - requestData.data = is.isString(req.body) ? req.body : JSON.stringify(normalize.normalize(req.body)); + index++; + if (match === "%c") { + lastC = index; } - break; - } - default: { - if ({}.hasOwnProperty.call(req, key)) { - requestData[key] = (req )[key]; + }); + args.splice(lastC, 0, c); + } + exports2.log = console.debug || console.log || (() => { + }); + function save(namespaces) { + try { + if (namespaces) { + exports2.storage.setItem("debug", namespaces); + } else { + exports2.storage.removeItem("debug"); } + } catch (error) { } } - }); - - return requestData; -} - -/** - * Add data from the given request to the given event - * - * @param event The event to which the request data will be added - * @param req Request object - * @param options.include Flags to control what data is included - * @param options.deps Injected platform-specific dependencies - * @returns The mutated `Event` object - */ -function addRequestDataToEvent( - event, - req, - options, -) { - const include = { - ...DEFAULT_INCLUDES, - ...(options && options.include), - }; - - if (include.request) { - const extractedRequestData = Array.isArray(include.request) - ? extractRequestData(req, { include: include.request, deps: options && options.deps }) - : extractRequestData(req, { deps: options && options.deps }); - - event.request = { - ...event.request, - ...extractedRequestData, + function load2() { + let r; + try { + r = exports2.storage.getItem("debug"); + } catch (error) { + } + if (!r && typeof process !== "undefined" && "env" in process) { + r = process.env.DEBUG; + } + return r; + } + function localstorage() { + try { + return localStorage; + } catch (error) { + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.j = function(v) { + try { + return JSON.stringify(v); + } catch (error) { + return "[UnexpectedJSONParseError]: " + error.message; + } }; } +}); - if (include.user) { - const extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {}; - - if (Object.keys(extractedUser).length) { - event.user = { - ...event.user, - ...extractedUser, - }; - } +// node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js +var require_has_flag = __commonJS({ + "node_modules/.pnpm/has-flag@3.0.0/node_modules/has-flag/index.js"(exports2, module2) { + "use strict"; + module2.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf("--"); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); + }; } +}); - // client ip: - // node, nextjs: req.socket.remoteAddress - // express, koa: req.ip - if (include.ip) { - const ip = req.ip || (req.socket && req.socket.remoteAddress); - if (ip) { - event.user = { - ...event.user, - ip_address: ip, +// node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js +var require_supports_color = __commonJS({ + "node_modules/.pnpm/supports-color@5.5.0/node_modules/supports-color/index.js"(exports2, module2) { + "use strict"; + var os3 = __require("os"); + var hasFlag = require_has_flag(); + var env = process.env; + var forceColor; + if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) { + forceColor = false; + } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { + forceColor = true; + } + if ("FORCE_COLOR" in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; + } + function translateLevel(level) { + if (level === 0) { + return false; + } + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 }; } - } - - if (include.transaction && !event.transaction) { - // TODO do we even need this anymore? - // TODO make this work for nextjs - event.transaction = extractTransaction(req, include.transaction); - } - - return event; -} - -function extractQueryParams( - req, - deps, -) { - // url (including path and query string): - // node, express: req.originalUrl - // koa, nextjs: req.url - let originalUrl = req.originalUrl || req.url || ''; - - if (!originalUrl) { - return; - } - - // The `URL` constructor can't handle internal URLs of the form `/some/path/here`, so stick a dummy protocol and - // hostname on the beginning. Since the point here is just to grab the query string, it doesn't matter what we use. - if (originalUrl.startsWith('/')) { - originalUrl = `http://dogs.are.great${originalUrl}`; - } - - try { - return ( - req.query || - (typeof URL !== 'undefined' && new URL(originalUrl).search.slice(1)) || - // In Node 8, `URL` isn't in the global scope, so we have to use the built-in module from Node - (deps && deps.url && deps.url.parse(originalUrl).query) || - undefined - ); - } catch (e2) { - return undefined; - } -} - -/** - * Transforms a `Headers` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into a simple key-value dict. - * The header keys will be lower case: e.g. A "Content-Type" header will be stored as "content-type". - */ -// TODO(v8): Make this function return undefined when the extraction fails. -function winterCGHeadersToDict(winterCGHeaders) { - const headers = {}; - try { - winterCGHeaders.forEach((value, key) => { - if (typeof value === 'string') { - // We check that value is a string even though it might be redundant to make sure prototype pollution is not possible. - headers[key] = value; + function supportsColor(stream) { + if (forceColor === false) { + return 0; } - }); - } catch (e) { - debugBuild.DEBUG_BUILD && - logger.logger.warn('Sentry failed extracting headers from a request object. If you see this, please file an issue.'); - } - - return headers; -} - -/** - * Converts a `Request` object that implements the `Web Fetch API` (https://developer.mozilla.org/en-US/docs/Web/API/Headers) into the format that the `RequestData` integration understands. - */ -function winterCGRequestToRequestData(req) { - const headers = winterCGHeadersToDict(req.headers); - return { - method: req.method, - url: req.url, - headers, - }; -} - -exports.DEFAULT_USER_INCLUDES = DEFAULT_USER_INCLUDES; -exports.addRequestDataToEvent = addRequestDataToEvent; -exports.addRequestDataToTransaction = addRequestDataToTransaction; -exports.extractPathForTransaction = extractPathForTransaction; -exports.extractRequestData = extractRequestData; -exports.winterCGHeadersToDict = winterCGHeadersToDict; -exports.winterCGRequestToRequestData = winterCGRequestToRequestData; -//# sourceMappingURL=requestdata.js.map - - -/***/ }), - -/***/ 57018: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either -// -// a) moving `validSeverityLevels` to `@sentry/types`, -// b) moving the`SeverityLevel` type here, or -// c) importing `validSeverityLevels` from here into `@sentry/types`. -// -// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would -// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the -// type, reminding anyone who changes it to change this list also, will have to do. - -const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug']; - -/** - * Converts a string-based level into a member of the deprecated {@link Severity} enum. - * - * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead. - * - * @param level String representation of Severity - * @returns Severity - */ -function severityFromString(level) { - return severityLevelFromString(level) ; -} - -/** - * Converts a string-based level into a `SeverityLevel`, normalizing it along the way. - * - * @param level String representation of desired `SeverityLevel`. - * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level. - */ -function severityLevelFromString(level) { - return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ; -} - -exports.severityFromString = severityFromString; -exports.severityLevelFromString = severityLevelFromString; -exports.validSeverityLevels = validSeverityLevels; -//# sourceMappingURL=severity.js.map - - -/***/ }), - -/***/ 1464: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const nodeStackTrace = __nccwpck_require__(78592); - -const STACKTRACE_FRAME_LIMIT = 50; -// Used to sanitize webpack (error: *) wrapped stack errors -const WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/; -const STRIP_FRAME_REGEXP = /captureMessage|captureException/; - -/** - * Creates a stack parser with the supplied line parsers - * - * StackFrames are returned in the correct order for Sentry Exception - * frames and with Sentry SDK internal frames removed from the top and bottom - * - */ -function createStackParser(...parsers) { - const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]); - - return (stack, skipFirst = 0) => { - const frames = []; - const lines = stack.split('\n'); - - for (let i = skipFirst; i < lines.length; i++) { - const line = lines[i]; - // Ignore lines over 1kb as they are unlikely to be stack frames. - // Many of the regular expressions use backtracking which results in run time that increases exponentially with - // input size. Huge strings can result in hangs/Denial of Service: - // https://github.com/getsentry/sentry-javascript/issues/2286 - if (line.length > 1024) { - continue; + if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { + return 3; } - - // https://github.com/getsentry/sentry-javascript/issues/5459 - // Remove webpack (error: *) wrappers - const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line; - - // https://github.com/getsentry/sentry-javascript/issues/7813 - // Skip Error: lines - if (cleanedLine.match(/\S*Error: /)) { - continue; + if (hasFlag("color=256")) { + return 2; } - - for (const parser of sortedParsers) { - const frame = parser(cleanedLine); - - if (frame) { - frames.push(frame); - break; + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + const min = forceColor ? 1 : 0; + if (process.platform === "win32") { + const osRelease = os3.release().split("."); + if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; } + return 1; } - - if (frames.length >= STACKTRACE_FRAME_LIMIT) { - break; + if ("CI" in env) { + if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign2) => sign2 in env) || env.CI_NAME === "codeship") { + return 1; + } + return min; } + if ("TEAMCITY_VERSION" in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + if (env.COLORTERM === "truecolor") { + return 3; + } + if ("TERM_PROGRAM" in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); + switch (env.TERM_PROGRAM) { + case "iTerm.app": + return version >= 3 ? 3 : 2; + case "Apple_Terminal": + return 2; + } + } + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + if ("COLORTERM" in env) { + return 1; + } + if (env.TERM === "dumb") { + return min; + } + return min; } - - return stripSentryFramesAndReverse(frames); - }; -} - -/** - * Gets a stack parser implementation from Options.stackParser - * @see Options - * - * If options contains an array of line parsers, it is converted into a parser - */ -function stackParserFromStackParserOptions(stackParser) { - if (Array.isArray(stackParser)) { - return createStackParser(...stackParser); - } - return stackParser; -} - -/** - * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames. - * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the - * function that caused the crash is the last frame in the array. - * @hidden - */ -function stripSentryFramesAndReverse(stack) { - if (!stack.length) { - return []; - } - - const localStack = Array.from(stack); - - // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call) - if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) { - localStack.pop(); - } - - // Reversing in the middle of the procedure allows us to just pop the values off the stack - localStack.reverse(); - - // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call) - if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) { - localStack.pop(); - - // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')` - // is produced within the hub itself, making it: - // - // Sentry.captureException() - // getCurrentHub().captureException() - // - // instead of just the top `Sentry` call itself. - // This forces us to possibly strip an additional frame in the exact same was as above. - if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) { - localStack.pop(); - } - } - - return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({ - ...frame, - filename: frame.filename || localStack[localStack.length - 1].filename, - function: frame.function || '?', - })); -} - -const defaultFunctionName = ''; - -/** - * Safely extract function name from itself - */ -function getFunctionName(fn) { - try { - if (!fn || typeof fn !== 'function') { - return defaultFunctionName; + function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); } - return fn.name || defaultFunctionName; - } catch (e) { - // Just accessing custom props in some Selenium environments - // can cause a "Permission denied" exception (see raven-js#495). - return defaultFunctionName; - } -} - -/** - * Node.js stack line parser - * - * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`. - * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain - */ -function nodeStackLineParser(getModule) { - return [90, nodeStackTrace.node(getModule)]; -} - -exports.filenameIsInApp = nodeStackTrace.filenameIsInApp; -exports.createStackParser = createStackParser; -exports.getFunctionName = getFunctionName; -exports.nodeStackLineParser = nodeStackLineParser; -exports.stackParserFromStackParserOptions = stackParserFromStackParserOptions; -exports.stripSentryFramesAndReverse = stripSentryFramesAndReverse; -//# sourceMappingURL=stacktrace.js.map - - -/***/ }), - -/***/ 1308: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); - -/** - * Truncates given string to the maximum characters count - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string (0 = unlimited) - * @returns string Encoded - */ -function truncate(str, max = 0) { - if (typeof str !== 'string' || max === 0) { - return str; - } - return str.length <= max ? str : `${str.slice(0, max)}...`; -} - -/** - * This is basically just `trim_line` from - * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 - * - * @param str An object that contains serializable values - * @param max Maximum number of characters in truncated string - * @returns string Encoded - */ -function snipLine(line, colno) { - let newLine = line; - const lineLength = newLine.length; - if (lineLength <= 150) { - return newLine; - } - if (colno > lineLength) { - // eslint-disable-next-line no-param-reassign - colno = lineLength; - } - - let start = Math.max(colno - 60, 0); - if (start < 5) { - start = 0; - } - - let end = Math.min(start + 140, lineLength); - if (end > lineLength - 5) { - end = lineLength; - } - if (end === lineLength) { - start = Math.max(end - 140, 0); - } - - newLine = newLine.slice(start, end); - if (start > 0) { - newLine = `'{snip} ${newLine}`; - } - if (end < lineLength) { - newLine += ' {snip}'; - } - - return newLine; -} - -/** - * Join values in array - * @param input array of values to be joined together - * @param delimiter string to be placed in-between values - * @returns Joined values - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function safeJoin(input, delimiter) { - if (!Array.isArray(input)) { - return ''; + module2.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) + }; } +}); - const output = []; - // eslint-disable-next-line @typescript-eslint/prefer-for-of - for (let i = 0; i < input.length; i++) { - const value = input[i]; +// node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js +var require_node2 = __commonJS({ + "node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js"(exports2, module2) { + var tty = __require("tty"); + var util2 = __require("util"); + exports2.init = init2; + exports2.log = log2; + exports2.formatArgs = formatArgs; + exports2.save = save; + exports2.load = load2; + exports2.useColors = useColors; + exports2.destroy = util2.deprecate( + () => { + }, + "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`." + ); + exports2.colors = [6, 2, 3, 4, 5, 1]; try { - // This is a hack to fix a Vue3-specific bug that causes an infinite loop of - // console warnings. This happens when a Vue template is rendered with - // an undeclared variable, which we try to stringify, ultimately causing - // Vue to issue another warning which repeats indefinitely. - // see: https://github.com/getsentry/sentry-javascript/pull/8981 - if (is.isVueViewModel(value)) { - output.push('[VueViewModel]'); + const supportsColor = require_supports_color(); + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports2.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } + } catch (error) { + } + exports2.inspectOpts = Object.keys(process.env).filter((key) => { + return /^debug_/i.test(key); + }).reduce((obj, key) => { + const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === "null") { + val = null; } else { - output.push(String(value)); + val = Number(val); + } + obj[prop] = val; + return obj; + }, {}); + function useColors() { + return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd); + } + function formatArgs(args) { + const { namespace: name, useColors: useColors2 } = this; + if (useColors2) { + const c = this.color; + const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c); + const prefix = ` ${colorCode};1m${name} \x1B[0m`; + args[0] = prefix + args[0].split("\n").join("\n" + prefix); + args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m"); + } else { + args[0] = getDate() + name + " " + args[0]; } - } catch (e) { - output.push('[value cannot be serialized]'); } - } - - return output.join(delimiter); -} - -/** - * Checks if the given value matches a regex or string - * - * @param value The string to test - * @param pattern Either a regex or a string against which `value` will be matched - * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match - * `pattern` if it contains `pattern`. Only applies to string-type patterns. - */ -function isMatchingPattern( - value, - pattern, - requireExactStringMatch = false, -) { - if (!is.isString(value)) { - return false; - } - - if (is.isRegExp(pattern)) { - return pattern.test(value); - } - if (is.isString(pattern)) { - return requireExactStringMatch ? value === pattern : value.includes(pattern); - } - - return false; -} - -/** - * Test the given string against an array of strings and regexes. By default, string matching is done on a - * substring-inclusion basis rather than a strict equality basis - * - * @param testString The string to test - * @param patterns The patterns against which to test the string - * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to - * count. If false, `testString` will match a string pattern if it contains that pattern. - * @returns - */ -function stringMatchesSomePattern( - testString, - patterns = [], - requireExactStringMatch = false, -) { - return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch)); -} - -exports.isMatchingPattern = isMatchingPattern; -exports.safeJoin = safeJoin; -exports.snipLine = snipLine; -exports.stringMatchesSomePattern = stringMatchesSomePattern; -exports.truncate = truncate; -//# sourceMappingURL=string.js.map - - -/***/ }), - -/***/ 31789: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const debugBuild = __nccwpck_require__(35523); -const logger = __nccwpck_require__(6661); -const worldwide = __nccwpck_require__(77822); - -// eslint-disable-next-line deprecation/deprecation -const WINDOW = worldwide.getGlobalObject(); - -/** - * Tells whether current environment supports ErrorEvent objects - * {@link supportsErrorEvent}. - * - * @returns Answer to the given question. - */ -function supportsErrorEvent() { - try { - new ErrorEvent(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports DOMError objects - * {@link supportsDOMError}. - * - * @returns Answer to the given question. - */ -function supportsDOMError() { - try { - // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError': - // 1 argument required, but only 0 present. - // @ts-expect-error It really needs 1 argument, not 0. - new DOMError(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports DOMException objects - * {@link supportsDOMException}. - * - * @returns Answer to the given question. - */ -function supportsDOMException() { - try { - new DOMException(''); - return true; - } catch (e) { - return false; - } -} - -/** - * Tells whether current environment supports Fetch API - * {@link supportsFetch}. - * - * @returns Answer to the given question. - */ -function supportsFetch() { - if (!('fetch' in WINDOW)) { - return false; - } - - try { - new Headers(); - new Request('http://www.example.com'); - new Response(); - return true; - } catch (e) { - return false; - } -} -/** - * isNativeFetch checks if the given function is a native implementation of fetch() - */ -// eslint-disable-next-line @typescript-eslint/ban-types -function isNativeFetch(func) { - return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); -} - -/** - * Tells whether current environment supports Fetch API natively - * {@link supportsNativeFetch}. - * - * @returns true if `window.fetch` is natively implemented, false otherwise - */ -function supportsNativeFetch() { - if (typeof EdgeRuntime === 'string') { - return true; - } - - if (!supportsFetch()) { - return false; - } - - // Fast path to avoid DOM I/O - // eslint-disable-next-line @typescript-eslint/unbound-method - if (isNativeFetch(WINDOW.fetch)) { - return true; - } - - // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension) - // so create a "pure" iframe to see if that has native fetch - let result = false; - const doc = WINDOW.document; - // eslint-disable-next-line deprecation/deprecation - if (doc && typeof (doc.createElement ) === 'function') { - try { - const sandbox = doc.createElement('iframe'); - sandbox.hidden = true; - doc.head.appendChild(sandbox); - if (sandbox.contentWindow && sandbox.contentWindow.fetch) { - // eslint-disable-next-line @typescript-eslint/unbound-method - result = isNativeFetch(sandbox.contentWindow.fetch); + function getDate() { + if (exports2.inspectOpts.hideDate) { + return ""; } - doc.head.removeChild(sandbox); - } catch (err) { - debugBuild.DEBUG_BUILD && - logger.logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err); + return (/* @__PURE__ */ new Date()).toISOString() + " "; } + function log2(...args) { + return process.stderr.write(util2.formatWithOptions(exports2.inspectOpts, ...args) + "\n"); + } + function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + delete process.env.DEBUG; + } + } + function load2() { + return process.env.DEBUG; + } + function init2(debug3) { + debug3.inspectOpts = {}; + const keys = Object.keys(exports2.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + } + } + module2.exports = require_common()(exports2); + var { formatters } = module2.exports; + formatters.o = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts).split("\n").map((str2) => str2.trim()).join(" "); + }; + formatters.O = function(v) { + this.inspectOpts.colors = this.useColors; + return util2.inspect(v, this.inspectOpts); + }; } +}); - return result; -} - -/** - * Tells whether current environment supports ReportingObserver API - * {@link supportsReportingObserver}. - * - * @returns Answer to the given question. - */ -function supportsReportingObserver() { - return 'ReportingObserver' in WINDOW; -} - -/** - * Tells whether current environment supports Referrer Policy API - * {@link supportsReferrerPolicy}. - * - * @returns Answer to the given question. - */ -function supportsReferrerPolicy() { - // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default' - // (see https://caniuse.com/#feat=referrer-policy), - // it doesn't. And it throws an exception instead of ignoring this parameter... - // REF: https://github.com/getsentry/raven-js/issues/1233 - - if (!supportsFetch()) { - return false; - } - - try { - new Request('_', { - referrerPolicy: 'origin' , - }); - return true; - } catch (e) { - return false; +// node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js +var require_src = __commonJS({ + "node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js"(exports2, module2) { + if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { + module2.exports = require_browser(); + } else { + module2.exports = require_node2(); + } } -} - -exports.isNativeFetch = isNativeFetch; -exports.supportsDOMError = supportsDOMError; -exports.supportsDOMException = supportsDOMException; -exports.supportsErrorEvent = supportsErrorEvent; -exports.supportsFetch = supportsFetch; -exports.supportsNativeFetch = supportsNativeFetch; -exports.supportsReferrerPolicy = supportsReferrerPolicy; -exports.supportsReportingObserver = supportsReportingObserver; -//# sourceMappingURL=supports.js.map - - -/***/ }), - -/***/ 14669: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const is = __nccwpck_require__(25789); - -/* eslint-disable @typescript-eslint/explicit-function-return-type */ - -/** SyncPromise internal states */ -var States; (function (States) { - /** Pending */ - const PENDING = 0; States[States["PENDING"] = PENDING] = "PENDING"; - /** Resolved / OK */ - const RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED"; - /** Rejected / Error */ - const REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED"; -})(States || (States = {})); - -// Overloads so we can call resolvedSyncPromise without arguments and generic argument - -/** - * Creates a resolved sync promise. - * - * @param value the value to resolve the promise with - * @returns the resolved sync promise - */ -function resolvedSyncPromise(value) { - return new SyncPromise(resolve => { - resolve(value); - }); -} - -/** - * Creates a rejected sync promise. - * - * @param value the value to reject the promise with - * @returns the rejected sync promise - */ -function rejectedSyncPromise(reason) { - return new SyncPromise((_, reject) => { - reject(reason); - }); -} - -/** - * Thenable class that behaves like a Promise and follows it's interface - * but is not async internally - */ -class SyncPromise { - - constructor( - executor, - ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this); - this._state = States.PENDING; - this._handlers = []; +}); - try { - executor(this._resolve, this._reject); - } catch (e) { - this._reject(e); - } - } - - /** JSDoc */ - then( - onfulfilled, - onrejected, - ) { - return new SyncPromise((resolve, reject) => { - this._handlers.push([ - false, - result => { - if (!onfulfilled) { - // TODO: ¯\_(ツ)_/¯ - // TODO: FIXME - resolve(result ); - } else { - try { - resolve(onfulfilled(result)); - } catch (e) { - reject(e); - } +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/debug.js +var require_debug = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/debug.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.genRedactedString = exports2.getStringValue = exports2.MAX_ARGUMENT_LENGTH = void 0; + var debug_1 = require_src(); + var MAX_ARGUMENT_LENGTH = 200; + exports2.MAX_ARGUMENT_LENGTH = MAX_ARGUMENT_LENGTH; + var NAMESPACE_PREFIX = "ioredis"; + function getStringValue(v) { + if (v === null) { + return; + } + switch (typeof v) { + case "boolean": + return; + case "number": + return; + case "object": + if (Buffer.isBuffer(v)) { + return v.toString("hex"); } - }, - reason => { - if (!onrejected) { - reject(reason); - } else { - try { - resolve(onrejected(reason)); - } catch (e) { - reject(e); - } + if (Array.isArray(v)) { + return v.join(","); + } + try { + return JSON.stringify(v); + } catch (e) { + return; + } + case "string": + return v; + } + } + exports2.getStringValue = getStringValue; + function genRedactedString(str2, maxLen) { + const { length } = str2; + return length <= maxLen ? str2 : str2.slice(0, maxLen) + ' ... '; + } + exports2.genRedactedString = genRedactedString; + function genDebugFunction(namespace) { + const fn = (0, debug_1.default)(`${NAMESPACE_PREFIX}:${namespace}`); + function wrappedDebug(...args) { + if (!fn.enabled) { + return; + } + for (let i = 1; i < args.length; i++) { + const str2 = getStringValue(args[i]); + if (typeof str2 === "string" && str2.length > MAX_ARGUMENT_LENGTH) { + args[i] = genRedactedString(str2, MAX_ARGUMENT_LENGTH); + } + } + return fn.apply(null, args); + } + Object.defineProperties(wrappedDebug, { + namespace: { + get() { + return fn.namespace; } }, - ]); - this._executeHandlers(); - }); - } - - /** JSDoc */ - catch( - onrejected, - ) { - return this.then(val => val, onrejected); - } - - /** JSDoc */ - finally(onfinally) { - return new SyncPromise((resolve, reject) => { - let val; - let isRejected; - - return this.then( - value => { - isRejected = false; - val = value; - if (onfinally) { - onfinally(); + enabled: { + get() { + return fn.enabled; } }, - reason => { - isRejected = true; - val = reason; - if (onfinally) { - onfinally(); + destroy: { + get() { + return fn.destroy; } }, - ).then(() => { - if (isRejected) { - reject(val); - return; + log: { + get() { + return fn.log; + }, + set(l) { + fn.log = l; + } } - - resolve(val ); }); - }); + return wrappedDebug; + } + exports2.default = genDebugFunction; } +}); - /** JSDoc */ - __init() {this._resolve = (value) => { - this._setResult(States.RESOLVED, value); - };} - - /** JSDoc */ - __init2() {this._reject = (reason) => { - this._setResult(States.REJECTED, reason); - };} - - /** JSDoc */ - __init3() {this._setResult = (state, value) => { - if (this._state !== States.PENDING) { - return; - } - - if (is.isThenable(value)) { - void (value ).then(this._resolve, this._reject); - return; - } - - this._state = state; - this._value = value; - - this._executeHandlers(); - };} +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/constants/TLSProfiles.js +var require_TLSProfiles = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/constants/TLSProfiles.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var RedisCloudCA = `-----BEGIN CERTIFICATE----- +MIIDTzCCAjegAwIBAgIJAKSVp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nVwLI23b8t0TozyCWw7q8h +-----END CERTIFICATE----- - /** JSDoc */ - __init4() {this._executeHandlers = () => { - if (this._state === States.PENDING) { - return; - } +-----BEGIN CERTIFICATE----- +MIIEjzCCA3egAwIBAgIQe55B/ALCKJDZtdNT8kD6hTANBgkqhkiG9w0BAQsFADBM +MSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xv +YmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0yMjAxMjYxMjAwMDBaFw0y +NTAxMjYwMDAwMDBaMFgxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWdu +IG52LXNhMS4wLAYDVQQDEyVHbG9iYWxTaWduIEF0bGFzIFIzIE9WIFRMUyBDQSAy +MDIyIFEyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmGmg1LW9b7Lf +8zDD83yBDTEkt+FOxKJZqF4veWc5KZsQj9HfnUS2e5nj/E+JImlGPsQuoiosLuXD +BVBNAMcUFa11buFMGMeEMwiTmCXoXRrXQmH0qjpOfKgYc5gHG3BsRGaRrf7VR4eg +ofNMG9wUBw4/g/TT7+bQJdA4NfE7Y4d5gEryZiBGB/swaX6Jp/8MF4TgUmOWmalK +dZCKyb4sPGQFRTtElk67F7vU+wdGcrcOx1tDcIB0ncjLPMnaFicagl+daWGsKqTh +counQb6QJtYHa91KvCfKWocMxQ7OIbB5UARLPmC4CJ1/f8YFm35ebfzAeULYdGXu +jE9CLor0OwIDAQABo4IBXzCCAVswDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQG +CCsGAQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQW +BBSH5Zq7a7B/t95GfJWkDBpA8HHqdjAfBgNVHSMEGDAWgBSP8Et/qC5FJK5NUPpj +move4t0bvDB7BggrBgEFBQcBAQRvMG0wLgYIKwYBBQUHMAGGImh0dHA6Ly9vY3Nw +Mi5nbG9iYWxzaWduLmNvbS9yb290cjMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9zZWN1 +cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L3Jvb3QtcjMuY3J0MDYGA1UdHwQvMC0w +K6ApoCeGJWh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5jb20vcm9vdC1yMy5jcmwwIQYD +VR0gBBowGDAIBgZngQwBAgIwDAYKKwYBBAGgMgoBAjANBgkqhkiG9w0BAQsFAAOC +AQEAKRic9/f+nmhQU/wz04APZLjgG5OgsuUOyUEZjKVhNGDwxGTvKhyXGGAMW2B/ +3bRi+aElpXwoxu3pL6fkElbX3B0BeS5LoDtxkyiVEBMZ8m+sXbocwlPyxrPbX6mY +0rVIvnuUeBH8X0L5IwfpNVvKnBIilTbcebfHyXkPezGwz7E1yhUULjJFm2bt0SdX +y+4X/WeiiYIv+fTVgZZgl+/2MKIsu/qdBJc3f3TvJ8nz+Eax1zgZmww+RSQWeOj3 +15Iw6Z5FX+NwzY/Ab+9PosR5UosSeq+9HhtaxZttXG1nVh+avYPGYddWmiMT90J5 +ZgKnO/Fx2hBgTxhOTMYaD312kg== +-----END CERTIFICATE----- - const cachedHandlers = this._handlers.slice(); - this._handlers = []; +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G +A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp +Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4 +MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG +A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8 +RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT +gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm +KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd +QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ +XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw +DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o +LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU +RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp +jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK +6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX +mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs +Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH +WD9f +-----END CERTIFICATE-----`; + var TLSProfiles = { + RedisCloudFixed: { ca: RedisCloudCA }, + RedisCloudFlexible: { ca: RedisCloudCA } + }; + exports2.default = TLSProfiles; + } +}); - cachedHandlers.forEach(handler => { - if (handler[0]) { - return; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/index.js +var require_utils3 = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noop = exports2.defaults = exports2.Debug = exports2.zipMap = exports2.CONNECTION_CLOSED_ERROR_MSG = exports2.shuffle = exports2.sample = exports2.resolveTLSProfile = exports2.parseURL = exports2.optimizeErrorStack = exports2.toArg = exports2.convertMapToArray = exports2.convertObjectToArray = exports2.timeout = exports2.packObject = exports2.isInt = exports2.wrapMultiResult = exports2.convertBufferToString = void 0; + var url_1 = __require("url"); + var lodash_1 = require_lodash3(); + Object.defineProperty(exports2, "defaults", { enumerable: true, get: function() { + return lodash_1.defaults; + } }); + Object.defineProperty(exports2, "noop", { enumerable: true, get: function() { + return lodash_1.noop; + } }); + var debug_1 = require_debug(); + exports2.Debug = debug_1.default; + var TLSProfiles_1 = require_TLSProfiles(); + function convertBufferToString(value, encoding) { + if (value instanceof Buffer) { + return value.toString(encoding); } - - if (this._state === States.RESOLVED) { - // eslint-disable-next-line @typescript-eslint/no-floating-promises - handler[1](this._value ); + if (Array.isArray(value)) { + const length = value.length; + const res = Array(length); + for (let i = 0; i < length; ++i) { + res[i] = value[i] instanceof Buffer && encoding === "utf8" ? value[i].toString() : convertBufferToString(value[i], encoding); + } + return res; } - - if (this._state === States.REJECTED) { - handler[2](this._value); + return value; + } + exports2.convertBufferToString = convertBufferToString; + function wrapMultiResult(arr) { + if (!arr) { + return null; } - - handler[0] = true; - }); - };} -} - -exports.SyncPromise = SyncPromise; -exports.rejectedSyncPromise = rejectedSyncPromise; -exports.resolvedSyncPromise = resolvedSyncPromise; -//# sourceMappingURL=syncpromise.js.map - - -/***/ }), - -/***/ 22948: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const worldwide = __nccwpck_require__(77822); - -const ONE_SECOND_IN_MS = 1000; - -/** - * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance} - * for accessing a high-resolution monotonic clock. - */ - -/** - * Returns a timestamp in seconds since the UNIX epoch using the Date API. - * - * TODO(v8): Return type should be rounded. - */ -function dateTimestampInSeconds() { - return Date.now() / ONE_SECOND_IN_MS; -} - -/** - * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not - * support the API. - * - * Wrapping the native API works around differences in behavior from different browsers. - */ -function createUnixTimestampInSecondsFunc() { - const { performance } = worldwide.GLOBAL_OBJ ; - if (!performance || !performance.now) { - return dateTimestampInSeconds; - } - - // Some browser and environments don't have a timeOrigin, so we fallback to - // using Date.now() to compute the starting time. - const approxStartingTimeOrigin = Date.now() - performance.now(); - const timeOrigin = performance.timeOrigin == undefined ? approxStartingTimeOrigin : performance.timeOrigin; - - // performance.now() is a monotonic clock, which means it starts at 0 when the process begins. To get the current - // wall clock time (actual UNIX timestamp), we need to add the starting time origin and the current time elapsed. - // - // TODO: This does not account for the case where the monotonic clock that powers performance.now() drifts from the - // wall clock time, which causes the returned timestamp to be inaccurate. We should investigate how to detect and - // correct for this. - // See: https://github.com/getsentry/sentry-javascript/issues/2590 - // See: https://github.com/mdn/content/issues/4713 - // See: https://dev.to/noamr/when-a-millisecond-is-not-a-millisecond-3h6 - return () => { - return (timeOrigin + performance.now()) / ONE_SECOND_IN_MS; - }; -} - -/** - * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the - * availability of the Performance API. - * - * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is - * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The - * skew can grow to arbitrary amounts like days, weeks or months. - * See https://github.com/getsentry/sentry-javascript/issues/2590. - */ -const timestampInSeconds = createUnixTimestampInSecondsFunc(); - -/** - * Re-exported with an old name for backwards-compatibility. - * TODO (v8): Remove this - * - * @deprecated Use `timestampInSeconds` instead. - */ -const timestampWithMs = timestampInSeconds; - -/** - * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only. - */ -exports._browserPerformanceTimeOriginMode = void 0; - -/** - * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the - * performance API is available. - */ -const browserPerformanceTimeOrigin = (() => { - // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or - // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin - // data as reliable if they are within a reasonable threshold of the current time. - - const { performance } = worldwide.GLOBAL_OBJ ; - if (!performance || !performance.now) { - exports._browserPerformanceTimeOriginMode = 'none'; - return undefined; - } - - const threshold = 3600 * 1000; - const performanceNow = performance.now(); - const dateNow = Date.now(); - - // if timeOrigin isn't available set delta to threshold so it isn't used - const timeOriginDelta = performance.timeOrigin - ? Math.abs(performance.timeOrigin + performanceNow - dateNow) - : threshold; - const timeOriginIsReliable = timeOriginDelta < threshold; - - // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin - // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing. - // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always - // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the - // Date API. - // eslint-disable-next-line deprecation/deprecation - const navigationStart = performance.timing && performance.timing.navigationStart; - const hasNavigationStart = typeof navigationStart === 'number'; - // if navigationStart isn't available set delta to threshold so it isn't used - const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold; - const navigationStartIsReliable = navigationStartDelta < threshold; - - if (timeOriginIsReliable || navigationStartIsReliable) { - // Use the more reliable time origin - if (timeOriginDelta <= navigationStartDelta) { - exports._browserPerformanceTimeOriginMode = 'timeOrigin'; - return performance.timeOrigin; - } else { - exports._browserPerformanceTimeOriginMode = 'navigationStart'; - return navigationStart; + const result = []; + const length = arr.length; + for (let i = 0; i < length; ++i) { + const item = arr[i]; + if (item instanceof Error) { + result.push([item]); + } else { + result.push([null, item]); + } + } + return result; } - } - - // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date. - exports._browserPerformanceTimeOriginMode = 'dateNow'; - return dateNow; -})(); - -exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin; -exports.dateTimestampInSeconds = dateTimestampInSeconds; -exports.timestampInSeconds = timestampInSeconds; -exports.timestampWithMs = timestampWithMs; -//# sourceMappingURL=time.js.map - - -/***/ }), - -/***/ 71267: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const baggage = __nccwpck_require__(25915); -const misc = __nccwpck_require__(56073); - -// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- RegExp is used for readability here -const TRACEPARENT_REGEXP = new RegExp( - '^[ \\t]*' + // whitespace - '([0-9a-f]{32})?' + // trace_id - '-?([0-9a-f]{16})?' + // span_id - '-?([01])?' + // sampled - '[ \\t]*$', // whitespace -); - -/** - * Extract transaction context data from a `sentry-trace` header. - * - * @param traceparent Traceparent string - * - * @returns Object containing data from the header, or undefined if traceparent string is malformed - */ -function extractTraceparentData(traceparent) { - if (!traceparent) { - return undefined; - } - - const matches = traceparent.match(TRACEPARENT_REGEXP); - if (!matches) { - return undefined; - } - - let parentSampled; - if (matches[3] === '1') { - parentSampled = true; - } else if (matches[3] === '0') { - parentSampled = false; - } - - return { - traceId: matches[1], - parentSampled, - parentSpanId: matches[2], - }; -} - -/** - * Create tracing context from incoming headers. - * - * @deprecated Use `propagationContextFromHeaders` instead. - */ -// TODO(v8): Remove this function -function tracingContextFromHeaders( - sentryTrace, - baggage$1, -) - - { - const traceparentData = extractTraceparentData(sentryTrace); - const dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1); - - const { traceId, parentSpanId, parentSampled } = traceparentData || {}; - - if (!traceparentData) { - return { - traceparentData, - dynamicSamplingContext: undefined, - propagationContext: { - traceId: traceId || misc.uuid4(), - spanId: misc.uuid4().substring(16), - }, - }; - } else { - return { - traceparentData, - dynamicSamplingContext: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it - propagationContext: { - traceId: traceId || misc.uuid4(), - parentSpanId: parentSpanId || misc.uuid4().substring(16), - spanId: misc.uuid4().substring(16), - sampled: parentSampled, - dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it - }, - }; - } -} - -/** - * Create a propagation context from incoming headers. - */ -function propagationContextFromHeaders( - sentryTrace, - baggage$1, -) { - const traceparentData = extractTraceparentData(sentryTrace); - const dynamicSamplingContext = baggage.baggageHeaderToDynamicSamplingContext(baggage$1); - - const { traceId, parentSpanId, parentSampled } = traceparentData || {}; - - if (!traceparentData) { - return { - traceId: traceId || misc.uuid4(), - spanId: misc.uuid4().substring(16), - }; - } else { - return { - traceId: traceId || misc.uuid4(), - parentSpanId: parentSpanId || misc.uuid4().substring(16), - spanId: misc.uuid4().substring(16), - sampled: parentSampled, - dsc: dynamicSamplingContext || {}, // If we have traceparent data but no DSC it means we are not head of trace and we must freeze it - }; - } -} - -/** - * Create sentry-trace header from span context values. - */ -function generateSentryTraceHeader( - traceId = misc.uuid4(), - spanId = misc.uuid4().substring(16), - sampled, -) { - let sampledString = ''; - if (sampled !== undefined) { - sampledString = sampled ? '-1' : '-0'; - } - return `${traceId}-${spanId}${sampledString}`; -} - -exports.TRACEPARENT_REGEXP = TRACEPARENT_REGEXP; -exports.extractTraceparentData = extractTraceparentData; -exports.generateSentryTraceHeader = generateSentryTraceHeader; -exports.propagationContextFromHeaders = propagationContextFromHeaders; -exports.tracingContextFromHeaders = tracingContextFromHeaders; -//# sourceMappingURL=tracing.js.map - - -/***/ }), - -/***/ 24076: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Parses string form of URL into an object - * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B - * // intentionally using regex and not href parsing trick because React Native and other - * // environments where DOM might not be available - * @returns parsed URL object - */ -function parseUrl(url) { - if (!url) { - return {}; - } - - const match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); - - if (!match) { - return {}; - } - - // coerce to undefined values to empty string so we don't get 'undefined' - const query = match[6] || ''; - const fragment = match[8] || ''; - return { - host: match[4], - path: match[5], - protocol: match[2], - search: query, - hash: fragment, - relative: match[5] + query + fragment, // everything minus origin - }; -} - -/** - * Strip the query string and fragment off of a given URL or path (if present) - * - * @param urlPath Full URL or path, including possible query string and/or fragment - * @returns URL or path without query string or fragment - */ -function stripUrlQueryAndFragment(urlPath) { - // eslint-disable-next-line no-useless-escape - return urlPath.split(/[\?#]/, 1)[0]; -} - -/** - * Returns number of URL segments of a passed string URL. - */ -function getNumberOfUrlSegments(url) { - // split at '/' or at '\/' to split regex urls correctly - return url.split(/\\?\//).filter(s => s.length > 0 && s !== ',').length; -} - -/** - * Takes a URL object and returns a sanitized string which is safe to use as span description - * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data - */ -function getSanitizedUrlString(url) { - const { protocol, host, path } = url; - - const filteredHost = - (host && - host - // Always filter out authority - .replace(/^.*@/, '[filtered]:[filtered]@') - // Don't show standard :80 (http) and :443 (https) ports to reduce the noise - // TODO: Use new URL global if it exists - .replace(/(:80)$/, '') - .replace(/(:443)$/, '')) || - ''; - - return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`; -} - -exports.getNumberOfUrlSegments = getNumberOfUrlSegments; -exports.getSanitizedUrlString = getSanitizedUrlString; -exports.parseUrl = parseUrl; -exports.stripUrlQueryAndFragment = stripUrlQueryAndFragment; -//# sourceMappingURL=url.js.map - - -/***/ }), - -/***/ 95337: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Recursively traverses an object to update an existing nested key. - * Note: The provided key path must include existing properties, - * the function will not create objects while traversing. - * - * @param obj An object to update - * @param value The value to update the nested key with - * @param keyPath The path to the key to update ex. fizz.buzz.foo - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setNestedKey(obj, keyPath, value) { - // Ex. foo.bar.zoop will extract foo and bar.zoop - const match = keyPath.match(/([a-z_]+)\.(.*)/i); - // The match will be null when there's no more recursing to do, i.e., when we've reached the right level of the object - if (match === null) { - obj[keyPath] = value; - } else { - // `match[1]` is the initial segment of the path, and `match[2]` is the remainder of the path - const innerObj = obj[match[1]]; - setNestedKey(innerObj, match[2], value); - } -} - -/** - * Enforces inclusion of a given integration with specified options in an integration array originally determined by the - * user, by either including the given default instance or by patching an existing user instance with the given options. - * - * Ideally this would happen when integrations are set up, but there isn't currently a mechanism there for merging - * options from a default integration instance with those from a user-provided instance of the same integration, only - * for allowing the user to override a default instance entirely. (TODO: Fix that.) - * - * @param defaultIntegrationInstance An instance of the integration with the correct options already set - * @param userIntegrations Integrations defined by the user. - * @param forcedOptions Options with which to patch an existing user-derived instance on the integration. - * @returns A final integrations array. - * - * @deprecated This will be removed in v8. - */ -function addOrUpdateIntegration( - defaultIntegrationInstance, - userIntegrations, - forcedOptions = {}, -) { - return ( - Array.isArray(userIntegrations) - ? addOrUpdateIntegrationInArray(defaultIntegrationInstance, userIntegrations, forcedOptions) - : addOrUpdateIntegrationInFunction( - defaultIntegrationInstance, - // Somehow TS can't figure out that not being an array makes this necessarily a function - userIntegrations , - forcedOptions, - ) - ) ; -} - -function addOrUpdateIntegrationInArray( - defaultIntegrationInstance, - userIntegrations, - forcedOptions, -) { - const userInstance = userIntegrations.find(integration => integration.name === defaultIntegrationInstance.name); - - if (userInstance) { - for (const [keyPath, value] of Object.entries(forcedOptions)) { - setNestedKey(userInstance, keyPath, value); + exports2.wrapMultiResult = wrapMultiResult; + function isInt(value) { + const x = parseFloat(value); + return !isNaN(value) && (x | 0) === x; } - - return userIntegrations; - } - - return [...userIntegrations, defaultIntegrationInstance]; -} - -function addOrUpdateIntegrationInFunction( - defaultIntegrationInstance, - userIntegrationsFunc, - forcedOptions, -) { - const wrapper = defaultIntegrations => { - const userFinalIntegrations = userIntegrationsFunc(defaultIntegrations); - - // There are instances where we want the user to be able to prevent an integration from appearing at all, which they - // would do by providing a function which filters out the integration in question. If that's happened in one of - // those cases, don't add our default back in. - if (defaultIntegrationInstance.allowExclusionByUser) { - const userFinalInstance = userFinalIntegrations.find( - integration => integration.name === defaultIntegrationInstance.name, - ); - if (!userFinalInstance) { - return userFinalIntegrations; + exports2.isInt = isInt; + function packObject(array) { + const result = {}; + const length = array.length; + for (let i = 1; i < length; i += 2) { + result[array[i - 1]] = array[i]; } + return result; } - - return addOrUpdateIntegrationInArray(defaultIntegrationInstance, userFinalIntegrations, forcedOptions); - }; - - return wrapper; -} - -exports.addOrUpdateIntegration = addOrUpdateIntegration; -//# sourceMappingURL=userIntegrations.js.map - - -/***/ }), - -/***/ 68138: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// Based on https://github.com/sindresorhus/escape-string-regexp but with modifications to: -// a) reduce the size by skipping the runtime type - checking -// b) ensure it gets down - compiled for old versions of Node(the published package only supports Node 12+). -// -// MIT License -// -// Copyright (c) Sindre Sorhus (https://sindresorhus.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -// documentation files(the "Software"), to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and -// to permit persons to whom the Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or substantial portions of -// the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -// IN THE SOFTWARE. - -/** - * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to - * `new RegExp()`. - * - * @param regexString The string to escape - * @returns An version of the string with all special regex characters escaped - */ -function escapeStringForRegex(regexString) { - // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems - // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20. - return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'); -} - -exports.escapeStringForRegex = escapeStringForRegex; -//# sourceMappingURL=escapeStringForRegex.js.map - - -/***/ }), - -/***/ 21012: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const worldwide = __nccwpck_require__(77822); - -// Based on https://github.com/angular/angular.js/pull/13945/files - -// eslint-disable-next-line deprecation/deprecation -const WINDOW = worldwide.getGlobalObject(); - -/** - * Tells whether current environment supports History API - * {@link supportsHistory}. - * - * @returns Answer to the given question. - */ -function supportsHistory() { - // NOTE: in Chrome App environment, touching history.pushState, *even inside - // a try/catch block*, will cause Chrome to output an error to console.error - // borrowed from: https://github.com/angular/angular.js/pull/13945/files - /* eslint-disable @typescript-eslint/no-unsafe-member-access */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const chromeVar = (WINDOW ).chrome; - const isChromePackagedApp = chromeVar && chromeVar.app && chromeVar.app.runtime; - /* eslint-enable @typescript-eslint/no-unsafe-member-access */ - const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState; - - return !isChromePackagedApp && hasHistoryApi; -} - -exports.supportsHistory = supportsHistory; -//# sourceMappingURL=supportsHistory.js.map - - -/***/ }), - -/***/ 77822: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** Internal global with common properties and Sentry extensions */ - -// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification -// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js -// core-js has the following licence: -// -// Copyright (c) 2014-2022 Denis Pushkarev -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -/** Returns 'obj' if it's the global object, otherwise returns undefined */ -function isGlobalObj(obj) { - return obj && obj.Math == Math ? obj : undefined; -} - -/** Get's the global object for the current JavaScript runtime */ -const GLOBAL_OBJ = - (typeof globalThis == 'object' && isGlobalObj(globalThis)) || - // eslint-disable-next-line no-restricted-globals - (typeof window == 'object' && isGlobalObj(window)) || - (typeof self == 'object' && isGlobalObj(self)) || - (typeof global == 'object' && isGlobalObj(global)) || - (function () { - return this; - })() || - {}; - -/** - * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8 - */ -function getGlobalObject() { - return GLOBAL_OBJ ; -} - -/** - * Returns a global singleton contained in the global `__SENTRY__` object. - * - * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory - * function and added to the `__SENTRY__` object. - * - * @param name name of the global singleton on __SENTRY__ - * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__` - * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value - * @returns the singleton - */ -function getGlobalSingleton(name, creator, obj) { - const gbl = (obj || GLOBAL_OBJ) ; - const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {}); - const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator()); - return singleton; -} - -exports.GLOBAL_OBJ = GLOBAL_OBJ; -exports.getGlobalObject = getGlobalObject; -exports.getGlobalSingleton = getGlobalSingleton; -//# sourceMappingURL=worldwide.js.map - - -/***/ }), - -/***/ 1535: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const types = __nccwpck_require__(3297); - -/** - * Add a listener that cancels and finishes a transaction when the global - * document is hidden. - */ -function registerBackgroundTabDetection() { - if (types.WINDOW.document) { - types.WINDOW.document.addEventListener('visibilitychange', () => { - // eslint-disable-next-line deprecation/deprecation - const activeTransaction = core.getActiveTransaction() ; - if (types.WINDOW.document.hidden && activeTransaction) { - const statusType = 'cancelled'; - - const { op, status } = core.spanToJSON(activeTransaction); - - debugBuild.DEBUG_BUILD && - utils.logger.log(`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${op}`); - // We should not set status if it is already set, this prevent important statuses like - // error or data loss from being overwritten on transaction. - if (!status) { - activeTransaction.setStatus(statusType); + exports2.packObject = packObject; + function timeout(callback, timeout2) { + let timer = null; + const run2 = function() { + if (timer) { + clearTimeout(timer); + timer = null; + callback.apply(this, arguments); } - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - activeTransaction.setTag('visibilitychange', 'document.hidden'); - activeTransaction.end(); - } - }); - } else { - debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Could not set up background tab detection due to lack of global document'); - } -} - -exports.registerBackgroundTabDetection = registerBackgroundTabDetection; -//# sourceMappingURL=backgroundtab.js.map - - -/***/ }), - -/***/ 22464: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const backgroundtab = __nccwpck_require__(1535); -const instrument = __nccwpck_require__(59011); -const index = __nccwpck_require__(62302); -const request = __nccwpck_require__(21673); -const types = __nccwpck_require__(3297); - -const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing'; - -/** Options for Browser Tracing integration */ - -const DEFAULT_BROWSER_TRACING_OPTIONS = { - ...core.TRACING_DEFAULTS, - instrumentNavigation: true, - instrumentPageLoad: true, - markBackgroundSpan: true, - enableLongTask: true, - enableInp: false, - interactionsSampleRate: 1, - _experiments: {}, - ...request.defaultRequestInstrumentationOptions, -}; - -/** - * The Browser Tracing integration automatically instruments browser pageload/navigation - * actions as transactions, and captures requests, metrics and errors as spans. - * - * The integration can be configured with a variety of options, and can be extended to use - * any routing library. This integration uses {@see IdleTransaction} to create transactions. - * - * We explicitly export the proper type here, as this has to be extended in some cases. - */ -const browserTracingIntegration = ((_options = {}) => { - const _hasSetTracePropagationTargets = debugBuild.DEBUG_BUILD - ? !!( - // eslint-disable-next-line deprecation/deprecation - (_options.tracePropagationTargets || _options.tracingOrigins) - ) - : false; - - core.addTracingExtensions(); - - // TODO (v8): remove this block after tracingOrigins is removed - // Set tracePropagationTargets to tracingOrigins if specified by the user - // In case both are specified, tracePropagationTargets takes precedence - // eslint-disable-next-line deprecation/deprecation - if (!_options.tracePropagationTargets && _options.tracingOrigins) { - // eslint-disable-next-line deprecation/deprecation - _options.tracePropagationTargets = _options.tracingOrigins; - } - - const options = { - ...DEFAULT_BROWSER_TRACING_OPTIONS, - ..._options, - }; - - const _collectWebVitals = index.startTrackingWebVitals(); - - /** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */ - const interactionIdToRouteNameMapping = {}; - if (options.enableInp) { - index.startTrackingINP(interactionIdToRouteNameMapping, options.interactionsSampleRate); - } - - if (options.enableLongTask) { - index.startTrackingLongTasks(); - } - if (options._experiments.enableInteractions) { - index.startTrackingInteractions(); - } - - const latestRoute - - = { - name: undefined, - context: undefined, - }; - - /** Create routing idle transaction. */ - function _createRouteTransaction(context) { - // eslint-disable-next-line deprecation/deprecation - const hub = core.getCurrentHub(); - - const { beforeStartSpan, idleTimeout, finalTimeout, heartbeatInterval } = options; - - const isPageloadTransaction = context.op === 'pageload'; - - let expandedContext; - if (isPageloadTransaction) { - const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : ''; - const baggage = isPageloadTransaction ? getMetaContent('baggage') : undefined; - const { traceId, dsc, parentSpanId, sampled } = utils.propagationContextFromHeaders(sentryTrace, baggage); - expandedContext = { - traceId, - parentSpanId, - parentSampled: sampled, - ...context, - metadata: { - // eslint-disable-next-line deprecation/deprecation - ...context.metadata, - dynamicSamplingContext: dsc, - }, - trimEnd: true, - }; - } else { - expandedContext = { - trimEnd: true, - ...context, }; + timer = setTimeout(run2, timeout2, new Error("timeout")); + return run2; + } + exports2.timeout = timeout; + function convertObjectToArray(obj) { + const result = []; + const keys = Object.keys(obj); + for (let i = 0, l = keys.length; i < l; i++) { + result.push(keys[i], obj[keys[i]]); + } + return result; } - - const finalContext = beforeStartSpan ? beforeStartSpan(expandedContext) : expandedContext; - - // If `beforeStartSpan` set a custom name, record that fact - // eslint-disable-next-line deprecation/deprecation - finalContext.metadata = - finalContext.name !== expandedContext.name - ? // eslint-disable-next-line deprecation/deprecation - { ...finalContext.metadata, source: 'custom' } - : // eslint-disable-next-line deprecation/deprecation - finalContext.metadata; - - latestRoute.name = finalContext.name; - latestRoute.context = finalContext; - - if (finalContext.sampled === false) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`); + exports2.convertObjectToArray = convertObjectToArray; + function convertMapToArray(map2) { + const result = []; + let pos = 0; + map2.forEach(function(value, key) { + result[pos] = key; + result[pos + 1] = value; + pos += 2; + }); + return result; } - - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`); - - const { location } = types.WINDOW; - - const idleTransaction = core.startIdleTransaction( - hub, - finalContext, - idleTimeout, - finalTimeout, - true, - { location }, // for use in the tracesSampler - heartbeatInterval, - isPageloadTransaction, // should wait for finish signal if it's a pageload transaction - ); - - if (isPageloadTransaction && types.WINDOW.document) { - types.WINDOW.document.addEventListener('readystatechange', () => { - if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) { - idleTransaction.sendAutoFinishSignal(); + exports2.convertMapToArray = convertMapToArray; + function toArg(arg) { + if (arg === null || typeof arg === "undefined") { + return ""; + } + return String(arg); + } + exports2.toArg = toArg; + function optimizeErrorStack(error, friendlyStack, filterPath) { + const stacks = friendlyStack.split("\n"); + let lines = ""; + let i; + for (i = 1; i < stacks.length; ++i) { + if (stacks[i].indexOf(filterPath) === -1) { + break; } - }); - - if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) { - idleTransaction.sendAutoFinishSignal(); } + for (let j = i; j < stacks.length; ++j) { + lines += "\n" + stacks[j]; + } + if (error.stack) { + const pos = error.stack.indexOf("\n"); + error.stack = error.stack.slice(0, pos) + lines; + } + return error; } - - idleTransaction.registerBeforeFinishCallback(transaction => { - _collectWebVitals(); - index.addPerformanceEntries(transaction); - }); - - return idleTransaction ; - } - - return { - name: BROWSER_TRACING_INTEGRATION_ID, - // eslint-disable-next-line @typescript-eslint/no-empty-function - setupOnce: () => {}, - afterAllSetup(client) { - const clientOptions = client.getOptions(); - - const { markBackgroundSpan, traceFetch, traceXHR, shouldCreateSpanForRequest, enableHTTPTimings, _experiments } = - options; - - const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets; - // There are three ways to configure tracePropagationTargets: - // 1. via top level client option `tracePropagationTargets` - // 2. via BrowserTracing option `tracePropagationTargets` - // 3. via BrowserTracing option `tracingOrigins` (deprecated) - // - // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to - // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated). - // This is done as it minimizes bundle size (we don't have to have undefined checks). - // - // If both 1 and either one of 2 or 3 are set (from above), we log out a warning. - // eslint-disable-next-line deprecation/deprecation - const tracePropagationTargets = clientOptionsTracePropagationTargets || options.tracePropagationTargets; - if (debugBuild.DEBUG_BUILD && _hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) { - utils.logger.warn( - '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.', - ); + exports2.optimizeErrorStack = optimizeErrorStack; + function parseURL(url) { + if (isInt(url)) { + return { port: url }; } - - let activeSpan; - let startingUrl = types.WINDOW.location && types.WINDOW.location.href; - - if (client.on) { - client.on('startNavigationSpan', (context) => { - if (activeSpan) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${core.spanToJSON(activeSpan).op}`); - // If there's an open transaction on the scope, we need to finish it before creating an new one. - activeSpan.end(); - } - activeSpan = _createRouteTransaction({ - op: 'navigation', - ...context, - }); - }); - - client.on('startPageLoadSpan', (context) => { - if (activeSpan) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${core.spanToJSON(activeSpan).op}`); - // If there's an open transaction on the scope, we need to finish it before creating an new one. - activeSpan.end(); - } - activeSpan = _createRouteTransaction({ - op: 'pageload', - ...context, - }); - }); + let parsed = (0, url_1.parse)(url, true, true); + if (!parsed.slashes && url[0] !== "/") { + url = "//" + url; + parsed = (0, url_1.parse)(url, true, true); } - - if (options.instrumentPageLoad && client.emit && types.WINDOW.location) { - const context = { - name: types.WINDOW.location.pathname, - // pageload should always start at timeOrigin (and needs to be in s, not ms) - startTimestamp: utils.browserPerformanceTimeOrigin ? utils.browserPerformanceTimeOrigin / 1000 : undefined, - origin: 'auto.pageload.browser', - attributes: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url', - }, - }; - startBrowserTracingPageLoadSpan(client, context); - } - - if (options.instrumentNavigation && client.emit && types.WINDOW.location) { - utils.addHistoryInstrumentationHandler(({ to, from }) => { - /** - * This early return is there to account for some cases where a navigation transaction starts right after - * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't - * create an uneccessary navigation transaction. - * - * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also - * only be caused in certain development environments where the usage of a hot module reloader is causing - * errors. - */ - if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) { - startingUrl = undefined; - return; - } - - if (from !== to) { - startingUrl = undefined; - const context = { - name: types.WINDOW.location.pathname, - origin: 'auto.navigation.browser', - attributes: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url', - }, - }; - - startBrowserTracingNavigationSpan(client, context); + const options2 = parsed.query || {}; + const result = {}; + if (parsed.auth) { + const index = parsed.auth.indexOf(":"); + result.username = index === -1 ? parsed.auth : parsed.auth.slice(0, index); + result.password = index === -1 ? "" : parsed.auth.slice(index + 1); + } + if (parsed.pathname) { + if (parsed.protocol === "redis:" || parsed.protocol === "rediss:") { + if (parsed.pathname.length > 1) { + result.db = parsed.pathname.slice(1); } - }); + } else { + result.path = parsed.pathname; + } } - - if (markBackgroundSpan) { - backgroundtab.registerBackgroundTabDetection(); + if (parsed.host) { + result.host = parsed.hostname; } - - if (_experiments.enableInteractions) { - registerInteractionListener(options, latestRoute); + if (parsed.port) { + result.port = parsed.port; } - - if (options.enableInp) { - registerInpInteractionListener(interactionIdToRouteNameMapping, latestRoute); + if (typeof options2.family === "string") { + const intFamily = Number.parseInt(options2.family, 10); + if (!Number.isNaN(intFamily)) { + result.family = intFamily; + } } - - request.instrumentOutgoingRequests({ - traceFetch, - traceXHR, - tracePropagationTargets, - shouldCreateSpanForRequest, - enableHTTPTimings, - }); - }, - // TODO v8: Remove this again - // This is private API that we use to fix converted BrowserTracing integrations in Next.js & SvelteKit - options, - }; -}) ; - -/** - * Manually start a page load span. - * This will only do something if the BrowserTracing integration has been setup. - */ -function startBrowserTracingPageLoadSpan(client, spanOptions) { - if (!client.emit) { - return; - } - - client.emit('startPageLoadSpan', spanOptions); - - const span = core.getActiveSpan(); - const op = span && core.spanToJSON(span).op; - return op === 'pageload' ? span : undefined; -} - -/** - * Manually start a navigation span. - * This will only do something if the BrowserTracing integration has been setup. - */ -function startBrowserTracingNavigationSpan(client, spanOptions) { - if (!client.emit) { - return; - } - - client.emit('startNavigationSpan', spanOptions); - - const span = core.getActiveSpan(); - const op = span && core.spanToJSON(span).op; - return op === 'navigation' ? span : undefined; -} - -/** Returns the value of a meta tag */ -function getMetaContent(metaName) { - // Can't specify generic to `getDomElement` because tracing can be used - // in a variety of environments, have to disable `no-unsafe-member-access` - // as a result. - const metaTag = utils.getDomElement(`meta[name=${metaName}]`); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return metaTag ? metaTag.getAttribute('content') : undefined; -} - -/** Start listener for interaction transactions */ -function registerInteractionListener( - options, - latestRoute - -, -) { - let inflightInteractionTransaction; - const registerInteractionTransaction = () => { - const { idleTimeout, finalTimeout, heartbeatInterval } = options; - const op = 'ui.action.click'; - - // eslint-disable-next-line deprecation/deprecation - const currentTransaction = core.getActiveTransaction(); - if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`, - ); - return undefined; + (0, lodash_1.defaults)(result, options2); + return result; } - - if (inflightInteractionTransaction) { - inflightInteractionTransaction.setFinishReason('interactionInterrupted'); - inflightInteractionTransaction.end(); - inflightInteractionTransaction = undefined; + exports2.parseURL = parseURL; + function resolveTLSProfile(options2) { + let tls2 = options2 === null || options2 === void 0 ? void 0 : options2.tls; + if (typeof tls2 === "string") + tls2 = { profile: tls2 }; + const profile = TLSProfiles_1.default[tls2 === null || tls2 === void 0 ? void 0 : tls2.profile]; + if (profile) { + tls2 = Object.assign({}, profile, tls2); + delete tls2.profile; + options2 = Object.assign({}, options2, { tls: tls2 }); + } + return options2; + } + exports2.resolveTLSProfile = resolveTLSProfile; + function sample(array, from = 0) { + const length = array.length; + if (from >= length) { + return null; + } + return array[from + Math.floor(Math.random() * (length - from))]; } - - if (!latestRoute.name) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`); - return undefined; + exports2.sample = sample; + function shuffle(array) { + let counter = array.length; + while (counter > 0) { + const index = Math.floor(Math.random() * counter); + counter--; + [array[counter], array[index]] = [array[index], array[counter]]; + } + return array; } - - const { location } = types.WINDOW; - - const context = { - name: latestRoute.name, - op, - trimEnd: true, - data: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: latestRoute.context ? getSource(latestRoute.context) : 'url', - }, - }; - - inflightInteractionTransaction = core.startIdleTransaction( - // eslint-disable-next-line deprecation/deprecation - core.getCurrentHub(), - context, - idleTimeout, - finalTimeout, - true, - { location }, // for use in the tracesSampler - heartbeatInterval, - ); - }; - - ['click'].forEach(type => { - if (types.WINDOW.document) { - addEventListener(type, registerInteractionTransaction, { once: false, capture: true }); + exports2.shuffle = shuffle; + exports2.CONNECTION_CLOSED_ERROR_MSG = "Connection is closed."; + function zipMap(keys, values) { + const map2 = /* @__PURE__ */ new Map(); + keys.forEach((key, index) => { + map2.set(key, values[index]); + }); + return map2; } - }); -} - -function isPerformanceEventTiming(entry) { - return 'duration' in entry; -} - -/** We store up to 10 interaction candidates max to cap memory usage. This is the same cap as getINP from web-vitals */ -const MAX_INTERACTIONS = 10; - -/** Creates a listener on interaction entries, and maps interactionIds to the origin path of the interaction */ -function registerInpInteractionListener( - interactionIdToRouteNameMapping, - latestRoute + exports2.zipMap = zipMap; + } +}); -, -) { - const handleEntries = ({ entries }) => { - const client = core.getClient(); - // We need to get the replay, user, and activeTransaction from the current scope - // so that we can associate replay id, profile id, and a user display to the span - const replay = - client !== undefined && client.getIntegrationByName !== undefined - ? (client.getIntegrationByName('Replay') ) - : undefined; - const replayId = replay !== undefined ? replay.getReplayId() : undefined; - // eslint-disable-next-line deprecation/deprecation - const activeTransaction = core.getActiveTransaction(); - const currentScope = core.getCurrentScope(); - const user = currentScope !== undefined ? currentScope.getUser() : undefined; - entries.forEach(entry => { - if (isPerformanceEventTiming(entry)) { - const interactionId = entry.interactionId; - if (interactionId === undefined) { - return; - } - const existingInteraction = interactionIdToRouteNameMapping[interactionId]; - const duration = entry.duration; - const startTime = entry.startTime; - const keys = Object.keys(interactionIdToRouteNameMapping); - const minInteractionId = - keys.length > 0 - ? keys.reduce((a, b) => { - return interactionIdToRouteNameMapping[a].duration < interactionIdToRouteNameMapping[b].duration - ? a - : b; - }) - : undefined; - // For a first input event to be considered, we must check that an interaction event does not already exist with the same duration and start time. - // This is also checked in the web-vitals library. - if (entry.entryType === 'first-input') { - const matchingEntry = keys - .map(key => interactionIdToRouteNameMapping[key]) - .some(interaction => { - return interaction.duration === duration && interaction.startTime === startTime; - }); - if (matchingEntry) { - return; - } - } - // Interactions with an id of 0 and are not first-input are not valid. - if (!interactionId) { - return; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Command.js +var require_Command = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Command.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var calculateSlot = require_lib3(); + var standard_as_callback_1 = require_built2(); + var utils_1 = require_utils3(); + var Command = class _Command { + /** + * Creates an instance of Command. + * @param name Command name + * @param args An array of command arguments + * @param options + * @param callback The callback that handles the response. + * If omit, the response will be handled via Promise + */ + constructor(name, args = [], options2 = {}, callback) { + this.name = name; + this.inTransaction = false; + this.isResolved = false; + this.transformed = false; + this.replyEncoding = options2.replyEncoding; + this.errorStack = options2.errorStack; + this.args = args.flat(); + this.callback = callback; + this.initPromise(); + if (options2.keyPrefix) { + const isBufferKeyPrefix = options2.keyPrefix instanceof Buffer; + let keyPrefixBuffer = isBufferKeyPrefix ? options2.keyPrefix : null; + this._iterateKeys((key) => { + if (key instanceof Buffer) { + if (keyPrefixBuffer === null) { + keyPrefixBuffer = Buffer.from(options2.keyPrefix); + } + return Buffer.concat([keyPrefixBuffer, key]); + } else if (isBufferKeyPrefix) { + return Buffer.concat([options2.keyPrefix, Buffer.from(String(key))]); + } + return options2.keyPrefix + key; + }); } - // If the interaction already exists, we want to use the duration of the longest entry, since that is what the INP metric uses. - if (existingInteraction) { - existingInteraction.duration = Math.max(existingInteraction.duration, duration); - } else if ( - keys.length < MAX_INTERACTIONS || - minInteractionId === undefined || - duration > interactionIdToRouteNameMapping[minInteractionId].duration - ) { - // If the interaction does not exist, we want to add it to the mapping if there is space, or if the duration is longer than the shortest entry. - const routeName = latestRoute.name; - const parentContext = latestRoute.context; - if (routeName && parentContext) { - if (minInteractionId && Object.keys(interactionIdToRouteNameMapping).length >= MAX_INTERACTIONS) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete interactionIdToRouteNameMapping[minInteractionId]; - } - interactionIdToRouteNameMapping[interactionId] = { - routeName, - duration, - parentContext, - user, - activeTransaction, - replayId, - startTime, + if (options2.readOnly) { + this.isReadOnly = true; + } + } + /** + * Check whether the command has the flag + */ + static checkFlag(flagName, commandName) { + return !!this.getFlagMap()[flagName][commandName]; + } + static setArgumentTransformer(name, func) { + this._transformer.argument[name] = func; + } + static setReplyTransformer(name, func) { + this._transformer.reply[name] = func; + } + static getFlagMap() { + if (!this.flagMap) { + this.flagMap = Object.keys(_Command.FLAGS).reduce((map2, flagName) => { + map2[flagName] = {}; + _Command.FLAGS[flagName].forEach((commandName) => { + map2[flagName][commandName] = true; + }); + return map2; + }, {}); + } + return this.flagMap; + } + getSlot() { + if (typeof this.slot === "undefined") { + const key = this.getKeys()[0]; + this.slot = key == null ? null : calculateSlot(key); + } + return this.slot; + } + getKeys() { + return this._iterateKeys(); + } + /** + * Convert command to writable buffer or string + */ + toWritable(_socket) { + let result; + const commandStr = "*" + (this.args.length + 1) + "\r\n$" + Buffer.byteLength(this.name) + "\r\n" + this.name + "\r\n"; + if (this.bufferMode) { + const buffers = new MixedBuffers(); + buffers.push(commandStr); + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (arg instanceof Buffer) { + if (arg.length === 0) { + buffers.push("$0\r\n\r\n"); + } else { + buffers.push("$" + arg.length + "\r\n"); + buffers.push(arg); + buffers.push("\r\n"); + } + } else { + buffers.push("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); + } + } + result = buffers.toBuffer(); + } else { + result = commandStr; + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + result += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; + } + } + return result; + } + stringifyArguments() { + for (let i = 0; i < this.args.length; ++i) { + const arg = this.args[i]; + if (typeof arg === "string") { + } else if (arg instanceof Buffer) { + this.bufferMode = true; + } else { + this.args[i] = (0, utils_1.toArg)(arg); + } + } + } + /** + * Convert buffer/buffer[] to string/string[], + * and apply reply transformer. + */ + transformReply(result) { + if (this.replyEncoding) { + result = (0, utils_1.convertBufferToString)(result, this.replyEncoding); + } + const transformer = _Command._transformer.reply[this.name]; + if (transformer) { + result = transformer(result); + } + return result; + } + /** + * Set the wait time before terminating the attempt to execute a command + * and generating an error. + */ + setTimeout(ms) { + if (!this._commandTimeoutTimer) { + this._commandTimeoutTimer = setTimeout(() => { + if (!this.isResolved) { + this.reject(new Error("Command timed out")); + } + }, ms); + } + } + initPromise() { + const promise = new Promise((resolve4, reject) => { + if (!this.transformed) { + this.transformed = true; + const transformer = _Command._transformer.argument[this.name]; + if (transformer) { + this.args = transformer(this.args); + } + this.stringifyArguments(); + } + this.resolve = this._convertValue(resolve4); + if (this.errorStack) { + this.reject = (err) => { + reject((0, utils_1.optimizeErrorStack)(err, this.errorStack.stack, __dirname)); }; + } else { + this.reject = reject; + } + }); + this.promise = (0, standard_as_callback_1.default)(promise, this.callback); + } + /** + * Iterate through the command arguments that are considered keys. + */ + _iterateKeys(transform = (key) => key) { + if (typeof this.keys === "undefined") { + this.keys = []; + if ((0, commands_1.exists)(this.name)) { + const keyIndexes = (0, commands_1.getKeyIndexes)(this.name, this.args); + for (const index of keyIndexes) { + this.args[index] = transform(this.args[index]); + this.keys.push(this.args[index]); + } + } + } + return this.keys; + } + /** + * Convert the value from buffer to the target encoding. + */ + _convertValue(resolve4) { + return (value) => { + try { + const existingTimer = this._commandTimeoutTimer; + if (existingTimer) { + clearTimeout(existingTimer); + delete this._commandTimeoutTimer; + } + resolve4(this.transformReply(value)); + this.isResolved = true; + } catch (err) { + this.reject(err); + } + return this.promise; + }; + } + }; + exports2.default = Command; + Command.FLAGS = { + VALID_IN_SUBSCRIBER_MODE: [ + "subscribe", + "psubscribe", + "unsubscribe", + "punsubscribe", + "ssubscribe", + "sunsubscribe", + "ping", + "quit" + ], + VALID_IN_MONITOR_MODE: ["monitor", "auth"], + ENTER_SUBSCRIBER_MODE: ["subscribe", "psubscribe", "ssubscribe"], + EXIT_SUBSCRIBER_MODE: ["unsubscribe", "punsubscribe", "sunsubscribe"], + WILL_DISCONNECT: ["quit"] + }; + Command._transformer = { + argument: {}, + reply: {} + }; + var msetArgumentTransformer = function(args) { + if (args.length === 1) { + if (args[0] instanceof Map) { + return (0, utils_1.convertMapToArray)(args[0]); + } + if (typeof args[0] === "object" && args[0] !== null) { + return (0, utils_1.convertObjectToArray)(args[0]); + } + } + return args; + }; + var hsetArgumentTransformer = function(args) { + if (args.length === 2) { + if (args[1] instanceof Map) { + return [args[0]].concat((0, utils_1.convertMapToArray)(args[1])); + } + if (typeof args[1] === "object" && args[1] !== null) { + return [args[0]].concat((0, utils_1.convertObjectToArray)(args[1])); + } + } + return args; + }; + Command.setArgumentTransformer("mset", msetArgumentTransformer); + Command.setArgumentTransformer("msetnx", msetArgumentTransformer); + Command.setArgumentTransformer("hset", hsetArgumentTransformer); + Command.setArgumentTransformer("hmset", hsetArgumentTransformer); + Command.setReplyTransformer("hgetall", function(result) { + if (Array.isArray(result)) { + const obj = {}; + for (let i = 0; i < result.length; i += 2) { + const key = result[i]; + const value = result[i + 1]; + if (key in obj) { + Object.defineProperty(obj, key, { + value, + configurable: true, + enumerable: true, + writable: true + }); + } else { + obj[key] = value; } } + return obj; } + return result; }); - }; - instrument.addPerformanceInstrumentationHandler('event', handleEntries); - instrument.addPerformanceInstrumentationHandler('first-input', handleEntries); -} - -function getSource(context) { - const sourceFromAttributes = context.attributes && context.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - // eslint-disable-next-line deprecation/deprecation - const sourceFromData = context.data && context.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - // eslint-disable-next-line deprecation/deprecation - const sourceFromMetadata = context.metadata && context.metadata.source; - - return sourceFromAttributes || sourceFromData || sourceFromMetadata; -} - -exports.BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID; -exports.browserTracingIntegration = browserTracingIntegration; -exports.getMetaContent = getMetaContent; -exports.startBrowserTracingNavigationSpan = startBrowserTracingNavigationSpan; -exports.startBrowserTracingPageLoadSpan = startBrowserTracingPageLoadSpan; -//# sourceMappingURL=browserTracingIntegration.js.map - - -/***/ }), - -/***/ 49520: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const backgroundtab = __nccwpck_require__(1535); -const instrument = __nccwpck_require__(59011); -const index = __nccwpck_require__(62302); -const request = __nccwpck_require__(21673); -const router = __nccwpck_require__(1279); -const types = __nccwpck_require__(3297); - -const BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing'; - -/** Options for Browser Tracing integration */ - -const DEFAULT_BROWSER_TRACING_OPTIONS = { - ...core.TRACING_DEFAULTS, - markBackgroundTransactions: true, - routingInstrumentation: router.instrumentRoutingWithDefaults, - startTransactionOnLocationChange: true, - startTransactionOnPageLoad: true, - enableLongTask: true, - enableInp: false, - interactionsSampleRate: 1, - _experiments: {}, - ...request.defaultRequestInstrumentationOptions, -}; - -/** We store up to 10 interaction candidates max to cap memory usage. This is the same cap as getINP from web-vitals */ -const MAX_INTERACTIONS = 10; - -/** - * The Browser Tracing integration automatically instruments browser pageload/navigation - * actions as transactions, and captures requests, metrics and errors as spans. - * - * The integration can be configured with a variety of options, and can be extended to use - * any routing library. This integration uses {@see IdleTransaction} to create transactions. - * - * @deprecated Use `browserTracingIntegration()` instead. - */ -class BrowserTracing { - // This class currently doesn't have a static `id` field like the other integration classes, because it prevented - // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects. - // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all - // integrations. - - /** Browser Tracing integration options */ - - /** - * @inheritDoc - */ - - // eslint-disable-next-line deprecation/deprecation - - constructor(_options) { - this.name = BROWSER_TRACING_INTEGRATION_ID; - this._hasSetTracePropagationTargets = false; - - core.addTracingExtensions(); - - if (debugBuild.DEBUG_BUILD) { - this._hasSetTracePropagationTargets = !!( - _options && - // eslint-disable-next-line deprecation/deprecation - (_options.tracePropagationTargets || _options.tracingOrigins) - ); - } - - this.options = { - ...DEFAULT_BROWSER_TRACING_OPTIONS, - ..._options, + var MixedBuffers = class { + constructor() { + this.length = 0; + this.items = []; + } + push(x) { + this.length += Buffer.byteLength(x); + this.items.push(x); + } + toBuffer() { + const result = Buffer.allocUnsafe(this.length); + let offset = 0; + for (const item of this.items) { + const length = Buffer.byteLength(item); + Buffer.isBuffer(item) ? item.copy(result, offset) : result.write(item, offset, length); + offset += length; + } + return result; + } }; + } +}); - // Special case: enableLongTask can be set in _experiments - // TODO (v8): Remove this in v8 - if (this.options._experiments.enableLongTask !== undefined) { - this.options.enableLongTask = this.options._experiments.enableLongTask; - } - - // TODO (v8): remove this block after tracingOrigins is removed - // Set tracePropagationTargets to tracingOrigins if specified by the user - // In case both are specified, tracePropagationTargets takes precedence - // eslint-disable-next-line deprecation/deprecation - if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) { - // eslint-disable-next-line deprecation/deprecation - this.options.tracePropagationTargets = _options.tracingOrigins; - } - - this._collectWebVitals = index.startTrackingWebVitals(); - /** Stores a mapping of interactionIds from PerformanceEventTimings to the origin interaction path */ - this._interactionIdToRouteNameMapping = {}; - - if (this.options.enableInp) { - index.startTrackingINP(this._interactionIdToRouteNameMapping, this.options.interactionsSampleRate); - } - if (this.options.enableLongTask) { - index.startTrackingLongTasks(); - } - if (this.options._experiments.enableInteractions) { - index.startTrackingInteractions(); - } - - this._latestRoute = { - name: undefined, - context: undefined, +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/ClusterAllFailedError.js +var require_ClusterAllFailedError = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/ClusterAllFailedError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var ClusterAllFailedError = class extends redis_errors_1.RedisError { + constructor(message, lastNodeError) { + super(message); + this.lastNodeError = lastNodeError; + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } }; + exports2.default = ClusterAllFailedError; + ClusterAllFailedError.defaultMessage = "Failed to refresh slots cache."; } +}); - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - this._getCurrentHub = getCurrentHub; - const hub = getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation - const client = hub.getClient(); - const clientOptions = client && client.getOptions(); - - const { - routingInstrumentation: instrumentRouting, - startTransactionOnLocationChange, - startTransactionOnPageLoad, - markBackgroundTransactions, - traceFetch, - traceXHR, - shouldCreateSpanForRequest, - enableHTTPTimings, - _experiments, - } = this.options; - - const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets; - // There are three ways to configure tracePropagationTargets: - // 1. via top level client option `tracePropagationTargets` - // 2. via BrowserTracing option `tracePropagationTargets` - // 3. via BrowserTracing option `tracingOrigins` (deprecated) - // - // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to - // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated). - // This is done as it minimizes bundle size (we don't have to have undefined checks). - // - // If both 1 and either one of 2 or 3 are set (from above), we log out a warning. - // eslint-disable-next-line deprecation/deprecation - const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets; - if (debugBuild.DEBUG_BUILD && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) { - utils.logger.warn( - '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.', - ); - } - - instrumentRouting( - (context) => { - const transaction = this._createRouteTransaction(context); - - this.options._experiments.onStartRouteTransaction && - this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub); - - return transaction; - }, - startTransactionOnPageLoad, - startTransactionOnLocationChange, - ); - - if (markBackgroundTransactions) { - backgroundtab.registerBackgroundTabDetection(); - } - - if (_experiments.enableInteractions) { - this._registerInteractionListener(); - } - - if (this.options.enableInp) { - this._registerInpInteractionListener(); - } - - request.instrumentOutgoingRequests({ - traceFetch, - traceXHR, - tracePropagationTargets, - shouldCreateSpanForRequest, - enableHTTPTimings, - }); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/ScanStream.js +var require_ScanStream = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/ScanStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var stream_1 = __require("stream"); + var ScanStream = class extends stream_1.Readable { + constructor(opt) { + super(opt); + this.opt = opt; + this._redisCursor = "0"; + this._redisDrained = false; + } + _read() { + if (this._redisDrained) { + this.push(null); + return; + } + const args = [this._redisCursor]; + if (this.opt.key) { + args.unshift(this.opt.key); + } + if (this.opt.match) { + args.push("MATCH", this.opt.match); + } + if (this.opt.type) { + args.push("TYPE", this.opt.type); + } + if (this.opt.count) { + args.push("COUNT", String(this.opt.count)); + } + this.opt.redis[this.opt.command](args, (err, res) => { + if (err) { + this.emit("error", err); + return; + } + this._redisCursor = res[0] instanceof Buffer ? res[0].toString() : res[0]; + if (this._redisCursor === "0") { + this._redisDrained = true; + } + this.push(res[1]); + }); + } + close() { + this._redisDrained = true; + } + }; + exports2.default = ScanStream; } +}); - /** Create routing idle transaction. */ - _createRouteTransaction(context) { - if (!this._getCurrentHub) { - debugBuild.DEBUG_BUILD && - utils.logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`); - return undefined; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/autoPipelining.js +var require_autoPipelining = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/autoPipelining.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.executeWithAutoPipelining = exports2.getFirstValueInFlattenedArray = exports2.shouldUseAutoPipelining = exports2.notAllowedAutoPipelineCommands = exports2.kCallbacks = exports2.kExec = void 0; + var lodash_1 = require_lodash3(); + var calculateSlot = require_lib3(); + var standard_as_callback_1 = require_built2(); + exports2.kExec = Symbol("exec"); + exports2.kCallbacks = Symbol("callbacks"); + exports2.notAllowedAutoPipelineCommands = [ + "auth", + "info", + "script", + "quit", + "cluster", + "pipeline", + "multi", + "subscribe", + "psubscribe", + "unsubscribe", + "unpsubscribe", + "select" + ]; + function executeAutoPipeline(client, slotKey) { + if (client._runningAutoPipelines.has(slotKey)) { + return; + } + if (!client._autoPipelines.has(slotKey)) { + return; + } + client._runningAutoPipelines.add(slotKey); + const pipeline = client._autoPipelines.get(slotKey); + client._autoPipelines.delete(slotKey); + const callbacks = pipeline[exports2.kCallbacks]; + pipeline[exports2.kCallbacks] = null; + pipeline.exec(function(err, results) { + client._runningAutoPipelines.delete(slotKey); + if (err) { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], err); + } + } else { + for (let i = 0; i < callbacks.length; i++) { + process.nextTick(callbacks[i], ...results[i]); + } + } + if (client._autoPipelines.has(slotKey)) { + executeAutoPipeline(client, slotKey); + } + }); } - - const hub = this._getCurrentHub(); - - const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options; - - const isPageloadTransaction = context.op === 'pageload'; - - let expandedContext; - if (isPageloadTransaction) { - const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : ''; - const baggage = isPageloadTransaction ? getMetaContent('baggage') : undefined; - const { traceId, dsc, parentSpanId, sampled } = utils.propagationContextFromHeaders(sentryTrace, baggage); - expandedContext = { - traceId, - parentSpanId, - parentSampled: sampled, - ...context, - metadata: { - // eslint-disable-next-line deprecation/deprecation - ...context.metadata, - dynamicSamplingContext: dsc, - }, - trimEnd: true, - }; - } else { - expandedContext = { - trimEnd: true, - ...context, - }; + function shouldUseAutoPipelining(client, functionName, commandName) { + return functionName && client.options.enableAutoPipelining && !client.isPipeline && !exports2.notAllowedAutoPipelineCommands.includes(commandName) && !client.options.autoPipeliningIgnoredCommands.includes(commandName); } - - const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext; - - // For backwards compatibility reasons, beforeNavigate can return undefined to "drop" the transaction (prevent it - // from being sent to Sentry). - const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext; - - // If `beforeNavigate` set a custom name, record that fact - // eslint-disable-next-line deprecation/deprecation - finalContext.metadata = - finalContext.name !== expandedContext.name - ? // eslint-disable-next-line deprecation/deprecation - { ...finalContext.metadata, source: 'custom' } - : // eslint-disable-next-line deprecation/deprecation - finalContext.metadata; - - this._latestRoute.name = finalContext.name; - this._latestRoute.context = finalContext; - - // eslint-disable-next-line deprecation/deprecation - if (finalContext.sampled === false) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`); + exports2.shouldUseAutoPipelining = shouldUseAutoPipelining; + function getFirstValueInFlattenedArray(args) { + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + if (typeof arg === "string") { + return arg; + } else if (Array.isArray(arg) || (0, lodash_1.isArguments)(arg)) { + if (arg.length === 0) { + continue; + } + return arg[0]; + } + const flattened = [arg].flat(); + if (flattened.length > 0) { + return flattened[0]; + } + } + return void 0; } - - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`); - - const { location } = types.WINDOW; - - const idleTransaction = core.startIdleTransaction( - hub, - finalContext, - idleTimeout, - finalTimeout, - true, - { location }, // for use in the tracesSampler - heartbeatInterval, - isPageloadTransaction, // should wait for finish signal if it's a pageload transaction - ); - - if (isPageloadTransaction) { - if (types.WINDOW.document) { - types.WINDOW.document.addEventListener('readystatechange', () => { - if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) { - idleTransaction.sendAutoFinishSignal(); + exports2.getFirstValueInFlattenedArray = getFirstValueInFlattenedArray; + function executeWithAutoPipelining(client, functionName, commandName, args, callback) { + if (client.isCluster && !client.slots.length) { + if (client.status === "wait") + client.connect().catch(lodash_1.noop); + return (0, standard_as_callback_1.default)(new Promise(function(resolve4, reject) { + client.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + executeWithAutoPipelining(client, functionName, commandName, args, null).then(resolve4, reject); + }); + }), callback); + } + const prefix = client.options.keyPrefix || ""; + const slotKey = client.isCluster ? client.slots[calculateSlot(`${prefix}${getFirstValueInFlattenedArray(args)}`)].join(",") : "main"; + if (!client._autoPipelines.has(slotKey)) { + const pipeline2 = client.pipeline(); + pipeline2[exports2.kExec] = false; + pipeline2[exports2.kCallbacks] = []; + client._autoPipelines.set(slotKey, pipeline2); + } + const pipeline = client._autoPipelines.get(slotKey); + if (!pipeline[exports2.kExec]) { + pipeline[exports2.kExec] = true; + setImmediate(executeAutoPipeline, client, slotKey); + } + const autoPipelinePromise = new Promise(function(resolve4, reject) { + pipeline[exports2.kCallbacks].push(function(err, value) { + if (err) { + reject(err); + return; } + resolve4(value); }); - - if (['interactive', 'complete'].includes(types.WINDOW.document.readyState)) { - idleTransaction.sendAutoFinishSignal(); + if (functionName === "call") { + args.unshift(commandName); } - } + pipeline[functionName](...args); + }); + return (0, standard_as_callback_1.default)(autoPipelinePromise, callback); } - - idleTransaction.registerBeforeFinishCallback(transaction => { - this._collectWebVitals(); - index.addPerformanceEntries(transaction); - }); - - return idleTransaction ; + exports2.executeWithAutoPipelining = executeWithAutoPipelining; } +}); - /** Start listener for interaction transactions */ - _registerInteractionListener() { - let inflightInteractionTransaction; - const registerInteractionTransaction = () => { - const { idleTimeout, finalTimeout, heartbeatInterval } = this.options; - const op = 'ui.action.click'; - - // eslint-disable-next-line deprecation/deprecation - const currentTransaction = core.getActiveTransaction(); - if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) { - debugBuild.DEBUG_BUILD && - utils.logger.warn( - `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`, - ); - return undefined; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Script.js +var require_Script = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Script.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var crypto_1 = __require("crypto"); + var Command_1 = require_Command(); + var standard_as_callback_1 = require_built2(); + var Script = class { + constructor(lua, numberOfKeys = null, keyPrefix = "", readOnly = false) { + this.lua = lua; + this.numberOfKeys = numberOfKeys; + this.keyPrefix = keyPrefix; + this.readOnly = readOnly; + this.sha = (0, crypto_1.createHash)("sha1").update(lua).digest("hex"); + const sha = this.sha; + const socketHasScriptLoaded = /* @__PURE__ */ new WeakSet(); + this.Command = class CustomScriptCommand extends Command_1.default { + toWritable(socket) { + const origReject = this.reject; + this.reject = (err) => { + if (err.message.indexOf("NOSCRIPT") !== -1) { + socketHasScriptLoaded.delete(socket); + } + origReject.call(this, err); + }; + if (!socketHasScriptLoaded.has(socket)) { + socketHasScriptLoaded.add(socket); + this.name = "eval"; + this.args[0] = lua; + } else if (this.name === "eval") { + this.name = "evalsha"; + this.args[0] = sha; + } + return super.toWritable(socket); + } + }; } - - if (inflightInteractionTransaction) { - inflightInteractionTransaction.setFinishReason('interactionInterrupted'); - inflightInteractionTransaction.end(); - inflightInteractionTransaction = undefined; + execute(container, args, options2, callback) { + if (typeof this.numberOfKeys === "number") { + args.unshift(this.numberOfKeys); + } + if (this.keyPrefix) { + options2.keyPrefix = this.keyPrefix; + } + if (this.readOnly) { + options2.readOnly = true; + } + const evalsha = new this.Command("evalsha", [this.sha, ...args], options2); + evalsha.promise = evalsha.promise.catch((err) => { + if (err.message.indexOf("NOSCRIPT") === -1) { + throw err; + } + const resend = new this.Command("evalsha", [this.sha, ...args], options2); + const client = container.isPipeline ? container.redis : container; + return client.sendCommand(resend); + }); + (0, standard_as_callback_1.default)(evalsha.promise, callback); + return container.sendCommand(evalsha); } + }; + exports2.default = Script; + } +}); - if (!this._getCurrentHub) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`); - return undefined; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/Commander.js +var require_Commander = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/Commander.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var autoPipelining_1 = require_autoPipelining(); + var Command_1 = require_Command(); + var Script_1 = require_Script(); + var Commander = class { + constructor() { + this.options = {}; + this.scriptsSet = {}; + this.addedBuiltinSet = /* @__PURE__ */ new Set(); } - - if (!this._latestRoute.name) { - debugBuild.DEBUG_BUILD && utils.logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`); - return undefined; + /** + * Return supported builtin commands + */ + getBuiltinCommands() { + return commands.slice(0); } - - const hub = this._getCurrentHub(); - const { location } = types.WINDOW; - - const context = { - name: this._latestRoute.name, - op, - trimEnd: true, - data: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: this._latestRoute.context - ? getSource(this._latestRoute.context) - : 'url', - }, - }; - - inflightInteractionTransaction = core.startIdleTransaction( - hub, - context, - idleTimeout, - finalTimeout, - true, - { location }, // for use in the tracesSampler - heartbeatInterval, - ); - }; - - ['click'].forEach(type => { - if (types.WINDOW.document) { - addEventListener(type, registerInteractionTransaction, { once: false, capture: true }); + /** + * Create a builtin command + */ + createBuiltinCommand(commandName) { + return { + string: generateFunction(null, commandName, "utf8"), + buffer: generateFunction(null, commandName, null) + }; + } + /** + * Create add builtin command + */ + addBuiltinCommand(commandName) { + this.addedBuiltinSet.add(commandName); + this[commandName] = generateFunction(commandName, commandName, "utf8"); + this[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); + } + /** + * Define a custom command using lua script + */ + defineCommand(name, definition) { + const script = new Script_1.default(definition.lua, definition.numberOfKeys, this.options.keyPrefix, definition.readOnly); + this.scriptsSet[name] = script; + this[name] = generateScriptingFunction(name, name, script, "utf8"); + this[name + "Buffer"] = generateScriptingFunction(name + "Buffer", name, script, null); + } + /** + * @ignore + */ + sendCommand(command, stream, node2) { + throw new Error('"sendCommand" is not implemented'); } + }; + var commands = commands_1.list.filter((command) => command !== "monitor"); + commands.push("sentinel"); + commands.forEach(function(commandName) { + Commander.prototype[commandName] = generateFunction(commandName, commandName, "utf8"); + Commander.prototype[commandName + "Buffer"] = generateFunction(commandName + "Buffer", commandName, null); }); + Commander.prototype.call = generateFunction("call", "utf8"); + Commander.prototype.callBuffer = generateFunction("callBuffer", null); + Commander.prototype.send_command = Commander.prototype.call; + function generateFunction(functionName, _commandName, _encoding) { + if (typeof _encoding === "undefined") { + _encoding = _commandName; + _commandName = null; + } + return function(...args) { + const commandName = _commandName || args.shift(); + let callback = args[args.length - 1]; + if (typeof callback === "function") { + args.pop(); + } else { + callback = void 0; + } + const options2 = { + errorStack: this.options.showFriendlyErrorStack ? new Error() : void 0, + keyPrefix: this.options.keyPrefix, + replyEncoding: _encoding + }; + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return this.sendCommand( + // @ts-expect-error + new Command_1.default(commandName, args, options2, callback) + ); + } + return (0, autoPipelining_1.executeWithAutoPipelining)( + this, + functionName, + commandName, + // @ts-expect-error + args, + callback + ); + }; + } + function generateScriptingFunction(functionName, commandName, script, encoding) { + return function(...args) { + const callback = typeof args[args.length - 1] === "function" ? args.pop() : void 0; + const options2 = { + replyEncoding: encoding + }; + if (this.options.showFriendlyErrorStack) { + options2.errorStack = new Error(); + } + if (!(0, autoPipelining_1.shouldUseAutoPipelining)(this, functionName, commandName)) { + return script.execute(this, args, options2, callback); + } + return (0, autoPipelining_1.executeWithAutoPipelining)(this, functionName, commandName, args, callback); + }; + } + exports2.default = Commander; } +}); - /** Creates a listener on interaction entries, and maps interactionIds to the origin path of the interaction */ - _registerInpInteractionListener() { - const handleEntries = ({ entries }) => { - const client = core.getClient(); - // We need to get the replay, user, and activeTransaction from the current scope - // so that we can associate replay id, profile id, and a user display to the span - const replay = - client !== undefined && client.getIntegrationByName !== undefined - ? (client.getIntegrationByName('Replay') ) - : undefined; - const replayId = replay !== undefined ? replay.getReplayId() : undefined; - // eslint-disable-next-line deprecation/deprecation - const activeTransaction = core.getActiveTransaction(); - const currentScope = core.getCurrentScope(); - const user = currentScope !== undefined ? currentScope.getUser() : undefined; - entries.forEach(entry => { - if (isPerformanceEventTiming(entry)) { - const interactionId = entry.interactionId; - if (interactionId === undefined) { - return; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Pipeline.js +var require_Pipeline = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Pipeline.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var calculateSlot = require_lib3(); + var commands_1 = require_built(); + var standard_as_callback_1 = require_built2(); + var util_1 = __require("util"); + var Command_1 = require_Command(); + var utils_1 = require_utils3(); + var Commander_1 = require_Commander(); + function generateMultiWithNodes(redis, keys) { + const slot = calculateSlot(keys[0]); + const target = redis._groupsBySlot[slot]; + for (let i = 1; i < keys.length; i++) { + if (redis._groupsBySlot[calculateSlot(keys[i])] !== target) { + return -1; + } + } + return slot; + } + var Pipeline = class extends Commander_1.default { + constructor(redis) { + super(); + this.redis = redis; + this.isPipeline = true; + this.replyPending = 0; + this._queue = []; + this._result = []; + this._transactions = 0; + this._shaToScript = {}; + this.isCluster = this.redis.constructor.name === "Cluster" || this.redis.isCluster; + this.options = redis.options; + Object.keys(redis.scriptsSet).forEach((name) => { + const script = redis.scriptsSet[name]; + this._shaToScript[script.sha] = script; + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + redis.addedBuiltinSet.forEach((name) => { + this[name] = redis[name]; + this[name + "Buffer"] = redis[name + "Buffer"]; + }); + this.promise = new Promise((resolve4, reject) => { + this.resolve = resolve4; + this.reject = reject; + }); + const _this = this; + Object.defineProperty(this, "length", { + get: function() { + return _this._queue.length; } - const existingInteraction = this._interactionIdToRouteNameMapping[interactionId]; - const duration = entry.duration; - const startTime = entry.startTime; - const keys = Object.keys(this._interactionIdToRouteNameMapping); - const minInteractionId = - keys.length > 0 - ? keys.reduce((a, b) => { - return this._interactionIdToRouteNameMapping[a].duration < - this._interactionIdToRouteNameMapping[b].duration - ? a - : b; - }) - : undefined; - // For a first input event to be considered, we must check that an interaction event does not already exist with the same duration and start time. - // This is also checked in the web-vitals library. - if (entry.entryType === 'first-input') { - const matchingEntry = keys - .map(key => this._interactionIdToRouteNameMapping[key]) - .some(interaction => { - return interaction.duration === duration && interaction.startTime === startTime; - }); - if (matchingEntry) { + }); + } + fillResult(value, position) { + if (this._queue[position].name === "exec" && Array.isArray(value[1])) { + const execLength = value[1].length; + for (let i = 0; i < execLength; i++) { + if (value[1][i] instanceof Error) { + continue; + } + const cmd = this._queue[position - (execLength - i)]; + try { + value[1][i] = cmd.transformReply(value[1][i]); + } catch (err) { + value[1][i] = err; + } + } + } + this._result[position] = value; + if (--this.replyPending) { + return; + } + if (this.isCluster) { + let retriable = true; + let commonError; + for (let i = 0; i < this._result.length; ++i) { + const error = this._result[i][0]; + const command = this._queue[i]; + if (error) { + if (command.name === "exec" && error.message === "EXECABORT Transaction discarded because of previous errors.") { + continue; + } + if (!commonError) { + commonError = { + name: error.name, + message: error.message + }; + } else if (commonError.name !== error.name || commonError.message !== error.message) { + retriable = false; + break; + } + } else if (!command.inTransaction) { + const isReadOnly = (0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "readonly"); + if (!isReadOnly) { + retriable = false; + break; + } + } + } + if (commonError && retriable) { + const _this = this; + const errv = commonError.message.split(" "); + const queue = this._queue; + let inTransaction = false; + this._queue = []; + for (let i = 0; i < queue.length; ++i) { + if (errv[0] === "ASK" && !inTransaction && queue[i].name !== "asking" && (!queue[i - 1] || queue[i - 1].name !== "asking")) { + const asking = new Command_1.default("asking"); + asking.ignore = true; + this.sendCommand(asking); + } + queue[i].initPromise(); + this.sendCommand(queue[i]); + inTransaction = queue[i].inTransaction; + } + let matched = true; + if (typeof this.leftRedirections === "undefined") { + this.leftRedirections = {}; + } + const exec = function() { + _this.exec(); + }; + const cluster = this.redis; + cluster.handleError(commonError, this.leftRedirections, { + moved: function(_slot, key) { + _this.preferKey = key; + cluster.slots[errv[1]] = [key]; + cluster._groupsBySlot[errv[1]] = cluster._groupsIds[cluster.slots[errv[1]].join(";")]; + cluster.refreshSlotsCache(); + _this.exec(); + }, + ask: function(_slot, key) { + _this.preferKey = key; + _this.exec(); + }, + tryagain: exec, + clusterDown: exec, + connectionClosed: exec, + maxRedirections: () => { + matched = false; + }, + defaults: () => { + matched = false; + } + }); + if (matched) { return; } } - // Interactions with an id of 0 and are not first-input are not valid. - if (!interactionId) { + } + let ignoredCount = 0; + for (let i = 0; i < this._queue.length - ignoredCount; ++i) { + if (this._queue[i + ignoredCount].ignore) { + ignoredCount += 1; + } + this._result[i] = this._result[i + ignoredCount]; + } + this.resolve(this._result.slice(0, this._result.length - ignoredCount)); + } + sendCommand(command) { + if (this._transactions > 0) { + command.inTransaction = true; + } + const position = this._queue.length; + command.pipelineIndex = position; + command.promise.then((result) => { + this.fillResult([null, result], position); + }).catch((error) => { + this.fillResult([error], position); + }); + this._queue.push(command); + return this; + } + addBatch(commands) { + let command, commandName, args; + for (let i = 0; i < commands.length; ++i) { + command = commands[i]; + commandName = command[0]; + args = command.slice(1); + this[commandName].apply(this, args); + } + return this; + } + }; + exports2.default = Pipeline; + var multi = Pipeline.prototype.multi; + Pipeline.prototype.multi = function() { + this._transactions += 1; + return multi.apply(this, arguments); + }; + var execBuffer = Pipeline.prototype.execBuffer; + Pipeline.prototype.execBuffer = (0, util_1.deprecate)(function() { + if (this._transactions > 0) { + this._transactions -= 1; + } + return execBuffer.apply(this, arguments); + }, "Pipeline#execBuffer: Use Pipeline#exec instead"); + Pipeline.prototype.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + if (callback && !this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + this.redis.delayUntilReady((err) => { + if (err) { + this.reject(err); return; } - // If the interaction already exists, we want to use the duration of the longest entry, since that is what the INP metric uses. - if (existingInteraction) { - existingInteraction.duration = Math.max(existingInteraction.duration, duration); - } else if ( - keys.length < MAX_INTERACTIONS || - minInteractionId === undefined || - duration > this._interactionIdToRouteNameMapping[minInteractionId].duration - ) { - // If the interaction does not exist, we want to add it to the mapping if there is space, or if the duration is longer than the shortest entry. - const routeName = this._latestRoute.name; - const parentContext = this._latestRoute.context; - if (routeName && parentContext) { - if (minInteractionId && Object.keys(this._interactionIdToRouteNameMapping).length >= MAX_INTERACTIONS) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete this._interactionIdToRouteNameMapping[minInteractionId]; + this.exec(callback); + }); + return this.promise; + } + if (this._transactions > 0) { + this._transactions -= 1; + return execBuffer.apply(this, arguments); + } + if (!this.nodeifiedPromise) { + this.nodeifiedPromise = true; + (0, standard_as_callback_1.default)(this.promise, callback); + } + if (!this._queue.length) { + this.resolve([]); + } + let pipelineSlot; + if (this.isCluster) { + const sampleKeys = []; + for (let i = 0; i < this._queue.length; i++) { + const keys = this._queue[i].getKeys(); + if (keys.length) { + sampleKeys.push(keys[0]); + } + if (keys.length && calculateSlot.generateMulti(keys) < 0) { + this.reject(new Error("All the keys in a pipeline command should belong to the same slot")); + return this.promise; + } + } + if (sampleKeys.length) { + pipelineSlot = generateMultiWithNodes(this.redis, sampleKeys); + if (pipelineSlot < 0) { + this.reject(new Error("All keys in the pipeline should belong to the same slots allocation group")); + return this.promise; + } + } else { + pipelineSlot = Math.random() * 16384 | 0; + } + } + const _this = this; + execPipeline(); + return this.promise; + function execPipeline() { + let writePending = _this.replyPending = _this._queue.length; + let node2; + if (_this.isCluster) { + node2 = { + slot: pipelineSlot, + redis: _this.redis.connectionPool.nodes.all[_this.preferKey] + }; + } + let data = ""; + let buffers; + const stream = { + isPipeline: true, + destination: _this.isCluster ? node2 : { redis: _this.redis }, + write(writable) { + if (typeof writable !== "string") { + if (!buffers) { + buffers = []; } - this._interactionIdToRouteNameMapping[interactionId] = { - routeName, - duration, - parentContext, - user, - activeTransaction, - replayId, - startTime, - }; + if (data) { + buffers.push(Buffer.from(data, "utf8")); + data = ""; + } + buffers.push(writable); + } else { + data += writable; + } + if (!--writePending) { + if (buffers) { + if (data) { + buffers.push(Buffer.from(data, "utf8")); + } + stream.destination.redis.stream.write(Buffer.concat(buffers)); + } else { + stream.destination.redis.stream.write(data); + } + writePending = _this._queue.length; + data = ""; + buffers = void 0; } } + }; + for (let i = 0; i < _this._queue.length; ++i) { + _this.redis.sendCommand(_this._queue[i], stream, node2); } - }); + return _this.promise; + } }; - instrument.addPerformanceInstrumentationHandler('event', handleEntries); - instrument.addPerformanceInstrumentationHandler('first-input', handleEntries); } -} - -/** Returns the value of a meta tag */ -function getMetaContent(metaName) { - // Can't specify generic to `getDomElement` because tracing can be used - // in a variety of environments, have to disable `no-unsafe-member-access` - // as a result. - const metaTag = utils.getDomElement(`meta[name=${metaName}]`); - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - return metaTag ? metaTag.getAttribute('content') : undefined; -} - -function getSource(context) { - const sourceFromAttributes = context.attributes && context.attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - // eslint-disable-next-line deprecation/deprecation - const sourceFromData = context.data && context.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]; - // eslint-disable-next-line deprecation/deprecation - const sourceFromMetadata = context.metadata && context.metadata.source; - - return sourceFromAttributes || sourceFromData || sourceFromMetadata; -} - -function isPerformanceEventTiming(entry) { - return 'duration' in entry; -} - -exports.BROWSER_TRACING_INTEGRATION_ID = BROWSER_TRACING_INTEGRATION_ID; -exports.BrowserTracing = BrowserTracing; -exports.getMetaContent = getMetaContent; -//# sourceMappingURL=browsertracing.js.map - +}); -/***/ }), - -/***/ 59011: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const getCLS = __nccwpck_require__(84771); -const getFID = __nccwpck_require__(69404); -const getINP = __nccwpck_require__(17462); -const getLCP = __nccwpck_require__(29956); -const observe = __nccwpck_require__(66407); -const onTTFB = __nccwpck_require__(85810); - -const handlers = {}; -const instrumented = {}; - -let _previousCls; -let _previousFid; -let _previousLcp; -let _previousTtfb; -let _previousInp; - -/** - * Add a callback that will be triggered when a CLS metric is available. - * Returns a cleanup callback which can be called to remove the instrumentation handler. - * - * Pass `stopOnCallback = true` to stop listening for CLS when the cleanup callback is called. - * This will lead to the CLS being finalized and frozen. - */ -function addClsInstrumentationHandler( - callback, - stopOnCallback = false, -) { - return addMetricObserver('cls', callback, instrumentCls, _previousCls, stopOnCallback); -} - -/** - * Add a callback that will be triggered when a LCP metric is available. - * Returns a cleanup callback which can be called to remove the instrumentation handler. - * - * Pass `stopOnCallback = true` to stop listening for LCP when the cleanup callback is called. - * This will lead to the LCP being finalized and frozen. - */ -function addLcpInstrumentationHandler( - callback, - stopOnCallback = false, -) { - return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp, stopOnCallback); -} - -/** - * Add a callback that will be triggered when a FID metric is available. - */ -function addTtfbInstrumentationHandler(callback) { - return addMetricObserver('ttfb', callback, instrumentTtfb, _previousTtfb); -} - -/** - * Add a callback that will be triggered when a FID metric is available. - * Returns a cleanup callback which can be called to remove the instrumentation handler. - */ -function addFidInstrumentationHandler(callback) { - return addMetricObserver('fid', callback, instrumentFid, _previousFid); -} - -/** - * Add a callback that will be triggered when a INP metric is available. - * Returns a cleanup callback which can be called to remove the instrumentation handler. - */ -function addInpInstrumentationHandler( - callback, -) { - return addMetricObserver('inp', callback, instrumentInp, _previousInp); -} - -/** - * Add a callback that will be triggered when a performance observer is triggered, - * and receives the entries of the observer. - * Returns a cleanup callback which can be called to remove the instrumentation handler. - */ -function addPerformanceInstrumentationHandler( - type, - callback, -) { - addHandler(type, callback); - - if (!instrumented[type]) { - instrumentPerformanceObserver(type); - instrumented[type] = true; - } - - return getCleanupCallback(type, callback); -} - -/** Trigger all handlers of a given type. */ -function triggerHandlers(type, data) { - const typeHandlers = handlers[type]; - - if (!typeHandlers || !typeHandlers.length) { - return; - } - - for (const handler of typeHandlers) { - try { - handler(data); - } catch (e) { - debugBuild.DEBUG_BUILD && - utils.logger.error( - `Error while triggering instrumentation handler.\nType: ${type}\nName: ${utils.getFunctionName(handler)}\nError:`, - e, - ); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/transaction.js +var require_transaction = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/transaction.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addTransactionSupport = void 0; + var utils_1 = require_utils3(); + var standard_as_callback_1 = require_built2(); + var Pipeline_1 = require_Pipeline(); + function addTransactionSupport(redis) { + redis.pipeline = function(commands) { + const pipeline = new Pipeline_1.default(this); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + return pipeline; + }; + const { multi } = redis; + redis.multi = function(commands, options2) { + if (typeof options2 === "undefined" && !Array.isArray(commands)) { + options2 = commands; + commands = null; + } + if (options2 && options2.pipeline === false) { + return multi.call(this); + } + const pipeline = new Pipeline_1.default(this); + pipeline.multi(); + if (Array.isArray(commands)) { + pipeline.addBatch(commands); + } + const exec2 = pipeline.exec; + pipeline.exec = function(callback) { + if (this.isCluster && !this.redis.slots.length) { + if (this.redis.status === "wait") + this.redis.connect().catch(utils_1.noop); + return (0, standard_as_callback_1.default)(new Promise((resolve4, reject) => { + this.redis.delayUntilReady((err) => { + if (err) { + reject(err); + return; + } + this.exec(pipeline).then(resolve4, reject); + }); + }), callback); + } + if (this._transactions > 0) { + exec2.call(pipeline); + } + if (this.nodeifiedPromise) { + return exec2.call(pipeline); + } + const promise = exec2.call(pipeline); + return (0, standard_as_callback_1.default)(promise.then(function(result) { + const execResult = result[result.length - 1]; + if (typeof execResult === "undefined") { + throw new Error("Pipeline cannot be used to send any commands when the `exec()` has been called on it."); + } + if (execResult[0]) { + execResult[0].previousErrors = []; + for (let i = 0; i < result.length - 1; ++i) { + if (result[i][0]) { + execResult[0].previousErrors.push(result[i][0]); + } + } + throw execResult[0]; + } + return (0, utils_1.wrapMultiResult)(execResult[1]); + }), callback); + }; + const { execBuffer } = pipeline; + pipeline.execBuffer = function(callback) { + if (this._transactions > 0) { + execBuffer.call(pipeline); + } + return pipeline.exec(callback); + }; + return pipeline; + }; + const { exec } = redis; + redis.exec = function(callback) { + return (0, standard_as_callback_1.default)(exec.call(this).then(function(results) { + if (Array.isArray(results)) { + results = (0, utils_1.wrapMultiResult)(results); + } + return results; + }), callback); + }; } + exports2.addTransactionSupport = addTransactionSupport; } -} +}); -function instrumentCls() { - return getCLS.onCLS( - metric => { - triggerHandlers('cls', { - metric, +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/applyMixin.js +var require_applyMixin = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/utils/applyMixin.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function applyMixin(derivedConstructor, mixinConstructor) { + Object.getOwnPropertyNames(mixinConstructor.prototype).forEach((name) => { + Object.defineProperty(derivedConstructor.prototype, name, Object.getOwnPropertyDescriptor(mixinConstructor.prototype, name)); }); - _previousCls = metric; - }, - { reportAllChanges: true }, - ); -} - -function instrumentFid() { - return getFID.onFID(metric => { - triggerHandlers('fid', { - metric, - }); - _previousFid = metric; - }); -} - -function instrumentLcp() { - return getLCP.onLCP(metric => { - triggerHandlers('lcp', { - metric, - }); - _previousLcp = metric; - }); -} - -function instrumentTtfb() { - return onTTFB.onTTFB(metric => { - triggerHandlers('ttfb', { - metric, - }); - _previousTtfb = metric; - }); -} - -function instrumentInp() { - return getINP.onINP(metric => { - triggerHandlers('inp', { - metric, - }); - _previousInp = metric; - }); -} - -function addMetricObserver( - type, - callback, - instrumentFn, - previousValue, - stopOnCallback = false, -) { - addHandler(type, callback); - - let stopListening; - - if (!instrumented[type]) { - stopListening = instrumentFn(); - instrumented[type] = true; - } - - if (previousValue) { - callback({ metric: previousValue }); + } + exports2.default = applyMixin; } +}); - return getCleanupCallback(type, callback, stopOnCallback ? stopListening : undefined); -} - -function instrumentPerformanceObserver(type) { - const options = {}; - - // Special per-type options we want to use - if (type === 'event') { - options.durationThreshold = 0; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ClusterOptions.js +var require_ClusterOptions = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ClusterOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_CLUSTER_OPTIONS = void 0; + var dns_1 = __require("dns"); + exports2.DEFAULT_CLUSTER_OPTIONS = { + clusterRetryStrategy: (times) => Math.min(100 + times * 2, 2e3), + enableOfflineQueue: true, + enableReadyCheck: true, + scaleReads: "master", + maxRedirections: 16, + retryDelayOnMoved: 0, + retryDelayOnFailover: 100, + retryDelayOnClusterDown: 100, + retryDelayOnTryAgain: 100, + slotsRefreshTimeout: 1e3, + useSRVRecords: false, + resolveSrv: dns_1.resolveSrv, + dnsLookup: dns_1.lookup, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [] + }; } +}); - observe.observe( - type, - entries => { - triggerHandlers(type, { entries }); - }, - options, - ); -} - -function addHandler(type, handler) { - handlers[type] = handlers[type] || []; - (handlers[type] ).push(handler); -} - -// Get a callback which can be called to remove the instrumentation handler -function getCleanupCallback( - type, - callback, - stopListening, -) { - return () => { - if (stopListening) { - stopListening(); - } - - const typeHandlers = handlers[type]; - - if (!typeHandlers) { - return; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/util.js +var require_util = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getConnectionName = exports2.weightSrvRecords = exports2.groupSrvRecords = exports2.getUniqueHostnamesFromOptions = exports2.normalizeNodeOptions = exports2.nodeKeyToRedisOptions = exports2.getNodeKey = void 0; + var utils_1 = require_utils3(); + var net_1 = __require("net"); + function getNodeKey(node2) { + node2.port = node2.port || 6379; + node2.host = node2.host || "127.0.0.1"; + return node2.host + ":" + node2.port; + } + exports2.getNodeKey = getNodeKey; + function nodeKeyToRedisOptions(nodeKey) { + const portIndex = nodeKey.lastIndexOf(":"); + if (portIndex === -1) { + throw new Error(`Invalid node key ${nodeKey}`); + } + return { + host: nodeKey.slice(0, portIndex), + port: Number(nodeKey.slice(portIndex + 1)) + }; } - - const index = typeHandlers.indexOf(callback); - if (index !== -1) { - typeHandlers.splice(index, 1); + exports2.nodeKeyToRedisOptions = nodeKeyToRedisOptions; + function normalizeNodeOptions(nodes) { + return nodes.map((node2) => { + const options2 = {}; + if (typeof node2 === "object") { + Object.assign(options2, node2); + } else if (typeof node2 === "string") { + Object.assign(options2, (0, utils_1.parseURL)(node2)); + } else if (typeof node2 === "number") { + options2.port = node2; + } else { + throw new Error("Invalid argument " + node2); + } + if (typeof options2.port === "string") { + options2.port = parseInt(options2.port, 10); + } + delete options2.db; + if (!options2.port) { + options2.port = 6379; + } + if (!options2.host) { + options2.host = "127.0.0.1"; + } + return (0, utils_1.resolveTLSProfile)(options2); + }); } - }; -} - -exports.addClsInstrumentationHandler = addClsInstrumentationHandler; -exports.addFidInstrumentationHandler = addFidInstrumentationHandler; -exports.addInpInstrumentationHandler = addInpInstrumentationHandler; -exports.addLcpInstrumentationHandler = addLcpInstrumentationHandler; -exports.addPerformanceInstrumentationHandler = addPerformanceInstrumentationHandler; -exports.addTtfbInstrumentationHandler = addTtfbInstrumentationHandler; -//# sourceMappingURL=instrument.js.map - - -/***/ }), - -/***/ 62302: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const instrument = __nccwpck_require__(59011); -const types = __nccwpck_require__(3297); -const getVisibilityWatcher = __nccwpck_require__(53451); -const utils$1 = __nccwpck_require__(22223); -const getNavigationEntry = __nccwpck_require__(47509); - -const MAX_INT_AS_BYTES = 2147483647; - -/** - * Converts from milliseconds to seconds - * @param time time in ms - */ -function msToSec(time) { - return time / 1000; -} - -function getBrowserPerformanceAPI() { - // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are - return types.WINDOW && types.WINDOW.addEventListener && types.WINDOW.performance; -} - -let _performanceCursor = 0; - -let _measurements = {}; -let _lcpEntry; -let _clsEntry; - -/** - * Start tracking web vitals. - * The callback returned by this function can be used to stop tracking & ensure all measurements are final & captured. - * - * @returns A function that forces web vitals collection - */ -function startTrackingWebVitals() { - const performance = getBrowserPerformanceAPI(); - if (performance && utils.browserPerformanceTimeOrigin) { - // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are - if (performance.mark) { - types.WINDOW.performance.mark('sentry-tracing-init'); + exports2.normalizeNodeOptions = normalizeNodeOptions; + function getUniqueHostnamesFromOptions(nodes) { + const uniqueHostsMap = {}; + nodes.forEach((node2) => { + uniqueHostsMap[node2.host] = true; + }); + return Object.keys(uniqueHostsMap).filter((host) => !(0, net_1.isIP)(host)); } - const fidCallback = _trackFID(); - const clsCallback = _trackCLS(); - const lcpCallback = _trackLCP(); - const ttfbCallback = _trackTtfb(); - - return () => { - fidCallback(); - clsCallback(); - lcpCallback(); - ttfbCallback(); - }; - } - - return () => undefined; -} - -/** - * Start tracking long tasks. - */ -function startTrackingLongTasks() { - instrument.addPerformanceInstrumentationHandler('longtask', ({ entries }) => { - for (const entry of entries) { - // eslint-disable-next-line deprecation/deprecation - const transaction = core.getActiveTransaction() ; - if (!transaction) { - return; + exports2.getUniqueHostnamesFromOptions = getUniqueHostnamesFromOptions; + function groupSrvRecords(records) { + const recordsByPriority = {}; + for (const record of records) { + if (!recordsByPriority.hasOwnProperty(record.priority)) { + recordsByPriority[record.priority] = { + totalWeight: record.weight, + records: [record] + }; + } else { + recordsByPriority[record.priority].totalWeight += record.weight; + recordsByPriority[record.priority].records.push(record); + } } - const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime); - const duration = msToSec(entry.duration); - - // eslint-disable-next-line deprecation/deprecation - transaction.startChild({ - description: 'Main UI thread blocked', - op: 'ui.long-task', - origin: 'auto.ui.browser.metrics', - startTimestamp: startTime, - endTimestamp: startTime + duration, - }); + return recordsByPriority; } - }); -} - -/** - * Start tracking interaction events. - */ -function startTrackingInteractions() { - instrument.addPerformanceInstrumentationHandler('event', ({ entries }) => { - for (const entry of entries) { - // eslint-disable-next-line deprecation/deprecation - const transaction = core.getActiveTransaction() ; - if (!transaction) { - return; + exports2.groupSrvRecords = groupSrvRecords; + function weightSrvRecords(recordsGroup) { + if (recordsGroup.records.length === 1) { + recordsGroup.totalWeight = 0; + return recordsGroup.records.shift(); } - - if (entry.name === 'click') { - const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime); - const duration = msToSec(entry.duration); - - const span = { - description: utils.htmlTreeAsString(entry.target), - op: `ui.interaction.${entry.name}`, - origin: 'auto.ui.browser.metrics', - startTimestamp: startTime, - endTimestamp: startTime + duration, - }; - - const componentName = utils.getComponentName(entry.target); - if (componentName) { - span.attributes = { 'ui.component_name': componentName }; + const random = Math.floor(Math.random() * (recordsGroup.totalWeight + recordsGroup.records.length)); + let total = 0; + for (const [i, record] of recordsGroup.records.entries()) { + total += 1 + record.weight; + if (total > random) { + recordsGroup.totalWeight -= record.weight; + recordsGroup.records.splice(i, 1); + return record; } - - // eslint-disable-next-line deprecation/deprecation - transaction.startChild(span); } } - }); -} - -/** - * Start tracking INP webvital events. - */ -function startTrackingINP( - interactionIdtoRouteNameMapping, - interactionsSampleRate, -) { - const performance = getBrowserPerformanceAPI(); - if (performance && utils.browserPerformanceTimeOrigin) { - const inpCallback = _trackINP(interactionIdtoRouteNameMapping, interactionsSampleRate); - - return () => { - inpCallback(); - }; - } - - return () => undefined; -} - -/** Starts tracking the Cumulative Layout Shift on the current page. */ -function _trackCLS() { - return instrument.addClsInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding CLS'); - _measurements['cls'] = { value: metric.value, unit: '' }; - _clsEntry = entry ; - }, true); -} - -/** Starts tracking the Largest Contentful Paint on the current page. */ -function _trackLCP() { - return instrument.addLcpInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding LCP'); - _measurements['lcp'] = { value: metric.value, unit: 'millisecond' }; - _lcpEntry = entry ; - }, true); -} - -/** Starts tracking the First Input Delay on the current page. */ -function _trackFID() { - return instrument.addFidInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - - const timeOrigin = msToSec(utils.browserPerformanceTimeOrigin ); - const startTime = msToSec(entry.startTime); - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FID'); - _measurements['fid'] = { value: metric.value, unit: 'millisecond' }; - _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' }; - }); -} - -function _trackTtfb() { - return instrument.addTtfbInstrumentationHandler(({ metric }) => { - const entry = metric.entries[metric.entries.length - 1]; - if (!entry) { - return; - } - - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding TTFB'); - _measurements['ttfb'] = { value: metric.value, unit: 'millisecond' }; - }); -} - -const INP_ENTRY_MAP = { - click: 'click', - pointerdown: 'click', - pointerup: 'click', - mousedown: 'click', - mouseup: 'click', - touchstart: 'click', - touchend: 'click', - mouseover: 'hover', - mouseout: 'hover', - mouseenter: 'hover', - mouseleave: 'hover', - pointerover: 'hover', - pointerout: 'hover', - pointerenter: 'hover', - pointerleave: 'hover', - dragstart: 'drag', - dragend: 'drag', - drag: 'drag', - dragenter: 'drag', - dragleave: 'drag', - dragover: 'drag', - drop: 'drag', - keydown: 'press', - keyup: 'press', - keypress: 'press', - input: 'press', -}; - -/** Starts tracking the Interaction to Next Paint on the current page. */ -function _trackINP( - interactionIdToRouteNameMapping, - interactionsSampleRate, -) { - return instrument.addInpInstrumentationHandler(({ metric }) => { - if (metric.value === undefined) { - return; - } - const entry = metric.entries.find( - entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name] !== undefined, - ); - const client = core.getClient(); - if (!entry || !client) { - return; - } - const interactionType = INP_ENTRY_MAP[entry.name]; - const options = client.getOptions(); - /** Build the INP span, create an envelope from the span, and then send the envelope */ - const startTime = msToSec((utils.browserPerformanceTimeOrigin ) + entry.startTime); - const duration = msToSec(metric.value); - const interaction = - entry.interactionId !== undefined ? interactionIdToRouteNameMapping[entry.interactionId] : undefined; - if (interaction === undefined) { - return; - } - const { routeName, parentContext, activeTransaction, user, replayId } = interaction; - const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined; - // eslint-disable-next-line deprecation/deprecation - const profileId = activeTransaction !== undefined ? activeTransaction.getProfileId() : undefined; - const span = new core.Span({ - startTimestamp: startTime, - endTimestamp: startTime + duration, - op: `ui.interaction.${interactionType}`, - name: utils.htmlTreeAsString(entry.target), - attributes: { - release: options.release, - environment: options.environment, - transaction: routeName, - ...(userDisplay !== undefined && userDisplay !== '' ? { user: userDisplay } : {}), - ...(profileId !== undefined ? { profile_id: profileId } : {}), - ...(replayId !== undefined ? { replay_id: replayId } : {}), - }, - exclusiveTime: metric.value, - measurements: { - inp: { value: metric.value, unit: 'millisecond' }, - }, - }); - - /** Check to see if the span should be sampled */ - const sampleRate = getSampleRate(parentContext, options, interactionsSampleRate); - - if (!sampleRate) { - return; + exports2.weightSrvRecords = weightSrvRecords; + function getConnectionName(component, nodeConnectionName) { + const prefix = `ioredis-cluster(${component})`; + return nodeConnectionName ? `${prefix}:${nodeConnectionName}` : prefix; } + exports2.getConnectionName = getConnectionName; + } +}); - if (Math.random() < (sampleRate )) { - const envelope = span ? core.createSpanEnvelope([span], client.getDsn()) : undefined; - const transport = client && client.getTransport(); - if (transport && envelope) { - transport.send(envelope).then(null, reason => { - debugBuild.DEBUG_BUILD && utils.logger.error('Error while sending interaction:', reason); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ClusterSubscriber.js +var require_ClusterSubscriber = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ClusterSubscriber.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var util_1 = require_util(); + var utils_1 = require_utils3(); + var Redis_1 = require_Redis(); + var debug3 = (0, utils_1.Debug)("cluster:subscriber"); + var ClusterSubscriber = class { + constructor(connectionPool, emitter) { + this.connectionPool = connectionPool; + this.emitter = emitter; + this.started = false; + this.subscriber = null; + this.onSubscriberEnd = () => { + if (!this.started) { + debug3("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting."); + return; + } + debug3("subscriber has disconnected, selecting a new one..."); + this.selectSubscriber(); + }; + this.connectionPool.on("-node", (_, key) => { + if (!this.started || !this.subscriber) { + return; + } + if ((0, util_1.getNodeKey)(this.subscriber.options) === key) { + debug3("subscriber has left, selecting a new one..."); + this.selectSubscriber(); + } + }); + this.connectionPool.on("+node", () => { + if (!this.started || this.subscriber) { + return; + } + debug3("a new node is discovered and there is no subscriber, selecting a new one..."); + this.selectSubscriber(); }); } - return; - } - }); -} - -/** Add performance related spans to a transaction */ -function addPerformanceEntries(transaction) { - const performance = getBrowserPerformanceAPI(); - if (!performance || !types.WINDOW.performance.getEntries || !utils.browserPerformanceTimeOrigin) { - // Gatekeeper if performance API not available - return; + getInstance() { + return this.subscriber; + } + start() { + this.started = true; + this.selectSubscriber(); + debug3("started"); + } + stop() { + this.started = false; + if (this.subscriber) { + this.subscriber.disconnect(); + this.subscriber = null; + } + debug3("stopped"); + } + selectSubscriber() { + const lastActiveSubscriber = this.lastActiveSubscriber; + if (lastActiveSubscriber) { + lastActiveSubscriber.off("end", this.onSubscriberEnd); + lastActiveSubscriber.disconnect(); + } + if (this.subscriber) { + this.subscriber.off("end", this.onSubscriberEnd); + this.subscriber.disconnect(); + } + const sampleNode = (0, utils_1.sample)(this.connectionPool.getNodes()); + if (!sampleNode) { + debug3("selecting subscriber failed since there is no node discovered in the cluster yet"); + this.subscriber = null; + return; + } + const { options: options2 } = sampleNode; + debug3("selected a subscriber %s:%s", options2.host, options2.port); + this.subscriber = new Redis_1.default({ + port: options2.port, + host: options2.host, + username: options2.username, + password: options2.password, + enableReadyCheck: true, + connectionName: (0, util_1.getConnectionName)("subscriber", options2.connectionName), + lazyConnect: true, + tls: options2.tls, + // Don't try to reconnect the subscriber connection. If the connection fails + // we will get an end event (handled below), at which point we'll pick a new + // node from the pool and try to connect to that as the subscriber connection. + retryStrategy: null + }); + this.subscriber.on("error", utils_1.noop); + this.subscriber.once("end", this.onSubscriberEnd); + const previousChannels = { subscribe: [], psubscribe: [], ssubscribe: [] }; + if (lastActiveSubscriber) { + const condition = lastActiveSubscriber.condition || lastActiveSubscriber.prevCondition; + if (condition && condition.subscriber) { + previousChannels.subscribe = condition.subscriber.channels("subscribe"); + previousChannels.psubscribe = condition.subscriber.channels("psubscribe"); + previousChannels.ssubscribe = condition.subscriber.channels("ssubscribe"); + } + } + if (previousChannels.subscribe.length || previousChannels.psubscribe.length || previousChannels.ssubscribe.length) { + let pending = 0; + for (const type2 of ["subscribe", "psubscribe", "ssubscribe"]) { + const channels = previousChannels[type2]; + if (channels.length) { + pending += 1; + debug3("%s %d channels", type2, channels.length); + this.subscriber[type2](channels).then(() => { + if (!--pending) { + this.lastActiveSubscriber = this.subscriber; + } + }).catch(() => { + debug3("failed to %s %d channels", type2, channels.length); + }); + } + } + } else { + this.lastActiveSubscriber = this.subscriber; + } + for (const event of [ + "message", + "messageBuffer", + "smessage", + "smessageBuffer" + ]) { + this.subscriber.on(event, (arg1, arg2) => { + this.emitter.emit(event, arg1, arg2); + }); + } + for (const event of ["pmessage", "pmessageBuffer"]) { + this.subscriber.on(event, (arg1, arg2, arg3) => { + this.emitter.emit(event, arg1, arg2, arg3); + }); + } + } + }; + exports2.default = ClusterSubscriber; } +}); - debugBuild.DEBUG_BUILD && utils.logger.log('[Tracing] Adding & adjusting spans using Performance API'); - const timeOrigin = msToSec(utils.browserPerformanceTimeOrigin); - - const performanceEntries = performance.getEntries(); - - const { op, start_timestamp: transactionStartTime } = core.spanToJSON(transaction); - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - performanceEntries.slice(_performanceCursor).forEach((entry) => { - const startTime = msToSec(entry.startTime); - const duration = msToSec(entry.duration); - - // eslint-disable-next-line deprecation/deprecation - if (transaction.op === 'navigation' && transactionStartTime && timeOrigin + startTime < transactionStartTime) { - return; - } - - switch (entry.entryType) { - case 'navigation': { - _addNavigationSpans(transaction, entry, timeOrigin); - break; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ConnectionPool.js +var require_ConnectionPool = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/ConnectionPool.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var events_1 = __require("events"); + var utils_1 = require_utils3(); + var util_1 = require_util(); + var Redis_1 = require_Redis(); + var debug3 = (0, utils_1.Debug)("cluster:connectionPool"); + var ConnectionPool = class extends events_1.EventEmitter { + constructor(redisOptions) { + super(); + this.redisOptions = redisOptions; + this.nodes = { + all: {}, + master: {}, + slave: {} + }; + this.specifiedOptions = {}; } - case 'mark': - case 'paint': - case 'measure': { - _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin); - - // capture web vitals - const firstHidden = getVisibilityWatcher.getVisibilityWatcher(); - // Only report if the page wasn't hidden prior to the web vital. - const shouldRecord = entry.startTime < firstHidden.firstHiddenTime; - - if (entry.name === 'first-paint' && shouldRecord) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FP'); - _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' }; + getNodes(role = "all") { + const nodes = this.nodes[role]; + return Object.keys(nodes).map((key) => nodes[key]); + } + getInstanceByKey(key) { + return this.nodes.all[key]; + } + getSampleInstance(role) { + const keys = Object.keys(this.nodes[role]); + const sampleKey = (0, utils_1.sample)(keys); + return this.nodes[role][sampleKey]; + } + /** + * Find or create a connection to the node + */ + findOrCreate(node2, readOnly = false) { + const key = (0, util_1.getNodeKey)(node2); + readOnly = Boolean(readOnly); + if (this.specifiedOptions[key]) { + Object.assign(node2, this.specifiedOptions[key]); + } else { + this.specifiedOptions[key] = node2; } - if (entry.name === 'first-contentful-paint' && shouldRecord) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding FCP'); - _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' }; + let redis; + if (this.nodes.all[key]) { + redis = this.nodes.all[key]; + if (redis.options.readOnly !== readOnly) { + redis.options.readOnly = readOnly; + debug3("Change role of %s to %s", key, readOnly ? "slave" : "master"); + redis[readOnly ? "readonly" : "readwrite"]().catch(utils_1.noop); + if (readOnly) { + delete this.nodes.master[key]; + this.nodes.slave[key] = redis; + } else { + delete this.nodes.slave[key]; + this.nodes.master[key] = redis; + } + } + } else { + debug3("Connecting to %s as %s", key, readOnly ? "slave" : "master"); + redis = new Redis_1.default((0, utils_1.defaults)({ + // Never try to reconnect when a node is lose, + // instead, waiting for a `MOVED` error and + // fetch the slots again. + retryStrategy: null, + // Offline queue should be enabled so that + // we don't need to wait for the `ready` event + // before sending commands to the node. + enableOfflineQueue: true, + readOnly + }, node2, this.redisOptions, { lazyConnect: true })); + this.nodes.all[key] = redis; + this.nodes[readOnly ? "slave" : "master"][key] = redis; + redis.once("end", () => { + this.removeNode(key); + this.emit("-node", redis, key); + if (!Object.keys(this.nodes.all).length) { + this.emit("drain"); + } + }); + this.emit("+node", redis, key); + redis.on("error", function(error) { + this.emit("nodeError", error, key); + }); } - break; + return redis; } - case 'resource': { - _addResourceSpans(transaction, entry, entry.name , startTime, duration, timeOrigin); - break; + /** + * Reset the pool with a set of nodes. + * The old node will be removed. + */ + reset(nodes) { + debug3("Reset with %O", nodes); + const newNodes = {}; + nodes.forEach((node2) => { + const key = (0, util_1.getNodeKey)(node2); + if (!(node2.readOnly && newNodes[key])) { + newNodes[key] = node2; + } + }); + Object.keys(this.nodes.all).forEach((key) => { + if (!newNodes[key]) { + debug3("Disconnect %s because the node does not hold any slot", key); + this.nodes.all[key].disconnect(); + this.removeNode(key); + } + }); + Object.keys(newNodes).forEach((key) => { + const node2 = newNodes[key]; + this.findOrCreate(node2, node2.readOnly); + }); } - // Ignore other entry types. - } - }); - - _performanceCursor = Math.max(performanceEntries.length - 1, 0); - - _trackNavigator(transaction); - - // Measurements are only available for pageload transactions - if (op === 'pageload') { - _addTtfbRequestTimeToMeasurements(_measurements); - - ['fcp', 'fp', 'lcp'].forEach(name => { - if (!_measurements[name] || !transactionStartTime || timeOrigin >= transactionStartTime) { - return; + /** + * Remove a node from the pool. + */ + removeNode(key) { + const { nodes } = this; + if (nodes.all[key]) { + debug3("Remove %s from the pool", key); + delete nodes.all[key]; + } + delete nodes.master[key]; + delete nodes.slave[key]; } - // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin. - // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need - // to be adjusted to be relative to transaction.startTimestamp. - const oldValue = _measurements[name].value; - const measurementTimestamp = timeOrigin + msToSec(oldValue); - - // normalizedValue should be in milliseconds - const normalizedValue = Math.abs((measurementTimestamp - transactionStartTime) * 1000); - const delta = normalizedValue - oldValue; - - debugBuild.DEBUG_BUILD && utils.logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`); - _measurements[name].value = normalizedValue; - }); - - const fidMark = _measurements['mark.fid']; - if (fidMark && _measurements['fid']) { - // create span for FID - utils$1._startChild(transaction, { - description: 'first input delay', - endTimestamp: fidMark.value + msToSec(_measurements['fid'].value), - op: 'ui.action', - origin: 'auto.ui.browser.metrics', - startTimestamp: fidMark.value, - }); - - // Delete mark.fid as we don't want it to be part of final payload - delete _measurements['mark.fid']; - } - - // If FCP is not recorded we should not record the cls value - // according to the new definition of CLS. - if (!('fcp' in _measurements)) { - delete _measurements.cls; - } - - Object.keys(_measurements).forEach(measurementName => { - core.setMeasurement(measurementName, _measurements[measurementName].value, _measurements[measurementName].unit); - }); - - _tagMetricInfo(transaction); - } - - _lcpEntry = undefined; - _clsEntry = undefined; - _measurements = {}; -} - -/** Create measure related spans */ -function _addMeasureSpans( - transaction, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - entry, - startTime, - duration, - timeOrigin, -) { - const measureStartTimestamp = timeOrigin + startTime; - const measureEndTimestamp = measureStartTimestamp + duration; - - utils$1._startChild(transaction, { - description: entry.name , - endTimestamp: measureEndTimestamp, - op: entry.entryType , - origin: 'auto.resource.browser.metrics', - startTimestamp: measureStartTimestamp, - }); - - return measureStartTimestamp; -} - -/** Instrument navigation entries */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function _addNavigationSpans(transaction, entry, timeOrigin) { - ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => { - _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin); - }); - _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd'); - _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart'); - _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS'); - _addRequest(transaction, entry, timeOrigin); -} - -/** Create performance navigation related spans */ -function _addPerformanceNavigationTiming( - transaction, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - entry, - event, - timeOrigin, - description, - eventEnd, -) { - const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] ); - const start = entry[`${event}Start`] ; - if (!start || !end) { - return; - } - utils$1._startChild(transaction, { - op: 'browser', - origin: 'auto.browser.browser.metrics', - description: description || event, - startTimestamp: timeOrigin + msToSec(start), - endTimestamp: timeOrigin + msToSec(end), - }); -} - -/** Create request and response related spans */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function _addRequest(transaction, entry, timeOrigin) { - if (entry.responseEnd) { - // It is possible that we are collecting these metrics when the page hasn't finished loading yet, for example when the HTML slowly streams in. - // In this case, ie. when the document request hasn't finished yet, `entry.responseEnd` will be 0. - // In order not to produce faulty spans, where the end timestamp is before the start timestamp, we will only collect - // these spans when the responseEnd value is available. The backend (Relay) would drop the entire transaction if it contained faulty spans. - utils$1._startChild(transaction, { - op: 'browser', - origin: 'auto.browser.browser.metrics', - description: 'request', - startTimestamp: timeOrigin + msToSec(entry.requestStart ), - endTimestamp: timeOrigin + msToSec(entry.responseEnd ), - }); - - utils$1._startChild(transaction, { - op: 'browser', - origin: 'auto.browser.browser.metrics', - description: 'response', - startTimestamp: timeOrigin + msToSec(entry.responseStart ), - endTimestamp: timeOrigin + msToSec(entry.responseEnd ), - }); - } -} - -/** Create resource-related spans */ -function _addResourceSpans( - transaction, - entry, - resourceUrl, - startTime, - duration, - timeOrigin, -) { - // we already instrument based on fetch and xhr, so we don't need to - // duplicate spans here. - if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') { - return; - } - - const parsedUrl = utils.parseUrl(resourceUrl); - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const data = {}; - setResourceEntrySizeData(data, entry, 'transferSize', 'http.response_transfer_size'); - setResourceEntrySizeData(data, entry, 'encodedBodySize', 'http.response_content_length'); - setResourceEntrySizeData(data, entry, 'decodedBodySize', 'http.decoded_response_content_length'); - - if ('renderBlockingStatus' in entry) { - data['resource.render_blocking_status'] = entry.renderBlockingStatus; - } - if (parsedUrl.protocol) { - data['url.scheme'] = parsedUrl.protocol.split(':').pop(); // the protocol returned by parseUrl includes a :, but OTEL spec does not, so we remove it. - } - - if (parsedUrl.host) { - data['server.address'] = parsedUrl.host; - } - - data['url.same_origin'] = resourceUrl.includes(types.WINDOW.location.origin); - - const startTimestamp = timeOrigin + startTime; - const endTimestamp = startTimestamp + duration; - - utils$1._startChild(transaction, { - description: resourceUrl.replace(types.WINDOW.location.origin, ''), - endTimestamp, - op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other', - origin: 'auto.resource.browser.metrics', - startTimestamp, - data, - }); -} - -/** - * Capture the information of the user agent. - */ -function _trackNavigator(transaction) { - const navigator = types.WINDOW.navigator ; - if (!navigator) { - return; - } - - // track network connectivity - const connection = navigator.connection; - if (connection) { - if (connection.effectiveType) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('effectiveConnectionType', connection.effectiveType); - } - - if (connection.type) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('connectionType', connection.type); - } - - if (utils$1.isMeasurementValue(connection.rtt)) { - _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' }; - } - } - - if (utils$1.isMeasurementValue(navigator.deviceMemory)) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`); - } - - if (utils$1.isMeasurementValue(navigator.hardwareConcurrency)) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency)); - } -} - -/** Add LCP / CLS data to transaction to allow debugging */ -function _tagMetricInfo(transaction) { - if (_lcpEntry) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding LCP Data'); - - // Capture Properties of the LCP element that contributes to the LCP. - - if (_lcpEntry.element) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('lcp.element', utils.htmlTreeAsString(_lcpEntry.element)); - } - - if (_lcpEntry.id) { - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('lcp.id', _lcpEntry.id); - } - - if (_lcpEntry.url) { - // Trim URL to the first 200 characters. - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200)); - } - - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag('lcp.size', _lcpEntry.size); - } - - // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift - if (_clsEntry && _clsEntry.sources) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding CLS Data'); - _clsEntry.sources.forEach((source, index) => - // TODO: Can we rewrite this to an attribute? - // eslint-disable-next-line deprecation/deprecation - transaction.setTag(`cls.source.${index + 1}`, utils.htmlTreeAsString(source.node)), - ); - } -} - -function setResourceEntrySizeData( - data, - entry, - key, - dataKey, -) { - const entryVal = entry[key]; - if (entryVal != null && entryVal < MAX_INT_AS_BYTES) { - data[dataKey] = entryVal; - } -} - -/** - * Add ttfb request time information to measurements. - * - * ttfb information is added via vendored web vitals library. - */ -function _addTtfbRequestTimeToMeasurements(_measurements) { - const navEntry = getNavigationEntry.getNavigationEntry(); - if (!navEntry) { - return; - } - - const { responseStart, requestStart } = navEntry; - - if (requestStart <= responseStart) { - debugBuild.DEBUG_BUILD && utils.logger.log('[Measurements] Adding TTFB Request Time'); - _measurements['ttfb.requestTime'] = { - value: responseStart - requestStart, - unit: 'millisecond', }; + exports2.default = ConnectionPool; } -} - -/** Taken from @sentry/core sampling.ts */ -function getSampleRate( - transactionContext, - options, - interactionsSampleRate, -) { - if (!core.hasTracingEnabled(options)) { - return false; - } - let sampleRate; - if (transactionContext !== undefined && typeof options.tracesSampler === 'function') { - sampleRate = options.tracesSampler({ - transactionContext, - name: transactionContext.name, - parentSampled: transactionContext.parentSampled, - attributes: { - // eslint-disable-next-line deprecation/deprecation - ...transactionContext.data, - ...transactionContext.attributes, - }, - location: types.WINDOW.location, - }); - } else if (transactionContext !== undefined && transactionContext.sampled !== undefined) { - sampleRate = transactionContext.sampled; - } else if (typeof options.tracesSampleRate !== 'undefined') { - sampleRate = options.tracesSampleRate; - } else { - sampleRate = 1; - } - if (!core.isValidSampleRate(sampleRate)) { - debugBuild.DEBUG_BUILD && utils.logger.warn('[Tracing] Discarding interaction span because of invalid sample rate.'); - return false; - } - if (sampleRate === true) { - return interactionsSampleRate; - } else if (sampleRate === false) { - return 0; - } - return sampleRate * interactionsSampleRate; -} - -exports._addMeasureSpans = _addMeasureSpans; -exports._addResourceSpans = _addResourceSpans; -exports.addPerformanceEntries = addPerformanceEntries; -exports.startTrackingINP = startTrackingINP; -exports.startTrackingInteractions = startTrackingInteractions; -exports.startTrackingLongTasks = startTrackingLongTasks; -exports.startTrackingWebVitals = startTrackingWebVitals; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 22223: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Checks if a given value is a valid measurement value. - */ -function isMeasurementValue(value) { - return typeof value === 'number' && isFinite(value); -} - -/** - * Helper function to start child on transactions. This function will make sure that the transaction will - * use the start timestamp of the created child span if it is earlier than the transactions actual - * start timestamp. - * - * Note: this will not be possible anymore in v8, - * unless we do some special handling for browser here... - */ -function _startChild(transaction, { startTimestamp, ...ctx }) { - // eslint-disable-next-line deprecation/deprecation - if (startTimestamp && transaction.startTimestamp > startTimestamp) { - // eslint-disable-next-line deprecation/deprecation - transaction.startTimestamp = startTimestamp; - } - - // eslint-disable-next-line deprecation/deprecation - return transaction.startChild({ - startTimestamp, - ...ctx, - }); -} - -exports._startChild = _startChild; -exports.isMeasurementValue = isMeasurementValue; -//# sourceMappingURL=utils.js.map - - -/***/ }), - -/***/ 21673: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const fetch = __nccwpck_require__(4997); -const instrument = __nccwpck_require__(59011); -const types = __nccwpck_require__(3297); - -/* eslint-disable max-lines */ - -const DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\/(?!\/)/]; - -/** Options for Request Instrumentation */ - -const defaultRequestInstrumentationOptions = { - traceFetch: true, - traceXHR: true, - enableHTTPTimings: true, - // TODO (v8): Remove this property - tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS, - tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS, -}; - -/** Registers span creators for xhr and fetch requests */ -function instrumentOutgoingRequests(_options) { - const { - traceFetch, - traceXHR, - // eslint-disable-next-line deprecation/deprecation - tracePropagationTargets, - // eslint-disable-next-line deprecation/deprecation - tracingOrigins, - shouldCreateSpanForRequest, - enableHTTPTimings, - } = { - traceFetch: defaultRequestInstrumentationOptions.traceFetch, - traceXHR: defaultRequestInstrumentationOptions.traceXHR, - ..._options, - }; +}); - const shouldCreateSpan = - typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true; - - // TODO(v8) Remove tracingOrigins here - // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported - // and we don't want to break the API. We can remove it in v8. - const shouldAttachHeadersWithTargets = (url) => - shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins); - - const spans = {}; - - if (traceFetch) { - utils.addFetchInstrumentationHandler(handlerData => { - const createdSpan = fetch.instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); - // We cannot use `window.location` in the generic fetch instrumentation, - // but we need it for reliable `server.address` attribute. - // so we extend this in here - if (createdSpan) { - const fullUrl = getFullURL(handlerData.fetchData.url); - const host = fullUrl ? utils.parseUrl(fullUrl).host : undefined; - createdSpan.setAttributes({ - 'http.url': fullUrl, - 'server.address': host, - }); +// node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js +var require_denque = __commonJS({ + "node_modules/.pnpm/denque@2.1.0/node_modules/denque/index.js"(exports2, module2) { + "use strict"; + function Denque(array, options2) { + var options2 = options2 || {}; + this._capacity = options2.capacity; + this._head = 0; + this._tail = 0; + if (Array.isArray(array)) { + this._fromArray(array); + } else { + this._capacityMask = 3; + this._list = new Array(4); } - - if (enableHTTPTimings && createdSpan) { - addHTTPTimings(createdSpan); + } + Denque.prototype.peekAt = function peekAt(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; } - }); - } - - if (traceXHR) { - utils.addXhrInstrumentationHandler(handlerData => { - const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans); - if (enableHTTPTimings && createdSpan) { - addHTTPTimings(createdSpan); + var len = this.size(); + if (i >= len || i < -len) return void 0; + if (i < 0) i += len; + i = this._head + i & this._capacityMask; + return this._list[i]; + }; + Denque.prototype.get = function get(i) { + return this.peekAt(i); + }; + Denque.prototype.peek = function peek() { + if (this._head === this._tail) return void 0; + return this._list[this._head]; + }; + Denque.prototype.peekFront = function peekFront() { + return this.peek(); + }; + Denque.prototype.peekBack = function peekBack() { + return this.peekAt(-1); + }; + Object.defineProperty(Denque.prototype, "length", { + get: function length() { + return this.size(); } }); - } -} - -function isPerformanceResourceTiming(entry) { - return ( - entry.entryType === 'resource' && - 'initiatorType' in entry && - typeof (entry ).nextHopProtocol === 'string' && - (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest') - ); -} - -/** - * Creates a temporary observer to listen to the next fetch/xhr resourcing timings, - * so that when timings hit their per-browser limit they don't need to be removed. - * - * @param span A span that has yet to be finished, must contain `url` on data. - */ -function addHTTPTimings(span) { - const { url } = core.spanToJSON(span).data || {}; - - if (!url || typeof url !== 'string') { - return; - } - - const cleanup = instrument.addPerformanceInstrumentationHandler('resource', ({ entries }) => { - entries.forEach(entry => { - if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) { - const spanData = resourceTimingEntryToSpanData(entry); - spanData.forEach(data => span.setAttribute(...data)); - // In the next tick, clean this handler up - // We have to wait here because otherwise this cleans itself up before it is fully done - setTimeout(cleanup); + Denque.prototype.size = function size() { + if (this._head === this._tail) return 0; + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.unshift = function unshift(item) { + if (arguments.length === 0) return this.size(); + var len = this._list.length; + this._head = this._head - 1 + len & this._capacityMask; + this._list[this._head] = item; + if (this._tail === this._head) this._growArray(); + if (this._capacity && this.size() > this._capacity) this.pop(); + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.shift = function shift() { + var head = this._head; + if (head === this._tail) return void 0; + var item = this._list[head]; + this._list[head] = void 0; + this._head = head + 1 & this._capacityMask; + if (head < 2 && this._tail > 1e4 && this._tail <= this._list.length >>> 2) this._shrinkArray(); + return item; + }; + Denque.prototype.push = function push(item) { + if (arguments.length === 0) return this.size(); + var tail = this._tail; + this._list[tail] = item; + this._tail = tail + 1 & this._capacityMask; + if (this._tail === this._head) { + this._growArray(); + } + if (this._capacity && this.size() > this._capacity) { + this.shift(); + } + if (this._head < this._tail) return this._tail - this._head; + else return this._capacityMask + 1 - (this._head - this._tail); + }; + Denque.prototype.pop = function pop() { + var tail = this._tail; + if (tail === this._head) return void 0; + var len = this._list.length; + this._tail = tail - 1 + len & this._capacityMask; + var item = this._list[this._tail]; + this._list[this._tail] = void 0; + if (this._head < 2 && tail > 1e4 && tail <= len >>> 2) this._shrinkArray(); + return item; + }; + Denque.prototype.removeOne = function removeOne(index) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size) return void 0; + if (i < 0) i += size; + i = this._head + i & this._capacityMask; + var item = this._list[i]; + var k; + if (index < size / 2) { + for (k = index; k > 0; k--) { + this._list[i] = this._list[i = i - 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._head = this._head + 1 + len & this._capacityMask; + } else { + for (k = size - 1 - index; k > 0; k--) { + this._list[i] = this._list[i = i + 1 + len & this._capacityMask]; + } + this._list[i] = void 0; + this._tail = this._tail - 1 + len & this._capacityMask; } - }); - }); -} - -/** - * Converts ALPN protocol ids to name and version. - * - * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) - * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol - */ -function extractNetworkProtocol(nextHopProtocol) { - let name = 'unknown'; - let version = 'unknown'; - let _name = ''; - for (const char of nextHopProtocol) { - // http/1.1 etc. - if (char === '/') { - [name, version] = nextHopProtocol.split('/'); - break; - } - // h2, h3 etc. - if (!isNaN(Number(char))) { - name = _name === 'h' ? 'http' : _name; - version = nextHopProtocol.split(_name)[1]; - break; - } - _name += char; - } - if (_name === nextHopProtocol) { - // webrtc, ftp, etc. - name = _name; - } - return { name, version }; -} - -function getAbsoluteTime(time = 0) { - return ((utils.browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000; -} - -function resourceTimingEntryToSpanData(resourceTiming) { - const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol); - - const timingSpanData = []; - - timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]); - - if (!utils.browserPerformanceTimeOrigin) { - return timingSpanData; - } - return [ - ...timingSpanData, - ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)], - ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)], - ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)], - ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)], - ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)], - ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)], - ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)], - ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)], - ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)], - ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)], - ]; -} - -/** - * A function that determines whether to attach tracing headers to a request. - * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders. - * We only export this fuction for testing purposes. - */ -function shouldAttachHeaders(url, tracePropagationTargets) { - return utils.stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS); -} - -/** - * Create and track xhr request spans - * - * @returns Span if a span was created, otherwise void. - */ -// eslint-disable-next-line complexity -function xhrCallback( - handlerData, - shouldCreateSpan, - shouldAttachHeaders, - spans, -) { - const xhr = handlerData.xhr; - const sentryXhrData = xhr && xhr[utils.SENTRY_XHR_DATA_KEY]; - - if (!core.hasTracingEnabled() || !xhr || xhr.__sentry_own_request__ || !sentryXhrData) { - return undefined; - } - - const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url); - - // check first if the request has finished and is tracked by an existing span which should now end - if (handlerData.endTimestamp && shouldCreateSpanResult) { - const spanId = xhr.__sentry_xhr_span_id__; - if (!spanId) return; - - const span = spans[spanId]; - if (span && sentryXhrData.status_code !== undefined) { - core.setHttpStatus(span, sentryXhrData.status_code); - span.end(); - - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete spans[spanId]; - } - return undefined; - } - - const scope = core.getCurrentScope(); - const isolationScope = core.getIsolationScope(); - - const fullUrl = getFullURL(sentryXhrData.url); - const host = fullUrl ? utils.parseUrl(fullUrl).host : undefined; - - const span = shouldCreateSpanResult - ? core.startInactiveSpan({ - name: `${sentryXhrData.method} ${sentryXhrData.url}`, - onlyIfParent: true, - attributes: { - type: 'xhr', - 'http.method': sentryXhrData.method, - 'http.url': fullUrl, - url: sentryXhrData.url, - 'server.address': host, - [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser', - }, - op: 'http.client', - }) - : undefined; - - if (span) { - xhr.__sentry_xhr_span_id__ = span.spanContext().spanId; - spans[xhr.__sentry_xhr_span_id__] = span; - } - - const client = core.getClient(); - - if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url) && client) { - const { traceId, spanId, sampled, dsc } = { - ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext(), + return item; }; - - const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled); - - const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( - dsc || - (span ? core.getDynamicSamplingContextFromSpan(span) : core.getDynamicSamplingContextFromClient(traceId, client, scope)), - ); - - setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader); - } - - return span; -} - -function setHeaderOnXhr( - xhr, - sentryTraceHeader, - sentryBaggageHeader, -) { - try { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - xhr.setRequestHeader('sentry-trace', sentryTraceHeader); - if (sentryBaggageHeader) { - // From MDN: "If this method is called several times with the same header, the values are merged into one single request header." - // We can therefore simply set a baggage header without checking what was there before - // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - xhr.setRequestHeader(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader); - } - } catch (_) { - // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED. - } -} - -function getFullURL(url) { - try { - // By adding a base URL to new URL(), this will also work for relative urls - // If `url` is a full URL, the base URL is ignored anyhow - const parsed = new URL(url, types.WINDOW.location.origin); - return parsed.href; - } catch (e) { - return undefined; - } -} - -exports.DEFAULT_TRACE_PROPAGATION_TARGETS = DEFAULT_TRACE_PROPAGATION_TARGETS; -exports.defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions; -exports.extractNetworkProtocol = extractNetworkProtocol; -exports.instrumentOutgoingRequests = instrumentOutgoingRequests; -exports.shouldAttachHeaders = shouldAttachHeaders; -exports.xhrCallback = xhrCallback; -//# sourceMappingURL=request.js.map - - -/***/ }), - -/***/ 1279: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const types = __nccwpck_require__(3297); - -/** - * Default function implementing pageload and navigation transactions - */ -function instrumentRoutingWithDefaults( - customStartTransaction, - startTransactionOnPageLoad = true, - startTransactionOnLocationChange = true, -) { - if (!types.WINDOW || !types.WINDOW.location) { - debugBuild.DEBUG_BUILD && utils.logger.warn('Could not initialize routing instrumentation due to invalid location'); - return; - } - - let startingUrl = types.WINDOW.location.href; - - let activeTransaction; - if (startTransactionOnPageLoad) { - activeTransaction = customStartTransaction({ - name: types.WINDOW.location.pathname, - // pageload should always start at timeOrigin (and needs to be in s, not ms) - startTimestamp: utils.browserPerformanceTimeOrigin ? utils.browserPerformanceTimeOrigin / 1000 : undefined, - op: 'pageload', - origin: 'auto.pageload.browser', - metadata: { source: 'url' }, - }); - } - - if (startTransactionOnLocationChange) { - utils.addHistoryInstrumentationHandler(({ to, from }) => { - /** - * This early return is there to account for some cases where a navigation transaction starts right after - * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't - * create an uneccessary navigation transaction. - * - * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also - * only be caused in certain development environments where the usage of a hot module reloader is causing - * errors. - */ - if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) { - startingUrl = undefined; - return; + Denque.prototype.remove = function remove(index, count) { + var i = index; + var removed; + var del_count = count; + if (i !== (i | 0)) { + return void 0; + } + if (this._head === this._tail) return void 0; + var size = this.size(); + var len = this._list.length; + if (i >= size || i < -size || count < 1) return void 0; + if (i < 0) i += size; + if (count === 1 || !count) { + removed = new Array(1); + removed[0] = this.removeOne(i); + return removed; + } + if (i === 0 && i + count >= size) { + removed = this.toArray(); + this.clear(); + return removed; } - - if (from !== to) { - startingUrl = undefined; - if (activeTransaction) { - debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`); - // If there's an open transaction on the scope, we need to finish it before creating an new one. - activeTransaction.end(); + if (i + count > size) count = size - i; + var k; + removed = new Array(count); + for (k = 0; k < count; k++) { + removed[k] = this._list[this._head + i + k & this._capacityMask]; + } + i = this._head + i & this._capacityMask; + if (index + count === size) { + this._tail = this._tail - count + len & this._capacityMask; + for (k = count; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; } - activeTransaction = customStartTransaction({ - name: types.WINDOW.location.pathname, - op: 'navigation', - origin: 'auto.navigation.browser', - metadata: { source: 'url' }, - }); + return removed; } - }); - } -} - -exports.instrumentRoutingWithDefaults = instrumentRoutingWithDefaults; -//# sourceMappingURL=router.js.map - - -/***/ }), - -/***/ 3297: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -const WINDOW = utils.GLOBAL_OBJ - -; - -exports.WINDOW = WINDOW; -//# sourceMappingURL=types.js.map - - -/***/ }), - -/***/ 84771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const bindReporter = __nccwpck_require__(40361); -const initMetric = __nccwpck_require__(40565); -const observe = __nccwpck_require__(66407); -const onHidden = __nccwpck_require__(11890); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Calculates the [CLS](https://web.dev/cls/) value for the current page and - * calls the `callback` function once the value is ready to be reported, along - * with all `layout-shift` performance entries that were used in the metric - * value calculation. The reported value is a `double` (corresponding to a - * [layout shift score](https://web.dev/cls/#layout-shift-score)). - * - * If the `reportAllChanges` configuration option is set to `true`, the - * `callback` function will be called as soon as the value is initially - * determined as well as any time the value changes throughout the page - * lifespan. - * - * _**Important:** CLS should be continually monitored for changes throughout - * the entire lifespan of a page—including if the user returns to the page after - * it's been hidden/backgrounded. However, since browsers often [will not fire - * additional callbacks once the user has backgrounded a - * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden), - * `callback` is always called when the page's visibility state changes to - * hidden. As a result, the `callback` function might be called multiple times - * during the same page load._ - */ -const onCLS = ( - onReport, - options = {}, -) => { - const metric = initMetric.initMetric('CLS', 0); - let report; - - let sessionValue = 0; - let sessionEntries = []; - - // const handleEntries = (entries: Metric['entries']) => { - const handleEntries = (entries) => { - entries.forEach(entry => { - // Only count layout shifts without recent user input. - if (!entry.hadRecentInput) { - const firstSessionEntry = sessionEntries[0]; - const lastSessionEntry = sessionEntries[sessionEntries.length - 1]; - - // If the entry occurred less than 1 second after the previous entry and - // less than 5 seconds after the first entry in the session, include the - // entry in the current session. Otherwise, start a new session. - if ( - sessionValue && - sessionEntries.length !== 0 && - entry.startTime - lastSessionEntry.startTime < 1000 && - entry.startTime - firstSessionEntry.startTime < 5000 - ) { - sessionValue += entry.value; - sessionEntries.push(entry); - } else { - sessionValue = entry.value; - sessionEntries = [entry]; + if (index === 0) { + this._head = this._head + count + len & this._capacityMask; + for (k = count - 1; k > 0; k--) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; } - - // If the current session value is larger than the current CLS value, - // update CLS and the entries contributing to it. - if (sessionValue > metric.value) { - metric.value = sessionValue; - metric.entries = sessionEntries; - if (report) { - report(); - } + return removed; + } + if (i < size / 2) { + this._head = this._head + index + count + len & this._capacityMask; + for (k = index; k > 0; k--) { + this.unshift(this._list[i = i - 1 + len & this._capacityMask]); + } + i = this._head - 1 + len & this._capacityMask; + while (del_count > 0) { + this._list[i = i - 1 + len & this._capacityMask] = void 0; + del_count--; + } + if (index < 0) this._tail = i; + } else { + this._tail = i; + i = i + count + len & this._capacityMask; + for (k = size - (count + index); k > 0; k--) { + this.push(this._list[i++]); + } + i = this._tail; + while (del_count > 0) { + this._list[i = i + 1 + len & this._capacityMask] = void 0; + del_count--; } } - }); - }; - - const po = observe.observe('layout-shift', handleEntries); - if (po) { - report = bindReporter.bindReporter(onReport, metric, options.reportAllChanges); - - const stopListening = () => { - handleEntries(po.takeRecords() ); - report(true); + if (this._head < 2 && this._tail > 1e4 && this._tail <= len >>> 2) this._shrinkArray(); + return removed; }; - - onHidden.onHidden(stopListening); - - return stopListening; - } - - return; -}; - -exports.onCLS = onCLS; -//# sourceMappingURL=getCLS.js.map - - -/***/ }), - -/***/ 69404: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const bindReporter = __nccwpck_require__(40361); -const getVisibilityWatcher = __nccwpck_require__(53451); -const initMetric = __nccwpck_require__(40565); -const observe = __nccwpck_require__(66407); -const onHidden = __nccwpck_require__(11890); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Calculates the [FID](https://web.dev/fid/) value for the current page and - * calls the `callback` function once the value is ready, along with the - * relevant `first-input` performance entry used to determine the value. The - * reported value is a `DOMHighResTimeStamp`. - * - * _**Important:** since FID is only reported after the user interacts with the - * page, it's possible that it will not be reported for some page loads._ - */ -const onFID = (onReport) => { - const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher(); - const metric = initMetric.initMetric('FID'); - // eslint-disable-next-line prefer-const - let report; - - const handleEntry = (entry) => { - // Only report if the page wasn't hidden prior to the first input. - if (entry.startTime < visibilityWatcher.firstHiddenTime) { - metric.value = entry.processingStart - entry.startTime; - metric.entries.push(entry); - report(true); - } - }; - - const handleEntries = (entries) => { - (entries ).forEach(handleEntry); - }; - - const po = observe.observe('first-input', handleEntries); - report = bindReporter.bindReporter(onReport, metric); - - if (po) { - onHidden.onHidden(() => { - handleEntries(po.takeRecords() ); - po.disconnect(); - }, true); - } -}; - -exports.onFID = onFID; -//# sourceMappingURL=getFID.js.map - - -/***/ }), - -/***/ 17462: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const bindReporter = __nccwpck_require__(40361); -const initMetric = __nccwpck_require__(40565); -const observe = __nccwpck_require__(66407); -const onHidden = __nccwpck_require__(11890); -const interactionCountPolyfill = __nccwpck_require__(9074); - -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Returns the interaction count since the last bfcache restore (or for the - * full page lifecycle if there were no bfcache restores). - */ -const getInteractionCountForNavigation = () => { - return interactionCountPolyfill.getInteractionCount(); -}; - -// To prevent unnecessary memory usage on pages with lots of interactions, -// store at most 10 of the longest interactions to consider as INP candidates. -const MAX_INTERACTIONS_TO_CONSIDER = 10; - -// A list of longest interactions on the page (by latency) sorted so the -// longest one is first. The list is as most MAX_INTERACTIONS_TO_CONSIDER long. -const longestInteractionList = []; - -// A mapping of longest interactions by their interaction ID. -// This is used for faster lookup. -const longestInteractionMap = {}; - -/** - * Takes a performance entry and adds it to the list of worst interactions - * if its duration is long enough to make it among the worst. If the - * entry is part of an existing interaction, it is merged and the latency - * and entries list is updated as needed. - */ -const processEntry = (entry) => { - // The least-long of the 10 longest interactions. - const minLongestInteraction = longestInteractionList[longestInteractionList.length - 1]; - - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const existingInteraction = longestInteractionMap[entry.interactionId]; - - // Only process the entry if it's possibly one of the ten longest, - // or if it's part of an existing interaction. - if ( - existingInteraction || - longestInteractionList.length < MAX_INTERACTIONS_TO_CONSIDER || - entry.duration > minLongestInteraction.latency - ) { - // If the interaction already exists, update it. Otherwise create one. - if (existingInteraction) { - existingInteraction.entries.push(entry); - existingInteraction.latency = Math.max(existingInteraction.latency, entry.duration); - } else { - const interaction = { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - id: entry.interactionId, - latency: entry.duration, - entries: [entry], - }; - longestInteractionMap[interaction.id] = interaction; - longestInteractionList.push(interaction); - } - - // Sort the entries by latency (descending) and keep only the top ten. - longestInteractionList.sort((a, b) => b.latency - a.latency); - longestInteractionList.splice(MAX_INTERACTIONS_TO_CONSIDER).forEach(i => { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete longestInteractionMap[i.id]; - }); - } -}; - -/** - * Returns the estimated p98 longest interaction based on the stored - * interaction candidates and the interaction count for the current page. - */ -const estimateP98LongestInteraction = () => { - const candidateInteractionIndex = Math.min( - longestInteractionList.length - 1, - Math.floor(getInteractionCountForNavigation() / 50), - ); - - return longestInteractionList[candidateInteractionIndex]; -}; - -/** - * Calculates the [INP](https://web.dev/responsiveness/) value for the current - * page and calls the `callback` function once the value is ready, along with - * the `event` performance entries reported for that interaction. The reported - * value is a `DOMHighResTimeStamp`. - * - * A custom `durationThreshold` configuration option can optionally be passed to - * control what `event-timing` entries are considered for INP reporting. The - * default threshold is `40`, which means INP scores of less than 40 are - * reported as 0. Note that this will not affect your 75th percentile INP value - * unless that value is also less than 40 (well below the recommended - * [good](https://web.dev/inp/#what-is-a-good-inp-score) threshold). - * - * If the `reportAllChanges` configuration option is set to `true`, the - * `callback` function will be called as soon as the value is initially - * determined as well as any time the value changes throughout the page - * lifespan. - * - * _**Important:** INP should be continually monitored for changes throughout - * the entire lifespan of a page—including if the user returns to the page after - * it's been hidden/backgrounded. However, since browsers often [will not fire - * additional callbacks once the user has backgrounded a - * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden), - * `callback` is always called when the page's visibility state changes to - * hidden. As a result, the `callback` function might be called multiple times - * during the same page load._ - */ -const onINP = (onReport, opts) => { - // Set defaults - // eslint-disable-next-line no-param-reassign - opts = opts || {}; - - // https://web.dev/inp/#what's-a-%22good%22-inp-value - // const thresholds = [200, 500]; - - // TODO(philipwalton): remove once the polyfill is no longer needed. - interactionCountPolyfill.initInteractionCountPolyfill(); - - const metric = initMetric.initMetric('INP'); - // eslint-disable-next-line prefer-const - let report; - - const handleEntries = (entries) => { - entries.forEach(entry => { - if (entry.interactionId) { - processEntry(entry); - } - - // Entries of type `first-input` don't currently have an `interactionId`, - // so to consider them in INP we have to first check that an existing - // entry doesn't match the `duration` and `startTime`. - // Note that this logic assumes that `event` entries are dispatched - // before `first-input` entries. This is true in Chrome but it is not - // true in Firefox; however, Firefox doesn't support interactionId, so - // it's not an issue at the moment. - // TODO(philipwalton): remove once crbug.com/1325826 is fixed. - if (entry.entryType === 'first-input') { - const noMatchingEntry = !longestInteractionList.some(interaction => { - return interaction.entries.some(prevEntry => { - return entry.duration === prevEntry.duration && entry.startTime === prevEntry.startTime; - }); - }); - if (noMatchingEntry) { - processEntry(entry); + Denque.prototype.splice = function splice(index, count) { + var i = index; + if (i !== (i | 0)) { + return void 0; + } + var size = this.size(); + if (i < 0) i += size; + if (i > size) return void 0; + if (arguments.length > 2) { + var k; + var temp; + var removed; + var arg_len = arguments.length; + var len = this._list.length; + var arguments_index = 2; + if (!size || i < size / 2) { + temp = new Array(i); + for (k = 0; k < i; k++) { + temp[k] = this._list[this._head + k & this._capacityMask]; + } + if (count === 0) { + removed = []; + if (i > 0) { + this._head = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count); + this._head = this._head + i + len & this._capacityMask; + } + while (arg_len > arguments_index) { + this.unshift(arguments[--arg_len]); + } + for (k = i; k > 0; k--) { + this.unshift(temp[k - 1]); + } + } else { + temp = new Array(size - (i + count)); + var leng = temp.length; + for (k = 0; k < leng; k++) { + temp[k] = this._list[this._head + i + count + k & this._capacityMask]; + } + if (count === 0) { + removed = []; + if (i != size) { + this._tail = this._head + i + len & this._capacityMask; + } + } else { + removed = this.remove(i, count); + this._tail = this._tail - leng + len & this._capacityMask; + } + while (arguments_index < arg_len) { + this.push(arguments[arguments_index++]); + } + for (k = 0; k < leng; k++) { + this.push(temp[k]); + } } + return removed; + } else { + return this.remove(i, count); } - }); - - const inp = estimateP98LongestInteraction(); - - if (inp && inp.latency !== metric.value) { - metric.value = inp.latency; - metric.entries = inp.entries; - report(); - } - }; - - const po = observe.observe('event', handleEntries, { - // Event Timing entries have their durations rounded to the nearest 8ms, - // so a duration of 40ms would be any event that spans 2.5 or more frames - // at 60Hz. This threshold is chosen to strike a balance between usefulness - // and performance. Running this callback for any interaction that spans - // just one or two frames is likely not worth the insight that could be - // gained. - durationThreshold: opts.durationThreshold || 40, - } ); - - report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges); - - if (po) { - // Also observe entries of type `first-input`. This is useful in cases - // where the first interaction is less than the `durationThreshold`. - po.observe({ type: 'first-input', buffered: true }); - - onHidden.onHidden(() => { - handleEntries(po.takeRecords() ); - - // If the interaction count shows that there were interactions but - // none were captured by the PerformanceObserver, report a latency of 0. - if (metric.value < 0 && getInteractionCountForNavigation() > 0) { - metric.value = 0; - metric.entries = []; - } - - report(true); - }); - } -}; - -exports.onINP = onINP; -//# sourceMappingURL=getINP.js.map - - -/***/ }), - -/***/ 29956: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); -const bindReporter = __nccwpck_require__(40361); -const getActivationStart = __nccwpck_require__(85771); -const getVisibilityWatcher = __nccwpck_require__(53451); -const initMetric = __nccwpck_require__(40565); -const observe = __nccwpck_require__(66407); -const onHidden = __nccwpck_require__(11890); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const reportedMetricIDs = {}; - -/** - * Calculates the [LCP](https://web.dev/lcp/) value for the current page and - * calls the `callback` function once the value is ready (along with the - * relevant `largest-contentful-paint` performance entry used to determine the - * value). The reported value is a `DOMHighResTimeStamp`. - */ -const onLCP = (onReport) => { - const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher(); - const metric = initMetric.initMetric('LCP'); - let report; - - const handleEntries = (entries) => { - const lastEntry = entries[entries.length - 1] ; - if (lastEntry) { - // The startTime attribute returns the value of the renderTime if it is - // not 0, and the value of the loadTime otherwise. The activationStart - // reference is used because LCP should be relative to page activation - // rather than navigation start if the page was prerendered. - const value = Math.max(lastEntry.startTime - getActivationStart.getActivationStart(), 0); - - // Only report if the page wasn't hidden prior to LCP. - if (value < visibilityWatcher.firstHiddenTime) { - metric.value = value; - metric.entries = [lastEntry]; - report(); - } - } - }; - - const po = observe.observe('largest-contentful-paint', handleEntries); - - if (po) { - report = bindReporter.bindReporter(onReport, metric); - - const stopListening = () => { - if (!reportedMetricIDs[metric.id]) { - handleEntries(po.takeRecords() ); - po.disconnect(); - reportedMetricIDs[metric.id] = true; - report(true); + }; + Denque.prototype.clear = function clear() { + this._list = new Array(this._list.length); + this._head = 0; + this._tail = 0; + }; + Denque.prototype.isEmpty = function isEmpty() { + return this._head === this._tail; + }; + Denque.prototype.toArray = function toArray2() { + return this._copyArray(false); + }; + Denque.prototype._fromArray = function _fromArray(array) { + var length = array.length; + var capacity = this._nextPowerOf2(length); + this._list = new Array(capacity); + this._capacityMask = capacity - 1; + this._tail = length; + for (var i = 0; i < length; i++) this._list[i] = array[i]; + }; + Denque.prototype._copyArray = function _copyArray(fullCopy, size) { + var src = this._list; + var capacity = src.length; + var length = this.length; + size = size | length; + if (size == length && this._head < this._tail) { + return this._list.slice(this._head, this._tail); + } + var dest = new Array(size); + var k = 0; + var i; + if (fullCopy || this._head > this._tail) { + for (i = this._head; i < capacity; i++) dest[k++] = src[i]; + for (i = 0; i < this._tail; i++) dest[k++] = src[i]; + } else { + for (i = this._head; i < this._tail; i++) dest[k++] = src[i]; } + return dest; }; - - // Stop listening after input. Note: while scrolling is an input that - // stop LCP observation, it's unreliable since it can be programmatically - // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75 - ['keydown', 'click'].forEach(type => { - if (types.WINDOW.document) { - addEventListener(type, stopListening, { once: true, capture: true }); + Denque.prototype._growArray = function _growArray() { + if (this._head != 0) { + var newList = this._copyArray(true, this._list.length << 1); + this._tail = this._list.length; + this._head = 0; + this._list = newList; + } else { + this._tail = this._list.length; + this._list.length <<= 1; } - }); - - onHidden.onHidden(stopListening, true); - - return stopListening; + this._capacityMask = this._capacityMask << 1 | 1; + }; + Denque.prototype._shrinkArray = function _shrinkArray() { + this._list.length >>>= 1; + this._capacityMask >>>= 1; + }; + Denque.prototype._nextPowerOf2 = function _nextPowerOf2(num) { + var log2 = Math.log(num) / Math.log(2); + var nextPow2 = 1 << log2 + 1; + return Math.max(nextPow2, 4); + }; + module2.exports = Denque; } +}); - return; -}; - -exports.onLCP = onLCP; -//# sourceMappingURL=getLCP.js.map - - -/***/ }), - -/***/ 40361: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const bindReporter = ( - callback, - metric, - reportAllChanges, -) => { - let prevValue; - let delta; - return (forceReport) => { - if (metric.value >= 0) { - if (forceReport || reportAllChanges) { - delta = metric.value - (prevValue || 0); - - // Report the metric if there's a non-zero delta or if no previous - // value exists (which can happen in the case of the document becoming - // hidden when the metric value is 0). - // See: https://github.com/GoogleChrome/web-vitals/issues/14 - if (delta || prevValue === undefined) { - prevValue = metric.value; - metric.delta = delta; - callback(metric); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/DelayQueue.js +var require_DelayQueue = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/DelayQueue.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils3(); + var Deque = require_denque(); + var debug3 = (0, utils_1.Debug)("delayqueue"); + var DelayQueue = class { + constructor() { + this.queues = {}; + this.timeouts = {}; + } + /** + * Add a new item to the queue + * + * @param bucket bucket name + * @param item function that will run later + * @param options + */ + push(bucket, item, options2) { + const callback = options2.callback || process.nextTick; + if (!this.queues[bucket]) { + this.queues[bucket] = new Deque(); + } + const queue = this.queues[bucket]; + queue.push(item); + if (!this.timeouts[bucket]) { + this.timeouts[bucket] = setTimeout(() => { + callback(() => { + this.timeouts[bucket] = null; + this.execute(bucket); + }); + }, options2.timeout); } } - } - }; -}; - -exports.bindReporter = bindReporter; -//# sourceMappingURL=bindReporter.js.map - - -/***/ }), - -/***/ 17982: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Performantly generate a unique, 30-char string by combining a version - * number, the current timestamp with a 13-digit number integer. - * @return {string} - */ -const generateUniqueID = () => { - return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`; -}; - -exports.generateUniqueID = generateUniqueID; -//# sourceMappingURL=generateUniqueID.js.map - - -/***/ }), - -/***/ 85771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const getNavigationEntry = __nccwpck_require__(47509); - -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const getActivationStart = () => { - const navEntry = getNavigationEntry.getNavigationEntry(); - return (navEntry && navEntry.activationStart) || 0; -}; - -exports.getActivationStart = getActivationStart; -//# sourceMappingURL=getActivationStart.js.map - - -/***/ }), - -/***/ 47509: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); - -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const getNavigationEntryFromPerformanceTiming = () => { - // eslint-disable-next-line deprecation/deprecation - const timing = types.WINDOW.performance.timing; - // eslint-disable-next-line deprecation/deprecation - const type = types.WINDOW.performance.navigation.type; - - const navigationEntry = { - entryType: 'navigation', - startTime: 0, - type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate', - }; - - for (const key in timing) { - if (key !== 'navigationStart' && key !== 'toJSON') { - // eslint-disable-next-line deprecation/deprecation - navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0); - } - } - return navigationEntry ; -}; - -const getNavigationEntry = () => { - if (types.WINDOW.__WEB_VITALS_POLYFILL__) { - return ( - types.WINDOW.performance && - ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) || - getNavigationEntryFromPerformanceTiming()) - ); - } else { - return types.WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0]; - } -}; - -exports.getNavigationEntry = getNavigationEntry; -//# sourceMappingURL=getNavigationEntry.js.map - - -/***/ }), - -/***/ 53451: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); -const onHidden = __nccwpck_require__(11890); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -let firstHiddenTime = -1; - -const initHiddenTime = () => { - // If the document is hidden and not prerendering, assume it was always - // hidden and the page was loaded in the background. - if (types.WINDOW.document && types.WINDOW.document.visibilityState) { - firstHiddenTime = types.WINDOW.document.visibilityState === 'hidden' && !types.WINDOW.document.prerendering ? 0 : Infinity; - } -}; - -const trackChanges = () => { - // Update the time if/when the document becomes hidden. - onHidden.onHidden(({ timeStamp }) => { - firstHiddenTime = timeStamp; - }, true); -}; - -const getVisibilityWatcher = ( - -) => { - if (firstHiddenTime < 0) { - // If the document is hidden when this code runs, assume it was hidden - // since navigation start. This isn't a perfect heuristic, but it's the - // best we can do until an API is available to support querying past - // visibilityState. - initHiddenTime(); - trackChanges(); - } - return { - get firstHiddenTime() { - return firstHiddenTime; - }, - }; -}; - -exports.getVisibilityWatcher = getVisibilityWatcher; -//# sourceMappingURL=getVisibilityWatcher.js.map - - -/***/ }), - -/***/ 40565: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); -const generateUniqueID = __nccwpck_require__(17982); -const getActivationStart = __nccwpck_require__(85771); -const getNavigationEntry = __nccwpck_require__(47509); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const initMetric = (name, value) => { - const navEntry = getNavigationEntry.getNavigationEntry(); - let navigationType = 'navigate'; - - if (navEntry) { - if ((types.WINDOW.document && types.WINDOW.document.prerendering) || getActivationStart.getActivationStart() > 0) { - navigationType = 'prerender'; - } else { - navigationType = navEntry.type.replace(/_/g, '-') ; - } - } - - return { - name, - value: typeof value === 'undefined' ? -1 : value, - rating: 'good', // Will be updated if the value changes. - delta: 0, - entries: [], - id: generateUniqueID.generateUniqueID(), - navigationType, - }; -}; - -exports.initMetric = initMetric; -//# sourceMappingURL=initMetric.js.map - - -/***/ }), - -/***/ 66407: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Takes a performance entry type and a callback function, and creates a - * `PerformanceObserver` instance that will observe the specified entry type - * with buffering enabled and call the callback _for each entry_. - * - * This function also feature-detects entry support and wraps the logic in a - * try/catch to avoid errors in unsupporting browsers. - */ -const observe = ( - type, - callback, - opts, -) => { - try { - if (PerformanceObserver.supportedEntryTypes.includes(type)) { - const po = new PerformanceObserver(list => { - callback(list.getEntries() ); - }); - po.observe( - Object.assign( - { - type, - buffered: true, - }, - opts || {}, - ) , - ); - return po; - } - } catch (e) { - // Do nothing. - } - return; -}; - -exports.observe = observe; -//# sourceMappingURL=observe.js.map - - -/***/ }), - -/***/ 11890: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const onHidden = (cb, once) => { - const onHiddenOrPageHide = (event) => { - if (event.type === 'pagehide' || types.WINDOW.document.visibilityState === 'hidden') { - cb(event); - if (once) { - removeEventListener('visibilitychange', onHiddenOrPageHide, true); - removeEventListener('pagehide', onHiddenOrPageHide, true); + execute(bucket) { + const queue = this.queues[bucket]; + if (!queue) { + return; + } + const { length } = queue; + if (!length) { + return; + } + debug3("send %d commands in %s queue", length, bucket); + this.queues[bucket] = null; + while (queue.length > 0) { + queue.shift()(); + } } - } - }; - - if (types.WINDOW.document) { - addEventListener('visibilitychange', onHiddenOrPageHide, true); - // Some browsers have buggy implementations of visibilitychange, - // so we use pagehide in addition, just to be safe. - addEventListener('pagehide', onHiddenOrPageHide, true); - } -}; - -exports.onHidden = onHidden; -//# sourceMappingURL=onHidden.js.map - - -/***/ }), - -/***/ 9074: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const observe = __nccwpck_require__(66407); - -let interactionCountEstimate = 0; -let minKnownInteractionId = Infinity; -let maxKnownInteractionId = 0; - -const updateEstimate = (entries) => { - (entries ).forEach(e => { - if (e.interactionId) { - minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId); - maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId); - - interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0; - } - }); -}; - -let po; - -/** - * Returns the `interactionCount` value using the native API (if available) - * or the polyfill estimate in this module. - */ -const getInteractionCount = () => { - return po ? interactionCountEstimate : performance.interactionCount || 0; -}; - -/** - * Feature detects native support or initializes the polyfill if needed. - */ -const initInteractionCountPolyfill = () => { - if ('interactionCount' in performance || po) return; - - po = observe.observe('event', updateEstimate, { - type: 'event', - buffered: true, - durationThreshold: 0, - } ); -}; - -exports.getInteractionCount = getInteractionCount; -exports.initInteractionCountPolyfill = initInteractionCountPolyfill; -//# sourceMappingURL=interactionCountPolyfill.js.map - - -/***/ }), - -/***/ 85810: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const types = __nccwpck_require__(3297); -const bindReporter = __nccwpck_require__(40361); -const getActivationStart = __nccwpck_require__(85771); -const getNavigationEntry = __nccwpck_require__(47509); -const initMetric = __nccwpck_require__(40565); - -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Runs in the next task after the page is done loading and/or prerendering. - * @param callback - */ -const whenReady = (callback) => { - if (!types.WINDOW.document) { - return; - } - - if (types.WINDOW.document.prerendering) { - addEventListener('prerenderingchange', () => whenReady(callback), true); - } else if (types.WINDOW.document.readyState !== 'complete') { - addEventListener('load', () => whenReady(callback), true); - } else { - // Queue a task so the callback runs after `loadEventEnd`. - setTimeout(callback, 0); - } -}; - -/** - * Calculates the [TTFB](https://web.dev/time-to-first-byte/) value for the - * current page and calls the `callback` function once the page has loaded, - * along with the relevant `navigation` performance entry used to determine the - * value. The reported value is a `DOMHighResTimeStamp`. - * - * Note, this function waits until after the page is loaded to call `callback` - * in order to ensure all properties of the `navigation` entry are populated. - * This is useful if you want to report on other metrics exposed by the - * [Navigation Timing API](https://w3c.github.io/navigation-timing/). For - * example, the TTFB metric starts from the page's [time - * origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it - * includes time spent on DNS lookup, connection negotiation, network latency, - * and server processing time. - */ -const onTTFB = (onReport, opts) => { - // Set defaults - // eslint-disable-next-line no-param-reassign - opts = opts || {}; - - // https://web.dev/ttfb/#what-is-a-good-ttfb-score - // const thresholds = [800, 1800]; - - const metric = initMetric.initMetric('TTFB'); - const report = bindReporter.bindReporter(onReport, metric, opts.reportAllChanges); - - whenReady(() => { - const navEntry = getNavigationEntry.getNavigationEntry() ; - - if (navEntry) { - // The activationStart reference is used because TTFB should be - // relative to page activation rather than navigation start if the - // page was prerendered. But in cases where `activationStart` occurs - // after the first byte is received, this time should be clamped at 0. - metric.value = Math.max(navEntry.responseStart - getActivationStart.getActivationStart(), 0); - - // In some cases the value reported is negative or is larger - // than the current page time. Ignore these cases: - // https://github.com/GoogleChrome/web-vitals/issues/137 - // https://github.com/GoogleChrome/web-vitals/issues/162 - if (metric.value < 0 || metric.value > performance.now()) return; - - metric.entries = [navEntry]; - - report(true); - } - }); -}; - -exports.onTTFB = onTTFB; -//# sourceMappingURL=onTTFB.js.map - - -/***/ }), - -/***/ 97547: -/***/ ((__unused_webpack_module, exports) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code. - * - * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking. - */ -const DEBUG_BUILD = (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__); - -exports.DEBUG_BUILD = DEBUG_BUILD; -//# sourceMappingURL=debug-build.js.map - - -/***/ }), - -/***/ 4997: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -/** - * Create and track fetch request spans for usage in combination with `addInstrumentationHandler`. - * - * @returns Span if a span was created, otherwise void. - */ -function instrumentFetchRequest( - handlerData, - shouldCreateSpan, - shouldAttachHeaders, - spans, - spanOrigin = 'auto.http.browser', -) { - if (!core.hasTracingEnabled() || !handlerData.fetchData) { - return undefined; - } - - const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url); - - if (handlerData.endTimestamp && shouldCreateSpanResult) { - const spanId = handlerData.fetchData.__span; - if (!spanId) return; - - const span = spans[spanId]; - if (span) { - endSpan(span, handlerData); - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete - delete spans[spanId]; - } - return undefined; - } - - const scope = core.getCurrentScope(); - const client = core.getClient(); - - const { method, url } = handlerData.fetchData; - - const fullUrl = getFullURL(url); - const host = fullUrl ? utils.parseUrl(fullUrl).host : undefined; - - const span = shouldCreateSpanResult - ? core.startInactiveSpan({ - name: `${method} ${url}`, - onlyIfParent: true, - attributes: { - url, - type: 'fetch', - 'http.method': method, - 'http.url': fullUrl, - 'server.address': host, - [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, - }, - op: 'http.client', - }) - : undefined; - - if (span) { - handlerData.fetchData.__span = span.spanContext().spanId; - spans[span.spanContext().spanId] = span; - } - - if (shouldAttachHeaders(handlerData.fetchData.url) && client) { - const request = handlerData.args[0]; - - // In case the user hasn't set the second argument of a fetch call we default it to `{}`. - handlerData.args[1] = handlerData.args[1] || {}; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const options = handlerData.args[1]; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access - options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span); - } - - return span; -} - -/** - * Adds sentry-trace and baggage headers to the various forms of fetch headers - */ -function addTracingHeadersToFetchRequest( - request, // unknown is actually type Request but we can't export DOM types from this package, - client, - scope, - options - -, - requestSpan, -) { - // eslint-disable-next-line deprecation/deprecation - const span = requestSpan || scope.getSpan(); - - const isolationScope = core.getIsolationScope(); - - const { traceId, spanId, sampled, dsc } = { - ...isolationScope.getPropagationContext(), - ...scope.getPropagationContext(), - }; - - const sentryTraceHeader = span ? core.spanToTraceHeader(span) : utils.generateSentryTraceHeader(traceId, spanId, sampled); - - const sentryBaggageHeader = utils.dynamicSamplingContextToSentryBaggageHeader( - dsc || - (span ? core.getDynamicSamplingContextFromSpan(span) : core.getDynamicSamplingContextFromClient(traceId, client, scope)), - ); - - const headers = - options.headers || - (typeof Request !== 'undefined' && utils.isInstanceOf(request, Request) ? (request ).headers : undefined); - - if (!headers) { - return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader }; - } else if (typeof Headers !== 'undefined' && utils.isInstanceOf(headers, Headers)) { - const newHeaders = new Headers(headers ); - - newHeaders.append('sentry-trace', sentryTraceHeader); - - if (sentryBaggageHeader) { - // If the same header is appended multiple times the browser will merge the values into a single request header. - // Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. - newHeaders.append(utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader); - } - - return newHeaders ; - } else if (Array.isArray(headers)) { - const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]]; - - if (sentryBaggageHeader) { - // If there are multiple entries with the same key, the browser will merge the values into a single request header. - // Its therefore safe to simply push a "baggage" entry, even though there might already be another baggage header. - newHeaders.push([utils.BAGGAGE_HEADER_NAME, sentryBaggageHeader]); - } - - return newHeaders ; - } else { - const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined; - const newBaggageHeaders = []; - - if (Array.isArray(existingBaggageHeader)) { - newBaggageHeaders.push(...existingBaggageHeader); - } else if (existingBaggageHeader) { - newBaggageHeaders.push(existingBaggageHeader); - } - - if (sentryBaggageHeader) { - newBaggageHeaders.push(sentryBaggageHeader); - } - - return { - ...(headers ), - 'sentry-trace': sentryTraceHeader, - baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined, }; + exports2.default = DelayQueue; } -} - -function getFullURL(url) { - try { - const parsed = new URL(url); - return parsed.href; - } catch (e) { - return undefined; - } -} - -function endSpan(span, handlerData) { - if (handlerData.response) { - core.setHttpStatus(span, handlerData.response.status); - - const contentLength = - handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length'); - - if (contentLength) { - const contentLengthNum = parseInt(contentLength); - if (contentLengthNum > 0) { - span.setAttribute('http.response_content_length', contentLengthNum); - } - } - } else if (handlerData.error) { - span.setStatus('internal_error'); - } - span.end(); -} - -exports.addTracingHeadersToFetchRequest = addTracingHeadersToFetchRequest; -exports.instrumentFetchRequest = instrumentFetchRequest; -//# sourceMappingURL=fetch.js.map - - -/***/ }), - -/***/ 28849: -/***/ ((module, exports, __nccwpck_require__) => { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); - -/** - * @private - */ -function _autoloadDatabaseIntegrations() { - const carrier = core.getMainCarrier(); - if (!carrier.__SENTRY__) { - return; - } - - const packageToIntegrationMapping = { - mongodb() { - const integration = utils.dynamicRequire(module, './node/integrations/mongo') - -; - return new integration.Mongo(); - }, - mongoose() { - const integration = utils.dynamicRequire(module, './node/integrations/mongo') - -; - return new integration.Mongo(); - }, - mysql() { - const integration = utils.dynamicRequire(module, './node/integrations/mysql') - -; - return new integration.Mysql(); - }, - pg() { - const integration = utils.dynamicRequire(module, './node/integrations/postgres') - -; - return new integration.Postgres(); - }, - }; - - const mappedPackages = Object.keys(packageToIntegrationMapping) - .filter(moduleName => !!utils.loadModule(moduleName)) - .map(pkg => { - try { - return packageToIntegrationMapping[pkg](); - } catch (e) { - return undefined; - } - }) - .filter(p => p) ; - - if (mappedPackages.length > 0) { - carrier.__SENTRY__.integrations = [...(carrier.__SENTRY__.integrations || []), ...mappedPackages]; - } -} - -/** - * This patches the global object and injects the Tracing extensions methods - */ -function addExtensionMethods() { - core.addTracingExtensions(); - - // Detect and automatically load specified integrations. - if (utils.isNodeEnv()) { - _autoloadDatabaseIntegrations(); - } -} - -exports.addExtensionMethods = addExtensionMethods; -//# sourceMappingURL=extensions.js.map - - -/***/ }), - -/***/ 99303: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const express = __nccwpck_require__(90170); -const postgres = __nccwpck_require__(11539); -const mysql = __nccwpck_require__(60212); -const mongo = __nccwpck_require__(89406); -const prisma = __nccwpck_require__(96760); -const graphql = __nccwpck_require__(78487); -const apollo = __nccwpck_require__(92675); -const lazy = __nccwpck_require__(85102); -const browsertracing = __nccwpck_require__(49520); -const browserTracingIntegration = __nccwpck_require__(22464); -const request = __nccwpck_require__(21673); -const instrument = __nccwpck_require__(59011); -const fetch = __nccwpck_require__(4997); -const extensions = __nccwpck_require__(28849); - - - -exports.IdleTransaction = core.IdleTransaction; -exports.Span = core.Span; -exports.SpanStatus = core.SpanStatus; -exports.Transaction = core.Transaction; -exports.extractTraceparentData = core.extractTraceparentData; -exports.getActiveTransaction = core.getActiveTransaction; -exports.hasTracingEnabled = core.hasTracingEnabled; -exports.spanStatusfromHttpCode = core.spanStatusfromHttpCode; -exports.startIdleTransaction = core.startIdleTransaction; -exports.TRACEPARENT_REGEXP = utils.TRACEPARENT_REGEXP; -exports.stripUrlQueryAndFragment = utils.stripUrlQueryAndFragment; -exports.Express = express.Express; -exports.Postgres = postgres.Postgres; -exports.Mysql = mysql.Mysql; -exports.Mongo = mongo.Mongo; -exports.Prisma = prisma.Prisma; -exports.GraphQL = graphql.GraphQL; -exports.Apollo = apollo.Apollo; -exports.lazyLoadedNodePerformanceMonitoringIntegrations = lazy.lazyLoadedNodePerformanceMonitoringIntegrations; -exports.BROWSER_TRACING_INTEGRATION_ID = browsertracing.BROWSER_TRACING_INTEGRATION_ID; -exports.BrowserTracing = browsertracing.BrowserTracing; -exports.browserTracingIntegration = browserTracingIntegration.browserTracingIntegration; -exports.startBrowserTracingNavigationSpan = browserTracingIntegration.startBrowserTracingNavigationSpan; -exports.startBrowserTracingPageLoadSpan = browserTracingIntegration.startBrowserTracingPageLoadSpan; -exports.defaultRequestInstrumentationOptions = request.defaultRequestInstrumentationOptions; -exports.instrumentOutgoingRequests = request.instrumentOutgoingRequests; -exports.addClsInstrumentationHandler = instrument.addClsInstrumentationHandler; -exports.addFidInstrumentationHandler = instrument.addFidInstrumentationHandler; -exports.addLcpInstrumentationHandler = instrument.addLcpInstrumentationHandler; -exports.addPerformanceInstrumentationHandler = instrument.addPerformanceInstrumentationHandler; -exports.addTracingHeadersToFetchRequest = fetch.addTracingHeadersToFetchRequest; -exports.instrumentFetchRequest = fetch.instrumentFetchRequest; -exports.addExtensionMethods = extensions.addExtensionMethods; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 92675: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -/** Tracing integration for Apollo */ -class Apollo { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Apollo';} - - /** - * @inheritDoc - */ - - /** - * @inheritDoc - */ - constructor( - options = { - useNestjs: false, - }, - ) { - this.name = Apollo.id; - this._useNest = !!options.useNestjs; - } - - /** @inheritdoc */ - loadDependency() { - if (this._useNest) { - this._module = this._module || utils.loadModule('@nestjs/graphql'); - } else { - this._module = this._module || utils.loadModule('apollo-server-core'); - } - - return this._module; - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('Apollo Integration is skipped because of instrumenter configuration.'); - return; - } - - if (this._useNest) { - const pkg = this.loadDependency(); +}); - if (!pkg) { - debugBuild.DEBUG_BUILD && utils.logger.error('Apollo-NestJS Integration was unable to require @nestjs/graphql package.'); - return; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/index.js +var require_cluster = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/cluster/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = __require("events"); + var redis_errors_1 = require_redis_errors(); + var standard_as_callback_1 = require_built2(); + var Command_1 = require_Command(); + var ClusterAllFailedError_1 = require_ClusterAllFailedError(); + var Redis_1 = require_Redis(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils3(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var ClusterOptions_1 = require_ClusterOptions(); + var ClusterSubscriber_1 = require_ClusterSubscriber(); + var ConnectionPool_1 = require_ConnectionPool(); + var DelayQueue_1 = require_DelayQueue(); + var util_1 = require_util(); + var Deque = require_denque(); + var debug3 = (0, utils_1.Debug)("cluster"); + var REJECT_OVERWRITTEN_COMMANDS = /* @__PURE__ */ new WeakSet(); + var Cluster = class _Cluster extends Commander_1.default { + /** + * Creates an instance of Cluster. + */ + constructor(startupNodes, options2 = {}) { + super(); + this.slots = []; + this._groupsIds = {}; + this._groupsBySlot = Array(16384); + this.isCluster = true; + this.retryAttempts = 0; + this.delayQueue = new DelayQueue_1.default(); + this.offlineQueue = new Deque(); + this.isRefreshing = false; + this._refreshSlotsCacheCallbacks = []; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this._readyDelayedCallbacks = []; + this.connectionEpoch = 0; + events_1.EventEmitter.call(this); + this.startupNodes = startupNodes; + this.options = (0, utils_1.defaults)({}, options2, ClusterOptions_1.DEFAULT_CLUSTER_OPTIONS, this.options); + if (this.options.redisOptions && this.options.redisOptions.keyPrefix && !this.options.keyPrefix) { + this.options.keyPrefix = this.options.redisOptions.keyPrefix; + } + if (typeof this.options.scaleReads !== "function" && ["all", "master", "slave"].indexOf(this.options.scaleReads) === -1) { + throw new Error('Invalid option scaleReads "' + this.options.scaleReads + '". Expected "all", "master", "slave" or a custom function'); + } + this.connectionPool = new ConnectionPool_1.default(this.options.redisOptions); + this.connectionPool.on("-node", (redis, key) => { + this.emit("-node", redis); + }); + this.connectionPool.on("+node", (redis) => { + this.emit("+node", redis); + }); + this.connectionPool.on("drain", () => { + this.setStatus("close"); + }); + this.connectionPool.on("nodeError", (error, key) => { + this.emit("node error", error, key); + }); + this.subscriber = new ClusterSubscriber_1.default(this.connectionPool, this); + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch((err) => { + debug3("connecting failed: %s", err); + }); + } } - /** - * Iterate over resolvers of NestJS ResolversExplorerService before schemas are constructed. + * Connect to a cluster */ - utils.fill( - pkg.GraphQLFactory.prototype, - 'mergeWithSchema', - function (orig) { - return function ( - - ...args - ) { - utils.fill(this.resolversExplorerService, 'explore', function (orig) { - return function () { - const resolvers = utils.arrayify(orig.call(this)); - - const instrumentedResolvers = instrumentResolvers(resolvers, getCurrentHub); - - return instrumentedResolvers; - }; + connect() { + return new Promise((resolve4, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + const epoch = ++this.connectionEpoch; + this.setStatus("connecting"); + this.resolveStartupNodeHostnames().then((nodes) => { + if (this.connectionEpoch !== epoch) { + debug3("discard connecting after resolving startup nodes because epoch not match: %d != %d", epoch, this.connectionEpoch); + reject(new redis_errors_1.RedisError("Connection is discarded because a new connection is made")); + return; + } + if (this.status !== "connecting") { + debug3("discard connecting after resolving startup nodes because the status changed to %s", this.status); + reject(new redis_errors_1.RedisError("Connection is aborted")); + return; + } + this.connectionPool.reset(nodes); + const readyHandler = () => { + this.setStatus("ready"); + this.retryAttempts = 0; + this.executeOfflineCommands(); + this.resetNodesRefreshInterval(); + resolve4(); + }; + let closeListener = void 0; + const refreshListener = () => { + this.invokeReadyDelayedCallbacks(void 0); + this.removeListener("close", closeListener); + this.manuallyClosing = false; + this.setStatus("connect"); + if (this.options.enableReadyCheck) { + this.readyCheck((err, fail) => { + if (err || fail) { + debug3("Ready check failed (%s). Reconnecting...", err || fail); + if (this.status === "connect") { + this.disconnect(true); + } + } else { + readyHandler(); + } + }); + } else { + readyHandler(); + } + }; + closeListener = () => { + const error = new Error("None of startup nodes is available"); + this.removeListener("refresh", refreshListener); + this.invokeReadyDelayedCallbacks(error); + reject(error); + }; + this.once("refresh", refreshListener); + this.once("close", closeListener); + this.once("close", this.handleCloseEvent.bind(this)); + this.refreshSlotsCache((err) => { + if (err && err.message === ClusterAllFailedError_1.default.defaultMessage) { + Redis_1.default.prototype.silentEmit.call(this, "error", err); + this.connectionPool.reset([]); + } }); - - return orig.call(this, ...args); - }; - }, - ); - } else { - const pkg = this.loadDependency(); - - if (!pkg) { - debugBuild.DEBUG_BUILD && utils.logger.error('Apollo Integration was unable to require apollo-server-core package.'); - return; + this.subscriber.start(); + }).catch((err) => { + this.setStatus("close"); + this.handleCloseEvent(err); + this.invokeReadyDelayedCallbacks(err); + reject(err); + }); + }); } - /** - * Iterate over resolvers of the ApolloServer instance before schemas are constructed. + * Disconnect from every node in the cluster. */ - utils.fill(pkg.ApolloServerBase.prototype, 'constructSchema', function (orig) { - return function ( - -) { - if (!this.config.resolvers) { - if (debugBuild.DEBUG_BUILD) { - if (this.config.schema) { - utils.logger.warn( - 'Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.' + - 'If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead.', - ); - utils.logger.warn(); - } else if (this.config.modules) { - utils.logger.warn( - 'Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property.', - ); - } - - utils.logger.error('Skipping tracing as no resolvers found on the `ApolloServer` instance.'); - } - - return orig.call(this); - } - - const resolvers = utils.arrayify(this.config.resolvers); - - this.config.resolvers = instrumentResolvers(resolvers, getCurrentHub); - - return orig.call(this); - }; - }); - } - } -}Apollo.__initStatic(); - -// eslint-disable-next-line deprecation/deprecation -function instrumentResolvers(resolvers, getCurrentHub) { - return resolvers.map(model => { - Object.keys(model).forEach(resolverGroupName => { - Object.keys(model[resolverGroupName]).forEach(resolverName => { - if (typeof model[resolverGroupName][resolverName] !== 'function') { - return; + disconnect(reconnect = false) { + const status = this.status; + this.setStatus("disconnecting"); + if (!reconnect) { + this.manuallyClosing = true; } - - wrapResolver(model, resolverGroupName, resolverName, getCurrentHub); - }); - }); - - return model; - }); -} - -/** - * Wrap a single resolver which can be a parent of other resolvers and/or db operations. - */ -function wrapResolver( - model, - resolverGroupName, - resolverName, - // eslint-disable-next-line deprecation/deprecation - getCurrentHub, -) { - utils.fill(model[resolverGroupName], resolverName, function (orig) { - return function ( ...args) { - // eslint-disable-next-line deprecation/deprecation - const scope = getCurrentHub().getScope(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({ - description: `${resolverGroupName}.${resolverName}`, - op: 'graphql.resolve', - origin: 'auto.graphql.apollo', - })]); - - const rv = orig.call(this, ...args); - - if (utils.isThenable(rv)) { - return rv.then((res) => { - _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]); - return res; - }); - } - - _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]); - - return rv; - }; - }); -} - -exports.Apollo = Apollo; -//# sourceMappingURL=apollo.js.map - - -/***/ }), - -/***/ 90170: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -/* eslint-disable max-lines */ - -/** - * Express integration - * - * Provides an request and error handler for Express framework as well as tracing capabilities - */ -class Express { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Express';} - - /** - * @inheritDoc - */ - - /** - * Express App instance - */ - - /** - * @inheritDoc - */ - constructor(options = {}) { - this.name = Express.id; - this._router = options.router || options.app; - this._methods = (Array.isArray(options.methods) ? options.methods : []).concat('use'); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (!this._router) { - debugBuild.DEBUG_BUILD && utils.logger.error('ExpressIntegration is missing an Express instance'); - return; - } - - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('Express Integration is skipped because of instrumenter configuration.'); - return; - } - - instrumentMiddlewares(this._router, this._methods); - instrumentRouter(this._router ); - } -}Express.__initStatic(); - -/** - * Wraps original middleware function in a tracing call, which stores the info about the call as a span, - * and finishes it once the middleware is done invoking. - * - * Express middlewares have 3 various forms, thus we have to take care of all of them: - * // sync - * app.use(function (req, res) { ... }) - * // async - * app.use(function (req, res, next) { ... }) - * // error handler - * app.use(function (err, req, res, next) { ... }) - * - * They all internally delegate to the `router[method]` of the given application instance. - */ -// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-explicit-any -function wrap(fn, method) { - const arity = fn.length; - - switch (arity) { - case 2: { - return function ( req, res) { - const transaction = res.__sentry_transaction; - if (transaction) { - // eslint-disable-next-line deprecation/deprecation - const span = transaction.startChild({ - description: fn.name, - op: `middleware.express.${method}`, - origin: 'auto.middleware.express', - }); - res.once('finish', () => { - span.end(); - }); + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + debug3("Canceled reconnecting attempts"); } - return fn.call(this, req, res); - }; - } - case 3: { - return function ( - - req, - res, - next, - ) { - const transaction = res.__sentry_transaction; - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([transaction, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({ - description: fn.name, - op: `middleware.express.${method}`, - origin: 'auto.middleware.express', - })]); - fn.call(this, req, res, function ( ...args) { - _optionalChain([span, 'optionalAccess', _4 => _4.end, 'call', _5 => _5()]); - next.call(this, ...args); - }); - }; - } - case 4: { - return function ( - - err, - req, - res, - next, - ) { - const transaction = res.__sentry_transaction; - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([transaction, 'optionalAccess', _6 => _6.startChild, 'call', _7 => _7({ - description: fn.name, - op: `middleware.express.${method}`, - origin: 'auto.middleware.express', - })]); - fn.call(this, err, req, res, function ( ...args) { - _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]); - next.call(this, ...args); - }); - }; - } - default: { - throw new Error(`Express middleware takes 2-4 arguments. Got: ${arity}`); - } - } -} - -/** - * Takes all the function arguments passed to the original `app` or `router` method, eg. `app.use` or `router.use` - * and wraps every function, as well as array of functions with a call to our `wrap` method. - * We have to take care of the arrays as well as iterate over all of the arguments, - * as `app.use` can accept middlewares in few various forms. - * - * app.use([], ) - * app.use([], , ...) - * app.use([], ...[]) - */ -function wrapMiddlewareArgs(args, method) { - return args.map((arg) => { - if (typeof arg === 'function') { - return wrap(arg, method); - } - - if (Array.isArray(arg)) { - return arg.map((a) => { - if (typeof a === 'function') { - return wrap(a, method); + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (status === "wait") { + this.setStatus("close"); + this.handleCloseEvent(); + } else { + this.connectionPool.reset([]); } - return a; - }); - } - - return arg; - }); -} - -/** - * Patches original router to utilize our tracing functionality - */ -function patchMiddleware(router, method) { - const originalCallback = router[method]; - - router[method] = function (...args) { - return originalCallback.call(this, ...wrapMiddlewareArgs(args, method)); - }; - - return router; -} - -/** - * Patches original router methods - */ -function instrumentMiddlewares(router, methods = []) { - methods.forEach((method) => patchMiddleware(router, method)); -} - -/** - * Patches the prototype of Express.Router to accumulate the resolved route - * if a layer instance's `match` function was called and it returned a successful match. - * - * @see https://github.com/expressjs/express/blob/master/lib/router/index.js - * - * @param appOrRouter the router instance which can either be an app (i.e. top-level) or a (nested) router. - */ -function instrumentRouter(appOrRouter) { - // This is how we can distinguish between app and routers - const isApp = 'settings' in appOrRouter; - - // In case the app's top-level router hasn't been initialized yet, we have to do it now - if (isApp && appOrRouter._router === undefined && appOrRouter.lazyrouter) { - appOrRouter.lazyrouter(); - } - - const router = isApp ? appOrRouter._router : appOrRouter; - - if (!router) { - /* - If we end up here, this means likely that this integration is used with Express 3 or Express 5. - For now, we don't support these versions (3 is very old and 5 is still in beta). To support Express 5, - we'd need to make more changes to the routing instrumentation because the router is no longer part of - the Express core package but maintained in its own package. The new router has different function - signatures and works slightly differently, demanding more changes than just taking the router from - `app.router` instead of `app._router`. - @see https://github.com/pillarjs/router - - TODO: Proper Express 5 support - */ - debugBuild.DEBUG_BUILD && utils.logger.debug('Cannot instrument router for URL Parameterization (did not find a valid router).'); - debugBuild.DEBUG_BUILD && utils.logger.debug('Routing instrumentation is currently only supported in Express 4.'); - return; - } - - const routerProto = Object.getPrototypeOf(router) ; - - const originalProcessParams = routerProto.process_params; - routerProto.process_params = function process_params( - layer, - called, - req, - res, - done, - ) { - // Base case: We're in the first part of the URL (thus we start with the root '/') - if (!req._reconstructedRoute) { - req._reconstructedRoute = ''; - } - - // If the layer's partial route has params, is a regex or an array, the route is stored in layer.route. - const { layerRoutePath, isRegex, isArray, numExtraSegments } = getLayerRoutePathInfo(layer); - - if (layerRoutePath || isRegex || isArray) { - req._hasParameters = true; - } - - // Otherwise, the hardcoded path (i.e. a partial route without params) is stored in layer.path - let partialRoute; - - if (layerRoutePath) { - partialRoute = layerRoutePath; - } else { + } /** - * prevent duplicate segment in _reconstructedRoute param if router match multiple routes before final path - * example: - * original url: /api/v1/1234 - * prevent: /api/api/v1/:userId - * router structure - * /api -> middleware - * /api/v1 -> middleware - * /1234 -> endpoint with param :userId - * final _reconstructedRoute is /api/v1/:userId - */ - partialRoute = preventDuplicateSegments(req.originalUrl, req._reconstructedRoute, layer.path) || ''; - } - - // Normalize the partial route so that it doesn't contain leading or trailing slashes - // and exclude empty or '*' wildcard routes. - // The exclusion of '*' routes is our best effort to not "pollute" the transaction name - // with interim handlers (e.g. ones that check authentication or do other middleware stuff). - // We want to end up with the parameterized URL of the incoming request without any extraneous path segments. - const finalPartialRoute = partialRoute - .split('/') - .filter(segment => segment.length > 0 && (isRegex || isArray || !segment.includes('*'))) - .join('/'); - - // If we found a valid partial URL, we append it to the reconstructed route - if (finalPartialRoute && finalPartialRoute.length > 0) { - // If the partial route is from a regex route, we append a '/' to close the regex - req._reconstructedRoute += `/${finalPartialRoute}${isRegex ? '/' : ''}`; - } - - // Now we check if we are in the "last" part of the route. We determine this by comparing the - // number of URL segments from the original URL to that of our reconstructed parameterized URL. - // If we've reached our final destination, we update the transaction name. - const urlLength = utils.getNumberOfUrlSegments(utils.stripUrlQueryAndFragment(req.originalUrl || '')) + numExtraSegments; - const routeLength = utils.getNumberOfUrlSegments(req._reconstructedRoute); - - if (urlLength === routeLength) { - if (!req._hasParameters) { - if (req._reconstructedRoute !== req.originalUrl) { - req._reconstructedRoute = req.originalUrl ? utils.stripUrlQueryAndFragment(req.originalUrl) : req.originalUrl; + * Quit the cluster gracefully. + */ + quit(callback) { + const status = this.status; + this.setStatus("disconnecting"); + this.manuallyClosing = true; + if (this.reconnectTimeout) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; } + this.clearNodesRefreshInterval(); + this.subscriber.stop(); + if (status === "wait") { + const ret = (0, standard_as_callback_1.default)(Promise.resolve("OK"), callback); + setImmediate(function() { + this.setStatus("close"); + this.handleCloseEvent(); + }.bind(this)); + return ret; + } + return (0, standard_as_callback_1.default)(Promise.all(this.nodes().map((node2) => node2.quit().catch((err) => { + if (err.message === utils_1.CONNECTION_CLOSED_ERROR_MSG) { + return "OK"; + } + throw err; + }))).then(() => "OK"), callback); } - - const transaction = res.__sentry_transaction; - const attributes = (transaction && core.spanToJSON(transaction).data) || {}; - if (transaction && attributes[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] !== 'custom') { - // If the request URL is '/' or empty, the reconstructed route will be empty. - // Therefore, we fall back to setting the final route to '/' in this case. - const finalRoute = req._reconstructedRoute || '/'; - - const [name, source] = utils.extractPathForTransaction(req, { path: true, method: true, customRoute: finalRoute }); - transaction.updateName(name); - transaction.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source); - } - } - - return originalProcessParams.call(this, layer, called, req, res, done); - }; -} - -/** - * Recreate layer.route.path from layer.regexp and layer.keys. - * Works until express.js used package path-to-regexp@0.1.7 - * or until layer.keys contain offset attribute - * - * @param layer the layer to extract the stringified route from - * - * @returns string in layer.route.path structure 'router/:pathParam' or undefined - */ -const extractOriginalRoute = ( - path, - regexp, - keys, -) => { - if (!path || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, 'access', _10 => _10[0], 'optionalAccess', _11 => _11.offset])) { - return undefined; - } - - const orderedKeys = keys.sort((a, b) => a.offset - b.offset); - - // add d flag for getting indices from regexp result - // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- regexp comes from express.js - const pathRegex = new RegExp(regexp, `${regexp.flags}d`); - /** - * use custom type cause of TS error with missing indices in RegExpExecArray - */ - const execResult = pathRegex.exec(path) ; - - if (!execResult || !execResult.indices) { - return undefined; - } - /** - * remove first match from regex cause contain whole layer.path - */ - const [, ...paramIndices] = execResult.indices; - - if (paramIndices.length !== orderedKeys.length) { - return undefined; - } - let resultPath = path; - let indexShift = 0; - - /** - * iterate param matches from regexp.exec - */ - paramIndices.forEach((item, index) => { - /** check if offsets is define because in some cases regex d flag returns undefined */ - if (item) { - const [startOffset, endOffset] = item; /** - * isolate part before param + * Create a new instance with the same startup nodes and options as the current one. + * + * @example + * ```js + * var cluster = new Redis.Cluster([{ host: "127.0.0.1", port: "30001" }]); + * var anotherCluster = cluster.duplicate(); + * ``` */ - const substr1 = resultPath.substring(0, startOffset - indexShift); + duplicate(overrideStartupNodes = [], overrideOptions = {}) { + const startupNodes = overrideStartupNodes.length > 0 ? overrideStartupNodes : this.startupNodes.slice(0); + const options2 = Object.assign({}, this.options, overrideOptions); + return new _Cluster(startupNodes, options2); + } /** - * define paramName as replacement in format :pathParam + * Get nodes with the specified role */ - const replacement = `:${orderedKeys[index].name}`; - + nodes(role = "all") { + if (role !== "all" && role !== "master" && role !== "slave") { + throw new Error('Invalid role "' + role + '". Expected "all", "master" or "slave"'); + } + return this.connectionPool.getNodes(role); + } /** - * isolate part after param + * This is needed in order not to install a listener for each auto pipeline + * + * @ignore */ - const substr2 = resultPath.substring(endOffset - indexShift); - + delayUntilReady(callback) { + this._readyDelayedCallbacks.push(callback); + } /** - * recreate original path but with param replacement + * Get the number of commands queued in automatic pipelines. + * + * This is not available (and returns 0) until the cluster is connected and slots information have been received. */ - resultPath = substr1 + replacement + substr2; - + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } /** - * calculate new index shift after resultPath was modified + * Refresh the slot cache + * + * @ignore */ - indexShift = indexShift + (endOffset - startOffset - replacement.length); - } - }); - - return resultPath; -}; - -/** - * Extracts and stringifies the layer's route which can either be a string with parameters (`users/:id`), - * a RegEx (`/test/`) or an array of strings and regexes (`['/path1', /\/path[2-5]/, /path/:id]`). Additionally - * returns extra information about the route, such as if the route is defined as regex or as an array. - * - * @param layer the layer to extract the stringified route from - * - * @returns an object containing the stringified route, a flag determining if the route was a regex - * and the number of extra segments to the matched path that are additionally in the route, - * if the route was an array (defaults to 0). - */ -function getLayerRoutePathInfo(layer) { - let lrp = _optionalChain([layer, 'access', _12 => _12.route, 'optionalAccess', _13 => _13.path]); - - const isRegex = utils.isRegExp(lrp); - const isArray = Array.isArray(lrp); - - if (!lrp) { - // parse node.js major version - // Next.js will complain if we directly use `proces.versions` here because of edge runtime. - const [major] = (utils.GLOBAL_OBJ ).process.versions.node.split('.').map(Number); - - // allow call extractOriginalRoute only if node version support Regex d flag, node 16+ - if (major >= 16) { + refreshSlotsCache(callback) { + if (callback) { + this._refreshSlotsCacheCallbacks.push(callback); + } + if (this.isRefreshing) { + return; + } + this.isRefreshing = true; + const _this = this; + const wrapper = (error) => { + this.isRefreshing = false; + for (const callback2 of this._refreshSlotsCacheCallbacks) { + callback2(error); + } + this._refreshSlotsCacheCallbacks = []; + }; + const nodes = (0, utils_1.shuffle)(this.connectionPool.getNodes()); + let lastNodeError = null; + function tryNode(index) { + if (index === nodes.length) { + const error = new ClusterAllFailedError_1.default(ClusterAllFailedError_1.default.defaultMessage, lastNodeError); + return wrapper(error); + } + const node2 = nodes[index]; + const key = `${node2.options.host}:${node2.options.port}`; + debug3("getting slot cache from %s", key); + _this.getInfoFromNode(node2, function(err) { + switch (_this.status) { + case "close": + case "end": + return wrapper(new Error("Cluster is disconnected.")); + case "disconnecting": + return wrapper(new Error("Cluster is disconnecting.")); + } + if (err) { + _this.emit("node error", err, key); + lastNodeError = err; + tryNode(index + 1); + } else { + _this.emit("refresh"); + wrapper(); + } + }); + } + tryNode(0); + } /** - * If lrp does not exist try to recreate original layer path from route regexp + * @ignore */ - lrp = extractOriginalRoute(layer.path, layer.regexp, layer.keys); - } - } - - if (!lrp) { - return { isRegex, isArray, numExtraSegments: 0 }; - } - - const numExtraSegments = isArray - ? Math.max(getNumberOfArrayUrlSegments(lrp ) - utils.getNumberOfUrlSegments(layer.path || ''), 0) - : 0; - - const layerRoutePath = getLayerRoutePathString(isArray, lrp); - - return { layerRoutePath, isRegex, isArray, numExtraSegments }; -} - -/** - * Returns the number of URL segments in an array of routes - * - * Example: ['/api/test', /\/api\/post[0-9]/, '/users/:id/details`] -> 7 - */ -function getNumberOfArrayUrlSegments(routesArray) { - return routesArray.reduce((accNumSegments, currentRoute) => { - // array members can be a RegEx -> convert them toString - return accNumSegments + utils.getNumberOfUrlSegments(currentRoute.toString()); - }, 0); -} - -/** - * Extracts and returns the stringified version of the layers route path - * Handles route arrays (by joining the paths together) as well as RegExp and normal - * string values (in the latter case the toString conversion is technically unnecessary but - * it doesn't hurt us either). - */ -function getLayerRoutePathString(isArray, lrp) { - if (isArray) { - return (lrp ).map(r => r.toString()).join(','); - } - return lrp && lrp.toString(); -} - -/** - * remove duplicate segment contain in layerPath against reconstructedRoute, - * and return only unique segment that can be added into reconstructedRoute - */ -function preventDuplicateSegments( - originalUrl, - reconstructedRoute, - layerPath, -) { - // filter query params - const normalizeURL = utils.stripUrlQueryAndFragment(originalUrl || ''); - const originalUrlSplit = _optionalChain([normalizeURL, 'optionalAccess', _14 => _14.split, 'call', _15 => _15('/'), 'access', _16 => _16.filter, 'call', _17 => _17(v => !!v)]); - let tempCounter = 0; - const currentOffset = _optionalChain([reconstructedRoute, 'optionalAccess', _18 => _18.split, 'call', _19 => _19('/'), 'access', _20 => _20.filter, 'call', _21 => _21(v => !!v), 'access', _22 => _22.length]) || 0; - const result = _optionalChain([layerPath -, 'optionalAccess', _23 => _23.split, 'call', _24 => _24('/') -, 'access', _25 => _25.filter, 'call', _26 => _26(segment => { - if (_optionalChain([originalUrlSplit, 'optionalAccess', _27 => _27[currentOffset + tempCounter]]) === segment) { - tempCounter += 1; - return true; - } - return false; - }) -, 'access', _28 => _28.join, 'call', _29 => _29('/')]); - return result; -} - -exports.Express = Express; -exports.extractOriginalRoute = extractOriginalRoute; -exports.preventDuplicateSegments = preventDuplicateSegments; -//# sourceMappingURL=express.js.map - - -/***/ }), - -/***/ 78487: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -/** Tracing integration for graphql package */ -class GraphQL { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'GraphQL';} - - /** - * @inheritDoc - */ - - constructor() { - this.name = GraphQL.id; - } - - /** @inheritdoc */ - loadDependency() { - return (this._module = this._module || utils.loadModule('graphql/execution/execute.js')); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('GraphQL Integration is skipped because of instrumenter configuration.'); - return; - } - - const pkg = this.loadDependency(); - - if (!pkg) { - debugBuild.DEBUG_BUILD && utils.logger.error('GraphQL Integration was unable to require graphql/execution package.'); - return; - } - - utils.fill(pkg, 'execute', function (orig) { - return function ( ...args) { - // eslint-disable-next-line deprecation/deprecation - const scope = getCurrentHub().getScope(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); - - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({ - description: 'execute', - op: 'graphql.execute', - origin: 'auto.graphql.graphql', - })]); - - // eslint-disable-next-line deprecation/deprecation - _optionalChain([scope, 'optionalAccess', _4 => _4.setSpan, 'call', _5 => _5(span)]); - - const rv = orig.call(this, ...args); - - if (utils.isThenable(rv)) { - return rv.then((res) => { - _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]); - // eslint-disable-next-line deprecation/deprecation - _optionalChain([scope, 'optionalAccess', _8 => _8.setSpan, 'call', _9 => _9(parentSpan)]); - - return res; - }); + sendCommand(command, stream, node2) { + if (this.status === "wait") { + this.connect().catch(utils_1.noop); } - - _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]); - // eslint-disable-next-line deprecation/deprecation - _optionalChain([scope, 'optionalAccess', _12 => _12.setSpan, 'call', _13 => _13(parentSpan)]); - return rv; - }; - }); - } -}GraphQL.__initStatic(); - -exports.GraphQL = GraphQL; -//# sourceMappingURL=graphql.js.map - - -/***/ }), - -/***/ 85102: -/***/ ((module, exports, __nccwpck_require__) => { - -/* module decorator */ module = __nccwpck_require__.nmd(module); -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); - -const lazyLoadedNodePerformanceMonitoringIntegrations = [ - () => { - const integration = utils.dynamicRequire(module, './apollo') - -; - return new integration.Apollo(); - }, - () => { - const integration = utils.dynamicRequire(module, './apollo') - -; - return new integration.Apollo({ useNestjs: true }); - }, - () => { - const integration = utils.dynamicRequire(module, './graphql') - -; - return new integration.GraphQL(); - }, - () => { - const integration = utils.dynamicRequire(module, './mongo') - -; - return new integration.Mongo(); - }, - () => { - const integration = utils.dynamicRequire(module, './mongo') - -; - return new integration.Mongo({ mongoose: true }); - }, - () => { - const integration = utils.dynamicRequire(module, './mysql') - -; - return new integration.Mysql(); - }, - () => { - const integration = utils.dynamicRequire(module, './postgres') - -; - return new integration.Postgres(); - }, -]; - -exports.lazyLoadedNodePerformanceMonitoringIntegrations = lazyLoadedNodePerformanceMonitoringIntegrations; -//# sourceMappingURL=lazy.js.map - - -/***/ }), - -/***/ 89406: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -// This allows us to use the same array for both defaults options and the type itself. -// (note `as const` at the end to make it a union of string literal types (i.e. "a" | "b" | ... ) -// and not just a string[]) - -const OPERATIONS = [ - 'aggregate', // aggregate(pipeline, options, callback) - 'bulkWrite', // bulkWrite(operations, options, callback) - 'countDocuments', // countDocuments(query, options, callback) - 'createIndex', // createIndex(fieldOrSpec, options, callback) - 'createIndexes', // createIndexes(indexSpecs, options, callback) - 'deleteMany', // deleteMany(filter, options, callback) - 'deleteOne', // deleteOne(filter, options, callback) - 'distinct', // distinct(key, query, options, callback) - 'drop', // drop(options, callback) - 'dropIndex', // dropIndex(indexName, options, callback) - 'dropIndexes', // dropIndexes(options, callback) - 'estimatedDocumentCount', // estimatedDocumentCount(options, callback) - 'find', // find(query, options, callback) - 'findOne', // findOne(query, options, callback) - 'findOneAndDelete', // findOneAndDelete(filter, options, callback) - 'findOneAndReplace', // findOneAndReplace(filter, replacement, options, callback) - 'findOneAndUpdate', // findOneAndUpdate(filter, update, options, callback) - 'indexes', // indexes(options, callback) - 'indexExists', // indexExists(indexes, options, callback) - 'indexInformation', // indexInformation(options, callback) - 'initializeOrderedBulkOp', // initializeOrderedBulkOp(options, callback) - 'insertMany', // insertMany(docs, options, callback) - 'insertOne', // insertOne(doc, options, callback) - 'isCapped', // isCapped(options, callback) - 'mapReduce', // mapReduce(map, reduce, options, callback) - 'options', // options(options, callback) - 'parallelCollectionScan', // parallelCollectionScan(options, callback) - 'rename', // rename(newName, options, callback) - 'replaceOne', // replaceOne(filter, doc, options, callback) - 'stats', // stats(options, callback) - 'updateMany', // updateMany(filter, update, options, callback) - 'updateOne', // updateOne(filter, update, options, callback) -] ; - -// All of the operations above take `options` and `callback` as their final parameters, but some of them -// take additional parameters as well. For those operations, this is a map of -// { : [] }, as a way to know what to call the operation's -// positional arguments when we add them to the span's `data` object later -const OPERATION_SIGNATURES - - = { - // aggregate intentionally not included because `pipeline` arguments are too complex to serialize well - // see https://github.com/getsentry/sentry-javascript/pull/3102 - bulkWrite: ['operations'], - countDocuments: ['query'], - createIndex: ['fieldOrSpec'], - createIndexes: ['indexSpecs'], - deleteMany: ['filter'], - deleteOne: ['filter'], - distinct: ['key', 'query'], - dropIndex: ['indexName'], - find: ['query'], - findOne: ['query'], - findOneAndDelete: ['filter'], - findOneAndReplace: ['filter', 'replacement'], - findOneAndUpdate: ['filter', 'update'], - indexExists: ['indexes'], - insertMany: ['docs'], - insertOne: ['doc'], - mapReduce: ['map', 'reduce'], - rename: ['newName'], - replaceOne: ['filter', 'doc'], - updateMany: ['filter', 'update'], - updateOne: ['filter', 'update'], -}; - -function isCursor(maybeCursor) { - return maybeCursor && typeof maybeCursor === 'object' && maybeCursor.once && typeof maybeCursor.once === 'function'; -} - -/** Tracing integration for mongo package */ -class Mongo { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Mongo';} - - /** - * @inheritDoc - */ - - /** - * @inheritDoc - */ - constructor(options = {}) { - this.name = Mongo.id; - this._operations = Array.isArray(options.operations) ? options.operations : (OPERATIONS ); - this._describeOperations = 'describeOperations' in options ? options.describeOperations : true; - this._useMongoose = !!options.useMongoose; - } - - /** @inheritdoc */ - loadDependency() { - const moduleName = this._useMongoose ? 'mongoose' : 'mongodb'; - return (this._module = this._module || utils.loadModule(moduleName)); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('Mongo Integration is skipped because of instrumenter configuration.'); - return; - } - - const pkg = this.loadDependency(); - - if (!pkg) { - const moduleName = this._useMongoose ? 'mongoose' : 'mongodb'; - debugBuild.DEBUG_BUILD && utils.logger.error(`Mongo Integration was unable to require \`${moduleName}\` package.`); - return; - } - - this._instrumentOperations(pkg.Collection, this._operations, getCurrentHub); - } - - /** - * Patches original collection methods - */ - // eslint-disable-next-line deprecation/deprecation - _instrumentOperations(collection, operations, getCurrentHub) { - operations.forEach((operation) => this._patchOperation(collection, operation, getCurrentHub)); - } - - /** - * Patches original collection to utilize our tracing functionality - */ - // eslint-disable-next-line deprecation/deprecation - _patchOperation(collection, operation, getCurrentHub) { - if (!(operation in collection.prototype)) return; - - const getSpanContext = this._getSpanContextFromOperationArguments.bind(this); - - utils.fill(collection.prototype, operation, function (orig) { - return function ( ...args) { - const lastArg = args[args.length - 1]; - // eslint-disable-next-line deprecation/deprecation - const hub = getCurrentHub(); - // eslint-disable-next-line deprecation/deprecation - const scope = hub.getScope(); - // eslint-disable-next-line deprecation/deprecation - const client = hub.getClient(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); - - const sendDefaultPii = _optionalChain([client, 'optionalAccess', _2 => _2.getOptions, 'call', _3 => _3(), 'access', _4 => _4.sendDefaultPii]); - - // Check if the operation was passed a callback. (mapReduce requires a different check, as - // its (non-callback) arguments can also be functions.) - if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) { - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _5 => _5.startChild, 'call', _6 => _6(getSpanContext(this, operation, args, sendDefaultPii))]); - const maybePromiseOrCursor = orig.call(this, ...args); - - if (utils.isThenable(maybePromiseOrCursor)) { - return maybePromiseOrCursor.then((res) => { - _optionalChain([span, 'optionalAccess', _7 => _7.end, 'call', _8 => _8()]); - return res; + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + let to = this.options.scaleReads; + if (to !== "master") { + const isCommandReadOnly = command.isReadOnly || (0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "readonly"); + if (!isCommandReadOnly) { + to = "master"; + } + } + let targetSlot = node2 ? node2.slot : command.getSlot(); + const ttl = {}; + const _this = this; + if (!node2 && !REJECT_OVERWRITTEN_COMMANDS.has(command)) { + REJECT_OVERWRITTEN_COMMANDS.add(command); + const reject = command.reject; + command.reject = function(err) { + const partialTry = tryConnection.bind(null, true); + _this.handleError(err, ttl, { + moved: function(slot, key) { + debug3("command %s is moved to %s", command.name, key); + targetSlot = Number(slot); + if (_this.slots[slot]) { + _this.slots[slot][0] = key; + } else { + _this.slots[slot] = [key]; + } + _this._groupsBySlot[slot] = _this._groupsIds[_this.slots[slot].join(";")]; + _this.connectionPool.findOrCreate(_this.natMapper(key)); + tryConnection(); + debug3("refreshing slot caches... (triggered by MOVED error)"); + _this.refreshSlotsCache(); + }, + ask: function(slot, key) { + debug3("command %s is required to ask %s:%s", command.name, key); + const mapped = _this.natMapper(key); + _this.connectionPool.findOrCreate(mapped); + tryConnection(false, `${mapped.host}:${mapped.port}`); + }, + tryagain: partialTry, + clusterDown: partialTry, + connectionClosed: partialTry, + maxRedirections: function(redirectionError) { + reject.call(command, redirectionError); + }, + defaults: function() { + reject.call(command, err); + } }); + }; + } + tryConnection(); + function tryConnection(random, asking) { + if (_this.status === "end") { + command.reject(new redis_errors_1.AbortError("Cluster is ended.")); + return; } - // If the operation returns a Cursor - // we need to attach a listener to it to finish the span when the cursor is closed. - else if (isCursor(maybePromiseOrCursor)) { - const cursor = maybePromiseOrCursor ; - - try { - cursor.once('close', () => { - _optionalChain([span, 'optionalAccess', _9 => _9.end, 'call', _10 => _10()]); - }); - } catch (e) { - // If the cursor is already closed, `once` will throw an error. In that case, we can - // finish the span immediately. - _optionalChain([span, 'optionalAccess', _11 => _11.end, 'call', _12 => _12()]); + let redis; + if (_this.status === "ready" || command.name === "cluster") { + if (node2 && node2.redis) { + redis = node2.redis; + } else if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", command.name) || Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", command.name)) { + redis = _this.subscriber.getInstance(); + if (!redis) { + command.reject(new redis_errors_1.AbortError("No subscriber for the cluster")); + return; + } + } else { + if (!random) { + if (typeof targetSlot === "number" && _this.slots[targetSlot]) { + const nodeKeys = _this.slots[targetSlot]; + if (typeof to === "function") { + const nodes = nodeKeys.map(function(key) { + return _this.connectionPool.getInstanceByKey(key); + }); + redis = to(nodes, command); + if (Array.isArray(redis)) { + redis = (0, utils_1.sample)(redis); + } + if (!redis) { + redis = nodes[0]; + } + } else { + let key; + if (to === "all") { + key = (0, utils_1.sample)(nodeKeys); + } else if (to === "slave" && nodeKeys.length > 1) { + key = (0, utils_1.sample)(nodeKeys, 1); + } else { + key = nodeKeys[0]; + } + redis = _this.connectionPool.getInstanceByKey(key); + } + } + if (asking) { + redis = _this.connectionPool.getInstanceByKey(asking); + redis.asking(); + } + } + if (!redis) { + redis = (typeof to === "function" ? null : _this.connectionPool.getSampleInstance(to)) || _this.connectionPool.getSampleInstance("all"); + } } - - return cursor; + if (node2 && !node2.redis) { + node2.redis = redis; + } + } + if (redis) { + redis.sendCommand(command, stream); + } else if (_this.options.enableOfflineQueue) { + _this.offlineQueue.push({ + command, + stream, + node: node2 + }); } else { - _optionalChain([span, 'optionalAccess', _13 => _13.end, 'call', _14 => _14()]); - return maybePromiseOrCursor; + command.reject(new Error("Cluster isn't ready and enableOfflineQueue options is false")); } } - - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _15 => _15.startChild, 'call', _16 => _16(getSpanContext(this, operation, args.slice(0, -1)))]); - - return orig.call(this, ...args.slice(0, -1), function (err, result) { - _optionalChain([span, 'optionalAccess', _17 => _17.end, 'call', _18 => _18()]); - lastArg(err, result); - }); - }; - }); - } - - /** - * Form a SpanContext based on the user input to a given operation. - */ - _getSpanContextFromOperationArguments( - collection, - operation, - args, - sendDefaultPii = false, - ) { - const data = { - 'db.system': 'mongodb', - 'db.name': collection.dbName, - 'db.operation': operation, - 'db.mongodb.collection': collection.collectionName, - }; - const spanContext = { - op: 'db', - // TODO v8: Use `${collection.collectionName}.${operation}` - origin: 'auto.db.mongo', - description: operation, - data, - }; - - // If the operation takes no arguments besides `options` and `callback`, or if argument - // collection is disabled for this operation, just return early. - const signature = OPERATION_SIGNATURES[operation]; - const shouldDescribe = Array.isArray(this._describeOperations) - ? this._describeOperations.includes(operation) - : this._describeOperations; - - if (!signature || !shouldDescribe || !sendDefaultPii) { - return spanContext; - } - - try { - // Special case for `mapReduce`, as the only one accepting functions as arguments. - if (operation === 'mapReduce') { - const [map, reduce] = args ; - data[signature[0]] = typeof map === 'string' ? map : map.name || ''; - data[signature[1]] = typeof reduce === 'string' ? reduce : reduce.name || ''; - } else { - for (let i = 0; i < signature.length; i++) { - data[`db.mongodb.${signature[i]}`] = JSON.stringify(args[i]); - } + return command.promise; } - } catch (_oO) { - // no-empty - } - - return spanContext; - } -}Mongo.__initStatic(); - -exports.Mongo = Mongo; -//# sourceMappingURL=mongo.js.map - - -/***/ }), - -/***/ 60212: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -/** Tracing integration for node-mysql package */ -class Mysql { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Mysql';} - - /** - * @inheritDoc - */ - - constructor() { - this.name = Mysql.id; - } - - /** @inheritdoc */ - loadDependency() { - return (this._module = this._module || utils.loadModule('mysql/lib/Connection.js')); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('Mysql Integration is skipped because of instrumenter configuration.'); - return; - } - - const pkg = this.loadDependency(); - - if (!pkg) { - debugBuild.DEBUG_BUILD && utils.logger.error('Mysql Integration was unable to require `mysql` package.'); - return; - } - - let mySqlConfig = undefined; - - try { - pkg.prototype.connect = new Proxy(pkg.prototype.connect, { - apply(wrappingTarget, thisArg, args) { - if (!mySqlConfig) { - mySqlConfig = thisArg.config; - } - return wrappingTarget.apply(thisArg, args); - }, - }); - } catch (e) { - debugBuild.DEBUG_BUILD && utils.logger.error('Mysql Integration was unable to instrument `mysql` config.'); - } - - function spanDataFromConfig() { - if (!mySqlConfig) { - return {}; + sscanStream(key, options2) { + return this.createScanStream("sscan", { key, options: options2 }); } - return { - 'server.address': mySqlConfig.host, - 'server.port': mySqlConfig.port, - 'db.user': mySqlConfig.user, - }; - } - - function finishSpan(span) { - if (!span) { - return; + sscanBufferStream(key, options2) { + return this.createScanStream("sscanBuffer", { key, options: options2 }); } - - const data = spanDataFromConfig(); - Object.keys(data).forEach(key => { - span.setAttribute(key, data[key]); - }); - - span.end(); - } - - // The original function will have one of these signatures: - // function (callback) => void - // function (options, callback) => void - // function (options, values, callback) => void - utils.fill(pkg, 'createQuery', function (orig) { - return function ( options, values, callback) { - // eslint-disable-next-line deprecation/deprecation - const scope = getCurrentHub().getScope(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); - - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _2 => _2.startChild, 'call', _3 => _3({ - description: typeof options === 'string' ? options : (options ).sql, - op: 'db', - origin: 'auto.db.mysql', - data: { - 'db.system': 'mysql', - }, - })]); - - if (typeof callback === 'function') { - return orig.call(this, options, values, function (err, result, fields) { - finishSpan(span); - callback(err, result, fields); - }); + hscanStream(key, options2) { + return this.createScanStream("hscan", { key, options: options2 }); + } + hscanBufferStream(key, options2) { + return this.createScanStream("hscanBuffer", { key, options: options2 }); + } + zscanStream(key, options2) { + return this.createScanStream("zscan", { key, options: options2 }); + } + zscanBufferStream(key, options2) { + return this.createScanStream("zscanBuffer", { key, options: options2 }); + } + /** + * @ignore + */ + handleError(error, ttl, handlers2) { + if (typeof ttl.value === "undefined") { + ttl.value = this.options.maxRedirections; + } else { + ttl.value -= 1; } - - if (typeof values === 'function') { - return orig.call(this, options, function (err, result, fields) { - finishSpan(span); - values(err, result, fields); + if (ttl.value <= 0) { + handlers2.maxRedirections(new Error("Too many Cluster redirections. Last error: " + error)); + return; + } + const errv = error.message.split(" "); + if (errv[0] === "MOVED") { + const timeout = this.options.retryDelayOnMoved; + if (timeout && typeof timeout === "number") { + this.delayQueue.push("moved", handlers2.moved.bind(null, errv[1], errv[2]), { timeout }); + } else { + handlers2.moved(errv[1], errv[2]); + } + } else if (errv[0] === "ASK") { + handlers2.ask(errv[1], errv[2]); + } else if (errv[0] === "TRYAGAIN") { + this.delayQueue.push("tryagain", handlers2.tryagain, { + timeout: this.options.retryDelayOnTryAgain + }); + } else if (errv[0] === "CLUSTERDOWN" && this.options.retryDelayOnClusterDown > 0) { + this.delayQueue.push("clusterdown", handlers2.connectionClosed, { + timeout: this.options.retryDelayOnClusterDown, + callback: this.refreshSlotsCache.bind(this) }); + } else if (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG && this.options.retryDelayOnFailover > 0 && this.status === "ready") { + this.delayQueue.push("failover", handlers2.connectionClosed, { + timeout: this.options.retryDelayOnFailover, + callback: this.refreshSlotsCache.bind(this) + }); + } else { + handlers2.defaults(); } - - // streaming, no callback! - const query = orig.call(this, options, values) ; - - query.on('end', () => { - finishSpan(span); + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + clearNodesRefreshInterval() { + if (this.slotsTimer) { + clearTimeout(this.slotsTimer); + this.slotsTimer = null; + } + } + resetNodesRefreshInterval() { + if (this.slotsTimer || !this.options.slotsRefreshInterval) { + return; + } + const nextRound = () => { + this.slotsTimer = setTimeout(() => { + debug3('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'); + this.refreshSlotsCache(() => { + nextRound(); + }); + }, this.options.slotsRefreshInterval); + }; + nextRound(); + } + /** + * Change cluster instance's status + */ + setStatus(status) { + debug3("status: %s -> %s", this.status || "[empty]", status); + this.status = status; + process.nextTick(() => { + this.emit(status); }); - - return query; - }; - }); - } -}Mysql.__initStatic(); - -exports.Mysql = Mysql; -//# sourceMappingURL=mysql.js.map - - -/***/ }), - -/***/ 11539: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); - -/** Tracing integration for node-postgres package */ -class Postgres { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Postgres';} - - /** - * @inheritDoc - */ - - constructor(options = {}) { - this.name = Postgres.id; - this._usePgNative = !!options.usePgNative; - this._module = options.module; - } - - /** @inheritdoc */ - loadDependency() { - return (this._module = this._module || utils.loadModule('pg')); - } - - /** - * @inheritDoc - */ - // eslint-disable-next-line deprecation/deprecation - setupOnce(_, getCurrentHub) { - if (nodeUtils.shouldDisableAutoInstrumentation(getCurrentHub)) { - debugBuild.DEBUG_BUILD && utils.logger.log('Postgres Integration is skipped because of instrumenter configuration.'); - return; - } - - const pkg = this.loadDependency(); - - if (!pkg) { - debugBuild.DEBUG_BUILD && utils.logger.error('Postgres Integration was unable to require `pg` package.'); - return; - } - - const Client = this._usePgNative ? _optionalChain([pkg, 'access', _2 => _2.native, 'optionalAccess', _3 => _3.Client]) : pkg.Client; - - if (!Client) { - debugBuild.DEBUG_BUILD && utils.logger.error("Postgres Integration was unable to access 'pg-native' bindings."); - return; - } - - /** - * function (query, callback) => void - * function (query, params, callback) => void - * function (query) => Promise - * function (query, params) => Promise - * function (pg.Cursor) => pg.Cursor - */ - utils.fill(Client.prototype, 'query', function (orig) { - return function ( config, values, callback) { - // eslint-disable-next-line deprecation/deprecation - const scope = getCurrentHub().getScope(); - // eslint-disable-next-line deprecation/deprecation - const parentSpan = scope.getSpan(); - - const data = { - 'db.system': 'postgresql', - }; - - try { - if (this.database) { - data['db.name'] = this.database; + } + /** + * Called when closed to check whether a reconnection should be made + */ + handleCloseEvent(reason) { + if (reason) { + debug3("closed because %s", reason); + } + let retryDelay; + if (!this.manuallyClosing && typeof this.options.clusterRetryStrategy === "function") { + retryDelay = this.options.clusterRetryStrategy.call(this, ++this.retryAttempts, reason); + } + if (typeof retryDelay === "number") { + this.setStatus("reconnecting"); + this.reconnectTimeout = setTimeout(() => { + this.reconnectTimeout = null; + debug3("Cluster is disconnected. Retrying after %dms", retryDelay); + this.connect().catch(function(err) { + debug3("Got error %s when reconnecting. Ignoring...", err); + }); + }, retryDelay); + } else { + this.setStatus("end"); + this.flushQueue(new Error("None of startup nodes is available")); + } + } + /** + * Flush offline queue with error. + */ + flushQueue(error) { + let item; + while (item = this.offlineQueue.shift()) { + item.command.reject(error); + } + } + executeOfflineCommands() { + if (this.offlineQueue.length) { + debug3("send %d commands in offline queue", this.offlineQueue.length); + const offlineQueue = this.offlineQueue; + this.resetOfflineQueue(); + let item; + while (item = offlineQueue.shift()) { + this.sendCommand(item.command, item.stream, item.node); + } + } + } + natMapper(nodeKey) { + if (this.options.natMap && typeof this.options.natMap === "object") { + const key = typeof nodeKey === "string" ? nodeKey : `${nodeKey.host}:${nodeKey.port}`; + const mapped = this.options.natMap[key]; + if (mapped) { + debug3("NAT mapping %s -> %O", key, mapped); + return Object.assign({}, mapped); } - if (this.host) { - data['server.address'] = this.host; + } + return typeof nodeKey === "string" ? (0, util_1.nodeKeyToRedisOptions)(nodeKey) : nodeKey; + } + getInfoFromNode(redis, callback) { + if (!redis) { + return callback(new Error("Node is disconnected")); + } + const duplicatedConnection = redis.duplicate({ + enableOfflineQueue: true, + enableReadyCheck: false, + retryStrategy: null, + connectionName: (0, util_1.getConnectionName)("refresher", this.options.redisOptions && this.options.redisOptions.connectionName) + }); + duplicatedConnection.on("error", utils_1.noop); + duplicatedConnection.cluster("SLOTS", (0, utils_1.timeout)((err, result) => { + duplicatedConnection.disconnect(); + if (err) { + return callback(err); } - if (this.port) { - data['server.port'] = this.port; + if (this.status === "disconnecting" || this.status === "close" || this.status === "end") { + debug3("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s", result.length, this.status); + callback(); + return; } - if (this.user) { - data['db.user'] = this.user; + const nodes = []; + debug3("cluster slots result count: %d", result.length); + for (let i = 0; i < result.length; ++i) { + const items = result[i]; + const slotRangeStart = items[0]; + const slotRangeEnd = items[1]; + const keys = []; + for (let j2 = 2; j2 < items.length; j2++) { + if (!items[j2][0]) { + continue; + } + const node2 = this.natMapper({ + host: items[j2][0], + port: items[j2][1] + }); + node2.readOnly = j2 !== 2; + nodes.push(node2); + keys.push(node2.host + ":" + node2.port); + } + debug3("cluster slots result [%d]: slots %d~%d served by %s", i, slotRangeStart, slotRangeEnd, keys); + for (let slot = slotRangeStart; slot <= slotRangeEnd; slot++) { + this.slots[slot] = keys; + } } - } catch (e) { - // ignore + this._groupsIds = /* @__PURE__ */ Object.create(null); + let j = 0; + for (let i = 0; i < 16384; i++) { + const target = (this.slots[i] || []).join(";"); + if (!target.length) { + this._groupsBySlot[i] = void 0; + continue; + } + if (!this._groupsIds[target]) { + this._groupsIds[target] = ++j; + } + this._groupsBySlot[i] = this._groupsIds[target]; + } + this.connectionPool.reset(nodes); + callback(); + }, this.options.slotsRefreshTimeout)); + } + invokeReadyDelayedCallbacks(err) { + for (const c of this._readyDelayedCallbacks) { + process.nextTick(c, err); } - - // eslint-disable-next-line deprecation/deprecation - const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({ - description: typeof config === 'string' ? config : (config ).text, - op: 'db', - origin: 'auto.db.postgres', - data, - })]); - - if (typeof callback === 'function') { - return orig.call(this, config, values, function (err, result) { - _optionalChain([span, 'optionalAccess', _6 => _6.end, 'call', _7 => _7()]); - callback(err, result); + this._readyDelayedCallbacks = []; + } + /** + * Check whether Cluster is able to process commands + */ + readyCheck(callback) { + this.cluster("INFO", (err, res) => { + if (err) { + return callback(err); + } + if (typeof res !== "string") { + return callback(); + } + let state; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const parts = lines[i].split(":"); + if (parts[0] === "cluster_state") { + state = parts[1]; + break; + } + } + if (state === "fail") { + debug3("cluster state not ok (%s)", state); + callback(null, state); + } else { + callback(); + } + }); + } + resolveSrv(hostname2) { + return new Promise((resolve4, reject) => { + this.options.resolveSrv(hostname2, (err, records) => { + if (err) { + return reject(err); + } + const self2 = this, groupedRecords = (0, util_1.groupSrvRecords)(records), sortedKeys = Object.keys(groupedRecords).sort((a, b) => parseInt(a) - parseInt(b)); + function tryFirstOne(err2) { + if (!sortedKeys.length) { + return reject(err2); + } + const key = sortedKeys[0], group = groupedRecords[key], record = (0, util_1.weightSrvRecords)(group); + if (!group.records.length) { + sortedKeys.shift(); + } + self2.dnsLookup(record.name).then((host) => resolve4({ + host, + port: record.port + }), tryFirstOne); + } + tryFirstOne(); }); - } - - if (typeof values === 'function') { - return orig.call(this, config, function (err, result) { - _optionalChain([span, 'optionalAccess', _8 => _8.end, 'call', _9 => _9()]); - values(err, result); + }); + } + dnsLookup(hostname2) { + return new Promise((resolve4, reject) => { + this.options.dnsLookup(hostname2, (err, address) => { + if (err) { + debug3("failed to resolve hostname %s to IP: %s", hostname2, err.message); + reject(err); + } else { + debug3("resolved hostname %s to IP %s", hostname2, address); + resolve4(address); + } }); + }); + } + /** + * Normalize startup nodes, and resolving hostnames to IPs. + * + * This process happens every time when #connect() is called since + * #startupNodes and DNS records may chanage. + */ + async resolveStartupNodeHostnames() { + if (!Array.isArray(this.startupNodes) || this.startupNodes.length === 0) { + throw new Error("`startupNodes` should contain at least one node."); } - - const rv = typeof values !== 'undefined' ? orig.call(this, config, values) : orig.call(this, config); - - if (utils.isThenable(rv)) { - return rv.then((res) => { - _optionalChain([span, 'optionalAccess', _10 => _10.end, 'call', _11 => _11()]); - return res; - }); + const startupNodes = (0, util_1.normalizeNodeOptions)(this.startupNodes); + const hostnames = (0, util_1.getUniqueHostnamesFromOptions)(startupNodes); + if (hostnames.length === 0) { + return startupNodes; } - - _optionalChain([span, 'optionalAccess', _12 => _12.end, 'call', _13 => _13()]); - return rv; - }; - }); + const configs = await Promise.all(hostnames.map((this.options.useSRVRecords ? this.resolveSrv : this.dnsLookup).bind(this))); + const hostnameToConfig = (0, utils_1.zipMap)(hostnames, configs); + return startupNodes.map((node2) => { + const config2 = hostnameToConfig.get(node2.host); + if (!config2) { + return node2; + } + if (this.options.useSRVRecords) { + return Object.assign({}, node2, config2); + } + return Object.assign({}, node2, { host: config2 }); + }); + } + createScanStream(command, { key, options: options2 = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options2 + }); + } + }; + (0, applyMixin_1.default)(Cluster, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Cluster.prototype); + exports2.default = Cluster; } -}Postgres.__initStatic(); - -exports.Postgres = Postgres; -//# sourceMappingURL=postgres.js.map - - -/***/ }), - -/***/ 96760: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const core = __nccwpck_require__(90155); -const utils = __nccwpck_require__(79565); -const debugBuild = __nccwpck_require__(97547); -const nodeUtils = __nccwpck_require__(33270); +}); -function isValidPrismaClient(possibleClient) { - return !!possibleClient && !!(possibleClient )['$use']; -} - -/** Tracing integration for @prisma/client package */ -class Prisma { - /** - * @inheritDoc - */ - static __initStatic() {this.id = 'Prisma';} - - /** - * @inheritDoc - */ - - /** - * @inheritDoc - */ - constructor(options = {}) { - this.name = Prisma.id; - - // We instrument the PrismaClient inside the constructor and not inside `setupOnce` because in some cases of server-side - // bundling (Next.js) multiple Prisma clients can be instantiated, even though users don't intend to. When instrumenting - // in setupOnce we can only ever instrument one client. - // https://github.com/getsentry/sentry-javascript/issues/7216#issuecomment-1602375012 - // In the future we might explore providing a dedicated PrismaClient middleware instead of this hack. - if (isValidPrismaClient(options.client) && !options.client._sentryInstrumented) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - utils.addNonEnumerableProperty(options.client , '_sentryInstrumented', true); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/AbstractConnector.js +var require_AbstractConnector = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/AbstractConnector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var utils_1 = require_utils3(); + var debug3 = (0, utils_1.Debug)("AbstractConnector"); + var AbstractConnector = class { + constructor(disconnectTimeout) { + this.connecting = false; + this.disconnectTimeout = disconnectTimeout; + } + check(info) { + return true; + } + disconnect() { + this.connecting = false; + if (this.stream) { + const stream = this.stream; + const timeout = setTimeout(() => { + debug3("stream %s:%s still open, destroying it", stream.remoteAddress, stream.remotePort); + stream.destroy(); + }, this.disconnectTimeout); + stream.on("close", () => clearTimeout(timeout)); + stream.end(); + } + } + }; + exports2.default = AbstractConnector; + } +}); - const clientData = {}; - try { - const engineConfig = (options.client )._engineConfig; - if (engineConfig) { - const { activeProvider, clientVersion } = engineConfig; - if (activeProvider) { - clientData['db.system'] = activeProvider; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/StandaloneConnector.js +var require_StandaloneConnector = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/StandaloneConnector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var net_1 = __require("net"); + var tls_1 = __require("tls"); + var utils_1 = require_utils3(); + var AbstractConnector_1 = require_AbstractConnector(); + var StandaloneConnector = class extends AbstractConnector_1.default { + constructor(options2) { + super(options2.disconnectTimeout); + this.options = options2; + } + connect(_) { + const { options: options2 } = this; + this.connecting = true; + let connectionOptions; + if ("path" in options2 && options2.path) { + connectionOptions = { + path: options2.path + }; + } else { + connectionOptions = {}; + if ("port" in options2 && options2.port != null) { + connectionOptions.port = options2.port; + } + if ("host" in options2 && options2.host != null) { + connectionOptions.host = options2.host; } - if (clientVersion) { - clientData['db.prisma.version'] = clientVersion; + if ("family" in options2 && options2.family != null) { + connectionOptions.family = options2.family; } } - } catch (e) { - // ignore - } - - options.client.$use((params, next) => { - // eslint-disable-next-line deprecation/deprecation - if (nodeUtils.shouldDisableAutoInstrumentation(core.getCurrentHub)) { - return next(params); + if (options2.tls) { + Object.assign(connectionOptions, options2.tls); } + return new Promise((resolve4, reject) => { + process.nextTick(() => { + if (!this.connecting) { + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return; + } + try { + if (options2.tls) { + this.stream = (0, tls_1.connect)(connectionOptions); + } else { + this.stream = (0, net_1.createConnection)(connectionOptions); + } + } catch (err) { + reject(err); + return; + } + this.stream.once("error", (err) => { + this.firstError = err; + }); + resolve4(this.stream); + }); + }); + } + }; + exports2.default = StandaloneConnector; + } +}); - const action = params.action; - const model = params.model; - - return core.startSpan( - { - name: model ? `${model} ${action}` : action, - onlyIfParent: true, - op: 'db.prisma', - attributes: { - [core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.db.prisma', - }, - data: { ...clientData, 'db.operation': action }, - }, - () => next(params), - ); - }); - } else { - debugBuild.DEBUG_BUILD && - utils.logger.warn('Unsupported Prisma client provided to PrismaIntegration. Provided client:', options.client); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +var require_SentinelIterator = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function isSentinelEql(a, b) { + return (a.host || "127.0.0.1") === (b.host || "127.0.0.1") && (a.port || 26379) === (b.port || 26379); } + var SentinelIterator = class { + constructor(sentinels) { + this.cursor = 0; + this.sentinels = sentinels.slice(0); + } + next() { + const done = this.cursor >= this.sentinels.length; + return { done, value: done ? void 0 : this.sentinels[this.cursor++] }; + } + reset(moveCurrentEndpointToFirst) { + if (moveCurrentEndpointToFirst && this.sentinels.length > 1 && this.cursor !== 1) { + this.sentinels.unshift(...this.sentinels.splice(this.cursor - 1)); + } + this.cursor = 0; + } + add(sentinel) { + for (let i = 0; i < this.sentinels.length; i++) { + if (isSentinelEql(sentinel, this.sentinels[i])) { + return false; + } + } + this.sentinels.push(sentinel); + return true; + } + toString() { + return `${JSON.stringify(this.sentinels)} @${this.cursor}`; + } + }; + exports2.default = SentinelIterator; } +}); - /** - * @inheritDoc - */ - setupOnce() { - // Noop - here for backwards compatibility +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +var require_FailoverDetector = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FailoverDetector = void 0; + var utils_1 = require_utils3(); + var debug3 = (0, utils_1.Debug)("FailoverDetector"); + var CHANNEL_NAME = "+switch-master"; + var FailoverDetector = class { + // sentinels can't be used for regular commands after this + constructor(connector, sentinels) { + this.isDisconnected = false; + this.connector = connector; + this.sentinels = sentinels; + } + cleanup() { + this.isDisconnected = true; + for (const sentinel of this.sentinels) { + sentinel.client.disconnect(); + } + } + async subscribe() { + debug3("Starting FailoverDetector"); + const promises = []; + for (const sentinel of this.sentinels) { + const promise = sentinel.client.subscribe(CHANNEL_NAME).catch((err) => { + debug3("Failed to subscribe to failover messages on sentinel %s:%s (%s)", sentinel.address.host || "127.0.0.1", sentinel.address.port || 26739, err.message); + }); + promises.push(promise); + sentinel.client.on("message", (channel) => { + if (!this.isDisconnected && channel === CHANNEL_NAME) { + this.disconnect(); + } + }); + } + await Promise.all(promises); + } + disconnect() { + this.isDisconnected = true; + debug3("Failover detected, disconnecting"); + this.connector.disconnect(); + } + }; + exports2.FailoverDetector = FailoverDetector; } -} Prisma.__initStatic(); - -exports.Prisma = Prisma; -//# sourceMappingURL=prisma.js.map - - -/***/ }), - -/***/ 33270: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -var { - _optionalChain -} = __nccwpck_require__(79565); - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/** - * Check if Sentry auto-instrumentation should be disabled. - * - * @param getCurrentHub A method to fetch the current hub - * @returns boolean - */ -// eslint-disable-next-line deprecation/deprecation -function shouldDisableAutoInstrumentation(getCurrentHub) { - // eslint-disable-next-line deprecation/deprecation - const clientOptions = _optionalChain([getCurrentHub, 'call', _ => _(), 'access', _2 => _2.getClient, 'call', _3 => _3(), 'optionalAccess', _4 => _4.getOptions, 'call', _5 => _5()]); - const instrumenter = _optionalChain([clientOptions, 'optionalAccess', _6 => _6.instrumenter]) || 'sentry'; - - return instrumenter !== 'sentry'; -} - -exports.shouldDisableAutoInstrumentation = shouldDisableAutoInstrumentation; -//# sourceMappingURL=node-utils.js.map - - -/***/ }), - -/***/ 16438: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * accepts - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var Negotiator = __nccwpck_require__(90373) -var mime = __nccwpck_require__(56553) - -/** - * Module exports. - * @public - */ - -module.exports = Accepts - -/** - * Create a new Accepts object for the given req. - * - * @param {object} req - * @public - */ - -function Accepts (req) { - if (!(this instanceof Accepts)) { - return new Accepts(req) - } - - this.headers = req.headers - this.negotiator = new Negotiator(req) -} - -/** - * Check if the given `type(s)` is acceptable, returning - * the best match when true, otherwise `undefined`, in which - * case you should respond with 406 "Not Acceptable". - * - * The `type` value may be a single mime type string - * such as "application/json", the extension name - * such as "json" or an array `["json", "html", "text/plain"]`. When a list - * or array is given the _best_ match, if any is returned. - * - * Examples: - * - * // Accept: text/html - * this.types('html'); - * // => "html" - * - * // Accept: text/*, application/json - * this.types('html'); - * // => "html" - * this.types('text/html'); - * // => "text/html" - * this.types('json', 'text'); - * // => "json" - * this.types('application/json'); - * // => "application/json" - * - * // Accept: text/*, application/json - * this.types('image/png'); - * this.types('png'); - * // => undefined - * - * // Accept: text/*;q=.5, application/json - * this.types(['html', 'json']); - * this.types('html', 'json'); - * // => "json" - * - * @param {String|Array} types... - * @return {String|Array|Boolean} - * @public - */ - -Accepts.prototype.type = -Accepts.prototype.types = function (types_) { - var types = types_ - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i] - } - } - - // no types, return all requested types - if (!types || types.length === 0) { - return this.negotiator.mediaTypes() - } - - // no accept header, return first given type - if (!this.headers.accept) { - return types[0] - } - - var mimes = types.map(extToMime) - var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)) - var first = accepts[0] - - return first - ? types[mimes.indexOf(first)] - : false -} - -/** - * Return accepted encodings or best fit based on `encodings`. - * - * Given `Accept-Encoding: gzip, deflate` - * an array sorted by quality is returned: - * - * ['gzip', 'deflate'] - * - * @param {String|Array} encodings... - * @return {String|Array} - * @public - */ - -Accepts.prototype.encoding = -Accepts.prototype.encodings = function (encodings_) { - var encodings = encodings_ - - // support flattened arguments - if (encodings && !Array.isArray(encodings)) { - encodings = new Array(arguments.length) - for (var i = 0; i < encodings.length; i++) { - encodings[i] = arguments[i] - } - } - - // no encodings, return all requested encodings - if (!encodings || encodings.length === 0) { - return this.negotiator.encodings() - } - - return this.negotiator.encodings(encodings)[0] || false -} - -/** - * Return accepted charsets or best fit based on `charsets`. - * - * Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5` - * an array sorted by quality is returned: - * - * ['utf-8', 'utf-7', 'iso-8859-1'] - * - * @param {String|Array} charsets... - * @return {String|Array} - * @public - */ - -Accepts.prototype.charset = -Accepts.prototype.charsets = function (charsets_) { - var charsets = charsets_ +}); - // support flattened arguments - if (charsets && !Array.isArray(charsets)) { - charsets = new Array(arguments.length) - for (var i = 0; i < charsets.length; i++) { - charsets[i] = arguments[i] +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/index.js +var require_SentinelConnector = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/SentinelConnector/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SentinelIterator = void 0; + var net_1 = __require("net"); + var utils_1 = require_utils3(); + var tls_1 = __require("tls"); + var SentinelIterator_1 = require_SentinelIterator(); + exports2.SentinelIterator = SentinelIterator_1.default; + var AbstractConnector_1 = require_AbstractConnector(); + var Redis_1 = require_Redis(); + var FailoverDetector_1 = require_FailoverDetector(); + var debug3 = (0, utils_1.Debug)("SentinelConnector"); + var SentinelConnector = class extends AbstractConnector_1.default { + constructor(options2) { + super(options2.disconnectTimeout); + this.options = options2; + this.emitter = null; + this.failoverDetector = null; + if (!this.options.sentinels.length) { + throw new Error("Requires at least one sentinel to connect to."); + } + if (!this.options.name) { + throw new Error("Requires the name of master."); + } + this.sentinelIterator = new SentinelIterator_1.default(this.options.sentinels); + } + check(info) { + const roleMatches = !info.role || this.options.role === info.role; + if (!roleMatches) { + debug3("role invalid, expected %s, but got %s", this.options.role, info.role); + this.sentinelIterator.next(); + this.sentinelIterator.next(); + this.sentinelIterator.reset(true); + } + return roleMatches; + } + disconnect() { + super.disconnect(); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + } + connect(eventEmitter) { + this.connecting = true; + this.retryAttempts = 0; + let lastError; + const connectToNext = async () => { + const endpoint2 = this.sentinelIterator.next(); + if (endpoint2.done) { + this.sentinelIterator.reset(false); + const retryDelay = typeof this.options.sentinelRetryStrategy === "function" ? this.options.sentinelRetryStrategy(++this.retryAttempts) : null; + let errorMsg = typeof retryDelay !== "number" ? "All sentinels are unreachable and retry is disabled." : `All sentinels are unreachable. Retrying from scratch after ${retryDelay}ms.`; + if (lastError) { + errorMsg += ` Last error: ${lastError.message}`; + } + debug3(errorMsg); + const error = new Error(errorMsg); + if (typeof retryDelay === "number") { + eventEmitter("error", error); + await new Promise((resolve4) => setTimeout(resolve4, retryDelay)); + return connectToNext(); + } else { + throw error; + } + } + let resolved = null; + let err = null; + try { + resolved = await this.resolve(endpoint2.value); + } catch (error) { + err = error; + } + if (!this.connecting) { + throw new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG); + } + const endpointAddress = endpoint2.value.host + ":" + endpoint2.value.port; + if (resolved) { + debug3("resolved: %s:%s from sentinel %s", resolved.host, resolved.port, endpointAddress); + if (this.options.enableTLSForSentinelMode && this.options.tls) { + Object.assign(resolved, this.options.tls); + this.stream = (0, tls_1.connect)(resolved); + this.stream.once("secureConnect", this.initFailoverDetector.bind(this)); + } else { + this.stream = (0, net_1.createConnection)(resolved); + this.stream.once("connect", this.initFailoverDetector.bind(this)); + } + this.stream.once("error", (err2) => { + this.firstError = err2; + }); + return this.stream; + } else { + const errorMsg = err ? "failed to connect to sentinel " + endpointAddress + " because " + err.message : "connected to sentinel " + endpointAddress + " successfully, but got an invalid reply: " + resolved; + debug3(errorMsg); + eventEmitter("sentinelError", new Error(errorMsg)); + if (err) { + lastError = err; + } + return connectToNext(); + } + }; + return connectToNext(); + } + async updateSentinels(client) { + if (!this.options.updateSentinels) { + return; + } + const result = await client.sentinel("sentinels", this.options.name); + if (!Array.isArray(result)) { + return; + } + result.map(utils_1.packObject).forEach((sentinel) => { + const flags = sentinel.flags ? sentinel.flags.split(",") : []; + if (flags.indexOf("disconnected") === -1 && sentinel.ip && sentinel.port) { + const endpoint2 = this.sentinelNatResolve(addressResponseToAddress(sentinel)); + if (this.sentinelIterator.add(endpoint2)) { + debug3("adding sentinel %s:%s", endpoint2.host, endpoint2.port); + } + } + }); + debug3("Updated internal sentinels: %s", this.sentinelIterator); + } + async resolveMaster(client) { + const result = await client.sentinel("get-master-addr-by-name", this.options.name); + await this.updateSentinels(client); + return this.sentinelNatResolve(Array.isArray(result) ? { host: result[0], port: Number(result[1]) } : null); + } + async resolveSlave(client) { + const result = await client.sentinel("slaves", this.options.name); + if (!Array.isArray(result)) { + return null; + } + const availableSlaves = result.map(utils_1.packObject).filter((slave) => slave.flags && !slave.flags.match(/(disconnected|s_down|o_down)/)); + return this.sentinelNatResolve(selectPreferredSentinel(availableSlaves, this.options.preferredSlaves)); + } + sentinelNatResolve(item) { + if (!item || !this.options.natMap) + return item; + return this.options.natMap[`${item.host}:${item.port}`] || item; + } + connectToSentinel(endpoint2, options2) { + const redis = new Redis_1.default({ + port: endpoint2.port || 26379, + host: endpoint2.host, + username: this.options.sentinelUsername || null, + password: this.options.sentinelPassword || null, + family: endpoint2.family || // @ts-expect-error + ("path" in this.options && this.options.path ? void 0 : ( + // @ts-expect-error + this.options.family + )), + tls: this.options.sentinelTLS, + retryStrategy: null, + enableReadyCheck: false, + connectTimeout: this.options.connectTimeout, + commandTimeout: this.options.sentinelCommandTimeout, + ...options2 + }); + return redis; + } + async resolve(endpoint2) { + const client = this.connectToSentinel(endpoint2); + client.on("error", noop3); + try { + if (this.options.role === "slave") { + return await this.resolveSlave(client); + } else { + return await this.resolveMaster(client); + } + } finally { + client.disconnect(); + } + } + async initFailoverDetector() { + var _a2; + if (!this.options.failoverDetector) { + return; + } + this.sentinelIterator.reset(true); + const sentinels = []; + while (sentinels.length < this.options.sentinelMaxConnections) { + const { done, value } = this.sentinelIterator.next(); + if (done) { + break; + } + const client = this.connectToSentinel(value, { + lazyConnect: true, + retryStrategy: this.options.sentinelReconnectStrategy + }); + client.on("reconnecting", () => { + var _a3; + (_a3 = this.emitter) === null || _a3 === void 0 ? void 0 : _a3.emit("sentinelReconnecting"); + }); + sentinels.push({ address: value, client }); + } + this.sentinelIterator.reset(false); + if (this.failoverDetector) { + this.failoverDetector.cleanup(); + } + this.failoverDetector = new FailoverDetector_1.FailoverDetector(this, sentinels); + await this.failoverDetector.subscribe(); + (_a2 = this.emitter) === null || _a2 === void 0 ? void 0 : _a2.emit("failoverSubscribed"); + } + }; + exports2.default = SentinelConnector; + function selectPreferredSentinel(availableSlaves, preferredSlaves) { + if (availableSlaves.length === 0) { + return null; + } + let selectedSlave; + if (typeof preferredSlaves === "function") { + selectedSlave = preferredSlaves(availableSlaves); + } else if (preferredSlaves !== null && typeof preferredSlaves === "object") { + const preferredSlavesArray = Array.isArray(preferredSlaves) ? preferredSlaves : [preferredSlaves]; + preferredSlavesArray.sort((a, b) => { + if (!a.prio) { + a.prio = 1; + } + if (!b.prio) { + b.prio = 1; + } + if (a.prio < b.prio) { + return -1; + } + if (a.prio > b.prio) { + return 1; + } + return 0; + }); + for (let p = 0; p < preferredSlavesArray.length; p++) { + for (let a = 0; a < availableSlaves.length; a++) { + const slave = availableSlaves[a]; + if (slave.ip === preferredSlavesArray[p].ip) { + if (slave.port === preferredSlavesArray[p].port) { + selectedSlave = slave; + break; + } + } + } + if (selectedSlave) { + break; + } + } + } + if (!selectedSlave) { + selectedSlave = (0, utils_1.sample)(availableSlaves); + } + return addressResponseToAddress(selectedSlave); + } + function addressResponseToAddress(input) { + return { host: input.ip, port: Number(input.port) }; + } + function noop3() { } } +}); - // no charsets, return all requested charsets - if (!charsets || charsets.length === 0) { - return this.negotiator.charsets() +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/index.js +var require_connectors = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/connectors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SentinelConnector = exports2.StandaloneConnector = void 0; + var StandaloneConnector_1 = require_StandaloneConnector(); + exports2.StandaloneConnector = StandaloneConnector_1.default; + var SentinelConnector_1 = require_SentinelConnector(); + exports2.SentinelConnector = SentinelConnector_1.default; } +}); - return this.negotiator.charsets(charsets)[0] || false -} - -/** - * Return accepted languages or best fit based on `langs`. - * - * Given `Accept-Language: en;q=0.8, es, pt` - * an array sorted by quality is returned: - * - * ['es', 'pt', 'en'] - * - * @param {String|Array} langs... - * @return {Array|String} - * @public - */ - -Accepts.prototype.lang = -Accepts.prototype.langs = -Accepts.prototype.language = -Accepts.prototype.languages = function (languages_) { - var languages = languages_ - - // support flattened arguments - if (languages && !Array.isArray(languages)) { - languages = new Array(arguments.length) - for (var i = 0; i < languages.length; i++) { - languages[i] = arguments[i] - } +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +var require_MaxRetriesPerRequestError = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var redis_errors_1 = require_redis_errors(); + var MaxRetriesPerRequestError = class extends redis_errors_1.AbortError { + constructor(maxRetriesPerRequest) { + const message = `Reached the max retries per request limit (which is ${maxRetriesPerRequest}). Refer to "maxRetriesPerRequest" option for details.`; + super(message); + Error.captureStackTrace(this, this.constructor); + } + get name() { + return this.constructor.name; + } + }; + exports2.default = MaxRetriesPerRequestError; } +}); - // no languages, return all requested languages - if (!languages || languages.length === 0) { - return this.negotiator.languages() +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/index.js +var require_errors2 = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/errors/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.MaxRetriesPerRequestError = void 0; + var MaxRetriesPerRequestError_1 = require_MaxRetriesPerRequestError(); + exports2.MaxRetriesPerRequestError = MaxRetriesPerRequestError_1.default; } +}); - return this.negotiator.languages(languages)[0] || false -} - -/** - * Convert extnames to mime. - * - * @param {String} type - * @return {String} - * @private - */ - -function extToMime (type) { - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if mime is valid. - * - * @param {String} type - * @return {String} - * @private - */ - -function validMime (type) { - return typeof type === 'string' -} - - -/***/ }), - -/***/ 79572: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const indentString = __nccwpck_require__(19886); -const cleanStack = __nccwpck_require__(82186); - -const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ''); - -class AggregateError extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - - errors = [...errors].map(error => { - if (error instanceof Error) { - return error; - } - - if (error !== null && typeof error === 'object') { - // Handle plain error objects with message property and/or possibly other metadata - return Object.assign(new Error(error.message), error); - } - - return new Error(error); - }); - - let message = errors - .map(error => { - // The `stack` property is not standardized, so we can't assume it exists - return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error); - }) - .join('\n'); - message = '\n' + indentString(message, 4); - super(message); - - this.name = 'AggregateError'; - - Object.defineProperty(this, '_errors', {value: errors}); - } - - * [Symbol.iterator]() { - for (const error of this._errors) { - yield error; - } - } -} - -module.exports = AggregateError; - - -/***/ }), - -/***/ 34441: -/***/ ((module) => { - -"use strict"; - - -/** - * Expose `arrayFlatten`. - */ -module.exports = arrayFlatten - -/** - * Recursive flatten function with depth. - * - * @param {Array} array - * @param {Array} result - * @param {Number} depth - * @return {Array} - */ -function flattenWithDepth (array, result, depth) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (depth > 0 && Array.isArray(value)) { - flattenWithDepth(value, result, depth - 1) - } else { - result.push(value) +// node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/lib/parser.js +var require_parser2 = __commonJS({ + "node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/lib/parser.js"(exports2, module2) { + "use strict"; + var Buffer3 = __require("buffer").Buffer; + var StringDecoder = __require("string_decoder").StringDecoder; + var decoder = new StringDecoder(); + var errors = require_redis_errors(); + var ReplyError = errors.ReplyError; + var ParserError = errors.ParserError; + var bufferPool = Buffer3.allocUnsafe(32 * 1024); + var bufferOffset = 0; + var interval = null; + var counter = 0; + var notDecreased = 0; + function parseSimpleNumbers(parser2) { + const length = parser2.buffer.length - 1; + var offset = parser2.offset; + var number = 0; + var sign2 = 1; + if (parser2.buffer[offset] === 45) { + sign2 = -1; + offset++; + } + while (offset < length) { + const c1 = parser2.buffer[offset++]; + if (c1 === 13) { + parser2.offset = offset + 1; + return sign2 * number; + } + number = number * 10 + (c1 - 48); + } + } + function parseStringNumbers(parser2) { + const length = parser2.buffer.length - 1; + var offset = parser2.offset; + var number = 0; + var res = ""; + if (parser2.buffer[offset] === 45) { + res += "-"; + offset++; + } + while (offset < length) { + var c1 = parser2.buffer[offset++]; + if (c1 === 13) { + parser2.offset = offset + 1; + if (number !== 0) { + res += number; + } + return res; + } else if (number > 429496728) { + res += number * 10 + (c1 - 48); + number = 0; + } else if (c1 === 48 && number === 0) { + res += 0; + } else { + number = number * 10 + (c1 - 48); + } + } } - } - - return result -} - -/** - * Recursive flatten function. Omitting depth is slightly faster. - * - * @param {Array} array - * @param {Array} result - * @return {Array} - */ -function flattenForever (array, result) { - for (var i = 0; i < array.length; i++) { - var value = array[i] - - if (Array.isArray(value)) { - flattenForever(value, result) - } else { - result.push(value) + function parseSimpleString(parser2) { + const start = parser2.offset; + const buffer = parser2.buffer; + const length = buffer.length - 1; + var offset = start; + while (offset < length) { + if (buffer[offset++] === 13) { + parser2.offset = offset + 1; + if (parser2.optionReturnBuffers === true) { + return parser2.buffer.slice(start, offset - 1); + } + return parser2.buffer.toString("utf8", start, offset - 1); + } + } } - } - - return result -} - -/** - * Flatten an array, with the ability to define a depth. - * - * @param {Array} array - * @param {Number} depth - * @return {Array} - */ -function arrayFlatten (array, depth) { - if (depth == null) { - return flattenForever(array, []) - } - - return flattenWithDepth(array, [], depth) -} - - -/***/ }), - -/***/ 12793: -/***/ ((module) => { - -"use strict"; - - -/* global SharedArrayBuffer, Atomics */ - -if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') { - const nil = new Int32Array(new SharedArrayBuffer(4)) - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') + function parseLength(parser2) { + const length = parser2.buffer.length - 1; + var offset = parser2.offset; + var number = 0; + while (offset < length) { + const c1 = parser2.buffer[offset++]; + if (c1 === 13) { + parser2.offset = offset + 1; + return number; + } + number = number * 10 + (c1 - 48); } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') } - - Atomics.wait(nil, 0, 0, Number(ms)) - } - module.exports = sleep -} else { - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') + function parseInteger(parser2) { + if (parser2.optionStringNumbers === true) { + return parseStringNumbers(parser2); + } + return parseSimpleNumbers(parser2); + } + function parseBulkString(parser2) { + const length = parseLength(parser2); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const offset = parser2.offset + length; + if (offset + 2 > parser2.buffer.length) { + parser2.bigStrSize = offset + 2; + parser2.totalChunkSize = parser2.buffer.length; + parser2.bufferCache.push(parser2.buffer); + return; + } + const start = parser2.offset; + parser2.offset = offset + 2; + if (parser2.optionReturnBuffers === true) { + return parser2.buffer.slice(start, offset); + } + return parser2.buffer.toString("utf8", start, offset); + } + function parseError(parser2) { + var string = parseSimpleString(parser2); + if (string !== void 0) { + if (parser2.optionReturnBuffers === true) { + string = string.toString(); + } + return new ReplyError(string); + } + } + function handleError(parser2, type2) { + const err = new ParserError( + "Protocol error, got " + JSON.stringify(String.fromCharCode(type2)) + " as reply type byte", + JSON.stringify(parser2.buffer), + parser2.offset + ); + parser2.buffer = null; + parser2.returnFatalError(err); + } + function parseArray(parser2) { + const length = parseLength(parser2); + if (length === void 0) { + return; + } + if (length < 0) { + return null; + } + const responses = new Array(length); + return parseArrayElements(parser2, responses, 0); + } + function pushArrayCache(parser2, array, pos) { + parser2.arrayCache.push(array); + parser2.arrayPos.push(pos); + } + function parseArrayChunks(parser2) { + const tmp = parser2.arrayCache.pop(); + var pos = parser2.arrayPos.pop(); + if (parser2.arrayCache.length) { + const res = parseArrayChunks(parser2); + if (res === void 0) { + pushArrayCache(parser2, tmp, pos); + return; + } + tmp[pos++] = res; + } + return parseArrayElements(parser2, tmp, pos); + } + function parseArrayElements(parser2, responses, i) { + const bufferLength = parser2.buffer.length; + while (i < responses.length) { + const offset = parser2.offset; + if (parser2.offset >= bufferLength) { + pushArrayCache(parser2, responses, i); + return; + } + const response = parseType(parser2, parser2.buffer[parser2.offset++]); + if (response === void 0) { + if (!(parser2.arrayCache.length || parser2.bufferCache.length)) { + parser2.offset = offset; + } + pushArrayCache(parser2, responses, i); + return; + } + responses[i] = response; + i++; + } + return responses; + } + function parseType(parser2, type2) { + switch (type2) { + case 36: + return parseBulkString(parser2); + case 43: + return parseSimpleString(parser2); + case 42: + return parseArray(parser2); + case 58: + return parseInteger(parser2); + case 45: + return parseError(parser2); + default: + return handleError(parser2, type2); } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') } - const target = Date.now() + Number(ms) - while (target > Date.now()){} + function decreaseBufferPool() { + if (bufferPool.length > 50 * 1024) { + if (counter === 1 || notDecreased > counter * 2) { + const minSliceLen = Math.floor(bufferPool.length / 10); + const sliceLength = minSliceLen < bufferOffset ? bufferOffset : minSliceLen; + bufferOffset = 0; + bufferPool = bufferPool.slice(sliceLength, bufferPool.length); + } else { + notDecreased++; + counter--; + } + } else { + clearInterval(interval); + counter = 0; + notDecreased = 0; + interval = null; + } + } + function resizeBuffer(length) { + if (bufferPool.length < length + bufferOffset) { + const multiplier = length > 1024 * 1024 * 75 ? 2 : 3; + if (bufferOffset > 1024 * 1024 * 111) { + bufferOffset = 1024 * 1024 * 50; + } + bufferPool = Buffer3.allocUnsafe(length * multiplier + bufferOffset); + bufferOffset = 0; + counter++; + if (interval === null) { + interval = setInterval(decreaseBufferPool, 50); + } + } + } + function concatBulkString(parser2) { + const list = parser2.bufferCache; + const oldOffset = parser2.offset; + var chunks = list.length; + var offset = parser2.bigStrSize - parser2.totalChunkSize; + parser2.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].toString("utf8", oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + var res = decoder.write(list[0].slice(oldOffset)); + for (var i = 1; i < chunks - 1; i++) { + res += decoder.write(list[i]); + } + res += decoder.end(list[i].slice(0, offset - 2)); + return res; + } + function concatBulkBuffer(parser2) { + const list = parser2.bufferCache; + const oldOffset = parser2.offset; + const length = parser2.bigStrSize - oldOffset - 2; + var chunks = list.length; + var offset = parser2.bigStrSize - parser2.totalChunkSize; + parser2.offset = offset; + if (offset <= 2) { + if (chunks === 2) { + return list[0].slice(oldOffset, list[0].length + offset - 2); + } + chunks--; + offset = list[list.length - 2].length + offset; + } + resizeBuffer(length); + const start = bufferOffset; + list[0].copy(bufferPool, start, oldOffset, list[0].length); + bufferOffset += list[0].length - oldOffset; + for (var i = 1; i < chunks - 1; i++) { + list[i].copy(bufferPool, bufferOffset); + bufferOffset += list[i].length; + } + list[i].copy(bufferPool, bufferOffset, 0, offset - 2); + bufferOffset += offset - 2; + return bufferPool.slice(start, bufferOffset); + } + var JavascriptRedisParser = class { + /** + * Javascript Redis Parser constructor + * @param {{returnError: Function, returnReply: Function, returnFatalError?: Function, returnBuffers: boolean, stringNumbers: boolean }} options + * @constructor + */ + constructor(options2) { + if (!options2) { + throw new TypeError("Options are mandatory."); + } + if (typeof options2.returnError !== "function" || typeof options2.returnReply !== "function") { + throw new TypeError("The returnReply and returnError options have to be functions."); + } + this.setReturnBuffers(!!options2.returnBuffers); + this.setStringNumbers(!!options2.stringNumbers); + this.returnError = options2.returnError; + this.returnFatalError = options2.returnFatalError || options2.returnError; + this.returnReply = options2.returnReply; + this.reset(); + } + /** + * Reset the parser values to the initial state + * + * @returns {undefined} + */ + reset() { + this.offset = 0; + this.buffer = null; + this.bigStrSize = 0; + this.totalChunkSize = 0; + this.bufferCache = []; + this.arrayCache = []; + this.arrayPos = []; + } + /** + * Set the returnBuffers option + * + * @param {boolean} returnBuffers + * @returns {undefined} + */ + setReturnBuffers(returnBuffers) { + if (typeof returnBuffers !== "boolean") { + throw new TypeError("The returnBuffers argument has to be a boolean"); + } + this.optionReturnBuffers = returnBuffers; + } + /** + * Set the stringNumbers option + * + * @param {boolean} stringNumbers + * @returns {undefined} + */ + setStringNumbers(stringNumbers) { + if (typeof stringNumbers !== "boolean") { + throw new TypeError("The stringNumbers argument has to be a boolean"); + } + this.optionStringNumbers = stringNumbers; + } + /** + * Parse the redis buffer + * @param {Buffer} buffer + * @returns {undefined} + */ + execute(buffer) { + if (this.buffer === null) { + this.buffer = buffer; + this.offset = 0; + } else if (this.bigStrSize === 0) { + const oldLength = this.buffer.length; + const remainingLength = oldLength - this.offset; + const newBuffer = Buffer3.allocUnsafe(remainingLength + buffer.length); + this.buffer.copy(newBuffer, 0, this.offset, oldLength); + buffer.copy(newBuffer, remainingLength, 0, buffer.length); + this.buffer = newBuffer; + this.offset = 0; + if (this.arrayCache.length) { + const arr = parseArrayChunks(this); + if (arr === void 0) { + return; + } + this.returnReply(arr); + } + } else if (this.totalChunkSize + buffer.length >= this.bigStrSize) { + this.bufferCache.push(buffer); + var tmp = this.optionReturnBuffers ? concatBulkBuffer(this) : concatBulkString(this); + this.bigStrSize = 0; + this.bufferCache = []; + this.buffer = buffer; + if (this.arrayCache.length) { + this.arrayCache[0][this.arrayPos[0]++] = tmp; + tmp = parseArrayChunks(this); + if (tmp === void 0) { + return; + } + } + this.returnReply(tmp); + } else { + this.bufferCache.push(buffer); + this.totalChunkSize += buffer.length; + return; + } + while (this.offset < this.buffer.length) { + const offset = this.offset; + const type2 = this.buffer[this.offset++]; + const response = parseType(this, type2); + if (response === void 0) { + if (!(this.arrayCache.length || this.bufferCache.length)) { + this.offset = offset; + } + return; + } + if (type2 === 45) { + this.returnError(response); + } else { + this.returnReply(response); + } + } + this.buffer = null; + } + }; + module2.exports = JavascriptRedisParser; } +}); - module.exports = sleep - -} - - -/***/ }), +// node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/index.js +var require_redis_parser = __commonJS({ + "node_modules/.pnpm/redis-parser@3.0.0/node_modules/redis-parser/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_parser2(); + } +}); -/***/ 48841: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(49056); -var addHook = __nccwpck_require__(55914); -var removeHook = __nccwpck_require__(27177); - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind; -var bindable = bind.bind(bind); - -function bindApi(hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply( - null, - name ? [state, name] : [state] - ); - hook.api = { remove: removeHookRef }; - hook.remove = removeHookRef; - ["before", "error", "after", "wrap"].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind]; - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); - }); -} - -function HookSingular() { - var singularHookName = "h"; - var singularHookState = { - registry: {}, - }; - var singularHook = register.bind(null, singularHookState, singularHookName); - bindApi(singularHook, singularHookState, singularHookName); - return singularHook; -} - -function HookCollection() { - var state = { - registry: {}, - }; - - var hook = register.bind(null, state); - bindApi(hook, state); - - return hook; -} - -var collectionHookDeprecationMessageDisplayed = false; -function Hook() { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn( - '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' - ); - collectionHookDeprecationMessageDisplayed = true; - } - return HookCollection(); -} - -Hook.Singular = HookSingular.bind(); -Hook.Collection = HookCollection.bind(); - -module.exports = Hook; -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook; -module.exports.Singular = Hook.Singular; -module.exports.Collection = Hook.Collection; - - -/***/ }), - -/***/ 55914: -/***/ ((module) => { - -module.exports = addHook; - -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/SubscriptionSet.js +var require_SubscriptionSet = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/SubscriptionSet.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var SubscriptionSet = class { + constructor() { + this.set = { + subscribe: {}, + psubscribe: {}, + ssubscribe: {} + }; + } + add(set3, channel) { + this.set[mapSet(set3)][channel] = true; + } + del(set3, channel) { + delete this.set[mapSet(set3)][channel]; + } + channels(set3) { + return Object.keys(this.set[mapSet(set3)]); + } + isEmpty() { + return this.channels("subscribe").length === 0 && this.channels("psubscribe").length === 0 && this.channels("ssubscribe").length === 0; + } }; + exports2.default = SubscriptionSet; + function mapSet(set3) { + if (set3 === "unsubscribe") { + return "subscribe"; + } + if (set3 === "punsubscribe") { + return "psubscribe"; + } + if (set3 === "sunsubscribe") { + return "ssubscribe"; + } + return set3; + } } +}); - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/DataHandler.js +var require_DataHandler = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/DataHandler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Command_1 = require_Command(); + var utils_1 = require_utils3(); + var RedisParser = require_redis_parser(); + var SubscriptionSet_1 = require_SubscriptionSet(); + var debug3 = (0, utils_1.Debug)("dataHandler"); + var DataHandler = class { + constructor(redis, parserOptions) { + this.redis = redis; + const parser2 = new RedisParser({ + stringNumbers: parserOptions.stringNumbers, + returnBuffers: true, + returnError: (err) => { + this.returnError(err); + }, + returnFatalError: (err) => { + this.returnFatalError(err); + }, + returnReply: (reply) => { + this.returnReply(reply); + } }); - }; - } - - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); + redis.stream.on("data", (data) => { + parser2.execute(data); }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} - - -/***/ }), - -/***/ 49056: -/***/ ((module) => { - -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } - - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} - - -/***/ }), - -/***/ 27177: -/***/ ((module) => { - -module.exports = removeHook; - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); - - if (index === -1) { - return; - } - - state.registry[name].splice(index, 1); -} - - -/***/ }), - -/***/ 41484: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var deprecate = __nccwpck_require__(97500)('body-parser') - -/** - * Cache of loaded parsers. - * @private - */ - -var parsers = Object.create(null) - -/** - * @typedef Parsers - * @type {function} - * @property {function} json - * @property {function} raw - * @property {function} text - * @property {function} urlencoded - */ - -/** - * Module exports. - * @type {Parsers} - */ - -exports = module.exports = deprecate.function(bodyParser, - 'bodyParser: use individual json/urlencoded middlewares') - -/** - * JSON parser. - * @public - */ - -Object.defineProperty(exports, "json", ({ - configurable: true, - enumerable: true, - get: createParserGetter('json') -})) - -/** - * Raw parser. - * @public - */ - -Object.defineProperty(exports, "raw", ({ - configurable: true, - enumerable: true, - get: createParserGetter('raw') -})) - -/** - * Text parser. - * @public - */ - -Object.defineProperty(exports, "text", ({ - configurable: true, - enumerable: true, - get: createParserGetter('text') -})) - -/** - * URL-encoded parser. - * @public - */ - -Object.defineProperty(exports, "urlencoded", ({ - configurable: true, - enumerable: true, - get: createParserGetter('urlencoded') -})) - -/** - * Create a middleware to parse json and urlencoded bodies. - * - * @param {object} [options] - * @return {function} - * @deprecated - * @public - */ - -function bodyParser (options) { - // use default type for parsers - var opts = Object.create(options || null, { - type: { - configurable: true, - enumerable: true, - value: undefined, - writable: true - } - }) - - var _urlencoded = exports.urlencoded(opts) - var _json = exports.json(opts) - - return function bodyParser (req, res, next) { - _json(req, res, function (err) { - if (err) return next(err) - _urlencoded(req, res, next) - }) - } -} - -/** - * Create a getter for loading a parser. - * @private - */ - -function createParserGetter (name) { - return function get () { - return loadParser(name) - } -} - -/** - * Load a parser module. - * @private - */ - -function loadParser (parserName) { - var parser = parsers[parserName] - - if (parser !== undefined) { - return parser - } - - // this uses a switch for static require analysis - switch (parserName) { - case 'json': - parser = __nccwpck_require__(54190) - break - case 'raw': - parser = __nccwpck_require__(36860) - break - case 'text': - parser = __nccwpck_require__(80495) - break - case 'urlencoded': - parser = __nccwpck_require__(66981) - break - } - - // store to prevent invoking require() - return (parsers[parserName] = parser) -} - - -/***/ }), - -/***/ 53054: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var createError = __nccwpck_require__(24700) -var destroy = __nccwpck_require__(95377) -var getBody = __nccwpck_require__(90017) -var iconv = __nccwpck_require__(10128) -var onFinished = __nccwpck_require__(41929) -var unpipe = __nccwpck_require__(63513) -var zlib = __nccwpck_require__(43106) - -/** - * Module exports. - */ - -module.exports = read - -/** - * Read a request into a buffer and parse. - * - * @param {object} req - * @param {object} res - * @param {function} next - * @param {function} parse - * @param {function} debug - * @param {object} options - * @private - */ - -function read (req, res, next, parse, debug, options) { - var length - var opts = options - var stream - - // flag as parsed - req._body = true - - // read options - var encoding = opts.encoding !== null - ? opts.encoding - : null - var verify = opts.verify - - try { - // get the content stream - stream = contentstream(req, debug, opts.inflate) - length = stream.length - stream.length = undefined - } catch (err) { - return next(err) - } - - // set raw-body options - opts.length = length - opts.encoding = verify - ? null - : encoding - - // assert charset is supported - if (opts.encoding === null && encoding !== null && !iconv.encodingExists(encoding)) { - return next(createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - })) - } - - // read body - debug('read body') - getBody(stream, opts, function (error, body) { - if (error) { - var _error - - if (error.type === 'encoding.unsupported') { - // echo back charset - _error = createError(415, 'unsupported charset "' + encoding.toUpperCase() + '"', { - charset: encoding.toLowerCase(), - type: 'charset.unsupported' - }) - } else { - // set status code on error - _error = createError(400, error) } - - // unpipe from stream and destroy - if (stream !== req) { - unpipe(req) - destroy(stream, true) + returnFatalError(err) { + err.message += ". Please report this."; + this.redis.recoverFromFatalError(err, err, { offlineQueue: false }); } - - // read off entire request - dump(req, function onfinished () { - next(createError(400, _error)) - }) - return - } - - // verify - if (verify) { - try { - debug('verify body') - verify(req, res, body, encoding) - } catch (err) { - next(createError(403, err, { - body: body, - type: err.type || 'entity.verify.failed' - })) - return + returnError(err) { + const item = this.shiftCommand(err); + if (!item) { + return; + } + err.command = { + name: item.command.name, + args: item.command.args + }; + this.redis.handleReconnection(err, item); } - } - - // parse - var str = body - try { - debug('parse body') - str = typeof body !== 'string' && encoding !== null - ? iconv.decode(body, encoding) - : body - req.body = parse(str) - } catch (err) { - next(createError(400, err, { - body: str, - type: err.type || 'entity.parse.failed' - })) - return - } - - next() - }) -} - -/** - * Get the content stream of the request. - * - * @param {object} req - * @param {function} debug - * @param {boolean} [inflate=true] - * @return {object} - * @api private - */ - -function contentstream (req, debug, inflate) { - var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase() - var length = req.headers['content-length'] - var stream - - debug('content-encoding "%s"', encoding) - - if (inflate === false && encoding !== 'identity') { - throw createError(415, 'content encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } - - switch (encoding) { - case 'deflate': - stream = zlib.createInflate() - debug('inflate body') - req.pipe(stream) - break - case 'gzip': - stream = zlib.createGunzip() - debug('gunzip body') - req.pipe(stream) - break - case 'identity': - stream = req - stream.length = length - break - default: - throw createError(415, 'unsupported content encoding "' + encoding + '"', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } - - return stream -} - -/** - * Dump the contents of a request. - * - * @param {object} req - * @param {function} callback - * @api private - */ - -function dump (req, callback) { - if (onFinished.isFinished(req)) { - callback(null) - } else { - onFinished(req, callback) - req.resume() - } -} - - -/***/ }), - -/***/ 54190: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var bytes = __nccwpck_require__(59576) -var contentType = __nccwpck_require__(6790) -var createError = __nccwpck_require__(24700) -var debug = __nccwpck_require__(78244)('body-parser:json') -var read = __nccwpck_require__(53054) -var typeis = __nccwpck_require__(87568) - -/** - * Module exports. - */ - -module.exports = json - -/** - * RegExp to match the first non-space in a string. - * - * Allowed whitespace is defined in RFC 7159: - * - * ws = *( - * %x20 / ; Space - * %x09 / ; Horizontal tab - * %x0A / ; Line feed or New line - * %x0D ) ; Carriage return - */ - -var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/ // eslint-disable-line no-control-regex - -var JSON_SYNTAX_CHAR = '#' -var JSON_SYNTAX_REGEXP = /#+/g - -/** - * Create a middleware to parse JSON bodies. - * - * @param {object} [options] - * @return {function} - * @public - */ - -function json (options) { - var opts = options || {} - - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var inflate = opts.inflate !== false - var reviver = opts.reviver - var strict = opts.strict !== false - var type = opts.type || 'application/json' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (body) { - if (body.length === 0) { - // special-case empty json body, as it's a common client-side mistake - // TODO: maybe make this configurable or part of "strict" option - return {} - } - - if (strict) { - var first = firstchar(body) - - if (first !== '{' && first !== '[') { - debug('strict violation') - throw createStrictSyntaxError(body, first) + returnReply(reply) { + if (this.handleMonitorReply(reply)) { + return; + } + if (this.handleSubscriberReply(reply)) { + return; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (Command_1.default.checkFlag("ENTER_SUBSCRIBER_MODE", item.command.name)) { + this.redis.condition.subscriber = new SubscriptionSet_1.default(); + this.redis.condition.subscriber.add(item.command.name, reply[1].toString()); + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else if (Command_1.default.checkFlag("EXIT_SUBSCRIBER_MODE", item.command.name)) { + if (!fillUnsubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + } else { + item.command.resolve(reply); + } } + handleSubscriberReply(reply) { + if (!this.redis.condition.subscriber) { + return false; + } + const replyType = Array.isArray(reply) ? reply[0].toString() : null; + debug3('receive reply "%s" in subscriber mode', replyType); + switch (replyType) { + case "message": + if (this.redis.listeners("message").length > 0) { + this.redis.emit("message", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("messageBuffer", reply[1], reply[2]); + break; + case "pmessage": { + const pattern = reply[1].toString(); + if (this.redis.listeners("pmessage").length > 0) { + this.redis.emit("pmessage", pattern, reply[2].toString(), reply[3].toString()); + } + this.redis.emit("pmessageBuffer", pattern, reply[2], reply[3]); + break; + } + case "smessage": { + if (this.redis.listeners("smessage").length > 0) { + this.redis.emit("smessage", reply[1].toString(), reply[2] ? reply[2].toString() : ""); + } + this.redis.emit("smessageBuffer", reply[1], reply[2]); + break; + } + case "ssubscribe": + case "subscribe": + case "psubscribe": { + const channel = reply[1].toString(); + this.redis.condition.subscriber.add(replyType, channel); + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillSubCommand(item.command, reply[2])) { + this.redis.commandQueue.unshift(item); + } + break; + } + case "sunsubscribe": + case "unsubscribe": + case "punsubscribe": { + const channel = reply[1] ? reply[1].toString() : null; + if (channel) { + this.redis.condition.subscriber.del(replyType, channel); + } + const count = reply[2]; + if (Number(count) === 0) { + this.redis.condition.subscriber = false; + } + const item = this.shiftCommand(reply); + if (!item) { + return; + } + if (!fillUnsubCommand(item.command, count)) { + this.redis.commandQueue.unshift(item); + } + break; + } + default: { + const item = this.shiftCommand(reply); + if (!item) { + return; + } + item.command.resolve(reply); + } + } + return true; + } + handleMonitorReply(reply) { + if (this.redis.status !== "monitoring") { + return false; + } + const replyStr = reply.toString(); + if (replyStr === "OK") { + return false; + } + const len = replyStr.indexOf(" "); + const timestamp2 = replyStr.slice(0, len); + const argIndex = replyStr.indexOf('"'); + const args = replyStr.slice(argIndex + 1, -1).split('" "').map((elem) => elem.replace(/\\"/g, '"')); + const dbAndSource = replyStr.slice(len + 2, argIndex - 2).split(" "); + this.redis.emit("monitor", timestamp2, args, dbAndSource[1], dbAndSource[0]); + return true; + } + shiftCommand(reply) { + const item = this.redis.commandQueue.shift(); + if (!item) { + const message = "Command queue state error. If you can reproduce this, please report it."; + const error = new Error(message + (reply instanceof Error ? ` Last error: ${reply.message}` : ` Last reply: ${reply.toString()}`)); + this.redis.emit("error", error); + return null; + } + return item; + } + }; + exports2.default = DataHandler; + var remainingRepliesMap = /* @__PURE__ */ new WeakMap(); + function fillSubCommand(command, count) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count); + remainingRepliesMap.delete(command); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; } - - try { - debug('parse json') - return JSON.parse(body, reviver) - } catch (e) { - throw normalizeJsonSyntaxError(e, { - message: e.message, - stack: e.stack - }) - } - } - - return function jsonParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return - } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return - } - - // assert charset per RFC 7159 sec 8.1 - var charset = getCharset(req) || 'utf-8' - if (charset.slice(0, 4) !== 'utf-') { - debug('invalid charset') - next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { - charset: charset, - type: 'charset.unsupported' - })) - return - } - - // read - read(req, res, next, parse, debug, { - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Create strict violation syntax error matching native error. - * - * @param {string} str - * @param {string} char - * @return {Error} - * @private - */ - -function createStrictSyntaxError (str, char) { - var index = str.indexOf(char) - var partial = '' - - if (index !== -1) { - partial = str.substring(0, index) + JSON_SYNTAX_CHAR - - for (var i = index + 1; i < str.length; i++) { - partial += JSON_SYNTAX_CHAR + function fillUnsubCommand(command, count) { + let remainingReplies = remainingRepliesMap.has(command) ? remainingRepliesMap.get(command) : command.args.length; + if (remainingReplies === 0) { + if (Number(count) === 0) { + remainingRepliesMap.delete(command); + command.resolve(count); + return true; + } + return false; + } + remainingReplies -= 1; + if (remainingReplies <= 0) { + command.resolve(count); + return true; + } + remainingRepliesMap.set(command, remainingReplies); + return false; } } +}); - try { - JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') - } catch (e) { - return normalizeJsonSyntaxError(e, { - message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) { - return str.substring(index, index + placeholder.length) - }), - stack: e.stack - }) - } -} - -/** - * Get the first non-whitespace character in a string. - * - * @param {string} str - * @return {function} - * @private - */ - -function firstchar (str) { - var match = FIRST_CHAR_REGEXP.exec(str) - - return match - ? match[1] - : undefined -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Normalize a SyntaxError for JSON.parse. - * - * @param {SyntaxError} error - * @param {object} obj - * @return {SyntaxError} - */ - -function normalizeJsonSyntaxError (error, obj) { - var keys = Object.getOwnPropertyNames(error) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - if (key !== 'stack' && key !== 'message') { - delete error[key] +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/redis/event_handler.js +var require_event_handler = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/redis/event_handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readyHandler = exports2.errorHandler = exports2.closeHandler = exports2.connectHandler = void 0; + var redis_errors_1 = require_redis_errors(); + var Command_1 = require_Command(); + var errors_1 = require_errors2(); + var utils_1 = require_utils3(); + var DataHandler_1 = require_DataHandler(); + var debug3 = (0, utils_1.Debug)("connection"); + function connectHandler(self2) { + return function() { + self2.setStatus("connect"); + self2.resetCommandQueue(); + let flushed = false; + const { connectionEpoch } = self2; + if (self2.condition.auth) { + self2.auth(self2.condition.auth, function(err) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (err.message.indexOf("no password is set") !== -1) { + console.warn("[WARN] Redis server does not require a password, but a password was supplied."); + } else if (err.message.indexOf("without any password configured for the default user") !== -1) { + console.warn("[WARN] This Redis server's `default` user does not require a password, but a password was supplied"); + } else if (err.message.indexOf("wrong number of arguments for 'auth' command") !== -1) { + console.warn(`[ERROR] The server returned "wrong number of arguments for 'auth' command". You are probably passing both username and password to Redis version 5 or below. You should only pass the 'password' option for Redis version 5 and under.`); + } else { + flushed = true; + self2.recoverFromFatalError(err, err); + } + } + }); + } + if (self2.condition.select) { + self2.select(self2.condition.select).catch((err) => { + self2.silentEmit("error", err); + }); + } + if (!self2.options.enableReadyCheck) { + exports2.readyHandler(self2)(); + } + new DataHandler_1.default(self2, { + stringNumbers: self2.options.stringNumbers + }); + if (self2.options.enableReadyCheck) { + self2._readyCheck(function(err, info) { + if (connectionEpoch !== self2.connectionEpoch) { + return; + } + if (err) { + if (!flushed) { + self2.recoverFromFatalError(new Error("Ready check failed: " + err.message), err); + } + } else { + if (self2.connector.check(info)) { + exports2.readyHandler(self2)(); + } else { + self2.disconnect(true); + } + } + }); + } + }; } - } - - // replace stack before message for Node.js 0.10 and below - error.stack = obj.stack.replace(error.message, obj.message) - error.message = obj.message - - return error -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} - - -/***/ }), - -/***/ 36860: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - */ - -var bytes = __nccwpck_require__(59576) -var debug = __nccwpck_require__(78244)('body-parser:raw') -var read = __nccwpck_require__(53054) -var typeis = __nccwpck_require__(87568) - -/** - * Module exports. - */ - -module.exports = raw - -/** - * Create a middleware to parse raw bodies. - * - * @param {object} [options] - * @return {function} - * @api public - */ - -function raw (options) { - var opts = options || {} - - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/octet-stream' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (buf) { - return buf - } - - return function rawParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return + exports2.connectHandler = connectHandler; + function abortError(command) { + const err = new redis_errors_1.AbortError("Command aborted due to connection close"); + err.command = { + name: command.name, + args: command.args + }; + return err; } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return + function abortIncompletePipelines(commandQueue) { + var _a2; + let expectedIndex = 0; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a2 = commandQueue.peekAt(i)) === null || _a2 === void 0 ? void 0 : _a2.command; + const pipelineIndex = command.pipelineIndex; + if (pipelineIndex === void 0 || pipelineIndex === 0) { + expectedIndex = 0; + } + if (pipelineIndex !== void 0 && pipelineIndex !== expectedIndex++) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + continue; + } + i++; + } } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return + function abortTransactionFragments(commandQueue) { + var _a2; + for (let i = 0; i < commandQueue.length; ) { + const command = (_a2 = commandQueue.peekAt(i)) === null || _a2 === void 0 ? void 0 : _a2.command; + if (command.name === "multi") { + break; + } + if (command.name === "exec") { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + break; + } + if (command.inTransaction) { + commandQueue.remove(i, 1); + command.reject(abortError(command)); + } else { + i++; + } + } } - - // read - read(req, res, next, parse, debug, { - encoding: null, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} - - -/***/ }), - -/***/ 80495: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - */ - -var bytes = __nccwpck_require__(59576) -var contentType = __nccwpck_require__(6790) -var debug = __nccwpck_require__(78244)('body-parser:text') -var read = __nccwpck_require__(53054) -var typeis = __nccwpck_require__(87568) - -/** - * Module exports. - */ - -module.exports = text - -/** - * Create a middleware to parse text bodies. - * - * @param {object} [options] - * @return {function} - * @api public - */ - -function text (options) { - var opts = options || {} - - var defaultCharset = opts.defaultCharset || 'utf-8' - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'text/plain' - var verify = opts.verify || false - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') - } - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (buf) { - return buf - } - - return function textParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return + function closeHandler(self2) { + return function() { + const prevStatus = self2.status; + self2.setStatus("close"); + if (self2.commandQueue.length) { + abortIncompletePipelines(self2.commandQueue); + } + if (self2.offlineQueue.length) { + abortTransactionFragments(self2.offlineQueue); + } + if (prevStatus === "ready") { + if (!self2.prevCondition) { + self2.prevCondition = self2.condition; + } + if (self2.commandQueue.length) { + self2.prevCommandQueue = self2.commandQueue; + } + } + if (self2.manuallyClosing) { + self2.manuallyClosing = false; + debug3("skip reconnecting since the connection is manually closed."); + return close2(); + } + if (typeof self2.options.retryStrategy !== "function") { + debug3("skip reconnecting because `retryStrategy` is not a function"); + return close2(); + } + const retryDelay = self2.options.retryStrategy(++self2.retryAttempts); + if (typeof retryDelay !== "number") { + debug3("skip reconnecting because `retryStrategy` doesn't return a number"); + return close2(); + } + debug3("reconnect in %sms", retryDelay); + self2.setStatus("reconnecting", retryDelay); + self2.reconnectTimeout = setTimeout(function() { + self2.reconnectTimeout = null; + self2.connect().catch(utils_1.noop); + }, retryDelay); + const { maxRetriesPerRequest } = self2.options; + if (typeof maxRetriesPerRequest === "number") { + if (maxRetriesPerRequest < 0) { + debug3("maxRetriesPerRequest is negative, ignoring..."); + } else { + const remainder = self2.retryAttempts % (maxRetriesPerRequest + 1); + if (remainder === 0) { + debug3("reach maxRetriesPerRequest limitation, flushing command queue..."); + self2.flushQueue(new errors_1.MaxRetriesPerRequestError(maxRetriesPerRequest)); + } + } + } + }; + function close2() { + self2.setStatus("end"); + self2.flushQueue(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + } } - - req.body = req.body || {} - - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return + exports2.closeHandler = closeHandler; + function errorHandler2(self2) { + return function(error) { + debug3("error: %s", error); + self2.silentEmit("error", error); + }; } - - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return + exports2.errorHandler = errorHandler2; + function readyHandler(self2) { + return function() { + self2.setStatus("ready"); + self2.retryAttempts = 0; + if (self2.options.monitor) { + self2.call("monitor").then(() => self2.setStatus("monitoring"), (error) => self2.emit("error", error)); + const { sendCommand } = self2; + self2.sendCommand = function(command) { + if (Command_1.default.checkFlag("VALID_IN_MONITOR_MODE", command.name)) { + return sendCommand.call(self2, command); + } + command.reject(new Error("Connection is in monitoring mode, can't process commands.")); + return command.promise; + }; + self2.once("close", function() { + delete self2.sendCommand; + }); + return; + } + const finalSelect = self2.prevCondition ? self2.prevCondition.select : self2.condition.select; + if (self2.options.connectionName) { + debug3("set the connection name [%s]", self2.options.connectionName); + self2.client("setname", self2.options.connectionName).catch(utils_1.noop); + } + if (self2.options.readOnly) { + debug3("set the connection to readonly mode"); + self2.readonly().catch(utils_1.noop); + } + if (self2.prevCondition) { + const condition = self2.prevCondition; + self2.prevCondition = null; + if (condition.subscriber && self2.options.autoResubscribe) { + if (self2.condition.select !== finalSelect) { + debug3("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + const subscribeChannels = condition.subscriber.channels("subscribe"); + if (subscribeChannels.length) { + debug3("subscribe %d channels", subscribeChannels.length); + self2.subscribe(subscribeChannels); + } + const psubscribeChannels = condition.subscriber.channels("psubscribe"); + if (psubscribeChannels.length) { + debug3("psubscribe %d channels", psubscribeChannels.length); + self2.psubscribe(psubscribeChannels); + } + const ssubscribeChannels = condition.subscriber.channels("ssubscribe"); + if (ssubscribeChannels.length) { + debug3("ssubscribe %d channels", ssubscribeChannels.length); + self2.ssubscribe(ssubscribeChannels); + } + } + } + if (self2.prevCommandQueue) { + if (self2.options.autoResendUnfulfilledCommands) { + debug3("resend %d unfulfilled commands", self2.prevCommandQueue.length); + while (self2.prevCommandQueue.length > 0) { + const item = self2.prevCommandQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } else { + self2.prevCommandQueue = null; + } + } + if (self2.offlineQueue.length) { + debug3("send %d commands in offline queue", self2.offlineQueue.length); + const offlineQueue = self2.offlineQueue; + self2.resetOfflineQueue(); + while (offlineQueue.length > 0) { + const item = offlineQueue.shift(); + if (item.select !== self2.condition.select && item.command.name !== "select") { + self2.select(item.select); + } + self2.sendCommand(item.command, item.stream); + } + } + if (self2.condition.select !== finalSelect) { + debug3("connect to db [%d]", finalSelect); + self2.select(finalSelect); + } + }; } - - // get charset - var charset = getCharset(req) || defaultCharset - - // read - read(req, res, next, parse, debug, { - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify - }) - } -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ - -function getCharset (req) { - try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined - } -} - -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) - } -} - - -/***/ }), - -/***/ 66981: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * body-parser - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var bytes = __nccwpck_require__(59576) -var contentType = __nccwpck_require__(6790) -var createError = __nccwpck_require__(24700) -var debug = __nccwpck_require__(78244)('body-parser:urlencoded') -var deprecate = __nccwpck_require__(97500)('body-parser') -var read = __nccwpck_require__(53054) -var typeis = __nccwpck_require__(87568) - -/** - * Module exports. - */ - -module.exports = urlencoded - -/** - * Cache of parser modules. - */ - -var parsers = Object.create(null) - -/** - * Create a middleware to parse urlencoded bodies. - * - * @param {object} [options] - * @return {function} - * @public - */ - -function urlencoded (options) { - var opts = options || {} - - // notice because option default will flip in next major - if (opts.extended === undefined) { - deprecate('undefined extended: provide extended option') - } - - var extended = opts.extended !== false - var inflate = opts.inflate !== false - var limit = typeof opts.limit !== 'number' - ? bytes.parse(opts.limit || '100kb') - : opts.limit - var type = opts.type || 'application/x-www-form-urlencoded' - var verify = opts.verify || false - var depth = typeof opts.depth !== 'number' - ? Number(opts.depth || 32) - : opts.depth - - if (verify !== false && typeof verify !== 'function') { - throw new TypeError('option verify must be function') + exports2.readyHandler = readyHandler; } +}); - // create the appropriate query parser - var queryparse = extended - ? extendedparser(opts) - : simpleparser(opts) - - // create the appropriate type checking function - var shouldParse = typeof type !== 'function' - ? typeChecker(type) - : type - - function parse (body) { - return body.length - ? queryparse(body) - : {} +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/redis/RedisOptions.js +var require_RedisOptions = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/redis/RedisOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_REDIS_OPTIONS = void 0; + exports2.DEFAULT_REDIS_OPTIONS = { + // Connection + port: 6379, + host: "localhost", + family: 4, + connectTimeout: 1e4, + disconnectTimeout: 2e3, + retryStrategy: function(times) { + return Math.min(times * 50, 2e3); + }, + keepAlive: 0, + noDelay: true, + connectionName: null, + // Sentinel + sentinels: null, + name: null, + role: "master", + sentinelRetryStrategy: function(times) { + return Math.min(times * 10, 1e3); + }, + sentinelReconnectStrategy: function() { + return 6e4; + }, + natMap: null, + enableTLSForSentinelMode: false, + updateSentinels: true, + failoverDetector: false, + // Status + username: null, + password: null, + db: 0, + // Others + enableOfflineQueue: true, + enableReadyCheck: true, + autoResubscribe: true, + autoResendUnfulfilledCommands: true, + lazyConnect: false, + keyPrefix: "", + reconnectOnError: null, + readOnly: false, + stringNumbers: false, + maxRetriesPerRequest: 20, + maxLoadingRetryTime: 1e4, + enableAutoPipelining: false, + autoPipeliningIgnoredCommands: [], + sentinelMaxConnections: 10 + }; } +}); - return function urlencodedParser (req, res, next) { - if (req._body) { - debug('body already parsed') - next() - return - } - - req.body = req.body || {} +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Redis.js +var require_Redis = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/Redis.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var commands_1 = require_built(); + var events_1 = __require("events"); + var standard_as_callback_1 = require_built2(); + var cluster_1 = require_cluster(); + var Command_1 = require_Command(); + var connectors_1 = require_connectors(); + var SentinelConnector_1 = require_SentinelConnector(); + var eventHandler = require_event_handler(); + var RedisOptions_1 = require_RedisOptions(); + var ScanStream_1 = require_ScanStream(); + var transaction_1 = require_transaction(); + var utils_1 = require_utils3(); + var applyMixin_1 = require_applyMixin(); + var Commander_1 = require_Commander(); + var lodash_1 = require_lodash3(); + var Deque = require_denque(); + var debug3 = (0, utils_1.Debug)("redis"); + var Redis = class _Redis extends Commander_1.default { + constructor(arg1, arg2, arg3) { + super(); + this.status = "wait"; + this.isCluster = false; + this.reconnectTimeout = null; + this.connectionEpoch = 0; + this.retryAttempts = 0; + this.manuallyClosing = false; + this._autoPipelines = /* @__PURE__ */ new Map(); + this._runningAutoPipelines = /* @__PURE__ */ new Set(); + this.parseOptions(arg1, arg2, arg3); + events_1.EventEmitter.call(this); + this.resetCommandQueue(); + this.resetOfflineQueue(); + if (this.options.Connector) { + this.connector = new this.options.Connector(this.options); + } else if (this.options.sentinels) { + const sentinelConnector = new SentinelConnector_1.default(this.options); + sentinelConnector.emitter = this; + this.connector = sentinelConnector; + } else { + this.connector = new connectors_1.StandaloneConnector(this.options); + } + if (this.options.scripts) { + Object.entries(this.options.scripts).forEach(([name, definition]) => { + this.defineCommand(name, definition); + }); + } + if (this.options.lazyConnect) { + this.setStatus("wait"); + } else { + this.connect().catch(lodash_1.noop); + } + } + /** + * Create a Redis instance. + * This is the same as `new Redis()` but is included for compatibility with node-redis. + */ + static createClient(...args) { + return new _Redis(...args); + } + get autoPipelineQueueSize() { + let queued = 0; + for (const pipeline of this._autoPipelines.values()) { + queued += pipeline.length; + } + return queued; + } + /** + * Create a connection to Redis. + * This method will be invoked automatically when creating a new Redis instance + * unless `lazyConnect: true` is passed. + * + * When calling this method manually, a Promise is returned, which will + * be resolved when the connection status is ready. + */ + connect(callback) { + const promise = new Promise((resolve4, reject) => { + if (this.status === "connecting" || this.status === "connect" || this.status === "ready") { + reject(new Error("Redis is already connecting/connected")); + return; + } + this.connectionEpoch += 1; + this.setStatus("connecting"); + const { options: options2 } = this; + this.condition = { + select: options2.db, + auth: options2.username ? [options2.username, options2.password] : options2.password, + subscriber: false + }; + const _this = this; + (0, standard_as_callback_1.default)(this.connector.connect(function(type2, err) { + _this.silentEmit(type2, err); + }), function(err, stream) { + if (err) { + _this.flushQueue(err); + _this.silentEmit("error", err); + reject(err); + _this.setStatus("end"); + return; + } + let CONNECT_EVENT = options2.tls ? "secureConnect" : "connect"; + if ("sentinels" in options2 && options2.sentinels && !options2.enableTLSForSentinelMode) { + CONNECT_EVENT = "connect"; + } + _this.stream = stream; + if (options2.noDelay) { + stream.setNoDelay(true); + } + if (typeof options2.keepAlive === "number") { + if (stream.connecting) { + stream.once(CONNECT_EVENT, () => { + stream.setKeepAlive(true, options2.keepAlive); + }); + } else { + stream.setKeepAlive(true, options2.keepAlive); + } + } + if (stream.connecting) { + stream.once(CONNECT_EVENT, eventHandler.connectHandler(_this)); + if (options2.connectTimeout) { + let connectTimeoutCleared = false; + stream.setTimeout(options2.connectTimeout, function() { + if (connectTimeoutCleared) { + return; + } + stream.setTimeout(0); + stream.destroy(); + const err2 = new Error("connect ETIMEDOUT"); + err2.errorno = "ETIMEDOUT"; + err2.code = "ETIMEDOUT"; + err2.syscall = "connect"; + eventHandler.errorHandler(_this)(err2); + }); + stream.once(CONNECT_EVENT, function() { + connectTimeoutCleared = true; + stream.setTimeout(0); + }); + } + } else if (stream.destroyed) { + const firstError = _this.connector.firstError; + if (firstError) { + process.nextTick(() => { + eventHandler.errorHandler(_this)(firstError); + }); + } + process.nextTick(eventHandler.closeHandler(_this)); + } else { + process.nextTick(eventHandler.connectHandler(_this)); + } + if (!stream.destroyed) { + stream.once("error", eventHandler.errorHandler(_this)); + stream.once("close", eventHandler.closeHandler(_this)); + } + const connectionReadyHandler = function() { + _this.removeListener("close", connectionCloseHandler); + resolve4(); + }; + var connectionCloseHandler = function() { + _this.removeListener("ready", connectionReadyHandler); + reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + }; + _this.once("ready", connectionReadyHandler); + _this.once("close", connectionCloseHandler); + }); + }); + return (0, standard_as_callback_1.default)(promise, callback); + } + /** + * Disconnect from Redis. + * + * This method closes the connection immediately, + * and may lose some pending replies that haven't written to client. + * If you want to wait for the pending replies, use Redis#quit instead. + */ + disconnect(reconnect = false) { + if (!reconnect) { + this.manuallyClosing = true; + } + if (this.reconnectTimeout && !reconnect) { + clearTimeout(this.reconnectTimeout); + this.reconnectTimeout = null; + } + if (this.status === "wait") { + eventHandler.closeHandler(this)(); + } else { + this.connector.disconnect(); + } + } + /** + * Disconnect from Redis. + * + * @deprecated + */ + end() { + this.disconnect(); + } + /** + * Create a new instance with the same options as the current one. + * + * @example + * ```js + * var redis = new Redis(6380); + * var anotherRedis = redis.duplicate(); + * ``` + */ + duplicate(override) { + return new _Redis({ ...this.options, ...override }); + } + /** + * Mode of the connection. + * + * One of `"normal"`, `"subscriber"`, or `"monitor"`. When the connection is + * not in `"normal"` mode, certain commands are not allowed. + */ + get mode() { + var _a2; + return this.options.monitor ? "monitor" : ((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.subscriber) ? "subscriber" : "normal"; + } + /** + * Listen for all requests received by the server in real time. + * + * This command will create a new connection to Redis and send a + * MONITOR command via the new connection in order to avoid disturbing + * the current connection. + * + * @param callback The callback function. If omit, a promise will be returned. + * @example + * ```js + * var redis = new Redis(); + * redis.monitor(function (err, monitor) { + * // Entering monitoring mode. + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * + * // supports promise as well as other commands + * redis.monitor().then(function (monitor) { + * monitor.on('monitor', function (time, args, source, database) { + * console.log(time + ": " + util.inspect(args)); + * }); + * }); + * ``` + */ + monitor(callback) { + const monitorInstance = this.duplicate({ + monitor: true, + lazyConnect: false + }); + return (0, standard_as_callback_1.default)(new Promise(function(resolve4, reject) { + monitorInstance.once("error", reject); + monitorInstance.once("monitoring", function() { + resolve4(monitorInstance); + }); + }), callback); + } + /** + * Send a command to Redis + * + * This method is used internally and in most cases you should not + * use it directly. If you need to send a command that is not supported + * by the library, you can use the `call` method: + * + * ```js + * const redis = new Redis(); + * + * redis.call('set', 'foo', 'bar'); + * // or + * redis.call(['set', 'foo', 'bar']); + * ``` + * + * @ignore + */ + sendCommand(command, stream) { + var _a2, _b; + if (this.status === "wait") { + this.connect().catch(lodash_1.noop); + } + if (this.status === "end") { + command.reject(new Error(utils_1.CONNECTION_CLOSED_ERROR_MSG)); + return command.promise; + } + if (((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.subscriber) && !Command_1.default.checkFlag("VALID_IN_SUBSCRIBER_MODE", command.name)) { + command.reject(new Error("Connection in subscriber mode, only subscriber commands may be used")); + return command.promise; + } + if (typeof this.options.commandTimeout === "number") { + command.setTimeout(this.options.commandTimeout); + } + let writable = this.status === "ready" || !stream && this.status === "connect" && (0, commands_1.exists)(command.name) && (0, commands_1.hasFlag)(command.name, "loading"); + if (!this.stream) { + writable = false; + } else if (!this.stream.writable) { + writable = false; + } else if (this.stream._writableState && this.stream._writableState.ended) { + writable = false; + } + if (!writable) { + if (!this.options.enableOfflineQueue) { + command.reject(new Error("Stream isn't writeable and enableOfflineQueue options is false")); + return command.promise; + } + if (command.name === "quit" && this.offlineQueue.length === 0) { + this.disconnect(); + command.resolve(Buffer.from("OK")); + return command.promise; + } + if (debug3.enabled) { + debug3("queue command[%s]: %d -> %s(%o)", this._getDescription(), this.condition.select, command.name, command.args); + } + this.offlineQueue.push({ + command, + stream, + select: this.condition.select + }); + } else { + if (debug3.enabled) { + debug3("write command[%s]: %d -> %s(%o)", this._getDescription(), (_b = this.condition) === null || _b === void 0 ? void 0 : _b.select, command.name, command.args); + } + if (stream) { + if ("isPipeline" in stream && stream.isPipeline) { + stream.write(command.toWritable(stream.destination.redis.stream)); + } else { + stream.write(command.toWritable(stream)); + } + } else { + this.stream.write(command.toWritable(this.stream)); + } + this.commandQueue.push({ + command, + stream, + select: this.condition.select + }); + if (Command_1.default.checkFlag("WILL_DISCONNECT", command.name)) { + this.manuallyClosing = true; + } + if (this.options.socketTimeout !== void 0 && this.socketTimeoutTimer === void 0) { + this.setSocketTimeout(); + } + } + if (command.name === "select" && (0, utils_1.isInt)(command.args[0])) { + const db = parseInt(command.args[0], 10); + if (this.condition.select !== db) { + this.condition.select = db; + this.emit("select", db); + debug3("switch to db [%d]", this.condition.select); + } + } + return command.promise; + } + setSocketTimeout() { + this.socketTimeoutTimer = setTimeout(() => { + this.stream.destroy(new Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)); + this.socketTimeoutTimer = void 0; + }, this.options.socketTimeout); + this.stream.once("data", () => { + clearTimeout(this.socketTimeoutTimer); + this.socketTimeoutTimer = void 0; + if (this.commandQueue.length === 0) + return; + this.setSocketTimeout(); + }); + } + scanStream(options2) { + return this.createScanStream("scan", { options: options2 }); + } + scanBufferStream(options2) { + return this.createScanStream("scanBuffer", { options: options2 }); + } + sscanStream(key, options2) { + return this.createScanStream("sscan", { key, options: options2 }); + } + sscanBufferStream(key, options2) { + return this.createScanStream("sscanBuffer", { key, options: options2 }); + } + hscanStream(key, options2) { + return this.createScanStream("hscan", { key, options: options2 }); + } + hscanBufferStream(key, options2) { + return this.createScanStream("hscanBuffer", { key, options: options2 }); + } + zscanStream(key, options2) { + return this.createScanStream("zscan", { key, options: options2 }); + } + zscanBufferStream(key, options2) { + return this.createScanStream("zscanBuffer", { key, options: options2 }); + } + /** + * Emit only when there's at least one listener. + * + * @ignore + */ + silentEmit(eventName, arg) { + let error; + if (eventName === "error") { + error = arg; + if (this.status === "end") { + return; + } + if (this.manuallyClosing) { + if (error instanceof Error && (error.message === utils_1.CONNECTION_CLOSED_ERROR_MSG || // @ts-expect-error + error.syscall === "connect" || // @ts-expect-error + error.syscall === "read")) { + return; + } + } + } + if (this.listeners(eventName).length > 0) { + return this.emit.apply(this, arguments); + } + if (error && error instanceof Error) { + console.error("[ioredis] Unhandled error event:", error.stack); + } + return false; + } + /** + * @ignore + */ + recoverFromFatalError(_commandError, err, options2) { + this.flushQueue(err, options2); + this.silentEmit("error", err); + this.disconnect(true); + } + /** + * @ignore + */ + handleReconnection(err, item) { + var _a2; + let needReconnect = false; + if (this.options.reconnectOnError) { + needReconnect = this.options.reconnectOnError(err); + } + switch (needReconnect) { + case 1: + case true: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + item.command.reject(err); + break; + case 2: + if (this.status !== "reconnecting") { + this.disconnect(true); + } + if (((_a2 = this.condition) === null || _a2 === void 0 ? void 0 : _a2.select) !== item.select && item.command.name !== "select") { + this.select(item.select); + } + this.sendCommand(item.command); + break; + default: + item.command.reject(err); + } + } + /** + * Get description of the connection. Used for debugging. + */ + _getDescription() { + let description; + if ("path" in this.options && this.options.path) { + description = this.options.path; + } else if (this.stream && this.stream.remoteAddress && this.stream.remotePort) { + description = this.stream.remoteAddress + ":" + this.stream.remotePort; + } else if ("host" in this.options && this.options.host) { + description = this.options.host + ":" + this.options.port; + } else { + description = ""; + } + if (this.options.connectionName) { + description += ` (${this.options.connectionName})`; + } + return description; + } + resetCommandQueue() { + this.commandQueue = new Deque(); + } + resetOfflineQueue() { + this.offlineQueue = new Deque(); + } + parseOptions(...args) { + const options2 = {}; + let isTls = false; + for (let i = 0; i < args.length; ++i) { + const arg = args[i]; + if (arg === null || typeof arg === "undefined") { + continue; + } + if (typeof arg === "object") { + (0, lodash_1.defaults)(options2, arg); + } else if (typeof arg === "string") { + (0, lodash_1.defaults)(options2, (0, utils_1.parseURL)(arg)); + if (arg.startsWith("rediss://")) { + isTls = true; + } + } else if (typeof arg === "number") { + options2.port = arg; + } else { + throw new Error("Invalid argument " + arg); + } + } + if (isTls) { + (0, lodash_1.defaults)(options2, { tls: true }); + } + (0, lodash_1.defaults)(options2, _Redis.defaultOptions); + if (typeof options2.port === "string") { + options2.port = parseInt(options2.port, 10); + } + if (typeof options2.db === "string") { + options2.db = parseInt(options2.db, 10); + } + this.options = (0, utils_1.resolveTLSProfile)(options2); + } + /** + * Change instance's status + */ + setStatus(status, arg) { + if (debug3.enabled) { + debug3("status[%s]: %s -> %s", this._getDescription(), this.status || "[empty]", status); + } + this.status = status; + process.nextTick(this.emit.bind(this, status, arg)); + } + createScanStream(command, { key, options: options2 = {} }) { + return new ScanStream_1.default({ + objectMode: true, + key, + redis: this, + command, + ...options2 + }); + } + /** + * Flush offline queue and command queue with error. + * + * @param error The error object to send to the commands + * @param options options + */ + flushQueue(error, options2) { + options2 = (0, lodash_1.defaults)({}, options2, { + offlineQueue: true, + commandQueue: true + }); + let item; + if (options2.offlineQueue) { + while (item = this.offlineQueue.shift()) { + item.command.reject(error); + } + } + if (options2.commandQueue) { + if (this.commandQueue.length > 0) { + if (this.stream) { + this.stream.removeAllListeners("data"); + } + while (item = this.commandQueue.shift()) { + item.command.reject(error); + } + } + } + } + /** + * Check whether Redis has finished loading the persistent data and is able to + * process commands. + */ + _readyCheck(callback) { + const _this = this; + this.info(function(err, res) { + if (err) { + if (err.message && err.message.includes("NOPERM")) { + console.warn(`Skipping the ready check because INFO command fails: "${err.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`); + return callback(null, {}); + } + return callback(err); + } + if (typeof res !== "string") { + return callback(null, res); + } + const info = {}; + const lines = res.split("\r\n"); + for (let i = 0; i < lines.length; ++i) { + const [fieldName, ...fieldValueParts] = lines[i].split(":"); + const fieldValue = fieldValueParts.join(":"); + if (fieldValue) { + info[fieldName] = fieldValue; + } + } + if (!info.loading || info.loading === "0") { + callback(null, info); + } else { + const loadingEtaMs = (info.loading_eta_seconds || 1) * 1e3; + const retryTime = _this.options.maxLoadingRetryTime && _this.options.maxLoadingRetryTime < loadingEtaMs ? _this.options.maxLoadingRetryTime : loadingEtaMs; + debug3("Redis server still loading, trying again in " + retryTime + "ms"); + setTimeout(function() { + _this._readyCheck(callback); + }, retryTime); + } + }).catch(lodash_1.noop); + } + }; + Redis.Cluster = cluster_1.default; + Redis.Command = Command_1.default; + Redis.defaultOptions = RedisOptions_1.DEFAULT_REDIS_OPTIONS; + (0, applyMixin_1.default)(Redis, events_1.EventEmitter); + (0, transaction_1.addTransactionSupport)(Redis.prototype); + exports2.default = Redis; + } +}); - // skip requests without bodies - if (!typeis.hasBody(req)) { - debug('skip empty body') - next() - return +// node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/index.js +var require_built3 = __commonJS({ + "node_modules/.pnpm/ioredis@5.4.1/node_modules/ioredis/built/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.print = exports2.ReplyError = exports2.SentinelIterator = exports2.SentinelConnector = exports2.AbstractConnector = exports2.Pipeline = exports2.ScanStream = exports2.Command = exports2.Cluster = exports2.Redis = exports2.default = void 0; + exports2 = module2.exports = require_Redis().default; + var Redis_1 = require_Redis(); + Object.defineProperty(exports2, "default", { enumerable: true, get: function() { + return Redis_1.default; + } }); + var Redis_2 = require_Redis(); + Object.defineProperty(exports2, "Redis", { enumerable: true, get: function() { + return Redis_2.default; + } }); + var cluster_1 = require_cluster(); + Object.defineProperty(exports2, "Cluster", { enumerable: true, get: function() { + return cluster_1.default; + } }); + var Command_1 = require_Command(); + Object.defineProperty(exports2, "Command", { enumerable: true, get: function() { + return Command_1.default; + } }); + var ScanStream_1 = require_ScanStream(); + Object.defineProperty(exports2, "ScanStream", { enumerable: true, get: function() { + return ScanStream_1.default; + } }); + var Pipeline_1 = require_Pipeline(); + Object.defineProperty(exports2, "Pipeline", { enumerable: true, get: function() { + return Pipeline_1.default; + } }); + var AbstractConnector_1 = require_AbstractConnector(); + Object.defineProperty(exports2, "AbstractConnector", { enumerable: true, get: function() { + return AbstractConnector_1.default; + } }); + var SentinelConnector_1 = require_SentinelConnector(); + Object.defineProperty(exports2, "SentinelConnector", { enumerable: true, get: function() { + return SentinelConnector_1.default; + } }); + Object.defineProperty(exports2, "SentinelIterator", { enumerable: true, get: function() { + return SentinelConnector_1.SentinelIterator; + } }); + exports2.ReplyError = require_redis_errors().ReplyError; + Object.defineProperty(exports2, "Promise", { + get() { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + return Promise; + }, + set(_lib) { + console.warn("ioredis v5 does not support plugging third-party Promise library anymore. Native Promise will be used."); + } + }); + function print(err, reply) { + if (err) { + console.log("Error: " + err); + } else { + console.log("Reply: " + reply); + } } + exports2.print = print; + } +}); - debug('content-type %j', req.headers['content-type']) - - // determine if request should be parsed - if (!shouldParse(req)) { - debug('skip parsing') - next() - return +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-octokit-throttle-options.js +var require_get_octokit_throttle_options = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-octokit-throttle-options.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getOctokitThrottleOptions = getOctokitThrottleOptions; + var bottleneck_1 = __importDefault(require_lib2()); + var ioredis_1 = require_built3(); + function getOctokitThrottleOptions(options2) { + let { log: log2, redisConfig } = options2; + const throttlingOptions = { + onRateLimit: (retryAfter, options3) => { + log2.warn(`Request quota exhausted for request ${options3.method} ${options3.url}`); + if (options3.request.retryCount <= 2) { + log2.info(`Retrying after ${retryAfter} seconds!`); + return true; + } + return false; + }, + onSecondaryRateLimit: (_retryAfter, options3) => { + log2.warn(`Secondary quota detected for request ${options3.method} ${options3.url}`); + } + }; + if (!redisConfig) + return throttlingOptions; + const connection = new bottleneck_1.default.IORedisConnection({ + client: getRedisClient(options2) + }); + connection.on("error", (error) => { + log2.error(Object.assign(error, { source: "bottleneck" })); + }); + throttlingOptions.Bottleneck = bottleneck_1.default; + throttlingOptions.connection = connection; + return throttlingOptions; } - - // assert charset - var charset = getCharset(req) || 'utf-8' - if (charset !== 'utf-8') { - debug('invalid charset') - next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { - charset: charset, - type: 'charset.unsupported' - })) - return + function getRedisClient({ redisConfig }) { + if (redisConfig) + return new ioredis_1.Redis(redisConfig); } - - // read - read(req, res, next, parse, debug, { - debug: debug, - encoding: charset, - inflate: inflate, - limit: limit, - verify: verify, - depth: depth - }) } -} - -/** - * Get the extended query parser. - * - * @param {object} options - */ - -function extendedparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit - : 1000 - - var depth = typeof options.depth !== 'number' - ? Number(options.depth || 32) - : options.depth - var parse = parser('qs') +}); - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-probot-octokit-with-defaults.js +var require_get_probot_octokit_with_defaults = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-probot-octokit-with-defaults.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getProbotOctokitWithDefaults = getProbotOctokitWithDefaults; + var request_1 = (init_dist_src3(), __toCommonJS(dist_src_exports2)); + var get_octokit_throttle_options_js_1 = require_get_octokit_throttle_options(); + function getProbotOctokitWithDefaults(options2) { + var _a2, _b; + const authOptions = options2.githubToken ? { + token: options2.githubToken, + request: request_1.request.defaults({ + request: { + fetch: (_a2 = options2.request) == null ? void 0 : _a2.fetch + } + }) + } : { + cache: options2.cache, + appId: options2.appId, + privateKey: options2.privateKey, + request: request_1.request.defaults({ + request: { + fetch: (_b = options2.request) == null ? void 0 : _b.fetch + } + }) + }; + const octokitThrottleOptions = (0, get_octokit_throttle_options_js_1.getOctokitThrottleOptions)({ + log: options2.log, + redisConfig: options2.redisConfig + }); + let defaultOptions = { + auth: authOptions, + log: options2.log.child ? options2.log.child({ name: "octokit" }) : options2.log + }; + if (options2.baseUrl) { + defaultOptions.baseUrl = options2.baseUrl; + } + if (octokitThrottleOptions) { + defaultOptions.throttle = octokitThrottleOptions; + } + return options2.Octokit.defaults((instanceOptions) => { + const options3 = Object.assign({}, defaultOptions, instanceOptions, { + auth: instanceOptions.auth ? Object.assign({}, defaultOptions.auth, instanceOptions.auth) : defaultOptions.auth + }); + if (instanceOptions.throttle) { + options3.throttle = Object.assign({}, defaultOptions.throttle, instanceOptions.throttle); + } + return options3; + }); + } } +}); - if (isNaN(depth) || depth < 0) { - throw new TypeError('option depth must be a zero or a positive number') +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/createLogger.js +var createLogger; +var init_createLogger = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/createLogger.js"() { + createLogger = (logger2) => ({ + debug: () => { + }, + info: () => { + }, + warn: console.warn.bind(console), + error: console.error.bind(console), + ...logger2 + }); } +}); - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/generated/webhook-names.js +var emitterEventNames; +var init_webhook_names = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/generated/webhook-names.js"() { + emitterEventNames = [ + "branch_protection_configuration", + "branch_protection_configuration.disabled", + "branch_protection_configuration.enabled", + "branch_protection_rule", + "branch_protection_rule.created", + "branch_protection_rule.deleted", + "branch_protection_rule.edited", + "check_run", + "check_run.completed", + "check_run.created", + "check_run.requested_action", + "check_run.rerequested", + "check_suite", + "check_suite.completed", + "check_suite.requested", + "check_suite.rerequested", + "code_scanning_alert", + "code_scanning_alert.appeared_in_branch", + "code_scanning_alert.closed_by_user", + "code_scanning_alert.created", + "code_scanning_alert.fixed", + "code_scanning_alert.reopened", + "code_scanning_alert.reopened_by_user", + "commit_comment", + "commit_comment.created", + "create", + "custom_property", + "custom_property.created", + "custom_property.deleted", + "custom_property_values", + "custom_property_values.updated", + "delete", + "dependabot_alert", + "dependabot_alert.created", + "dependabot_alert.dismissed", + "dependabot_alert.fixed", + "dependabot_alert.reintroduced", + "dependabot_alert.reopened", + "deploy_key", + "deploy_key.created", + "deploy_key.deleted", + "deployment", + "deployment.created", + "deployment_protection_rule", + "deployment_protection_rule.requested", + "deployment_review", + "deployment_review.approved", + "deployment_review.rejected", + "deployment_review.requested", + "deployment_status", + "deployment_status.created", + "discussion", + "discussion.answered", + "discussion.category_changed", + "discussion.created", + "discussion.deleted", + "discussion.edited", + "discussion.labeled", + "discussion.locked", + "discussion.pinned", + "discussion.transferred", + "discussion.unanswered", + "discussion.unlabeled", + "discussion.unlocked", + "discussion.unpinned", + "discussion_comment", + "discussion_comment.created", + "discussion_comment.deleted", + "discussion_comment.edited", + "fork", + "github_app_authorization", + "github_app_authorization.revoked", + "gollum", + "installation", + "installation.created", + "installation.deleted", + "installation.new_permissions_accepted", + "installation.suspend", + "installation.unsuspend", + "installation_repositories", + "installation_repositories.added", + "installation_repositories.removed", + "installation_target", + "installation_target.renamed", + "issue_comment", + "issue_comment.created", + "issue_comment.deleted", + "issue_comment.edited", + "issues", + "issues.assigned", + "issues.closed", + "issues.deleted", + "issues.demilestoned", + "issues.edited", + "issues.labeled", + "issues.locked", + "issues.milestoned", + "issues.opened", + "issues.pinned", + "issues.reopened", + "issues.transferred", + "issues.unassigned", + "issues.unlabeled", + "issues.unlocked", + "issues.unpinned", + "label", + "label.created", + "label.deleted", + "label.edited", + "marketplace_purchase", + "marketplace_purchase.cancelled", + "marketplace_purchase.changed", + "marketplace_purchase.pending_change", + "marketplace_purchase.pending_change_cancelled", + "marketplace_purchase.purchased", + "member", + "member.added", + "member.edited", + "member.removed", + "membership", + "membership.added", + "membership.removed", + "merge_group", + "merge_group.checks_requested", + "merge_group.destroyed", + "meta", + "meta.deleted", + "milestone", + "milestone.closed", + "milestone.created", + "milestone.deleted", + "milestone.edited", + "milestone.opened", + "org_block", + "org_block.blocked", + "org_block.unblocked", + "organization", + "organization.deleted", + "organization.member_added", + "organization.member_invited", + "organization.member_removed", + "organization.renamed", + "package", + "package.published", + "package.updated", + "page_build", + "ping", + "project", + "project.closed", + "project.created", + "project.deleted", + "project.edited", + "project.reopened", + "project_card", + "project_card.converted", + "project_card.created", + "project_card.deleted", + "project_card.edited", + "project_card.moved", + "project_column", + "project_column.created", + "project_column.deleted", + "project_column.edited", + "project_column.moved", + "projects_v2_item", + "projects_v2_item.archived", + "projects_v2_item.converted", + "projects_v2_item.created", + "projects_v2_item.deleted", + "projects_v2_item.edited", + "projects_v2_item.reordered", + "projects_v2_item.restored", + "public", + "pull_request", + "pull_request.assigned", + "pull_request.auto_merge_disabled", + "pull_request.auto_merge_enabled", + "pull_request.closed", + "pull_request.converted_to_draft", + "pull_request.demilestoned", + "pull_request.dequeued", + "pull_request.edited", + "pull_request.enqueued", + "pull_request.labeled", + "pull_request.locked", + "pull_request.milestoned", + "pull_request.opened", + "pull_request.ready_for_review", + "pull_request.reopened", + "pull_request.review_request_removed", + "pull_request.review_requested", + "pull_request.synchronize", + "pull_request.unassigned", + "pull_request.unlabeled", + "pull_request.unlocked", + "pull_request_review", + "pull_request_review.dismissed", + "pull_request_review.edited", + "pull_request_review.submitted", + "pull_request_review_comment", + "pull_request_review_comment.created", + "pull_request_review_comment.deleted", + "pull_request_review_comment.edited", + "pull_request_review_thread", + "pull_request_review_thread.resolved", + "pull_request_review_thread.unresolved", + "push", + "registry_package", + "registry_package.published", + "registry_package.updated", + "release", + "release.created", + "release.deleted", + "release.edited", + "release.prereleased", + "release.published", + "release.released", + "release.unpublished", + "repository", + "repository.archived", + "repository.created", + "repository.deleted", + "repository.edited", + "repository.privatized", + "repository.publicized", + "repository.renamed", + "repository.transferred", + "repository.unarchived", + "repository_dispatch", + "repository_import", + "repository_vulnerability_alert", + "repository_vulnerability_alert.create", + "repository_vulnerability_alert.dismiss", + "repository_vulnerability_alert.reopen", + "repository_vulnerability_alert.resolve", + "secret_scanning_alert", + "secret_scanning_alert.created", + "secret_scanning_alert.reopened", + "secret_scanning_alert.resolved", + "secret_scanning_alert.revoked", + "secret_scanning_alert_location", + "secret_scanning_alert_location.created", + "security_advisory", + "security_advisory.performed", + "security_advisory.published", + "security_advisory.updated", + "security_advisory.withdrawn", + "sponsorship", + "sponsorship.cancelled", + "sponsorship.created", + "sponsorship.edited", + "sponsorship.pending_cancellation", + "sponsorship.pending_tier_change", + "sponsorship.tier_changed", + "star", + "star.created", + "star.deleted", + "status", + "team", + "team.added_to_repository", + "team.created", + "team.deleted", + "team.edited", + "team.removed_from_repository", + "team_add", + "watch", + "watch.started", + "workflow_dispatch", + "workflow_job", + "workflow_job.completed", + "workflow_job.in_progress", + "workflow_job.queued", + "workflow_job.waiting", + "workflow_run", + "workflow_run.completed", + "workflow_run.in_progress", + "workflow_run.requested" + ]; } +}); - return function queryparse (body) { - var paramCount = parameterCount(body, parameterLimit) +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/on.js +function handleEventHandlers(state, webhookName, handler2) { + if (!state.hooks[webhookName]) { + state.hooks[webhookName] = []; + } + state.hooks[webhookName].push(handler2); +} +function receiverOn(state, webhookNameOrNames, handler2) { + if (Array.isArray(webhookNameOrNames)) { + webhookNameOrNames.forEach( + (webhookName) => receiverOn(state, webhookName, handler2) + ); + return; + } + if (["*", "error"].includes(webhookNameOrNames)) { + const webhookName = webhookNameOrNames === "*" ? "any" : webhookNameOrNames; + const message = `Using the "${webhookNameOrNames}" event with the regular Webhooks.on() function is not supported. Please use the Webhooks.on${webhookName.charAt(0).toUpperCase() + webhookName.slice(1)}() method instead`; + throw new Error(message); + } + if (!emitterEventNames.includes(webhookNameOrNames)) { + state.log.warn( + `"${webhookNameOrNames}" is not a known webhook name (https://developer.github.com/v3/activity/events/types/)` + ); + } + handleEventHandlers(state, webhookNameOrNames, handler2); +} +function receiverOnAny(state, handler2) { + handleEventHandlers(state, "*", handler2); +} +function receiverOnError(state, handler2) { + handleEventHandlers(state, "error", handler2); +} +var init_on = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/on.js"() { + init_webhook_names(); + } +}); - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) - } +// node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js +var require_indent_string = __commonJS({ + "node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports2, module2) { + "use strict"; + module2.exports = (string, count = 1, options2) => { + options2 = { + indent: " ", + includeEmptyLines: false, + ...options2 + }; + if (typeof string !== "string") { + throw new TypeError( + `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` + ); + } + if (typeof count !== "number") { + throw new TypeError( + `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` + ); + } + if (typeof options2.indent !== "string") { + throw new TypeError( + `Expected \`options.indent\` to be a \`string\`, got \`${typeof options2.indent}\`` + ); + } + if (count === 0) { + return string; + } + const regex2 = options2.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; + return string.replace(regex2, options2.indent.repeat(count)); + }; + } +}); - var arrayLimit = Math.max(100, paramCount) +// node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js +var require_clean_stack = __commonJS({ + "node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports2, module2) { + "use strict"; + var os3 = __require("os"); + var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; + var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; + var homeDir = typeof os3.homedir === "undefined" ? "" : os3.homedir(); + module2.exports = (stack, options2) => { + options2 = Object.assign({ pretty: false }, options2); + return stack.replace(/\\/g, "/").split("\n").filter((line) => { + const pathMatches = line.match(extractPathRegex); + if (pathMatches === null || !pathMatches[1]) { + return true; + } + const match = pathMatches[1]; + if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { + return false; + } + return !pathRegex.test(match); + }).filter((line) => line.trim() !== "").map((line) => { + if (options2.pretty) { + return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); + } + return line; + }).join("\n"); + }; + } +}); - debug('parse extended urlencoding') - try { - return parse(body, { - allowPrototypes: true, - arrayLimit: arrayLimit, - depth: depth, - strictDepth: true, - parameterLimit: parameterLimit - }) - } catch (err) { - if (err instanceof RangeError) { - throw createError(400, 'The input exceeded the depth', { - type: 'querystring.parse.rangeError' - }) - } else { - throw err +// node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js +var require_aggregate_error = __commonJS({ + "node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports2, module2) { + "use strict"; + var indentString2 = require_indent_string(); + var cleanStack = require_clean_stack(); + var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); + var AggregateError5 = class extends Error { + constructor(errors) { + if (!Array.isArray(errors)) { + throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); + } + errors = [...errors].map((error) => { + if (error instanceof Error) { + return error; + } + if (error !== null && typeof error === "object") { + return Object.assign(new Error(error.message), error); + } + return new Error(error); + }); + let message = errors.map((error) => { + return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error); + }).join("\n"); + message = "\n" + indentString2(message, 4); + super(message); + this.name = "AggregateError"; + Object.defineProperty(this, "_errors", { value: errors }); } - } + *[Symbol.iterator]() { + for (const error of this._errors) { + yield error; + } + } + }; + module2.exports = AggregateError5; } -} - -/** - * Get the charset of a request. - * - * @param {object} req - * @api private - */ +}); -function getCharset (req) { +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/wrap-error-handler.js +function wrapErrorHandler(handler2, error) { + let returnValue; try { - return (contentType.parse(req).parameters.charset || '').toLowerCase() - } catch (e) { - return undefined + returnValue = handler2(error); + } catch (error2) { + console.log('FATAL: Error occurred in "error" event handler'); + console.log(error2); + } + if (returnValue && returnValue.catch) { + returnValue.catch((error2) => { + console.log('FATAL: Error occurred in "error" event handler'); + console.log(error2); + }); } } - -/** - * Count the number of parameters, stopping once limit reached - * - * @param {string} body - * @param {number} limit - * @api private - */ - -function parameterCount (body, limit) { - var count = 0 - var index = 0 - - while ((index = body.indexOf('&', index)) !== -1) { - count++ - index++ - - if (count === limit) { - return undefined - } +var init_wrap_error_handler = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/wrap-error-handler.js"() { } +}); - return count +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/receive.js +function getHooks(state, eventPayloadAction, eventName) { + const hooks = [state.hooks[eventName], state.hooks["*"]]; + if (eventPayloadAction) { + hooks.unshift(state.hooks[`${eventName}.${eventPayloadAction}`]); + } + return [].concat(...hooks.filter(Boolean)); } - -/** - * Get parser for module name dynamically. - * - * @param {string} name - * @return {function} - * @api private - */ - -function parser (name) { - var mod = parsers[name] - - if (mod !== undefined) { - return mod.parse +function receiverHandle(state, event) { + const errorHandlers = state.hooks.error || []; + if (event instanceof Error) { + const error = Object.assign(new import_aggregate_error.default([event]), { + event, + errors: [event] + }); + errorHandlers.forEach((handler2) => wrapErrorHandler(handler2, error)); + return Promise.reject(error); } - - // this uses a switch for static require analysis - switch (name) { - case 'qs': - mod = __nccwpck_require__(96792) - break - case 'querystring': - mod = __nccwpck_require__(83480) - break + if (!event || !event.name) { + throw new import_aggregate_error.default(["Event name not passed"]); } - - // store to prevent invoking require() - parsers[name] = mod - - return mod.parse + if (!event.payload) { + throw new import_aggregate_error.default(["Event payload not passed"]); + } + const hooks = getHooks( + state, + "action" in event.payload ? event.payload.action : null, + event.name + ); + if (hooks.length === 0) { + return Promise.resolve(); + } + const errors = []; + const promises = hooks.map((handler2) => { + let promise = Promise.resolve(event); + if (state.transform) { + promise = promise.then(state.transform); + } + return promise.then((event2) => { + return handler2(event2); + }).catch((error) => errors.push(Object.assign(error, { event }))); + }); + return Promise.all(promises).then(() => { + if (errors.length === 0) { + return; + } + const error = new import_aggregate_error.default(errors); + Object.assign(error, { + event, + errors + }); + errorHandlers.forEach((handler2) => wrapErrorHandler(handler2, error)); + throw error; + }); } - -/** - * Get the simple query parser. - * - * @param {object} options - */ - -function simpleparser (options) { - var parameterLimit = options.parameterLimit !== undefined - ? options.parameterLimit - : 1000 - var parse = parser('querystring') - - if (isNaN(parameterLimit) || parameterLimit < 1) { - throw new TypeError('option parameterLimit must be a positive number') +var import_aggregate_error; +var init_receive = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/receive.js"() { + import_aggregate_error = __toESM(require_aggregate_error()); + init_wrap_error_handler(); } +}); - if (isFinite(parameterLimit)) { - parameterLimit = parameterLimit | 0 +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/remove-listener.js +function removeListener(state, webhookNameOrNames, handler2) { + if (Array.isArray(webhookNameOrNames)) { + webhookNameOrNames.forEach( + (webhookName) => removeListener(state, webhookName, handler2) + ); + return; } - - return function queryparse (body) { - var paramCount = parameterCount(body, parameterLimit) - - if (paramCount === undefined) { - debug('too many parameters') - throw createError(413, 'too many parameters', { - type: 'parameters.too.many' - }) + if (!state.hooks[webhookNameOrNames]) { + return; + } + for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) { + if (state.hooks[webhookNameOrNames][i] === handler2) { + state.hooks[webhookNameOrNames].splice(i, 1); + return; } - - debug('parse urlencoding') - return parse(body, undefined, undefined, { maxKeys: parameterLimit }) } } +var init_remove_listener = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/remove-listener.js"() { + } +}); -/** - * Get the simple type checker. - * - * @param {string} type - * @return {function} - */ - -function typeChecker (type) { - return function checkType (req) { - return Boolean(typeis(req, type)) +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/index.js +function createEventHandler(options2) { + const state = { + hooks: {}, + log: createLogger(options2 && options2.log) + }; + if (options2 && options2.transform) { + state.transform = options2.transform; } + return { + on: receiverOn.bind(null, state), + onAny: receiverOnAny.bind(null, state), + onError: receiverOnError.bind(null, state), + removeListener: removeListener.bind(null, state), + receive: receiverHandle.bind(null, state) + }; } +var init_event_handler = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/event-handler/index.js"() { + init_createLogger(); + init_on(); + init_receive(); + init_remove_listener(); + } +}); +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/types.js +var Algorithm; +var init_types = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/types.js"() { + Algorithm = /* @__PURE__ */ ((Algorithm2) => { + Algorithm2["SHA1"] = "sha1"; + Algorithm2["SHA256"] = "sha256"; + return Algorithm2; + })(Algorithm || {}); + } +}); -/***/ }), - -/***/ 26760: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Batcher, Events, parser; -parser = __nccwpck_require__(21216); -Events = __nccwpck_require__(40950); - -Batcher = function () { - class Batcher { - constructor(options = {}) { - this.options = options; - parser.load(this.options, this.defaults, this); - this.Events = new Events(this); - this._arr = []; - - this._resetPromise(); - - this._lastFlush = Date.now(); - } - - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } - - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/version.js +var VERSION3; +var init_version4 = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/version.js"() { + VERSION3 = "4.1.0"; + } +}); - this._resolve(); +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/node/sign.js +import { createHmac } from "node:crypto"; +async function sign(options2, payload) { + const { secret, algorithm } = typeof options2 === "object" ? { + secret: options2.secret, + algorithm: options2.algorithm || Algorithm.SHA256 + } : { secret: options2, algorithm: Algorithm.SHA256 }; + if (!secret || !payload) { + throw new TypeError( + "[@octokit/webhooks-methods] secret & payload required for sign()" + ); + } + if (typeof payload !== "string") { + throw new TypeError("[@octokit/webhooks-methods] payload must be a string"); + } + if (!Object.values(Algorithm).includes(algorithm)) { + throw new TypeError( + `[@octokit/webhooks] Algorithm ${algorithm} is not supported. Must be 'sha1' or 'sha256'` + ); + } + return `${algorithm}=${createHmac(algorithm, secret).update(payload).digest("hex")}`; +} +var init_sign = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/node/sign.js"() { + init_types(); + init_version4(); + sign.VERSION = VERSION3; + } +}); - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - - add(data) { - var ret; - - this._arr.push(data); - - ret = this._promise; - - if (this._arr.length === this.maxSize) { - this._flush(); - } else if (this.maxTime != null && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - - return ret; - } +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/utils.js +var getAlgorithm; +var init_utils4 = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/utils.js"() { + getAlgorithm = (signature) => { + return signature.startsWith("sha256=") ? "sha256" : "sha1"; + }; + } +}); +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/node/verify.js +import { timingSafeEqual } from "node:crypto"; +import { Buffer as Buffer2 } from "node:buffer"; +async function verify(secret, eventPayload, signature) { + if (!secret || !eventPayload || !signature) { + throw new TypeError( + "[@octokit/webhooks-methods] secret, eventPayload & signature required" + ); } + if (typeof eventPayload !== "string") { + throw new TypeError( + "[@octokit/webhooks-methods] eventPayload must be a string" + ); + } + const signatureBuffer = Buffer2.from(signature); + const algorithm = getAlgorithm(signature); + const verificationBuffer = Buffer2.from( + await sign({ secret, algorithm }, eventPayload) + ); + if (signatureBuffer.length !== verificationBuffer.length) { + return false; + } + return timingSafeEqual(signatureBuffer, verificationBuffer); +} +var init_verify = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/node/verify.js"() { + init_sign(); + init_version4(); + init_utils4(); + verify.VERSION = VERSION3; + } +}); - ; - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - return Batcher; -}.call(void 0); - -module.exports = Batcher; - -/***/ }), - -/***/ 30692: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Bottleneck, - DEFAULT_PRIORITY, - Events, - Job, - LocalDatastore, - NUM_PRIORITIES, - Queues, - RedisDatastore, - States, - Sync, - parser, - splice = [].splice; -NUM_PRIORITIES = 10; -DEFAULT_PRIORITY = 5; -parser = __nccwpck_require__(21216); -Queues = __nccwpck_require__(40023); -Job = __nccwpck_require__(1668); -LocalDatastore = __nccwpck_require__(41311); -RedisDatastore = __nccwpck_require__(39567); -Events = __nccwpck_require__(40950); -States = __nccwpck_require__(77393); -Sync = __nccwpck_require__(7212); - -Bottleneck = function () { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - - this._validateOptions(options, invalid); - - parser.load(options, this.instanceDefaults, this); - this._queues = new Queues(NUM_PRIORITIES); - this._scheduled = {}; - this._states = new States(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events(this); - this._submitLock = new Sync("submit", this.Promise); - this._registerLock = new Sync("register", this.Promise); - storeOptions = parser.load(options, this.storeDefaults, {}); - - this._store = function () { - if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { - storeInstanceOptions = parser.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser.load(options, this.localStoreDefaults, {}); - return new LocalDatastore(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }.call(this); - - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _validateOptions(options, invalid) { - if (!(options != null && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - - ready() { - return this._store.ready; - } - - clients() { - return this._store.clients; - } - - channel() { - return `b_${this.id}`; - } - - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } - - publish(message) { - return this._store.__publish__(message); - } - - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } - - chain(_limiter) { - this._limiter = _limiter; - return this; - } - - queued(priority) { - return this._queues.queued(priority); - } - - clusterQueued() { - return this._store.__queued__(); - } - - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - - running() { - return this._store.__running__(); - } +// node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/index.js +var init_dist_src4 = __esm({ + "node_modules/.pnpm/@octokit+webhooks-methods@4.1.0/node_modules/@octokit/webhooks-methods/dist-src/index.js"() { + init_sign(); + init_verify(); + } +}); - done() { - return this._store.__done__(); - } +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/verify-and-receive.js +async function verifyAndReceive(state, event) { + const matchesSignature = await verify( + state.secret, + event.payload, + event.signature + ).catch(() => false); + if (!matchesSignature) { + const error = new Error( + "[@octokit/webhooks] signature does not match event payload and secret" + ); + return state.eventHandler.receive( + Object.assign(error, { event, status: 400 }) + ); + } + let payload; + try { + payload = JSON.parse(event.payload); + } catch (error) { + error.message = "Invalid JSON"; + error.status = 400; + throw new import_aggregate_error2.default([error]); + } + return state.eventHandler.receive({ + id: event.id, + name: event.name, + payload + }); +} +var import_aggregate_error2; +var init_verify_and_receive = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/verify-and-receive.js"() { + import_aggregate_error2 = __toESM(require_aggregate_error()); + init_dist_src4(); + } +}); - jobStatus(id) { - return this._states.jobStatus(id); - } +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js +function getMissingHeaders(request2) { + return WEBHOOK_HEADERS.filter((header) => !(header in request2.headers)); +} +var WEBHOOK_HEADERS; +var init_get_missing_headers = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/get-missing-headers.js"() { + WEBHOOK_HEADERS = [ + "x-github-event", + "x-hub-signature-256", + "x-github-delivery" + ]; + } +}); - jobs(status) { - return this._states.statusJobs(status); +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js +function getPayload(request2) { + if ("body" in request2) { + if (typeof request2.body === "object" && "rawBody" in request2 && request2.rawBody instanceof Buffer) { + return Promise.resolve(request2.rawBody.toString("utf8")); + } else { + return Promise.resolve(request2.body); } + } + return new Promise((resolve4, reject) => { + let data = []; + request2.on("error", (error) => reject(new import_aggregate_error3.default([error]))); + request2.on("data", (chunk) => data.push(chunk)); + request2.on( + "end", + () => ( + // setImmediate improves the throughput by reducing the pressure from + // the event loop + setImmediate( + resolve4, + data.length === 1 ? data[0].toString("utf8") : Buffer.concat(data).toString("utf8") + ) + ) + ); + }); +} +var import_aggregate_error3; +var init_get_payload = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/get-payload.js"() { + import_aggregate_error3 = __toESM(require_aggregate_error()); + } +}); - counts() { - return this._states.statusCounts(); - } +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js +function onUnhandledRequestDefault(request2, response) { + response.writeHead(404, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Unknown route: ${request2.method} ${request2.url}` + }) + ); +} +var init_on_unhandled_request_default = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/on-unhandled-request-default.js"() { + } +}); - _randomIndex() { - return Math.random().toString(36).slice(2); - } +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js +async function middleware(webhooks, options2, request2, response, next) { + let pathname; + try { + pathname = new URL(request2.url, "http://localhost").pathname; + } catch (error) { + response.writeHead(422, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Request URL could not be parsed: ${request2.url}` + }) + ); + return true; + } + if (pathname !== options2.path) { + next == null ? void 0 : next(); + return false; + } else if (request2.method !== "POST") { + onUnhandledRequestDefault(request2, response); + return true; + } + if (!request2.headers["content-type"] || !request2.headers["content-type"].startsWith("application/json")) { + response.writeHead(415, { + "content-type": "application/json", + accept: "application/json" + }); + response.end( + JSON.stringify({ + error: `Unsupported "Content-Type" header value. Must be "application/json"` + }) + ); + return true; + } + const missingHeaders = getMissingHeaders(request2).join(", "); + if (missingHeaders) { + response.writeHead(400, { + "content-type": "application/json" + }); + response.end( + JSON.stringify({ + error: `Required headers missing: ${missingHeaders}` + }) + ); + return true; + } + const eventName = request2.headers["x-github-event"]; + const signatureSHA256 = request2.headers["x-hub-signature-256"]; + const id = request2.headers["x-github-delivery"]; + options2.log.debug(`${eventName} event received (id: ${id})`); + let didTimeout = false; + const timeout = setTimeout(() => { + didTimeout = true; + response.statusCode = 202; + response.end("still processing\n"); + }, 9e3).unref(); + try { + const payload = await getPayload(request2); + await webhooks.verifyAndReceive({ + id, + name: eventName, + payload, + signature: signatureSHA256 + }); + clearTimeout(timeout); + if (didTimeout) + return true; + response.end("ok\n"); + return true; + } catch (error) { + clearTimeout(timeout); + if (didTimeout) + return true; + const err = Array.from(error)[0]; + const errorMessage = err.message ? `${err.name}: ${err.message}` : "Error: An Unspecified error occurred"; + response.statusCode = typeof err.status !== "undefined" ? err.status : 500; + options2.log.error(error); + response.end( + JSON.stringify({ + error: errorMessage + }) + ); + return true; + } +} +var init_middleware = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/middleware.js"() { + init_get_missing_headers(); + init_get_payload(); + init_on_unhandled_request_default(); + } +}); - check(weight = 1) { - return this._store.__check__(weight); - } +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js +function createNodeMiddleware(webhooks, { + path: path2 = "/api/github/webhooks", + log: log2 = createLogger() +} = {}) { + return middleware.bind(null, webhooks, { + path: path2, + log: log2 + }); +} +var init_node2 = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/middleware/node/index.js"() { + init_createLogger(); + init_middleware(); + } +}); - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; +// node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/index.js +var dist_src_exports3 = {}; +__export(dist_src_exports3, { + Webhooks: () => Webhooks, + createEventHandler: () => createEventHandler, + createNodeMiddleware: () => createNodeMiddleware, + emitterEventNames: () => emitterEventNames +}); +var Webhooks; +var init_dist_src5 = __esm({ + "node_modules/.pnpm/@octokit+webhooks@12.3.1/node_modules/@octokit/webhooks/dist-src/index.js"() { + init_createLogger(); + init_event_handler(); + init_dist_src4(); + init_verify_and_receive(); + init_node2(); + init_webhook_names(); + Webhooks = class { + constructor(options2) { + if (!options2 || !options2.secret) { + throw new Error("[@octokit/webhooks] options.secret required"); + } + const state = { + eventHandler: createEventHandler(options2), + secret: options2.secret, + hooks: {}, + log: createLogger(options2.log) + }; + this.sign = sign.bind(null, options2.secret); + this.verify = verify.bind(null, options2.secret); + this.on = state.eventHandler.on; + this.onAny = state.eventHandler.onAny; + this.onError = state.eventHandler.onError; + this.removeListener = state.eventHandler.removeListener; + this.receive = state.eventHandler.receive; + this.verifyAndReceive = verifyAndReceive.bind(null, state); } - } - - _free(index, job, options, eventInfo) { - var _this = this; - - return _asyncToGenerator(function* () { - var e, running; - - try { - var _ref = yield _this._store.__free__(index, options.weight); - - running = _ref.running; - - _this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); + }; + } +}); - if (running === 0 && _this.empty()) { - return _this.Events.trigger("idle"); +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/get-error-handler.js +var require_get_error_handler = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/get-error-handler.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getErrorHandler = getErrorHandler; + function getErrorHandler(log2) { + return (error) => { + const errors = error.name === "AggregateError" ? error : [error]; + const event = error.event; + for (const error2 of errors) { + const errMessage = (error2.message || "").toLowerCase(); + if (errMessage.includes("x-hub-signature-256")) { + log2.error(error2, "Go to https://github.com/settings/apps/YOUR_APP and verify that the Webhook secret matches the value of the WEBHOOK_SECRET environment variable."); + continue; } - } catch (error1) { - e = error1; - return _this.Events.trigger("error", e); + if (errMessage.includes("pem") || errMessage.includes("json web token")) { + log2.error(error2, "Your private key (a .pem file or PRIVATE_KEY environment variable) or APP_ID is incorrect. Go to https://github.com/settings/apps/YOUR_APP, verify that APP_ID is set correctly, and generate a new PEM file if necessary."); + continue; + } + log2.child({ + name: "event", + id: event == null ? void 0 : event.id + }).error(error2); } - })(); - } - - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function () { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job }; } + } +}); - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - - queue = this._queues.getFirst(); - - var _next2 = next = queue.first(); - - options = _next2.options; - args = _next2.args; - - if (capacity != null && options.weight > capacity) { - return this.Promise.resolve(null); - } - - this.Events.trigger("debug", `Draining ${options.id}`, { - args, - options - }); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ - success, - wait, - reservoir - }) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, { - success, - args, - options - }); - - if (success) { - queue.shift(); - empty = this.empty(); - - if (empty) { - this.Events.trigger("empty"); - } - - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - - this._run(index, next, wait); - - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/octokit-webhooks-transform.js +var require_octokit_webhooks_transform = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/octokit-webhooks-transform.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.webhookTransform = webhookTransform; + var context_js_1 = require_context(); + async function webhookTransform(state, event) { + const log2 = state.log.child({ name: "event", id: event.id }); + const octokit = await state.octokit.auth({ + type: "event-octokit", + event }); + return new context_js_1.Context(event, octokit, log2); } + } +}); - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then(drained => { - var newCapacity; - - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch(e => { - return this.Events.trigger("error", e); +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-webhooks.js +var require_get_webhooks = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/octokit/get-webhooks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getWebhooks = getWebhooks; + var webhooks_1 = (init_dist_src5(), __toCommonJS(dist_src_exports3)); + var get_error_handler_js_1 = require_get_error_handler(); + var octokit_webhooks_transform_js_1 = require_octokit_webhooks_transform(); + function getWebhooks(state) { + const webhooks = new webhooks_1.Webhooks({ + log: state.log, + secret: state.webhooks.secret, + transform: (hook6) => (0, octokit_webhooks_transform_js_1.webhookTransform)(state, hook6) }); + webhooks.onError((0, get_error_handler_js_1.getErrorHandler)(state.log)); + return webhooks; } + } +}); - _dropAllQueued(message) { - return this._queues.shiftAll(function (job) { - return job.doDrop({ - message - }); +// node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/register.js +var require_register = __commonJS({ + "node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/register.js"(exports2, module2) { + module2.exports = register; + function register(state, name, method, options2) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + if (!options2) { + options2 = {}; + } + if (Array.isArray(name)) { + return name.reverse().reduce(function(callback, name2) { + return register.bind(null, state, name2, callback, options2); + }, method)(); + } + return Promise.resolve().then(function() { + if (!state.registry[name]) { + return method(options2); + } + return state.registry[name].reduce(function(method2, registered) { + return registered.hook.bind(null, method2, options2); + }, method)(); }); } + } +}); - stop(options = {}) { - var done, waitForExecuting; - options = parser.load(options, this.stopDefaults); - - waitForExecuting = at => { - var finished; - - finished = () => { - var counts; - counts = this._states.counts; - return counts[0] + counts[1] + counts[2] + counts[3] === at; +// node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/add.js +var require_add = __commonJS({ + "node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/add.js"(exports2, module2) { + module2.exports = addHook; + function addHook(state, kind, name, hook6) { + var orig = hook6; + if (!state.registry[name]) { + state.registry[name] = []; + } + if (kind === "before") { + hook6 = function(method, options2) { + return Promise.resolve().then(orig.bind(null, options2)).then(method.bind(null, options2)); }; - - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - - done = options.dropWaitingJobs ? (this._run = function (index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - - for (k in ref) { - v = ref[k]; - - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - - this._dropAllQueued(options.dropErrorMessage); - - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - - this._receive = function (job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - - return done; - } - - _addToQueue(job) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var args, blocked, error, options, reachedHWM, shifted, strategy; - args = job.args; - options = job.options; - - try { - var _ref2 = yield _this2._store.__submit__(_this2.queued(), options.weight); - - reachedHWM = _ref2.reachedHWM; - blocked = _ref2.blocked; - strategy = _ref2.strategy; - } catch (error1) { - error = error1; - - _this2.Events.trigger("debug", `Could not queue ${options.id}`, { - args, - options, - error - }); - - job.doDrop({ - error - }); - return false; - } - - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? _this2._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? _this2._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - - if (shifted != null) { - shifted.doDrop(); - } - - if (shifted == null || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - - return reachedHWM; - } - } - - job.doQueue(reachedHWM, blocked); - - _this2._queues.push(job); - - yield _this2._drainAll(); - return reachedHWM; - })(); - } - - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); } - } - - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - - if (typeof args[0] === "function") { - var _ref3, _ref4, _splice$call, _splice$call2; - - ref = args, (_ref3 = ref, _ref4 = _toArray(_ref3), fn = _ref4[0], args = _ref4.slice(1), _ref3), (_splice$call = splice.call(args, -1), _splice$call2 = _slicedToArray(_splice$call, 1), cb = _splice$call2[0], _splice$call); - options = parser.load({}, this.jobDefaults); - } else { - var _ref5, _ref6, _splice$call3, _splice$call4; - - ref1 = args, (_ref5 = ref1, _ref6 = _toArray(_ref5), options = _ref6[0], fn = _ref6[1], args = _ref6.slice(2), _ref5), (_splice$call3 = splice.call(args, -1), _splice$call4 = _slicedToArray(_splice$call3, 1), cb = _splice$call4[0], _splice$call3); - options = parser.load(options, this.jobDefaults); + if (kind === "after") { + hook6 = function(method, options2) { + var result; + return Promise.resolve().then(method.bind(null, options2)).then(function(result_) { + result = result_; + return orig(result, options2); + }).then(function() { + return result; + }); + }; } - - task = (...args) => { - return new this.Promise(function (resolve, reject) { - return fn(...args, function (...args) { - return (args[0] != null ? reject : resolve)(args); + if (kind === "error") { + hook6 = function(method, options2) { + return Promise.resolve().then(method.bind(null, options2)).catch(function(error) { + return orig(error, options2); }); - }); - }; - - job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function (args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function (args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } + }; + } + state.registry[name].push({ + hook: hook6, + orig }); - return this._receive(job); } + } +}); - schedule(...args) { - var job, options, task; - - if (typeof args[0] === "function") { - var _args = args; - - var _args2 = _toArray(_args); - - task = _args2[0]; - args = _args2.slice(1); - options = {}; - } else { - var _args3 = args; - - var _args4 = _toArray(_args3); - - options = _args4[0]; - task = _args4[1]; - args = _args4.slice(2); +// node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/remove.js +var require_remove = __commonJS({ + "node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/lib/remove.js"(exports2, module2) { + module2.exports = removeHook; + function removeHook(state, name, method) { + if (!state.registry[name]) { + return; } - - job = new Job(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - - this._receive(job); - - return job.promise; + var index = state.registry[name].map(function(registered) { + return registered.orig; + }).indexOf(method); + if (index === -1) { + return; + } + state.registry[name].splice(index, 1); } + } +}); - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - - wrapped = function wrapped(...args) { - return schedule(fn.bind(this), ...args); - }; - - wrapped.withOptions = function (options, ...args) { - return schedule(options, fn, ...args); +// node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/index.js +var require_before_after_hook = __commonJS({ + "node_modules/.pnpm/before-after-hook@2.2.3/node_modules/before-after-hook/index.js"(exports2, module2) { + var register = require_register(); + var addHook = require_add(); + var removeHook = require_remove(); + var bind = Function.bind; + var bindable = bind.bind(bind); + function bindApi(hook6, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook6.api = { remove: removeHookRef }; + hook6.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function(kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook6[kind] = hook6.api[kind] = bindable(addHook, null).apply(null, args); + }); + } + function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {} }; - - return wrapped; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; } - - updateSettings(options = {}) { - var _this3 = this; - - return _asyncToGenerator(function* () { - yield _this3._store.__updateSettings__(parser.overwrite(options, _this3.storeDefaults)); - parser.overwrite(options, _this3.instanceDefaults, _this3); - return _this3; - })(); + function HookCollection() { + var state = { + registry: {} + }; + var hook6 = register.bind(null, state); + bindApi(hook6, state); + return hook6; + } + var collectionHookDeprecationMessageDisplayed = false; + function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; + } + return HookCollection(); } + Hook.Singular = HookSingular.bind(); + Hook.Collection = HookCollection.bind(); + module2.exports = Hook; + module2.exports.Hook = Hook; + module2.exports.Singular = Hook.Singular; + module2.exports.Collection = Hook.Collection; + } +}); - currentReservoir() { - return this._store.__currentReservoir__(); +// node_modules/.pnpm/@octokit+graphql@7.1.0/node_modules/@octokit/graphql/dist-web/index.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +function graphql(request2, query, options2) { + if (options2) { + if (typeof query === "string" && "query" in options2) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); } - - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); + for (const key in options2) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); } - - } - - ; - Bottleneck.default = Bottleneck; - Bottleneck.Events = Events; - Bottleneck.version = Bottleneck.prototype.version = (__nccwpck_require__(96701)/* .version */ .r); - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = __nccwpck_require__(9964); - Bottleneck.Group = Bottleneck.prototype.Group = __nccwpck_require__(48884); - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = __nccwpck_require__(65644); - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = __nccwpck_require__(28576); - Bottleneck.Batcher = Bottleneck.prototype.Batcher = __nccwpck_require__(26760); - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY, - weight: 1, - expiration: null, - id: "" - }; - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - return Bottleneck; -}.call(void 0); - -module.exports = Bottleneck; - -/***/ }), - -/***/ 9964: -/***/ ((module) => { - -"use strict"; - - -var BottleneckError; -BottleneckError = class BottleneckError extends Error {}; -module.exports = BottleneckError; - -/***/ }), - -/***/ 89939: -/***/ ((module) => { - -"use strict"; - - -var DLList; -DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; } - - push(value) { - var node; - this.length++; - - if (typeof this.incr === "function") { - this.incr(); + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options2) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; } - - node = { - value, - prev: this._last, - next: null - }; - - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; + if (!result.variables) { + result.variables = {}; } - - return void 0; + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); } - - shift() { - var value; - - if (this._first == null) { - return; - } else { - this.length--; - - if (typeof this.decr === "function") { - this.decr(); + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); } - - value = this._first.value; - - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - - return value; + return response.data.data; + }); +} +function withDefaults3(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options2) => { + return graphql(newRequest, query, options2); + }; + return Object.assign(newApi, { + defaults: withDefaults3.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} +function withCustomRequest(customRequest) { + return withDefaults3(customRequest, { + method: "POST", + url: "/graphql" + }); +} +var VERSION4, GraphqlResponseError, NON_VARIABLE_OPTIONS, FORBIDDEN_VARIABLE_OPTIONS, GHES_V3_SUFFIX_REGEX, graphql2; +var init_dist_web3 = __esm({ + "node_modules/.pnpm/@octokit+graphql@7.1.0/node_modules/@octokit/graphql/dist-web/index.js"() { + init_dist_src3(); + init_dist_web(); + VERSION4 = "7.1.0"; + GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + }; + NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" + ]; + FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; + GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; + graphql2 = withDefaults3(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION4} ${getUserAgent()}` + }, + method: "POST", + url: "/graphql" + }); } +}); - first() { - if (this._first != null) { - return this._first.value; - } +// node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/auth.js +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} +var REGEX_IS_INSTALLATION_LEGACY, REGEX_IS_INSTALLATION, REGEX_IS_USER_TO_SERVER; +var init_auth = __esm({ + "node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/auth.js"() { + REGEX_IS_INSTALLATION_LEGACY = /^v1\./; + REGEX_IS_INSTALLATION = /^ghs_/; + REGEX_IS_USER_TO_SERVER = /^ghu_/; } +}); - getArray() { - var node, ref, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - - return results; +// node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; } + return `token ${token}`; +} +var init_with_authorization_prefix = __esm({ + "node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js"() { + } +}); - forEachShift(cb) { - var node; - node = this.shift(); - - while (node != null) { - cb(node), node = this.shift(); - } - - return void 0; - } - - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - - return results; +// node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/hook.js +async function hook(token, request2, route, parameters) { + const endpoint2 = request2.endpoint.merge( + route, + parameters + ); + endpoint2.headers.authorization = withAuthorizationPrefix(token); + return request2(endpoint2); +} +var init_hook = __esm({ + "node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/hook.js"() { + init_with_authorization_prefix(); } +}); -}; -module.exports = DLList; - -/***/ }), - -/***/ 40950: -/***/ ((module) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events; -Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - - if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { - throw new Error("An Emitter already exists for this object"); - } - - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; +// node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/index.js +var createTokenAuth; +var init_dist_src6 = __esm({ + "node_modules/.pnpm/@octokit+auth-token@4.0.0/node_modules/@octokit/auth-token/dist-src/index.js"() { + init_auth(); + init_hook(); + createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); }; } +}); - _addListener(name, status, cb) { - var base; - - if ((base = this._events)[name] == null) { - base[name] = []; - } - - this._events[name].push({ - cb, - status - }); - - return this.instance; - } - - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - - trigger(name, ...args) { - var _this = this; - - return _asyncToGenerator(function* () { - var e, promises; - - try { - if (name !== "debug") { - _this.trigger("debug", `Event triggered: ${name}`, args); - } - - if (_this._events[name] == null) { - return; - } - - _this._events[name] = _this._events[name].filter(function (listener) { - return listener.status !== "none"; - }); - promises = _this._events[name].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator(function* (listener) { - var e, returned; - - if (listener.status === "none") { +// node_modules/.pnpm/@octokit+core@5.2.0/node_modules/@octokit/core/dist-web/index.js +var dist_web_exports3 = {}; +__export(dist_web_exports3, { + Octokit: () => Octokit +}); +var import_before_after_hook, VERSION5, noop, consoleWarn, consoleError, userAgentTrail, _a, Octokit; +var init_dist_web4 = __esm({ + "node_modules/.pnpm/@octokit+core@5.2.0/node_modules/@octokit/core/dist-web/index.js"() { + init_dist_web(); + import_before_after_hook = __toESM(require_before_after_hook()); + init_dist_src3(); + init_dist_web3(); + init_dist_src6(); + VERSION5 = "5.2.0"; + noop = () => { + }; + consoleWarn = console.warn.bind(console); + consoleError = console.error.bind(console); + userAgentTrail = `octokit-core.js/${VERSION5} ${getUserAgent()}`; + Octokit = (_a = class { + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options2 = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options2)); return; } - - if (listener.status === "once") { - listener.status = "none"; - } - - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - - if (typeof (returned != null ? returned.then : void 0) === "function") { - return yield returned; - } else { - return returned; - } - } catch (error) { - e = error; - - if (true) { - _this.trigger("error", e); - } - - return null; - } - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }()); - return (yield Promise.all(promises)).find(function (x) { - return x != null; - }); - } catch (error) { - e = error; - - if (true) { - _this.trigger("error", e); - } - - return null; - } - })(); - } - -}; -module.exports = Events; - -/***/ }), - -/***/ 48884: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, Group, IORedisConnection, RedisConnection, Scripts, parser; -parser = __nccwpck_require__(21216); -Events = __nccwpck_require__(40950); -RedisConnection = __nccwpck_require__(65644); -IORedisConnection = __nccwpck_require__(28576); -Scripts = __nccwpck_require__(19899); - -Group = function () { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser.load(this.limiterOptions, this.defaults, this); - this.Events = new Events(this); - this.instances = {}; - this.Bottleneck = __nccwpck_require__(30692); - - this._startAutoCleanup(); - - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection(Object.assign({}, this.limiterOptions, { - Events: this.Events - })); - } + super( + Object.assign( + {}, + defaults, + options2, + options2.userAgent && defaults.userAgent ? { + userAgent: `${options2.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; } - } - - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } - - deleteKey(key = "") { - var _this = this; - - return _asyncToGenerator(function* () { - var deleted, instance; - instance = _this.instances[key]; - - if (_this.connection) { - deleted = yield _this.connection.__runCommand__(['del', ...Scripts.allKeys(`${_this.id}-${key}`)]); + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + var _a2; + const currentPlugins = this.plugins; + const NewOctokit = (_a2 = class extends this { + }, _a2.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ), _a2); + return NewOctokit; + } + constructor(options2 = {}) { + const hook6 = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options2.request, { + // @ts-ignore internal usage only, no need to type + hook: hook6.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options2.userAgent ? `${options2.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options2.baseUrl) { + requestDefaults.baseUrl = options2.baseUrl; } - - if (instance != null) { - delete _this.instances[key]; - yield instance.disconnect(); + if (options2.previews) { + requestDefaults.mediaType.previews = options2.previews; } - - return instance != null || deleted > 0; - })(); - } - - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - - return results; - } - - keys() { - return Object.keys(this.instances); - } - - clusterKeys() { - var _this2 = this; - - return _asyncToGenerator(function* () { - var cursor, end, found, i, k, keys, len, next, start; - - if (_this2.connection == null) { - return _this2.Promise.resolve(_this2.keys()); + if (options2.timeZone) { + requestDefaults.headers["time-zone"] = options2.timeZone; } - - keys = []; - cursor = null; - start = `b_${_this2.id}-`.length; - end = "_settings".length; - - while (cursor !== 0) { - var _ref = yield _this2.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${_this2.id}-*_settings`, "count", 10000]); - - var _ref2 = _slicedToArray(_ref, 2); - - next = _ref2[0]; - found = _ref2[1]; - cursor = ~~next; - - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options2.log + ); + this.hook = hook6; + if (!options2.authStrategy) { + if (!options2.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth7 = createTokenAuth(options2.auth); + hook6.wrap("request", auth7.hook); + this.auth = auth7; } + } else { + const { authStrategy, ...otherOptions } = options2; + const auth7 = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options2.auth + ) + ); + hook6.wrap("request", auth7.hook); + this.auth = auth7; } - - return keys; - })(); - } - - _startAutoCleanup() { - var _this3 = this; - - var base; - clearInterval(this.interval); - return typeof (base = this.interval = setInterval( - /*#__PURE__*/ - _asyncToGenerator(function* () { - var e, k, ref, results, time, v; - time = Date.now(); - ref = _this3.instances; - results = []; - - for (k in ref) { - v = ref[k]; - - try { - if (yield v._store.__groupCheck__(time)) { - results.push(_this3.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options2)); } - - return results; - }), this.timeout / 2)).unref === "function" ? base.unref() : void 0; - } - - updateSettings(options = {}) { - parser.overwrite(options, this.defaults, this); - parser.overwrite(options, options, this.limiterOptions); - - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - - disconnect(flush = true) { - var ref; - - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; } - } - + }, _a.VERSION = VERSION5, _a.plugins = [], _a); } +}); - ; - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - return Group; -}.call(void 0); - -module.exports = Group; - -/***/ }), - -/***/ 28576: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, IORedisConnection, Scripts, parser; -parser = __nccwpck_require__(21216); -Events = __nccwpck_require__(40950); -Scripts = __nccwpck_require__(19899); - -IORedisConnection = function () { - class IORedisConnection { - constructor(options = {}) { - parser.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("ioredis"); // Obfuscated or else Webpack/Angular will try to inline the optional ioredis module. To override this behavior: pass the ioredis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events(this); - } - - this.terminated = false; - - if (this.clusterNodes != null) { - this.client = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - this.subscriber = new this.Redis.Cluster(this.clusterNodes, this.clientOptions); - } else if (this.client != null && this.client.duplicate == null) { - this.subscriber = new this.Redis.Cluster(this.client.startupNodes, this.client.options); - } else { - if (this.client == null) { - this.client = new this.Redis(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - } - - this.limiters = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { - this._loadScripts(); - - return { - client: this.client, - subscriber: this.subscriber - }; - }); - } - - _setup(client, sub) { - client.setMaxListeners(0); - return new this.Promise((resolve, reject) => { - client.on("error", e => { - return this.Events.trigger("error", e); - }); +// node_modules/.pnpm/@octokit+plugin-enterprise-compatibility@4.1.0/node_modules/@octokit/plugin-enterprise-compatibility/dist-src/version.js +var VERSION6; +var init_version5 = __esm({ + "node_modules/.pnpm/@octokit+plugin-enterprise-compatibility@4.1.0/node_modules/@octokit/plugin-enterprise-compatibility/dist-src/version.js"() { + VERSION6 = "4.1.0"; + } +}); - if (sub) { - client.on("message", (channel, message) => { - var ref; - return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); +// node_modules/.pnpm/@octokit+plugin-enterprise-compatibility@4.1.0/node_modules/@octokit/plugin-enterprise-compatibility/dist-src/index.js +var dist_src_exports4 = {}; +__export(dist_src_exports4, { + enterpriseCompatibility: () => enterpriseCompatibility +}); +function enterpriseCompatibility(octokit) { + octokit.hook.wrap("request", async (request2, options2) => { + if (/\/orgs\/[^/]+\/teams/.test(options2.url)) { + try { + return await request2(options2); + } catch (error) { + if (error.status !== 404) { + throw error; } - - if (client.status === "ready") { - return resolve(); - } else { - return client.once("ready", resolve); + if (!error.response || !error.response.headers["x-github-enterprise-version"]) { + throw error; } - }); - } - - _loadScripts() { - return Scripts.names.forEach(name => { - return this.client.defineCommand(name, { - lua: Scripts.payload(name) - }); - }); - } - - __runCommand__(cmd) { - var _this = this; - - return _asyncToGenerator(function* () { - var _, deleted; - - yield _this.ready; - - var _ref = yield _this.client.pipeline([cmd]).exec(); - - var _ref2 = _slicedToArray(_ref, 1); - - var _ref2$ = _slicedToArray(_ref2[0], 2); - - _ = _ref2$[0]; - deleted = _ref2$[1]; - return deleted; - })(); - } - - __addLimiter__(instance) { - return this.Promise.all([instance.channel(), instance.channel_client()].map(channel => { - return new this.Promise((resolve, reject) => { - return this.subscriber.subscribe(channel, () => { - this.limiters[channel] = instance; - return resolve(); - }); - }); - })); - } - - __removeLimiter__(instance) { - var _this2 = this; - - return [instance.channel(), instance.channel_client()].forEach( - /*#__PURE__*/ - function () { - var _ref3 = _asyncToGenerator(function* (channel) { - if (!_this2.terminated) { - yield _this2.subscriber.unsubscribe(channel); + const deprecatedUrl = options2.url.replace( + /\/orgs\/[^/]+\/teams\/[^/]+/, + "/teams/{team_id}" + ); + throw new RequestError( + `"${options2.method} ${options2.url}" is not supported in your GitHub Enterprise Server version. Please replace with octokit.request("${options2.method} ${deprecatedUrl}", { team_id })`, + 404, + { + request: options2 } - - return delete _this2.limiters[channel]; - }); - - return function (_x) { - return _ref3.apply(this, arguments); - }; - }()); - } - - __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts.keys(name, id); - return [keys.length].concat(keys, args, cb); - } - - __scriptFn__(name) { - return this.client[name].bind(this.client); - } - - disconnect(flush = true) { - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - - if (flush) { - return this.Promise.all([this.client.quit(), this.subscriber.quit()]); - } else { - this.client.disconnect(); - this.subscriber.disconnect(); - return this.Promise.resolve(); - } - } - - } - - ; - IORedisConnection.prototype.datastore = "ioredis"; - IORedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - clusterNodes: null, - client: null, - Promise: Promise, - Events: null - }; - return IORedisConnection; -}.call(void 0); - -module.exports = IORedisConnection; - -/***/ }), - -/***/ 1668: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser; -NUM_PRIORITIES = 10; -DEFAULT_PRIORITY = 5; -parser = __nccwpck_require__(21216); -BottleneckError = __nccwpck_require__(9964); -Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } - - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - doDrop({ - error, - message = "This job has been dropped by Bottleneck" - } = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError(message)); + ); } - - this.Events.trigger("dropped", { - args: this.args, - options: this.options, - task: this.task, - promise: this.promise - }); - return true; - } else { - return false; - } - } - - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - - if (!(status === expected || expected === "DONE" && status === null)) { - throw new BottleneckError(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); } + return request2(options2); + }); +} +var init_dist_src7 = __esm({ + "node_modules/.pnpm/@octokit+plugin-enterprise-compatibility@4.1.0/node_modules/@octokit/plugin-enterprise-compatibility/dist-src/index.js"() { + init_dist_src2(); + init_version5(); + enterpriseCompatibility.VERSION = VERSION6; } +}); - doReceive() { - this._states.start(this.options.id); - - return this.Events.trigger("received", { - args: this.args, - options: this.options - }); +// node_modules/.pnpm/@octokit+plugin-paginate-rest@9.2.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js +var dist_web_exports4 = {}; +__export(dist_web_exports4, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; } - - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - - this._states.next(this.options.id); - - return this.Events.trigger("queued", { - args: this.args, - options: this.options, - reachedHWM, - blocked - }); + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; } - - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - - return this.Events.trigger("scheduled", { - args: this.args, - options: this.options - }); + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; } - - doExecute(chained, clearGlobalState, run, free) { - var _this = this; - - return _asyncToGenerator(function* () { - var error, eventInfo, passed; - - if (_this.retryCount === 0) { - _this._assertStatus("RUNNING"); - - _this._states.next(_this.options.id); - } else { - _this._assertStatus("EXECUTING"); - } - - eventInfo = { - args: _this.args, - options: _this.options, - retryCount: _this.retryCount - }; - - _this.Events.trigger("executing", eventInfo); - - try { - passed = yield chained != null ? chained.schedule(_this.options, _this.task, ..._this.args) : _this.task(..._this.args); - - if (clearGlobalState()) { - _this.doDone(eventInfo); - - yield free(_this.options, eventInfo); - - _this._assertStatus("DONE"); - - return _this._resolve(passed); + response.data.total_count = totalCount; + return response; +} +function iterator(octokit, route, parameters) { + const options2 = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options2.method; + const headers = options2.headers; + let url = options2.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; } - } catch (error1) { - error = error1; - return _this._onFailure(error, eventInfo, clearGlobalState, run, free); } - })(); + }) + }; +} +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; } - - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; } - - this._assertStatus("EXECUTING"); - - eventInfo = { - args: this.args, - options: this.options, - retryCount: this.retryCount - }; - error = new BottleneckError(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - - _onFailure(error, eventInfo, clearGlobalState, run, free) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var retry, retryAfter; - - if (clearGlobalState()) { - retry = yield _this2.Events.trigger("failed", error, eventInfo); - - if (retry != null) { - retryAfter = ~~retry; - - _this2.Events.trigger("retry", `Retrying ${_this2.options.id} after ${retryAfter} ms`, eventInfo); - - _this2.retryCount++; - return run(retryAfter); - } else { - _this2.doDone(eventInfo); - - yield free(_this2.options, eventInfo); - - _this2._assertStatus("DONE"); - - return _this2._reject(error); - } - } - })(); - } - - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - - this._states.next(this.options.id); - - return this.Events.trigger("done", eventInfo); - } - -}; -module.exports = Job; - -/***/ }), - -/***/ 41311: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, LocalDatastore, parser; -parser = __nccwpck_require__(21216); -BottleneckError = __nccwpck_require__(9964); -LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - - this._startHeartbeat(); - } - - _startHeartbeat() { - var base; - - if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { - return typeof (base = this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - - if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - - this.instance._drainAll(this.computeCapacity()); - } - - if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - var _this$storeOptions = this.storeOptions; - amount = _this$storeOptions.reservoirIncreaseAmount; - maximum = _this$storeOptions.reservoirIncreaseMaximum; - reservoir = _this$storeOptions.reservoir; - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); + let earlyExit = false; + function done() { + earlyExit = true; } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); +} +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; } - - __publish__(message) { - var _this = this; - - return _asyncToGenerator(function* () { - yield _this.yieldLoop(); - return _this.instance.Events.trigger("message", message.toString()); - })(); - } - - __disconnect__(flush) { - var _this2 = this; - - return _asyncToGenerator(function* () { - yield _this2.yieldLoop(); - clearInterval(_this2.heartbeat); - return _this2.Promise.resolve(); - })(); - } - - yieldLoop(t = 0) { - return new this.Promise(function (resolve, reject) { - return setTimeout(resolve, t); +} +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +var VERSION7, composePaginateRest, paginatingEndpoints; +var init_dist_web5 = __esm({ + "node_modules/.pnpm/@octokit+plugin-paginate-rest@9.2.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js"() { + VERSION7 = "9.2.1"; + composePaginateRest = Object.assign(paginate, { + iterator }); + paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/organization-roles/{role_id}/teams", + "GET /orgs/{org}/organization-roles/{role_id}/users", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" + ]; + paginateRest.VERSION = VERSION7; } +}); - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5000; +// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +var VERSION8; +var init_version6 = __esm({ + "node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js"() { + VERSION8 = "10.4.1"; } +}); - __updateSettings__(options) { - var _this3 = this; - - return _asyncToGenerator(function* () { - yield _this3.yieldLoop(); - parser.overwrite(options, options, _this3.storeOptions); - - _this3._startHeartbeat(); - - _this3.instance._drainAll(_this3.computeCapacity()); - - return true; - })(); - } - - __running__() { - var _this4 = this; - - return _asyncToGenerator(function* () { - yield _this4.yieldLoop(); - return _this4._running; - })(); - } - - __queued__() { - var _this5 = this; - - return _asyncToGenerator(function* () { - yield _this5.yieldLoop(); - return _this5.instance.queued(); - })(); - } - - __done__() { - var _this6 = this; - - return _asyncToGenerator(function* () { - yield _this6.yieldLoop(); - return _this6._done; - })(); - } - - __groupCheck__(time) { - var _this7 = this; - - return _asyncToGenerator(function* () { - yield _this7.yieldLoop(); - return _this7._nextRequest + _this7.timeout < time; - })(); - } - - computeCapacity() { - var maxConcurrent, reservoir; - var _this$storeOptions2 = this.storeOptions; - maxConcurrent = _this$storeOptions2.maxConcurrent; - reservoir = _this$storeOptions2.reservoir; - - if (maxConcurrent != null && reservoir != null) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return capacity == null || weight <= capacity; - } - - __incrementReservoir__(incr) { - var _this8 = this; - - return _asyncToGenerator(function* () { - var reservoir; - yield _this8.yieldLoop(); - reservoir = _this8.storeOptions.reservoir += incr; - - _this8.instance._drainAll(_this8.computeCapacity()); - - return reservoir; - })(); - } - - __currentReservoir__() { - var _this9 = this; - - return _asyncToGenerator(function* () { - yield _this9.yieldLoop(); - return _this9.storeOptions.reservoir; - })(); - } - - isBlocked(now) { - return this._unblockTime >= now; - } - - check(weight, now) { - return this.conditionsCheck(weight) && this._nextRequest - now <= 0; - } - - __check__(weight) { - var _this10 = this; - - return _asyncToGenerator(function* () { - var now; - yield _this10.yieldLoop(); - now = Date.now(); - return _this10.check(weight, now); - })(); - } - - __register__(index, weight, expiration) { - var _this11 = this; - - return _asyncToGenerator(function* () { - var now, wait; - yield _this11.yieldLoop(); - now = Date.now(); - - if (_this11.conditionsCheck(weight)) { - _this11._running += weight; - - if (_this11.storeOptions.reservoir != null) { - _this11.storeOptions.reservoir -= weight; - } - - wait = Math.max(_this11._nextRequest - now, 0); - _this11._nextRequest = now + wait + _this11.storeOptions.minTime; - return { - success: true, - wait, - reservoir: _this11.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - })(); - } - - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - - __submit__(queueLength, weight) { - var _this12 = this; - - return _asyncToGenerator(function* () { - var blocked, now, reachedHWM; - yield _this12.yieldLoop(); - - if (_this12.storeOptions.maxConcurrent != null && weight > _this12.storeOptions.maxConcurrent) { - throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${_this12.storeOptions.maxConcurrent}`); - } - - now = Date.now(); - reachedHWM = _this12.storeOptions.highWater != null && queueLength === _this12.storeOptions.highWater && !_this12.check(weight, now); - blocked = _this12.strategyIsBlock() && (reachedHWM || _this12.isBlocked(now)); - - if (blocked) { - _this12._unblockTime = now + _this12.computePenalty(); - _this12._nextRequest = _this12._unblockTime + _this12.storeOptions.minTime; - - _this12.instance._dropAllQueued(); - } - - return { - reachedHWM, - blocked, - strategy: _this12.storeOptions.strategy - }; - })(); - } - - __free__(index, weight) { - var _this13 = this; - - return _asyncToGenerator(function* () { - yield _this13.yieldLoop(); - _this13._running -= weight; - _this13._done += weight; - - _this13.instance._drainAll(_this13.computeCapacity()); - - return { - running: _this13._running - }; - })(); - } - -}; -module.exports = LocalDatastore; - -/***/ }), - -/***/ 40023: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var DLList, Events, Queues; -DLList = __nccwpck_require__(89939); -Events = __nccwpck_require__(40950); -Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events(this); - this._length = 0; - - this._lists = function () { - var j, ref, results; - results = []; - - for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { - results.push(new DLList(() => { - return this.incr(); - }, () => { - return this.decr(); - })); - } - - return results; - }.call(this); - } - - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - - push(job) { - return this._lists[job.options.priority].push(job); - } - - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - - shiftAll(fn) { - return this._lists.forEach(function (list) { - return list.forEachShift(fn); - }); - } - - getFirst(arr = this._lists) { - var j, len, list; - - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - - if (list.length > 0) { - return list; - } - } - - return []; - } - - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - -}; -module.exports = Queues; - -/***/ }), - -/***/ 65644: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var Events, RedisConnection, Scripts, parser; -parser = __nccwpck_require__(21216); -Events = __nccwpck_require__(40950); -Scripts = __nccwpck_require__(19899); - -RedisConnection = function () { - class RedisConnection { - constructor(options = {}) { - parser.load(options, this.defaults, this); - - if (this.Redis == null) { - this.Redis = eval("require")("redis"); // Obfuscated or else Webpack/Angular will try to inline the optional redis module. To override this behavior: pass the redis module to Bottleneck as the 'Redis' option. - } - - if (this.Events == null) { - this.Events = new Events(this); - } - - this.terminated = false; - - if (this.client == null) { - this.client = this.Redis.createClient(this.clientOptions); - } - - this.subscriber = this.client.duplicate(); - this.limiters = {}; - this.shas = {}; - this.ready = this.Promise.all([this._setup(this.client, false), this._setup(this.subscriber, true)]).then(() => { - return this._loadScripts(); - }).then(() => { - return { - client: this.client, - subscriber: this.subscriber - }; - }); - } - - _setup(client, sub) { - client.setMaxListeners(0); - return new this.Promise((resolve, reject) => { - client.on("error", e => { - return this.Events.trigger("error", e); - }); - - if (sub) { - client.on("message", (channel, message) => { - var ref; - return (ref = this.limiters[channel]) != null ? ref._store.onMessage(channel, message) : void 0; - }); - } - - if (client.ready) { - return resolve(); - } else { - return client.once("ready", resolve); - } - }); - } - - _loadScript(name) { - return new this.Promise((resolve, reject) => { - var payload; - payload = Scripts.payload(name); - return this.client.multi([["script", "load", payload]]).exec((err, replies) => { - if (err != null) { - return reject(err); +// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +var Endpoints, endpoints_default; +var init_endpoints = __esm({ + "node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js"() { + Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repositories/{repository_id}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getCustomOidcSubClaimForRepo: [ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables" + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setCustomOidcSubClaimForRepo: [ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ] + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsDone: ["DELETE /notifications/threads/{thread_id}"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + copilot: { + addCopilotSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] + }, + meta: { + get: ["GET /meta"], + getAllVersions: ["GET /versions"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + cancelImport: [ + "DELETE /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" } - - this.shas[name] = replies[0]; - return resolve(replies[0]); - }); - }); - } - - _loadScripts() { - return this.Promise.all(Scripts.names.map(k => { - return this._loadScript(k); - })); - } - - __runCommand__(cmd) { - var _this = this; - - return _asyncToGenerator(function* () { - yield _this.ready; - return new _this.Promise((resolve, reject) => { - return _this.client.multi([cmd]).exec_atomic(function (err, replies) { - if (err != null) { - return reject(err); - } else { - return resolve(replies[0]); - } - }); - }); - })(); - } - - __addLimiter__(instance) { - return this.Promise.all([instance.channel(), instance.channel_client()].map(channel => { - return new this.Promise((resolve, reject) => { - var handler; - - handler = chan => { - if (chan === channel) { - this.subscriber.removeListener("subscribe", handler); - this.limiters[channel] = instance; - return resolve(); - } - }; - - this.subscriber.on("subscribe", handler); - return this.subscriber.subscribe(channel); - }); - })); - } - - __removeLimiter__(instance) { - var _this2 = this; - - return this.Promise.all([instance.channel(), instance.channel_client()].map( - /*#__PURE__*/ - function () { - var _ref = _asyncToGenerator(function* (channel) { - if (!_this2.terminated) { - yield new _this2.Promise((resolve, reject) => { - return _this2.subscriber.unsubscribe(channel, function (err, chan) { - if (err != null) { - return reject(err); - } - - if (chan === channel) { - return resolve(); - } - }); - }); + ], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getCommitAuthors: [ + "GET /repos/{owner}/{repo}/import/authors", + {}, + { + deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" } - - return delete _this2.limiters[channel]; - }); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }())); - } - - __scriptArgs__(name, id, args, cb) { - var keys; - keys = Scripts.keys(name, id); - return [this.shas[name], keys.length].concat(keys, args, cb); - } - - __scriptFn__(name) { - return this.client.evalsha.bind(this.client); - } - - disconnect(flush = true) { - var i, k, len, ref; - ref = Object.keys(this.limiters); - - for (i = 0, len = ref.length; i < len; i++) { - k = ref[i]; - clearInterval(this.limiters[k]._store.heartbeat); - } - - this.limiters = {}; - this.terminated = true; - this.client.end(flush); - this.subscriber.end(flush); - return this.Promise.resolve(); - } - - } - - ; - RedisConnection.prototype.datastore = "redis"; - RedisConnection.prototype.defaults = { - Redis: null, - clientOptions: {}, - client: null, - Promise: Promise, - Events: null - }; - return RedisConnection; -}.call(void 0); - -module.exports = RedisConnection; - -/***/ }), - -/***/ 39567: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } - -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } - -function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } - -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var BottleneckError, IORedisConnection, RedisConnection, RedisDatastore, parser; -parser = __nccwpck_require__(21216); -BottleneckError = __nccwpck_require__(9964); -RedisConnection = __nccwpck_require__(65644); -IORedisConnection = __nccwpck_require__(28576); -RedisDatastore = class RedisDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.originalId = this.instance.id; - this.clientId = this.instance._randomIndex(); - parser.load(storeInstanceOptions, storeInstanceOptions, this); - this.clients = {}; - this.capacityPriorityCounters = {}; - this.sharedConnection = this.connection != null; - - if (this.connection == null) { - this.connection = this.instance.datastore === "redis" ? new RedisConnection({ - Redis: this.Redis, - clientOptions: this.clientOptions, - Promise: this.Promise, - Events: this.instance.Events - }) : this.instance.datastore === "ioredis" ? new IORedisConnection({ - Redis: this.Redis, - clientOptions: this.clientOptions, - clusterNodes: this.clusterNodes, - Promise: this.Promise, - Events: this.instance.Events - }) : void 0; - } - - this.instance.connection = this.connection; - this.instance.datastore = this.connection.datastore; - this.ready = this.connection.ready.then(clients => { - this.clients = clients; - return this.runScript("init", this.prepareInitSettings(this.clearDatastore)); - }).then(() => { - return this.connection.__addLimiter__(this.instance); - }).then(() => { - return this.runScript("register_client", [this.instance.queued()]); - }).then(() => { - var base; - - if (typeof (base = this.heartbeat = setInterval(() => { - return this.runScript("heartbeat", []).catch(e => { - return this.instance.Events.trigger("error", e); - }); - }, this.heartbeatInterval)).unref === "function") { - base.unref(); - } - - return this.clients; - }); - } - - __publish__(message) { - var _this = this; - - return _asyncToGenerator(function* () { - var client; - - var _ref = yield _this.ready; - - client = _ref.client; - return client.publish(_this.instance.channel(), `message:${message.toString()}`); - })(); - } - - onMessage(channel, message) { - var _this2 = this; - - return _asyncToGenerator(function* () { - var capacity, counter, data, drained, e, newCapacity, pos, priorityClient, rawCapacity, type; - - try { - pos = message.indexOf(":"); - var _ref2 = [message.slice(0, pos), message.slice(pos + 1)]; - type = _ref2[0]; - data = _ref2[1]; - - if (type === "capacity") { - return yield _this2.instance._drainAll(data.length > 0 ? ~~data : void 0); - } else if (type === "capacity-priority") { - var _data$split = data.split(":"); - - var _data$split2 = _slicedToArray(_data$split, 3); - - rawCapacity = _data$split2[0]; - priorityClient = _data$split2[1]; - counter = _data$split2[2]; - capacity = rawCapacity.length > 0 ? ~~rawCapacity : void 0; - - if (priorityClient === _this2.clientId) { - drained = yield _this2.instance._drainAll(capacity); - newCapacity = capacity != null ? capacity - (drained || 0) : ""; - return yield _this2.clients.client.publish(_this2.instance.channel(), `capacity-priority:${newCapacity}::${counter}`); - } else if (priorityClient === "") { - clearTimeout(_this2.capacityPriorityCounters[counter]); - delete _this2.capacityPriorityCounters[counter]; - return _this2.instance._drainAll(capacity); - } else { - return _this2.capacityPriorityCounters[counter] = setTimeout( - /*#__PURE__*/ - _asyncToGenerator(function* () { - var e; - - try { - delete _this2.capacityPriorityCounters[counter]; - yield _this2.runScript("blacklist_client", [priorityClient]); - return yield _this2.instance._drainAll(capacity); - } catch (error) { - e = error; - return _this2.instance.Events.trigger("error", e); - } - }), 1000); + ], + getImportStatus: [ + "GET /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" } - } else if (type === "message") { - return _this2.instance.Events.trigger("message", data); - } else if (type === "blocked") { - return yield _this2.instance._dropAllQueued(); - } - } catch (error) { - e = error; - return _this2.instance.Events.trigger("error", e); - } - })(); - } - - __disconnect__(flush) { - clearInterval(this.heartbeat); - - if (this.sharedConnection) { - return this.connection.__removeLimiter__(this.instance); - } else { - return this.connection.disconnect(flush); - } - } - - runScript(name, args) { - var _this3 = this; - - return _asyncToGenerator(function* () { - if (!(name === "init" || name === "register_client")) { - yield _this3.ready; - } - - return new _this3.Promise((resolve, reject) => { - var all_args, arr; - all_args = [Date.now(), _this3.clientId].concat(args); - - _this3.instance.Events.trigger("debug", `Calling Redis script: ${name}.lua`, all_args); - - arr = _this3.connection.__scriptArgs__(name, _this3.originalId, all_args, function (err, replies) { - if (err != null) { - return reject(err); + ], + getLargeFiles: [ + "GET /repos/{owner}/{repo}/import/large_files", + {}, + { + deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" } - - return resolve(replies); - }); - return _this3.connection.__scriptFn__(name)(...arr); - }).catch(e => { - if (e.message === "SETTINGS_KEY_NOT_FOUND") { - if (name === "heartbeat") { - return _this3.Promise.resolve(); - } else { - return _this3.runScript("init", _this3.prepareInitSettings(false)).then(() => { - return _this3.runScript(name, args); - }); + ], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + mapCommitAuthor: [ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", + {}, + { + deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" } - } else if (e.message === "UNKNOWN_CLIENT") { - return _this3.runScript("register_client", [_this3.instance.queued()]).then(() => { - return _this3.runScript(name, args); - }); - } else { - return _this3.Promise.reject(e); - } - }); - })(); - } - - prepareArray(arr) { - var i, len, results, x; - results = []; - - for (i = 0, len = arr.length; i < len; i++) { - x = arr[i]; - results.push(x != null ? x.toString() : ""); - } - - return results; - } - - prepareObject(obj) { - var arr, k, v; - arr = []; - - for (k in obj) { - v = obj[k]; - arr.push(k, v != null ? v.toString() : ""); - } - - return arr; - } - - prepareInitSettings(clear) { - var args; - args = this.prepareObject(Object.assign({}, this.storeOptions, { - id: this.originalId, - version: this.instance.version, - groupTimeout: this.timeout, - clientTimeout: this.clientTimeout - })); - args.unshift(clear ? 1 : 0, this.instance.version); - return args; - } - - convertBool(b) { - return !!b; - } - - __updateSettings__(options) { - var _this4 = this; - - return _asyncToGenerator(function* () { - yield _this4.runScript("update_settings", _this4.prepareObject(options)); - return parser.overwrite(options, options, _this4.storeOptions); - })(); - } - - __running__() { - return this.runScript("running", []); - } - - __queued__() { - return this.runScript("queued", []); - } - - __done__() { - return this.runScript("done", []); - } - - __groupCheck__() { - var _this5 = this; - - return _asyncToGenerator(function* () { - return _this5.convertBool((yield _this5.runScript("group_check", []))); - })(); - } - - __incrementReservoir__(incr) { - return this.runScript("increment_reservoir", [incr]); - } - - __currentReservoir__() { - return this.runScript("current_reservoir", []); - } - - __check__(weight) { - var _this6 = this; - - return _asyncToGenerator(function* () { - return _this6.convertBool((yield _this6.runScript("check", _this6.prepareArray([weight])))); - })(); - } - - __register__(index, weight, expiration) { - var _this7 = this; - - return _asyncToGenerator(function* () { - var reservoir, success, wait; - - var _ref4 = yield _this7.runScript("register", _this7.prepareArray([index, weight, expiration])); - - var _ref5 = _slicedToArray(_ref4, 3); - - success = _ref5[0]; - wait = _ref5[1]; - reservoir = _ref5[2]; - return { - success: _this7.convertBool(success), - wait, - reservoir - }; - })(); - } - - __submit__(queueLength, weight) { - var _this8 = this; - - return _asyncToGenerator(function* () { - var blocked, e, maxConcurrent, overweight, reachedHWM, strategy; - - try { - var _ref6 = yield _this8.runScript("submit", _this8.prepareArray([queueLength, weight])); - - var _ref7 = _slicedToArray(_ref6, 3); - - reachedHWM = _ref7[0]; - blocked = _ref7[1]; - strategy = _ref7[2]; - return { - reachedHWM: _this8.convertBool(reachedHWM), - blocked: _this8.convertBool(blocked), - strategy - }; - } catch (error) { - e = error; - - if (e.message.indexOf("OVERWEIGHT") === 0) { - var _e$message$split = e.message.split(":"); - - var _e$message$split2 = _slicedToArray(_e$message$split, 3); - - overweight = _e$message$split2[0]; - weight = _e$message$split2[1]; - maxConcurrent = _e$message$split2[2]; - throw new BottleneckError(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${maxConcurrent}`); - } else { - throw e; - } + ], + setLfsPreference: [ + "PATCH /repos/{owner}/{repo}/import/lfs", + {}, + { + deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" + } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: [ + "PUT /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" + } + ], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ], + updateImport: [ + "PATCH /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" + } + ] + }, + oidc: { + getOidcCustomSubTemplateForOrg: [ + "GET /orgs/{org}/actions/oidc/customization/sub" + ], + updateOidcCustomSubTemplateForOrg: [ + "PUT /orgs/{org}/actions/oidc/customization/sub" + ] + }, + orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], + assignTeamToOrgRole: [ + "PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + assignUserToOrgRole: [ + "PUT /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], + createCustomOrganizationRole: ["POST /orgs/{org}/organization-roles"], + createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], + createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], + deleteCustomOrganizationRole: [ + "DELETE /orgs/{org}/organization-roles/{role_id}" + ], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], + get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"], + listOrgRoleUsers: ["GET /orgs/{org}/organization-roles/{role_id}/users"], + listOrgRoles: ["GET /orgs/{org}/organization-roles"], + listOrganizationFineGrainedPermissions: [ + "GET /orgs/{org}/organization-fine-grained-permissions" + ], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + patchCustomOrganizationRole: [ + "PATCH /orgs/{org}/organization-roles/{role_id}" + ], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}" + ], + reviewPatGrantRequest: [ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], + revokeAllOrgRolesTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}" + ], + revokeAllOrgRolesUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}" + ], + revokeOrgRoleTeam: [ + "DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}" + ], + revokeOrgRoleUser: [ + "DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}" + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] + } + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + cancelPagesDeployment: [ + "POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel" + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateCustomPropertiesValues: [ + "PATCH /repos/{owner}/{repo}/properties/values" + ], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployments"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesDeployment: [ + "GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}" + ], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + securityAdvisories: { + createFork: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks" + ], + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] } - })(); - } - - __free__(index, weight) { - var _this9 = this; - - return _asyncToGenerator(function* () { - var running; - running = yield _this9.runScript("free", _this9.prepareArray([index])); - return { - running - }; - })(); - } - -}; -module.exports = RedisDatastore; - -/***/ }), - -/***/ 19899: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var headers, lua, templates; -lua = __nccwpck_require__(79583); -headers = { - refs: lua["refs.lua"], - validate_keys: lua["validate_keys.lua"], - validate_client: lua["validate_client.lua"], - refresh_expiration: lua["refresh_expiration.lua"], - process_tick: lua["process_tick.lua"], - conditions_check: lua["conditions_check.lua"], - get_time: lua["get_time.lua"] -}; - -exports.allKeys = function (id) { - return [ - /* - HASH - */ - `b_${id}_settings`, - /* - HASH - job index -> weight - */ - `b_${id}_job_weights`, - /* - ZSET - job index -> expiration - */ - `b_${id}_job_expirations`, - /* - HASH - job index -> client - */ - `b_${id}_job_clients`, - /* - ZSET - client -> sum running - */ - `b_${id}_client_running`, - /* - HASH - client -> num queued - */ - `b_${id}_client_num_queued`, - /* - ZSET - client -> last job registered - */ - `b_${id}_client_last_registered`, - /* - ZSET - client -> last seen - */ - `b_${id}_client_last_seen`]; -}; - -templates = { - init: { - keys: exports.allKeys, - headers: ["process_tick"], - refresh_expiration: true, - code: lua["init.lua"] - }, - group_check: { - keys: exports.allKeys, - headers: [], - refresh_expiration: false, - code: lua["group_check.lua"] - }, - register_client: { - keys: exports.allKeys, - headers: ["validate_keys"], - refresh_expiration: false, - code: lua["register_client.lua"] - }, - blacklist_client: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["blacklist_client.lua"] - }, - heartbeat: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["heartbeat.lua"] - }, - update_settings: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["update_settings.lua"] - }, - running: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["running.lua"] - }, - queued: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client"], - refresh_expiration: false, - code: lua["queued.lua"] - }, - done: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["done.lua"] - }, - check: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: false, - code: lua["check.lua"] - }, - submit: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["submit.lua"] - }, - register: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick", "conditions_check"], - refresh_expiration: true, - code: lua["register.lua"] - }, - free: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["free.lua"] - }, - current_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: false, - code: lua["current_reservoir.lua"] - }, - increment_reservoir: { - keys: exports.allKeys, - headers: ["validate_keys", "validate_client", "process_tick"], - refresh_expiration: true, - code: lua["increment_reservoir.lua"] + }; + endpoints_default = Endpoints; } -}; -exports.names = Object.keys(templates); - -exports.keys = function (name, id) { - return templates[name].keys(id); -}; - -exports.payload = function (name) { - var template; - template = templates[name]; - return Array.prototype.concat(headers.refs, template.headers.map(function (h) { - return headers[h]; - }), template.refresh_expiration ? headers.refresh_expiration : "", template.code).join("\n"); -}; - -/***/ }), - -/***/ 77393: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - +}); -var BottleneckError, States; -BottleneckError = __nccwpck_require__(9964); -States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function () { - return 0; - }); +// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); } - - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - - if (current != null && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options2 = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options2 = Object.assign({}, options2, { + data: options2[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options2); } - } - - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - - remove(id) { - var current; - current = this._jobs[id]; - - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); } - - return current != null; - } - - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - - statusJobs(status) { - var k, pos, ref, results, v; - - if (status != null) { - pos = this.status.indexOf(status); - - if (pos < 0) { - throw new BottleneckError(`status must be one of ${this.status.join(', ')}`); - } - - ref = this._jobs; - results = []; - - for (k in ref) { - v = ref[k]; - - if (v === pos) { - results.push(k); + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options22 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options22) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options22)) { + options22[alias] = options22[name]; + } + delete options22[name]; } } - - return results; - } else { - return Object.keys(this._jobs); + return requestWithDefaults(options22); } + return requestWithDefaults(...args); } - - statusCounts() { - return this.counts.reduce((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }, {}); - } - -}; -module.exports = States; - -/***/ }), - -/***/ 7212: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } - -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -var DLList, Sync; -DLList = __nccwpck_require__(89939); -Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList(); - } - - isEmpty() { - return this._queue.length === 0; - } - - _tryToRun() { - var _this = this; - - return _asyncToGenerator(function* () { - var args, cb, error, reject, resolve, returned, task; - - if (_this._running < 1 && _this._queue.length > 0) { - _this._running++; - - var _this$_queue$shift = _this._queue.shift(); - - task = _this$_queue$shift.task; - args = _this$_queue$shift.args; - resolve = _this$_queue$shift.resolve; - reject = _this$_queue$shift.reject; - cb = yield _asyncToGenerator(function* () { - try { - returned = yield task(...args); - return function () { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function () { - return reject(error); - }; - } - })(); - _this._running--; - - _this._tryToRun(); - - return cb(); + return Object.assign(withDecorations, requestWithDefaults); +} +var endpointMethodsMap, handler; +var init_endpoints_to_methods = __esm({ + "node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js"() { + init_endpoints(); + endpointMethodsMap = /* @__PURE__ */ new Map(); + for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint2] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint2; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); } - })(); - } - - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function (_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - - this._queue.push({ - task, - args, - resolve, - reject - }); - - this._tryToRun(); - - return promise; - } - -}; -module.exports = Sync; - -/***/ }), - -/***/ 3295: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = __nccwpck_require__(30692); - -/***/ }), - -/***/ 21216: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -exports.load = function (received, defaults, onto = {}) { - var k, ref, v; - - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - - return onto; -}; - -exports.overwrite = function (received, defaults, onto = {}) { - var k, v; - - for (k in received) { - v = received[k]; - - if (defaults[k] !== void 0) { - onto[k] = v; } + handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } + }; } +}); - return onto; -}; - -/***/ }), - -/***/ 27447: -/***/ (function(module) { - -/** - * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support. - * https://github.com/SGrondin/bottleneck - */ -(function (global, factory) { - true ? module.exports = factory() : - 0; -}(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - - var load = function(received, defaults, onto = {}) { - var k, ref, v; - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - return onto; - }; - - var overwrite = function(received, defaults, onto = {}) { - var k, v; - for (k in received) { - v = received[k]; - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - return onto; - }; - - var parser = { - load: load, - overwrite: overwrite - }; - - var DLList; - - DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - - push(value) { - var node; - this.length++; - if (typeof this.incr === "function") { - this.incr(); - } - node = { - value, - prev: this._last, - next: null - }; - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - return void 0; - } - - shift() { - var value; - if (this._first == null) { - return; - } else { - this.length--; - if (typeof this.decr === "function") { - this.decr(); - } - } - value = this._first.value; - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - return value; - } - - first() { - if (this._first != null) { - return this._first.value; - } - } - - getArray() { - var node, ref, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - return results; - } - - forEachShift(cb) { - var node; - node = this.shift(); - while (node != null) { - (cb(node), node = this.shift()); - } - return void 0; - } - - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - return results; - } - - }; - - var DLList_1 = DLList; - - var Events; - - Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) { - throw new Error("An Emitter already exists for this object"); - } - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; - } - }; - } - - _addListener(name, status, cb) { - var base; - if ((base = this._events)[name] == null) { - base[name] = []; - } - this._events[name].push({cb, status}); - return this.instance; - } - - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - - async trigger(name, ...args) { - var e, promises; - try { - if (name !== "debug") { - this.trigger("debug", `Event triggered: ${name}`, args); - } - if (this._events[name] == null) { - return; - } - this._events[name] = this._events[name].filter(function(listener) { - return listener.status !== "none"; - }); - promises = this._events[name].map(async(listener) => { - var e, returned; - if (listener.status === "none") { - return; - } - if (listener.status === "once") { - listener.status = "none"; - } - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - if (typeof (returned != null ? returned.then : void 0) === "function") { - return (await returned); - } else { - return returned; - } - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - }); - return ((await Promise.all(promises))).find(function(x) { - return x != null; - }); - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - } - - }; - - var Events_1 = Events; - - var DLList$1, Events$1, Queues; - - DLList$1 = DLList_1; - - Events$1 = Events_1; - - Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events$1(this); - this._length = 0; - this._lists = (function() { - var j, ref, results; - results = []; - for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) { - results.push(new DLList$1((() => { - return this.incr(); - }), (() => { - return this.decr(); - }))); - } - return results; - }).call(this); - } - - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - - push(job) { - return this._lists[job.options.priority].push(job); - } - - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - - shiftAll(fn) { - return this._lists.forEach(function(list) { - return list.forEachShift(fn); - }); - } - - getFirst(arr = this._lists) { - var j, len, list; - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - if (list.length > 0) { - return list; - } - } - return []; - } - - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - - }; - - var Queues_1 = Queues; - - var BottleneckError; - - BottleneckError = class BottleneckError extends Error {}; - - var BottleneckError_1 = BottleneckError; - - var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; - - NUM_PRIORITIES = 10; - - DEFAULT_PRIORITY = 5; - - parser$1 = parser; - - BottleneckError$1 = BottleneckError_1; - - Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser$1.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } - - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); - } - this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise}); - return true; - } else { - return false; - } - } - - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - if (!(status === expected || (expected === "DONE" && status === null))) { - throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); - } - } - - doReceive() { - this._states.start(this.options.id); - return this.Events.trigger("received", {args: this.args, options: this.options}); - } - - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - this._states.next(this.options.id); - return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked}); - } - - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - return this.Events.trigger("scheduled", {args: this.args, options: this.options}); - } - - async doExecute(chained, clearGlobalState, run, free) { - var error, eventInfo, passed; - if (this.retryCount === 0) { - this._assertStatus("RUNNING"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - this.Events.trigger("executing", eventInfo); - try { - passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args))); - if (clearGlobalState()) { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._resolve(passed); - } - } catch (error1) { - error = error1; - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - } - - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - this._assertStatus("EXECUTING"); - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - - async _onFailure(error, eventInfo, clearGlobalState, run, free) { - var retry, retryAfter; - if (clearGlobalState()) { - retry = (await this.Events.trigger("failed", error, eventInfo)); - if (retry != null) { - retryAfter = ~~retry; - this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); - this.retryCount++; - return run(retryAfter); - } else { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._reject(error); - } - } - } - - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - this._states.next(this.options.id); - return this.Events.trigger("done", eventInfo); - } - - }; - - var Job_1 = Job; - - var BottleneckError$2, LocalDatastore, parser$2; - - parser$2 = parser; - - BottleneckError$2 = BottleneckError_1; - - LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser$2.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - this._startHeartbeat(); - } - - _startHeartbeat() { - var base; - if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) { - return typeof (base = (this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - this.instance._drainAll(this.computeCapacity()); - } - if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - ({ - reservoirIncreaseAmount: amount, - reservoirIncreaseMaximum: maximum, - reservoir - } = this.storeOptions); - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } - - async __publish__(message) { - await this.yieldLoop(); - return this.instance.Events.trigger("message", message.toString()); - } - - async __disconnect__(flush) { - await this.yieldLoop(); - clearInterval(this.heartbeat); - return this.Promise.resolve(); - } - - yieldLoop(t = 0) { - return new this.Promise(function(resolve, reject) { - return setTimeout(resolve, t); - }); - } - - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000; - } - - async __updateSettings__(options) { - await this.yieldLoop(); - parser$2.overwrite(options, options, this.storeOptions); - this._startHeartbeat(); - this.instance._drainAll(this.computeCapacity()); - return true; - } - - async __running__() { - await this.yieldLoop(); - return this._running; - } - - async __queued__() { - await this.yieldLoop(); - return this.instance.queued(); - } - - async __done__() { - await this.yieldLoop(); - return this._done; - } - - async __groupCheck__(time) { - await this.yieldLoop(); - return (this._nextRequest + this.timeout) < time; - } - - computeCapacity() { - var maxConcurrent, reservoir; - ({maxConcurrent, reservoir} = this.storeOptions); - if ((maxConcurrent != null) && (reservoir != null)) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return (capacity == null) || weight <= capacity; - } - - async __incrementReservoir__(incr) { - var reservoir; - await this.yieldLoop(); - reservoir = this.storeOptions.reservoir += incr; - this.instance._drainAll(this.computeCapacity()); - return reservoir; - } - - async __currentReservoir__() { - await this.yieldLoop(); - return this.storeOptions.reservoir; - } - - isBlocked(now) { - return this._unblockTime >= now; - } - - check(weight, now) { - return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; - } - - async __check__(weight) { - var now; - await this.yieldLoop(); - now = Date.now(); - return this.check(weight, now); - } - - async __register__(index, weight, expiration) { - var now, wait; - await this.yieldLoop(); - now = Date.now(); - if (this.conditionsCheck(weight)) { - this._running += weight; - if (this.storeOptions.reservoir != null) { - this.storeOptions.reservoir -= weight; - } - wait = Math.max(this._nextRequest - now, 0); - this._nextRequest = now + wait + this.storeOptions.minTime; - return { - success: true, - wait, - reservoir: this.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - } - - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - - async __submit__(queueLength, weight) { - var blocked, now, reachedHWM; - await this.yieldLoop(); - if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) { - throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); - } - now = Date.now(); - reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now); - blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); - if (blocked) { - this._unblockTime = now + this.computePenalty(); - this._nextRequest = this._unblockTime + this.storeOptions.minTime; - this.instance._dropAllQueued(); - } - return { - reachedHWM, - blocked, - strategy: this.storeOptions.strategy - }; - } - - async __free__(index, weight) { - await this.yieldLoop(); - this._running -= weight; - this._done += weight; - this.instance._drainAll(this.computeCapacity()); - return { - running: this._running - }; - } - - }; - - var LocalDatastore_1 = LocalDatastore; - - var BottleneckError$3, States; - - BottleneckError$3 = BottleneckError_1; - - States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function() { - return 0; - }); - } - - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - if ((current != null) && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } - - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - - remove(id) { - var current; - current = this._jobs[id]; - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - return current != null; - } - - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - - statusJobs(status) { - var k, pos, ref, results, v; - if (status != null) { - pos = this.status.indexOf(status); - if (pos < 0) { - throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`); - } - ref = this._jobs; - results = []; - for (k in ref) { - v = ref[k]; - if (v === pos) { - results.push(k); - } - } - return results; - } else { - return Object.keys(this._jobs); - } - } - - statusCounts() { - return this.counts.reduce(((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }), {}); - } - - }; - - var States_1 = States; - - var DLList$2, Sync; - - DLList$2 = DLList_1; - - Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList$2(); - } - - isEmpty() { - return this._queue.length === 0; - } - - async _tryToRun() { - var args, cb, error, reject, resolve, returned, task; - if ((this._running < 1) && this._queue.length > 0) { - this._running++; - ({task, args, resolve, reject} = this._queue.shift()); - cb = (await (async function() { - try { - returned = (await task(...args)); - return function() { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function() { - return reject(error); - }; - } - })()); - this._running--; - this._tryToRun(); - return cb(); - } - } - - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function(_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - this._queue.push({task, args, resolve, reject}); - this._tryToRun(); - return promise; - } - - }; - - var Sync_1 = Sync; - - var version = "2.19.5"; - var version$1 = { - version: version - }; - - var version$2 = /*#__PURE__*/Object.freeze({ - version: version, - default: version$1 - }); - - var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; - - parser$3 = parser; - - Events$2 = Events_1; - - RedisConnection$1 = require$$2; - - IORedisConnection$1 = require$$3; - - Scripts$1 = require$$4; - - Group = (function() { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser$3.load(this.limiterOptions, this.defaults, this); - this.Events = new Events$2(this); - this.instances = {}; - this.Bottleneck = Bottleneck_1; - this._startAutoCleanup(); - this.sharedConnection = this.connection != null; - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } - } - } - - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } - - async deleteKey(key = "") { - var deleted, instance; - instance = this.instances[key]; - if (this.connection) { - deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)])); - } - if (instance != null) { - delete this.instances[key]; - await instance.disconnect(); - } - return (instance != null) || deleted > 0; - } - - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - return results; - } - - keys() { - return Object.keys(this.instances); - } - - async clusterKeys() { - var cursor, end, found, i, k, keys, len, next, start; - if (this.connection == null) { - return this.Promise.resolve(this.keys()); - } - keys = []; - cursor = null; - start = `b_${this.id}-`.length; - end = "_settings".length; - while (cursor !== 0) { - [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000])); - cursor = ~~next; - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - } - return keys; - } - - _startAutoCleanup() { - var base; - clearInterval(this.interval); - return typeof (base = (this.interval = setInterval(async() => { - var e, k, ref, results, time, v; - time = Date.now(); - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - try { - if ((await v._store.__groupCheck__(time))) { - results.push(this.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } - } - return results; - }, this.timeout / 2))).unref === "function" ? base.unref() : void 0; - } - - updateSettings(options = {}) { - parser$3.overwrite(options, this.defaults, this); - parser$3.overwrite(options, options, this.limiterOptions); - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - - disconnect(flush = true) { - var ref; - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } - - } - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - - return Group; - - }).call(commonjsGlobal); - - var Group_1 = Group; - - var Batcher, Events$3, parser$4; - - parser$4 = parser; - - Events$3 = Events_1; - - Batcher = (function() { - class Batcher { - constructor(options = {}) { - this.options = options; - parser$4.load(this.options, this.defaults, this); - this.Events = new Events$3(this); - this._arr = []; - this._resetPromise(); - this._lastFlush = Date.now(); - } - - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } - - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - this._resolve(); - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - - add(data) { - var ret; - this._arr.push(data); - ret = this._promise; - if (this._arr.length === this.maxSize) { - this._flush(); - } else if ((this.maxTime != null) && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - return ret; - } - - } - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - - return Batcher; - - }).call(commonjsGlobal); - - var Batcher_1 = Batcher; - - var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$8 = getCjsExportFromNamespace(version$2); - - var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, - splice = [].splice; - - NUM_PRIORITIES$1 = 10; - - DEFAULT_PRIORITY$1 = 5; - - parser$5 = parser; - - Queues$1 = Queues_1; - - Job$1 = Job_1; - - LocalDatastore$1 = LocalDatastore_1; - - RedisDatastore$1 = require$$4$1; - - Events$4 = Events_1; - - States$1 = States_1; - - Sync$1 = Sync_1; - - Bottleneck = (function() { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - this._validateOptions(options, invalid); - parser$5.load(options, this.instanceDefaults, this); - this._queues = new Queues$1(NUM_PRIORITIES$1); - this._scheduled = {}; - this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events$4(this); - this._submitLock = new Sync$1("submit", this.Promise); - this._registerLock = new Sync$1("register", this.Promise); - storeOptions = parser$5.load(options, this.storeDefaults, {}); - this._store = (function() { - if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) { - storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); - return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }).call(this); - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _validateOptions(options, invalid) { - if (!((options != null) && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - - ready() { - return this._store.ready; - } - - clients() { - return this._store.clients; - } - - channel() { - return `b_${this.id}`; - } - - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } - - publish(message) { - return this._store.__publish__(message); - } - - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } - - chain(_limiter) { - this._limiter = _limiter; - return this; - } - - queued(priority) { - return this._queues.queued(priority); - } - - clusterQueued() { - return this._store.__queued__(); - } - - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - - running() { - return this._store.__running__(); - } - - done() { - return this._store.__done__(); - } - - jobStatus(id) { - return this._states.jobStatus(id); - } - - jobs(status) { - return this._states.statusJobs(status); - } - - counts() { - return this._states.statusCounts(); - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - check(weight = 1) { - return this._store.__check__(weight); - } - - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } - - async _free(index, job, options, eventInfo) { - var e, running; - try { - ({running} = (await this._store.__free__(index, options.weight))); - this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - if (running === 0 && this.empty()) { - return this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return this.Events.trigger("error", e); - } - } - - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function() { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } - - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - queue = this._queues.getFirst(); - ({options, args} = next = queue.first()); - if ((capacity != null) && options.weight > capacity) { - return this.Promise.resolve(null); - } - this.Events.trigger("debug", `Draining ${options.id}`, {args, options}); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options}); - if (success) { - queue.shift(); - empty = this.empty(); - if (empty) { - this.Events.trigger("empty"); - } - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - this._run(index, next, wait); - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); - } - - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then((drained) => { - var newCapacity; - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch((e) => { - return this.Events.trigger("error", e); - }); - } - - _dropAllQueued(message) { - return this._queues.shiftAll(function(job) { - return job.doDrop({message}); - }); - } - - stop(options = {}) { - var done, waitForExecuting; - options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { - var finished; - finished = () => { - var counts; - counts = this._states.counts; - return (counts[0] + counts[1] + counts[2] + counts[3]) === at; - }; - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - for (k in ref) { - v = ref[k]; - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - this._dropAllQueued(options.dropErrorMessage); - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - this._receive = function(job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - return done; - } - - async _addToQueue(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy; - ({args, options} = job); - try { - ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight))); - } catch (error1) { - error = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error}); - job.doDrop({error}); - return false; - } - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - if (shifted != null) { - shifted.doDrop(); - } - if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - return reachedHWM; - } - } - job.doQueue(reachedHWM, blocked); - this._queues.push(job); - await this._drainAll(); - return reachedHWM; - } - - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - if (typeof args[0] === "function") { - ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); - options = parser$5.load({}, this.jobDefaults); - } else { - ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); - options = parser$5.load(options, this.jobDefaults); - } - task = (...args) => { - return new this.Promise(function(resolve, reject) { - return fn(...args, function(...args) { - return (args[0] != null ? reject : resolve)(args); - }); - }); - }; - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function(args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function(args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } - - schedule(...args) { - var job, options, task; - if (typeof args[0] === "function") { - [task, ...args] = args; - options = {}; - } else { - [options, task, ...args] = args; - } - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - this._receive(job); - return job.promise; - } - - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - wrapped = function(...args) { - return schedule(fn.bind(this), ...args); - }; - wrapped.withOptions = function(options, ...args) { - return schedule(options, fn, ...args); - }; - return wrapped; - } - - async updateSettings(options = {}) { - await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); - parser$5.overwrite(options, this.instanceDefaults, this); - return this; - } - - currentReservoir() { - return this._store.__currentReservoir__(); - } - - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); - } - - } - Bottleneck.default = Bottleneck; - - Bottleneck.Events = Events$4; - - Bottleneck.version = Bottleneck.prototype.version = require$$8.version; - - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; - - Bottleneck.Group = Bottleneck.prototype.Group = Group_1; - - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; - - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; - - Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; - - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; - - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - - return Bottleneck; - - }).call(commonjsGlobal); - - var Bottleneck_1 = Bottleneck; - - var lib = Bottleneck_1; - - return lib; - -}))); - - -/***/ }), - -/***/ 95432: -/***/ ((module) => { - -module.exports = function btoa(str) { - return new Buffer(str).toString('base64') +// node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +var dist_src_exports5 = {}; +__export(dist_src_exports5, { + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods +}); +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; } - - -/***/ }), - -/***/ 98378: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*jshint node:true */ - -var Buffer = (__nccwpck_require__(20181).Buffer); // browserify -var SlowBuffer = (__nccwpck_require__(20181).SlowBuffer); - -module.exports = bufferEq; - -function bufferEq(a, b) { - - // shortcutting on type is necessary for correctness - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - return false; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +var init_dist_src8 = __esm({ + "node_modules/.pnpm/@octokit+plugin-rest-endpoint-methods@10.4.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js"() { + init_version6(); + init_endpoints_to_methods(); + restEndpointMethods.VERSION = VERSION8; + legacyRestEndpointMethods.VERSION = VERSION8; } +}); - // buffer sizes should be well-known information, so despite this - // shortcutting, it doesn't leak any information about the *contents* of the - // buffers. - if (a.length !== b.length) { - return false; +// node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/error-request.js +async function errorRequest(state, octokit, error, options2) { + if (!error.request || !error.request.request) { + throw error; } - - var c = 0; - for (var i = 0; i < a.length; i++) { - /*jshint bitwise:false */ - c |= a[i] ^ b[i]; // XOR + if (error.status >= 400 && !state.doNotRetry.includes(error.status)) { + const retries = options2.request.retries != null ? options2.request.retries : state.retries; + const retryAfter = Math.pow((options2.request.retryCount || 0) + 1, 2); + throw octokit.retry.retryRequest(error, retries, retryAfter); } - return c === 0; + throw error; } +var init_error_request = __esm({ + "node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/error-request.js"() { + } +}); -bufferEq.install = function() { - Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; -}; - -var origBufEqual = Buffer.prototype.equal; -var origSlowBufEqual = SlowBuffer.prototype.equal; -bufferEq.restore = function() { - Buffer.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; -}; - - -/***/ }), - -/***/ 59576: -/***/ ((module) => { - -"use strict"; -/*! - * bytes - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015 Jed Watson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = bytes; -module.exports.format = format; -module.exports.parse = parse; - -/** - * Module variables. - * @private - */ - -var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; - -var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; - -var map = { - b: 1, - kb: 1 << 10, - mb: 1 << 20, - gb: 1 << 30, - tb: Math.pow(1024, 4), - pb: Math.pow(1024, 5), -}; - -var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; - -/** - * Convert the given value in bytes into a string or parse to string to an integer in bytes. - * - * @param {string|number} value - * @param {{ - * case: [string], - * decimalPlaces: [number] - * fixedDecimals: [boolean] - * thousandsSeparator: [string] - * unitSeparator: [string] - * }} [options] bytes options. - * - * @returns {string|number|null} - */ - -function bytes(value, options) { - if (typeof value === 'string') { - return parse(value); +// node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js +var require_light = __commonJS({ + "node_modules/.pnpm/bottleneck@2.19.5/node_modules/bottleneck/light.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.Bottleneck = factory(); + })(exports2, function() { + "use strict"; + var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; + function getCjsExportFromNamespace(n) { + return n && n["default"] || n; + } + var load2 = function(received, defaults, onto = {}) { + var k, ref, v; + for (k in defaults) { + v = defaults[k]; + onto[k] = (ref = received[k]) != null ? ref : v; + } + return onto; + }; + var overwrite = function(received, defaults, onto = {}) { + var k, v; + for (k in received) { + v = received[k]; + if (defaults[k] !== void 0) { + onto[k] = v; + } + } + return onto; + }; + var parser2 = { + load: load2, + overwrite + }; + var DLList; + DLList = class DLList { + constructor(incr, decr) { + this.incr = incr; + this.decr = decr; + this._first = null; + this._last = null; + this.length = 0; + } + push(value) { + var node2; + this.length++; + if (typeof this.incr === "function") { + this.incr(); + } + node2 = { + value, + prev: this._last, + next: null + }; + if (this._last != null) { + this._last.next = node2; + this._last = node2; + } else { + this._first = this._last = node2; + } + return void 0; + } + shift() { + var value; + if (this._first == null) { + return; + } else { + this.length--; + if (typeof this.decr === "function") { + this.decr(); + } + } + value = this._first.value; + if ((this._first = this._first.next) != null) { + this._first.prev = null; + } else { + this._last = null; + } + return value; + } + first() { + if (this._first != null) { + return this._first.value; + } + } + getArray() { + var node2, ref, results; + node2 = this._first; + results = []; + while (node2 != null) { + results.push((ref = node2, node2 = node2.next, ref.value)); + } + return results; + } + forEachShift(cb) { + var node2; + node2 = this.shift(); + while (node2 != null) { + cb(node2), node2 = this.shift(); + } + return void 0; + } + debug() { + var node2, ref, ref1, ref2, results; + node2 = this._first; + results = []; + while (node2 != null) { + results.push((ref = node2, node2 = node2.next, { + value: ref.value, + prev: (ref1 = ref.prev) != null ? ref1.value : void 0, + next: (ref2 = ref.next) != null ? ref2.value : void 0 + })); + } + return results; + } + }; + var DLList_1 = DLList; + var Events2; + Events2 = class Events { + constructor(instance) { + this.instance = instance; + this._events = {}; + if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { + throw new Error("An Emitter already exists for this object"); + } + this.instance.on = (name, cb) => { + return this._addListener(name, "many", cb); + }; + this.instance.once = (name, cb) => { + return this._addListener(name, "once", cb); + }; + this.instance.removeAllListeners = (name = null) => { + if (name != null) { + return delete this._events[name]; + } else { + return this._events = {}; + } + }; + } + _addListener(name, status, cb) { + var base; + if ((base = this._events)[name] == null) { + base[name] = []; + } + this._events[name].push({ cb, status }); + return this.instance; + } + listenerCount(name) { + if (this._events[name] != null) { + return this._events[name].length; + } else { + return 0; + } + } + async trigger(name, ...args) { + var e, promises; + try { + if (name !== "debug") { + this.trigger("debug", `Event triggered: ${name}`, args); + } + if (this._events[name] == null) { + return; + } + this._events[name] = this._events[name].filter(function(listener) { + return listener.status !== "none"; + }); + promises = this._events[name].map(async (listener) => { + var e2, returned; + if (listener.status === "none") { + return; + } + if (listener.status === "once") { + listener.status = "none"; + } + try { + returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; + if (typeof (returned != null ? returned.then : void 0) === "function") { + return await returned; + } else { + return returned; + } + } catch (error) { + e2 = error; + { + this.trigger("error", e2); + } + return null; + } + }); + return (await Promise.all(promises)).find(function(x) { + return x != null; + }); + } catch (error) { + e = error; + { + this.trigger("error", e); + } + return null; + } + } + }; + var Events_1 = Events2; + var DLList$1, Events$1, Queues; + DLList$1 = DLList_1; + Events$1 = Events_1; + Queues = class Queues { + constructor(num_priorities) { + var i; + this.Events = new Events$1(this); + this._length = 0; + this._lists = function() { + var j, ref, results; + results = []; + for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { + results.push(new DLList$1(() => { + return this.incr(); + }, () => { + return this.decr(); + })); + } + return results; + }.call(this); + } + incr() { + if (this._length++ === 0) { + return this.Events.trigger("leftzero"); + } + } + decr() { + if (--this._length === 0) { + return this.Events.trigger("zero"); + } + } + push(job) { + return this._lists[job.options.priority].push(job); + } + queued(priority) { + if (priority != null) { + return this._lists[priority].length; + } else { + return this._length; + } + } + shiftAll(fn) { + return this._lists.forEach(function(list) { + return list.forEachShift(fn); + }); + } + getFirst(arr = this._lists) { + var j, len, list; + for (j = 0, len = arr.length; j < len; j++) { + list = arr[j]; + if (list.length > 0) { + return list; + } + } + return []; + } + shiftLastFrom(priority) { + return this.getFirst(this._lists.slice(priority).reverse()).shift(); + } + }; + var Queues_1 = Queues; + var BottleneckError; + BottleneckError = class BottleneckError extends Error { + }; + var BottleneckError_1 = BottleneckError; + var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; + NUM_PRIORITIES = 10; + DEFAULT_PRIORITY = 5; + parser$1 = parser2; + BottleneckError$1 = BottleneckError_1; + Job = class Job { + constructor(task, args, options2, jobDefaults, rejectOnDrop, Events3, _states, Promise2) { + this.task = task; + this.args = args; + this.rejectOnDrop = rejectOnDrop; + this.Events = Events3; + this._states = _states; + this.Promise = Promise2; + this.options = parser$1.load(options2, jobDefaults); + this.options.priority = this._sanitizePriority(this.options.priority); + if (this.options.id === jobDefaults.id) { + this.options.id = `${this.options.id}-${this._randomIndex()}`; + } + this.promise = new this.Promise((_resolve, _reject) => { + this._resolve = _resolve; + this._reject = _reject; + }); + this.retryCount = 0; + } + _sanitizePriority(priority) { + var sProperty; + sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; + if (sProperty < 0) { + return 0; + } else if (sProperty > NUM_PRIORITIES - 1) { + return NUM_PRIORITIES - 1; + } else { + return sProperty; + } + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + doDrop({ error, message = "This job has been dropped by Bottleneck" } = {}) { + if (this._states.remove(this.options.id)) { + if (this.rejectOnDrop) { + this._reject(error != null ? error : new BottleneckError$1(message)); + } + this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); + return true; + } else { + return false; + } + } + _assertStatus(expected) { + var status; + status = this._states.jobStatus(this.options.id); + if (!(status === expected || expected === "DONE" && status === null)) { + throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); + } + } + doReceive() { + this._states.start(this.options.id); + return this.Events.trigger("received", { args: this.args, options: this.options }); + } + doQueue(reachedHWM, blocked) { + this._assertStatus("RECEIVED"); + this._states.next(this.options.id); + return this.Events.trigger("queued", { args: this.args, options: this.options, reachedHWM, blocked }); + } + doRun() { + if (this.retryCount === 0) { + this._assertStatus("QUEUED"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + return this.Events.trigger("scheduled", { args: this.args, options: this.options }); + } + async doExecute(chained, clearGlobalState, run2, free) { + var error, eventInfo, passed; + if (this.retryCount === 0) { + this._assertStatus("RUNNING"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; + this.Events.trigger("executing", eventInfo); + try { + passed = await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args)); + if (clearGlobalState()) { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._resolve(passed); + } + } catch (error1) { + error = error1; + return this._onFailure(error, eventInfo, clearGlobalState, run2, free); + } + } + doExpire(clearGlobalState, run2, free) { + var error, eventInfo; + if (this._states.jobStatus(this.options.id === "RUNNING")) { + this._states.next(this.options.id); + } + this._assertStatus("EXECUTING"); + eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; + error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error, eventInfo, clearGlobalState, run2, free); + } + async _onFailure(error, eventInfo, clearGlobalState, run2, free) { + var retry2, retryAfter; + if (clearGlobalState()) { + retry2 = await this.Events.trigger("failed", error, eventInfo); + if (retry2 != null) { + retryAfter = ~~retry2; + this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); + this.retryCount++; + return run2(retryAfter); + } else { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._reject(error); + } + } + } + doDone(eventInfo) { + this._assertStatus("EXECUTING"); + this._states.next(this.options.id); + return this.Events.trigger("done", eventInfo); + } + }; + var Job_1 = Job; + var BottleneckError$2, LocalDatastore, parser$2; + parser$2 = parser2; + BottleneckError$2 = BottleneckError_1; + LocalDatastore = class LocalDatastore { + constructor(instance, storeOptions, storeInstanceOptions) { + this.instance = instance; + this.storeOptions = storeOptions; + this.clientId = this.instance._randomIndex(); + parser$2.load(storeInstanceOptions, storeInstanceOptions, this); + this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); + this._running = 0; + this._done = 0; + this._unblockTime = 0; + this.ready = this.Promise.resolve(); + this.clients = {}; + this._startHeartbeat(); + } + _startHeartbeat() { + var base; + if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { + return typeof (base = this.heartbeat = setInterval(() => { + var amount, incr, maximum, now, reservoir; + now = Date.now(); + if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { + this._lastReservoirRefresh = now; + this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; + this.instance._drainAll(this.computeCapacity()); + } + if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { + ({ + reservoirIncreaseAmount: amount, + reservoirIncreaseMaximum: maximum, + reservoir + } = this.storeOptions); + this._lastReservoirIncrease = now; + incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; + if (incr > 0) { + this.storeOptions.reservoir += incr; + return this.instance._drainAll(this.computeCapacity()); + } + } + }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; + } else { + return clearInterval(this.heartbeat); + } + } + async __publish__(message) { + await this.yieldLoop(); + return this.instance.Events.trigger("message", message.toString()); + } + async __disconnect__(flush2) { + await this.yieldLoop(); + clearInterval(this.heartbeat); + return this.Promise.resolve(); + } + yieldLoop(t = 0) { + return new this.Promise(function(resolve4, reject) { + return setTimeout(resolve4, t); + }); + } + computePenalty() { + var ref; + return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5e3; + } + async __updateSettings__(options2) { + await this.yieldLoop(); + parser$2.overwrite(options2, options2, this.storeOptions); + this._startHeartbeat(); + this.instance._drainAll(this.computeCapacity()); + return true; + } + async __running__() { + await this.yieldLoop(); + return this._running; + } + async __queued__() { + await this.yieldLoop(); + return this.instance.queued(); + } + async __done__() { + await this.yieldLoop(); + return this._done; + } + async __groupCheck__(time) { + await this.yieldLoop(); + return this._nextRequest + this.timeout < time; + } + computeCapacity() { + var maxConcurrent, reservoir; + ({ maxConcurrent, reservoir } = this.storeOptions); + if (maxConcurrent != null && reservoir != null) { + return Math.min(maxConcurrent - this._running, reservoir); + } else if (maxConcurrent != null) { + return maxConcurrent - this._running; + } else if (reservoir != null) { + return reservoir; + } else { + return null; + } + } + conditionsCheck(weight) { + var capacity; + capacity = this.computeCapacity(); + return capacity == null || weight <= capacity; + } + async __incrementReservoir__(incr) { + var reservoir; + await this.yieldLoop(); + reservoir = this.storeOptions.reservoir += incr; + this.instance._drainAll(this.computeCapacity()); + return reservoir; + } + async __currentReservoir__() { + await this.yieldLoop(); + return this.storeOptions.reservoir; + } + isBlocked(now) { + return this._unblockTime >= now; + } + check(weight, now) { + return this.conditionsCheck(weight) && this._nextRequest - now <= 0; + } + async __check__(weight) { + var now; + await this.yieldLoop(); + now = Date.now(); + return this.check(weight, now); + } + async __register__(index, weight, expiration) { + var now, wait2; + await this.yieldLoop(); + now = Date.now(); + if (this.conditionsCheck(weight)) { + this._running += weight; + if (this.storeOptions.reservoir != null) { + this.storeOptions.reservoir -= weight; + } + wait2 = Math.max(this._nextRequest - now, 0); + this._nextRequest = now + wait2 + this.storeOptions.minTime; + return { + success: true, + wait: wait2, + reservoir: this.storeOptions.reservoir + }; + } else { + return { + success: false + }; + } + } + strategyIsBlock() { + return this.storeOptions.strategy === 3; + } + async __submit__(queueLength, weight) { + var blocked, now, reachedHWM; + await this.yieldLoop(); + if (this.storeOptions.maxConcurrent != null && weight > this.storeOptions.maxConcurrent) { + throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); + } + now = Date.now(); + reachedHWM = this.storeOptions.highWater != null && queueLength === this.storeOptions.highWater && !this.check(weight, now); + blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); + if (blocked) { + this._unblockTime = now + this.computePenalty(); + this._nextRequest = this._unblockTime + this.storeOptions.minTime; + this.instance._dropAllQueued(); + } + return { + reachedHWM, + blocked, + strategy: this.storeOptions.strategy + }; + } + async __free__(index, weight) { + await this.yieldLoop(); + this._running -= weight; + this._done += weight; + this.instance._drainAll(this.computeCapacity()); + return { + running: this._running + }; + } + }; + var LocalDatastore_1 = LocalDatastore; + var BottleneckError$3, States2; + BottleneckError$3 = BottleneckError_1; + States2 = class States { + constructor(status1) { + this.status = status1; + this._jobs = {}; + this.counts = this.status.map(function() { + return 0; + }); + } + next(id) { + var current, next; + current = this._jobs[id]; + next = current + 1; + if (current != null && next < this.status.length) { + this.counts[current]--; + this.counts[next]++; + return this._jobs[id]++; + } else if (current != null) { + this.counts[current]--; + return delete this._jobs[id]; + } + } + start(id) { + var initial; + initial = 0; + this._jobs[id] = initial; + return this.counts[initial]++; + } + remove(id) { + var current; + current = this._jobs[id]; + if (current != null) { + this.counts[current]--; + delete this._jobs[id]; + } + return current != null; + } + jobStatus(id) { + var ref; + return (ref = this.status[this._jobs[id]]) != null ? ref : null; + } + statusJobs(status) { + var k, pos, ref, results, v; + if (status != null) { + pos = this.status.indexOf(status); + if (pos < 0) { + throw new BottleneckError$3(`status must be one of ${this.status.join(", ")}`); + } + ref = this._jobs; + results = []; + for (k in ref) { + v = ref[k]; + if (v === pos) { + results.push(k); + } + } + return results; + } else { + return Object.keys(this._jobs); + } + } + statusCounts() { + return this.counts.reduce((acc, v, i) => { + acc[this.status[i]] = v; + return acc; + }, {}); + } + }; + var States_1 = States2; + var DLList$2, Sync; + DLList$2 = DLList_1; + Sync = class Sync { + constructor(name, Promise2) { + this.schedule = this.schedule.bind(this); + this.name = name; + this.Promise = Promise2; + this._running = 0; + this._queue = new DLList$2(); + } + isEmpty() { + return this._queue.length === 0; + } + async _tryToRun() { + var args, cb, error, reject, resolve4, returned, task; + if (this._running < 1 && this._queue.length > 0) { + this._running++; + ({ task, args, resolve: resolve4, reject } = this._queue.shift()); + cb = await async function() { + try { + returned = await task(...args); + return function() { + return resolve4(returned); + }; + } catch (error1) { + error = error1; + return function() { + return reject(error); + }; + } + }(); + this._running--; + this._tryToRun(); + return cb(); + } + } + schedule(task, ...args) { + var promise, reject, resolve4; + resolve4 = reject = null; + promise = new this.Promise(function(_resolve, _reject) { + resolve4 = _resolve; + return reject = _reject; + }); + this._queue.push({ task, args, resolve: resolve4, reject }); + this._tryToRun(); + return promise; + } + }; + var Sync_1 = Sync; + var version = "2.19.5"; + var version$1 = { + version + }; + var version$2 = /* @__PURE__ */ Object.freeze({ + version, + default: version$1 + }); + var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$3 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$4 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; + parser$3 = parser2; + Events$2 = Events_1; + RedisConnection$1 = require$$2; + IORedisConnection$1 = require$$3; + Scripts$1 = require$$4; + Group = function() { + class Group2 { + constructor(limiterOptions = {}) { + this.deleteKey = this.deleteKey.bind(this); + this.limiterOptions = limiterOptions; + parser$3.load(this.limiterOptions, this.defaults, this); + this.Events = new Events$2(this); + this.instances = {}; + this.Bottleneck = Bottleneck_1; + this._startAutoCleanup(); + this.sharedConnection = this.connection != null; + if (this.connection == null) { + if (this.limiterOptions.datastore === "redis") { + this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events })); + } else if (this.limiterOptions.datastore === "ioredis") { + this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events })); + } + } + } + key(key = "") { + var ref; + return (ref = this.instances[key]) != null ? ref : (() => { + var limiter; + limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { + id: `${this.id}-${key}`, + timeout: this.timeout, + connection: this.connection + })); + this.Events.trigger("created", limiter, key); + return limiter; + })(); + } + async deleteKey(key = "") { + var deleted, instance; + instance = this.instances[key]; + if (this.connection) { + deleted = await this.connection.__runCommand__(["del", ...Scripts$1.allKeys(`${this.id}-${key}`)]); + } + if (instance != null) { + delete this.instances[key]; + await instance.disconnect(); + } + return instance != null || deleted > 0; + } + limiters() { + var k, ref, results, v; + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + results.push({ + key: k, + limiter: v + }); + } + return results; + } + keys() { + return Object.keys(this.instances); + } + async clusterKeys() { + var cursor, end2, found, i, k, keys, len, next, start; + if (this.connection == null) { + return this.Promise.resolve(this.keys()); + } + keys = []; + cursor = null; + start = `b_${this.id}-`.length; + end2 = "_settings".length; + while (cursor !== 0) { + [next, found] = await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 1e4]); + cursor = ~~next; + for (i = 0, len = found.length; i < len; i++) { + k = found[i]; + keys.push(k.slice(start, -end2)); + } + } + return keys; + } + _startAutoCleanup() { + var base; + clearInterval(this.interval); + return typeof (base = this.interval = setInterval(async () => { + var e, k, ref, results, time, v; + time = Date.now(); + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + try { + if (await v._store.__groupCheck__(time)) { + results.push(this.deleteKey(k)); + } else { + results.push(void 0); + } + } catch (error) { + e = error; + results.push(v.Events.trigger("error", e)); + } + } + return results; + }, this.timeout / 2)).unref === "function" ? base.unref() : void 0; + } + updateSettings(options2 = {}) { + parser$3.overwrite(options2, this.defaults, this); + parser$3.overwrite(options2, options2, this.limiterOptions); + if (options2.timeout != null) { + return this._startAutoCleanup(); + } + } + disconnect(flush2 = true) { + var ref; + if (!this.sharedConnection) { + return (ref = this.connection) != null ? ref.disconnect(flush2) : void 0; + } + } + } + Group2.prototype.defaults = { + timeout: 1e3 * 60 * 5, + connection: null, + Promise, + id: "group-key" + }; + return Group2; + }.call(commonjsGlobal); + var Group_1 = Group; + var Batcher, Events$3, parser$4; + parser$4 = parser2; + Events$3 = Events_1; + Batcher = function() { + class Batcher2 { + constructor(options2 = {}) { + this.options = options2; + parser$4.load(this.options, this.defaults, this); + this.Events = new Events$3(this); + this._arr = []; + this._resetPromise(); + this._lastFlush = Date.now(); + } + _resetPromise() { + return this._promise = new this.Promise((res, rej) => { + return this._resolve = res; + }); + } + _flush() { + clearTimeout(this._timeout); + this._lastFlush = Date.now(); + this._resolve(); + this.Events.trigger("batch", this._arr); + this._arr = []; + return this._resetPromise(); + } + add(data) { + var ret; + this._arr.push(data); + ret = this._promise; + if (this._arr.length === this.maxSize) { + this._flush(); + } else if (this.maxTime != null && this._arr.length === 1) { + this._timeout = setTimeout(() => { + return this._flush(); + }, this.maxTime); + } + return ret; + } + } + Batcher2.prototype.defaults = { + maxTime: null, + maxSize: null, + Promise + }; + return Batcher2; + }.call(commonjsGlobal); + var Batcher_1 = Batcher; + var require$$4$1 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$8 = getCjsExportFromNamespace(version$2); + var Bottleneck2, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, splice = [].splice; + NUM_PRIORITIES$1 = 10; + DEFAULT_PRIORITY$1 = 5; + parser$5 = parser2; + Queues$1 = Queues_1; + Job$1 = Job_1; + LocalDatastore$1 = LocalDatastore_1; + RedisDatastore$1 = require$$4$1; + Events$4 = Events_1; + States$1 = States_1; + Sync$1 = Sync_1; + Bottleneck2 = function() { + class Bottleneck3 { + constructor(options2 = {}, ...invalid) { + var storeInstanceOptions, storeOptions; + this._addToQueue = this._addToQueue.bind(this); + this._validateOptions(options2, invalid); + parser$5.load(options2, this.instanceDefaults, this); + this._queues = new Queues$1(NUM_PRIORITIES$1); + this._scheduled = {}; + this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); + this._limiter = null; + this.Events = new Events$4(this); + this._submitLock = new Sync$1("submit", this.Promise); + this._registerLock = new Sync$1("register", this.Promise); + storeOptions = parser$5.load(options2, this.storeDefaults, {}); + this._store = function() { + if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { + storeInstanceOptions = parser$5.load(options2, this.redisStoreDefaults, {}); + return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); + } else if (this.datastore === "local") { + storeInstanceOptions = parser$5.load(options2, this.localStoreDefaults, {}); + return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); + } else { + throw new Bottleneck3.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); + } + }.call(this); + this._queues.on("leftzero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; + }); + this._queues.on("zero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; + }); + } + _validateOptions(options2, invalid) { + if (!(options2 != null && typeof options2 === "object" && invalid.length === 0)) { + throw new Bottleneck3.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); + } + } + ready() { + return this._store.ready; + } + clients() { + return this._store.clients; + } + channel() { + return `b_${this.id}`; + } + channel_client() { + return `b_${this.id}_${this._store.clientId}`; + } + publish(message) { + return this._store.__publish__(message); + } + disconnect(flush2 = true) { + return this._store.__disconnect__(flush2); + } + chain(_limiter) { + this._limiter = _limiter; + return this; + } + queued(priority) { + return this._queues.queued(priority); + } + clusterQueued() { + return this._store.__queued__(); + } + empty() { + return this.queued() === 0 && this._submitLock.isEmpty(); + } + running() { + return this._store.__running__(); + } + done() { + return this._store.__done__(); + } + jobStatus(id) { + return this._states.jobStatus(id); + } + jobs(status) { + return this._states.statusJobs(status); + } + counts() { + return this._states.statusCounts(); + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + check(weight = 1) { + return this._store.__check__(weight); + } + _clearGlobalState(index) { + if (this._scheduled[index] != null) { + clearTimeout(this._scheduled[index].expiration); + delete this._scheduled[index]; + return true; + } else { + return false; + } + } + async _free(index, job, options2, eventInfo) { + var e, running; + try { + ({ running } = await this._store.__free__(index, options2.weight)); + this.Events.trigger("debug", `Freed ${options2.id}`, eventInfo); + if (running === 0 && this.empty()) { + return this.Events.trigger("idle"); + } + } catch (error1) { + e = error1; + return this.Events.trigger("error", e); + } + } + _run(index, job, wait2) { + var clearGlobalState, free, run2; + job.doRun(); + clearGlobalState = this._clearGlobalState.bind(this, index); + run2 = this._run.bind(this, index, job); + free = this._free.bind(this, index, job); + return this._scheduled[index] = { + timeout: setTimeout(() => { + return job.doExecute(this._limiter, clearGlobalState, run2, free); + }, wait2), + expiration: job.options.expiration != null ? setTimeout(function() { + return job.doExpire(clearGlobalState, run2, free); + }, wait2 + job.options.expiration) : void 0, + job + }; + } + _drainOne(capacity) { + return this._registerLock.schedule(() => { + var args, index, next, options2, queue; + if (this.queued() === 0) { + return this.Promise.resolve(null); + } + queue = this._queues.getFirst(); + ({ options: options2, args } = next = queue.first()); + if (capacity != null && options2.weight > capacity) { + return this.Promise.resolve(null); + } + this.Events.trigger("debug", `Draining ${options2.id}`, { args, options: options2 }); + index = this._randomIndex(); + return this._store.__register__(index, options2.weight, options2.expiration).then(({ success, wait: wait2, reservoir }) => { + var empty; + this.Events.trigger("debug", `Drained ${options2.id}`, { success, args, options: options2 }); + if (success) { + queue.shift(); + empty = this.empty(); + if (empty) { + this.Events.trigger("empty"); + } + if (reservoir === 0) { + this.Events.trigger("depleted", empty); + } + this._run(index, next, wait2); + return this.Promise.resolve(options2.weight); + } else { + return this.Promise.resolve(null); + } + }); + }); + } + _drainAll(capacity, total = 0) { + return this._drainOne(capacity).then((drained) => { + var newCapacity; + if (drained != null) { + newCapacity = capacity != null ? capacity - drained : capacity; + return this._drainAll(newCapacity, total + drained); + } else { + return this.Promise.resolve(total); + } + }).catch((e) => { + return this.Events.trigger("error", e); + }); + } + _dropAllQueued(message) { + return this._queues.shiftAll(function(job) { + return job.doDrop({ message }); + }); + } + stop(options2 = {}) { + var done, waitForExecuting; + options2 = parser$5.load(options2, this.stopDefaults); + waitForExecuting = (at) => { + var finished; + finished = () => { + var counts; + counts = this._states.counts; + return counts[0] + counts[1] + counts[2] + counts[3] === at; + }; + return new this.Promise((resolve4, reject) => { + if (finished()) { + return resolve4(); + } else { + return this.on("done", () => { + if (finished()) { + this.removeAllListeners("done"); + return resolve4(); + } + }); + } + }); + }; + done = options2.dropWaitingJobs ? (this._run = function(index, next) { + return next.doDrop({ + message: options2.dropErrorMessage + }); + }, this._drainOne = () => { + return this.Promise.resolve(null); + }, this._registerLock.schedule(() => { + return this._submitLock.schedule(() => { + var k, ref, v; + ref = this._scheduled; + for (k in ref) { + v = ref[k]; + if (this.jobStatus(v.job.options.id) === "RUNNING") { + clearTimeout(v.timeout); + clearTimeout(v.expiration); + v.job.doDrop({ + message: options2.dropErrorMessage + }); + } + } + this._dropAllQueued(options2.dropErrorMessage); + return waitForExecuting(0); + }); + })) : this.schedule({ + priority: NUM_PRIORITIES$1 - 1, + weight: 0 + }, () => { + return waitForExecuting(1); + }); + this._receive = function(job) { + return job._reject(new Bottleneck3.prototype.BottleneckError(options2.enqueueErrorMessage)); + }; + this.stop = () => { + return this.Promise.reject(new Bottleneck3.prototype.BottleneckError("stop() has already been called")); + }; + return done; + } + async _addToQueue(job) { + var args, blocked, error, options2, reachedHWM, shifted, strategy; + ({ args, options: options2 } = job); + try { + ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options2.weight)); + } catch (error1) { + error = error1; + this.Events.trigger("debug", `Could not queue ${options2.id}`, { args, options: options2, error }); + job.doDrop({ error }); + return false; + } + if (blocked) { + job.doDrop(); + return true; + } else if (reachedHWM) { + shifted = strategy === Bottleneck3.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options2.priority) : strategy === Bottleneck3.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options2.priority + 1) : strategy === Bottleneck3.prototype.strategy.OVERFLOW ? job : void 0; + if (shifted != null) { + shifted.doDrop(); + } + if (shifted == null || strategy === Bottleneck3.prototype.strategy.OVERFLOW) { + if (shifted == null) { + job.doDrop(); + } + return reachedHWM; + } + } + job.doQueue(reachedHWM, blocked); + this._queues.push(job); + await this._drainAll(); + return reachedHWM; + } + _receive(job) { + if (this._states.jobStatus(job.options.id) != null) { + job._reject(new Bottleneck3.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); + return false; + } else { + job.doReceive(); + return this._submitLock.schedule(this._addToQueue, job); + } + } + submit(...args) { + var cb, fn, job, options2, ref, ref1, task; + if (typeof args[0] === "function") { + ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); + options2 = parser$5.load({}, this.jobDefaults); + } else { + ref1 = args, [options2, fn, ...args] = ref1, [cb] = splice.call(args, -1); + options2 = parser$5.load(options2, this.jobDefaults); + } + task = (...args2) => { + return new this.Promise(function(resolve4, reject) { + return fn(...args2, function(...args3) { + return (args3[0] != null ? reject : resolve4)(args3); + }); + }); + }; + job = new Job$1(task, args, options2, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + job.promise.then(function(args2) { + return typeof cb === "function" ? cb(...args2) : void 0; + }).catch(function(args2) { + if (Array.isArray(args2)) { + return typeof cb === "function" ? cb(...args2) : void 0; + } else { + return typeof cb === "function" ? cb(args2) : void 0; + } + }); + return this._receive(job); + } + schedule(...args) { + var job, options2, task; + if (typeof args[0] === "function") { + [task, ...args] = args; + options2 = {}; + } else { + [options2, task, ...args] = args; + } + job = new Job$1(task, args, options2, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + this._receive(job); + return job.promise; + } + wrap(fn) { + var schedule, wrapped; + schedule = this.schedule.bind(this); + wrapped = function(...args) { + return schedule(fn.bind(this), ...args); + }; + wrapped.withOptions = function(options2, ...args) { + return schedule(options2, fn, ...args); + }; + return wrapped; + } + async updateSettings(options2 = {}) { + await this._store.__updateSettings__(parser$5.overwrite(options2, this.storeDefaults)); + parser$5.overwrite(options2, this.instanceDefaults, this); + return this; + } + currentReservoir() { + return this._store.__currentReservoir__(); + } + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } + } + Bottleneck3.default = Bottleneck3; + Bottleneck3.Events = Events$4; + Bottleneck3.version = Bottleneck3.prototype.version = require$$8.version; + Bottleneck3.strategy = Bottleneck3.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; + Bottleneck3.BottleneckError = Bottleneck3.prototype.BottleneckError = BottleneckError_1; + Bottleneck3.Group = Bottleneck3.prototype.Group = Group_1; + Bottleneck3.RedisConnection = Bottleneck3.prototype.RedisConnection = require$$2; + Bottleneck3.IORedisConnection = Bottleneck3.prototype.IORedisConnection = require$$3; + Bottleneck3.Batcher = Bottleneck3.prototype.Batcher = Batcher_1; + Bottleneck3.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY$1, + weight: 1, + expiration: null, + id: "" + }; + Bottleneck3.prototype.storeDefaults = { + maxConcurrent: null, + minTime: 0, + highWater: null, + strategy: Bottleneck3.prototype.strategy.LEAK, + penalty: null, + reservoir: null, + reservoirRefreshInterval: null, + reservoirRefreshAmount: null, + reservoirIncreaseInterval: null, + reservoirIncreaseAmount: null, + reservoirIncreaseMaximum: null + }; + Bottleneck3.prototype.localStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 250 + }; + Bottleneck3.prototype.redisStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 5e3, + clientTimeout: 1e4, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; + Bottleneck3.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise + }; + Bottleneck3.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; + return Bottleneck3; + }.call(commonjsGlobal); + var Bottleneck_1 = Bottleneck2; + var lib = Bottleneck_1; + return lib; + }); } +}); - if (typeof value === 'number') { - return format(value, options); +// node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/wrap-request.js +async function wrapRequest(state, octokit, request2, options2) { + const limiter = new import_light.default(); + limiter.on("failed", function(error, info) { + const maxRetries = ~~error.request.request.retries; + const after = ~~error.request.request.retryAfter; + options2.request.retryCount = info.retryCount + 1; + if (maxRetries > info.retryCount) { + return after * state.retryAfterBaseValue; + } + }); + return limiter.schedule( + requestWithGraphqlErrorHandling.bind(null, state, octokit, request2), + options2 + ); +} +async function requestWithGraphqlErrorHandling(state, octokit, request2, options2) { + const response = await request2(request2, options2); + if (response.data && response.data.errors && /Something went wrong while executing your query/.test( + response.data.errors[0].message + )) { + const error = new RequestError(response.data.errors[0].message, 500, { + request: options2, + response + }); + return errorRequest(state, octokit, error, options2); } - - return null; + return response; } - -/** - * Format the given value in bytes into a string. - * - * If the value is negative, it is kept as such. If it is a float, - * it is rounded. - * - * @param {number} value - * @param {object} [options] - * @param {number} [options.decimalPlaces=2] - * @param {number} [options.fixedDecimals=false] - * @param {string} [options.thousandsSeparator=] - * @param {string} [options.unit=] - * @param {string} [options.unitSeparator=] - * - * @returns {string|null} - * @public - */ - -function format(value, options) { - if (!Number.isFinite(value)) { - return null; +var import_light; +var init_wrap_request = __esm({ + "node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/wrap-request.js"() { + import_light = __toESM(require_light()); + init_dist_src2(); + init_error_request(); } +}); - var mag = Math.abs(value); - var thousandsSeparator = (options && options.thousandsSeparator) || ''; - var unitSeparator = (options && options.unitSeparator) || ''; - var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; - var fixedDecimals = Boolean(options && options.fixedDecimals); - var unit = (options && options.unit) || ''; - - if (!unit || !map[unit.toLowerCase()]) { - if (mag >= map.pb) { - unit = 'PB'; - } else if (mag >= map.tb) { - unit = 'TB'; - } else if (mag >= map.gb) { - unit = 'GB'; - } else if (mag >= map.mb) { - unit = 'MB'; - } else if (mag >= map.kb) { - unit = 'KB'; - } else { - unit = 'B'; - } +// node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/index.js +var dist_src_exports6 = {}; +__export(dist_src_exports6, { + VERSION: () => VERSION9, + retry: () => retry +}); +function retry(octokit, octokitOptions) { + const state = Object.assign( + { + enabled: true, + retryAfterBaseValue: 1e3, + doNotRetry: [400, 401, 403, 404, 422, 451], + retries: 3 + }, + octokitOptions.retry + ); + if (state.enabled) { + octokit.hook.error("request", errorRequest.bind(null, state, octokit)); + octokit.hook.wrap("request", wrapRequest.bind(null, state, octokit)); } - - var val = value / map[unit.toLowerCase()]; - var str = val.toFixed(decimalPlaces); - - if (!fixedDecimals) { - str = str.replace(formatDecimalsRegExp, '$1'); + return { + retry: { + retryRequest: (error, retries, retryAfter) => { + error.request.request = Object.assign({}, error.request.request, { + retries, + retryAfter + }); + return error; + } + } + }; +} +var VERSION9; +var init_dist_src9 = __esm({ + "node_modules/.pnpm/@octokit+plugin-retry@6.0.1_@octokit+core@5.2.0/node_modules/@octokit/plugin-retry/dist-src/index.js"() { + init_error_request(); + init_wrap_request(); + VERSION9 = "0.0.0-development"; + retry.VERSION = VERSION9; } +}); - if (thousandsSeparator) { - str = str.split('.').map(function (s, i) { - return i === 0 - ? s.replace(formatThousandsRegExp, thousandsSeparator) - : s - }).join('.'); +// node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/version.js +var VERSION10; +var init_version7 = __esm({ + "node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/version.js"() { + VERSION10 = "8.2.0"; } +}); - return str + unitSeparator + unit; +// node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/wrap-request.js +function wrapRequest2(state, request2, options2) { + return state.retryLimiter.schedule(doRequest, state, request2, options2); } - -/** - * Parse the string value into an integer in bytes. - * - * If no unit is given, it is assumed the value is in bytes. - * - * @param {number|string} val - * - * @returns {number|null} - * @public - */ - -function parse(val) { - if (typeof val === 'number' && !isNaN(val)) { - return val; - } - - if (typeof val !== 'string') { - return null; +async function doRequest(state, request2, options2) { + const isWrite = options2.method !== "GET" && options2.method !== "HEAD"; + const { pathname } = new URL(options2.url, "http://github.test"); + const isSearch = options2.method === "GET" && pathname.startsWith("/search/"); + const isGraphQL = pathname.startsWith("/graphql"); + const retryCount = ~~request2.retryCount; + const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; + if (state.clustering) { + jobOptions.expiration = 1e3 * 60; } - - // Test if the string passed is valid - var results = parseRegExp.exec(val); - var floatValue; - var unit = 'b'; - - if (!results) { - // Nothing could be extracted from the given string - floatValue = parseInt(val, 10); - unit = 'b' - } else { - // Retrieve the value and the unit - floatValue = parseFloat(results[1]); - unit = results[4].toLowerCase(); + if (isWrite || isGraphQL) { + await state.write.key(state.id).schedule(jobOptions, noop2); } - - if (isNaN(floatValue)) { - return null; + if (isWrite && state.triggersNotification(pathname)) { + await state.notifications.key(state.id).schedule(jobOptions, noop2); } - - return Math.floor(map[unit] * floatValue); -} - - -/***/ }), - -/***/ 29196: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var GetIntrinsic = __nccwpck_require__(485); - -var callBind = __nccwpck_require__(85632); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; - - -/***/ }), - -/***/ 85632: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var bind = __nccwpck_require__(35632); -var GetIntrinsic = __nccwpck_require__(485); -var setFunctionLength = __nccwpck_require__(73239); - -var $TypeError = __nccwpck_require__(56458); -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $defineProperty = __nccwpck_require__(90961); -var $max = GetIntrinsic('%Math.max%'); - -module.exports = function callBind(originalFunction) { - if (typeof originalFunction !== 'function') { - throw new $TypeError('a function is required'); - } - var func = $reflectApply(bind, $call, arguments); - return setFunctionLength( - func, - 1 + $max(0, originalFunction.length - (arguments.length - 1)), - true - ); -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} - - -/***/ }), - -/***/ 82186: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(70857); - -const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; -const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; -const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir(); - -module.exports = (stack, options) => { - options = Object.assign({pretty: false}, options); - - return stack.replace(/\\/g, '/') - .split('\n') - .filter(line => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - - const match = pathMatches[1]; - - // Electron - if ( - match.includes('.app/Contents/Resources/electron.asar') || - match.includes('.app/Contents/Resources/default_app.asar') - ) { - return false; - } - - return !pathRegex.test(match); - }) - .filter(line => line.trim() !== '') - .map(line => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~'))); - } - - return line; - }) - .join('\n'); -}; - - -/***/ }), - -/***/ 73288: -/***/ ((module) => { - -/* - * Copyright 2001-2010 Georges Menie (www.menie.org) - * Copyright 2010 Salvatore Sanfilippo (adapted to Redis coding style) - * Copyright 2015 Zihua Li (http://zihua.li) (ported to JavaScript) - * Copyright 2016 Mike Diarmid (http://github.com/salakar) (re-write for performance, ~700% perf inc) - * All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the University of California, Berkeley nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* CRC16 implementation according to CCITT standards. - * - * Note by @antirez: this is actually the XMODEM CRC 16 algorithm, using the - * following parameters: - * - * Name : "XMODEM", also known as "ZMODEM", "CRC-16/ACORN" - * Width : 16 bit - * Poly : 1021 (That is actually x^16 + x^12 + x^5 + 1) - * Initialization : 0000 - * Reflect Input byte : False - * Reflect Output CRC : False - * Xor constant to output CRC : 0000 - * Output for "123456789" : 31C3 - */ - -var lookup = [ - 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, - 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, - 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, - 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, - 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, 0x5485, - 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, - 0x3653, 0x2672, 0x1611, 0x0630, 0x76d7, 0x66f6, 0x5695, 0x46b4, - 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, - 0x48c4, 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, - 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, 0xa90a, 0xb92b, - 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, - 0xdbfd, 0xcbdc, 0xfbbf, 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, - 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, - 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, - 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, 0x2e32, 0x1e51, 0x0e70, - 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, - 0x9188, 0x81a9, 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, - 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, 0x6067, - 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, - 0x02b1, 0x1290, 0x22f3, 0x32d2, 0x4235, 0x5214, 0x6277, 0x7256, - 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, - 0x34e2, 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, - 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, 0xc71d, 0xd73c, - 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, - 0xd94c, 0xc96d, 0xf90e, 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, - 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, - 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, - 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, 0x1ad0, 0x2ab3, 0x3a92, - 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, - 0x7c26, 0x6c07, 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, - 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, 0x9ff8, - 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 -]; - -/** - * Convert a string to a UTF8 array - faster than via buffer - * @param str - * @returns {Array} - */ -var toUTF8Array = function toUTF8Array(str) { - var char; - var i = 0; - var p = 0; - var utf8 = []; - var len = str.length; - - for (; i < len; i++) { - char = str.charCodeAt(i); - if (char < 128) { - utf8[p++] = char; - } else if (char < 2048) { - utf8[p++] = (char >> 6) | 192; - utf8[p++] = (char & 63) | 128; - } else if ( - ((char & 0xFC00) === 0xD800) && (i + 1) < str.length && - ((str.charCodeAt(i + 1) & 0xFC00) === 0xDC00)) { - char = 0x10000 + ((char & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF); - utf8[p++] = (char >> 18) | 240; - utf8[p++] = ((char >> 12) & 63) | 128; - utf8[p++] = ((char >> 6) & 63) | 128; - utf8[p++] = (char & 63) | 128; - } else { - utf8[p++] = (char >> 12) | 224; - utf8[p++] = ((char >> 6) & 63) | 128; - utf8[p++] = (char & 63) | 128; - } + if (isSearch) { + await state.search.key(state.id).schedule(jobOptions, noop2); } - - return utf8; -}; - -/** - * Convert a string into a redis slot hash. - * @param str - * @returns {number} - */ -var generate = module.exports = function generate(str) { - var char; - var i = 0; - var start = -1; - var result = 0; - var resultHash = 0; - var utf8 = typeof str === 'string' ? toUTF8Array(str) : str; - var len = utf8.length; - - while (i < len) { - char = utf8[i++]; - if (start === -1) { - if (char === 0x7B) { - start = i; - } - } else if (char !== 0x7D) { - resultHash = lookup[(char ^ (resultHash >> 8)) & 0xFF] ^ (resultHash << 8); - } else if (i - 1 !== start) { - return resultHash & 0x3FFF; + const req = state.global.key(state.id).schedule(jobOptions, request2, options2); + if (isGraphQL) { + const res = await req; + if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) { + const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { + response: res, + data: res.data + }); + throw error; } - - result = lookup[(char ^ (result >> 8)) & 0xFF] ^ (result << 8); } - - return result & 0x3FFF; -}; - -/** - * Convert an array of multiple strings into a redis slot hash. - * Returns -1 if one of the keys is not for the same slot as the others - * @param keys - * @returns {number} - */ -module.exports.generateMulti = function generateMulti(keys) { - var i = 1; - var len = keys.length; - var base = generate(keys[0]); - - while (i < len) { - if (generate(keys[i++]) !== base) return -1; + return req; +} +var noop2; +var init_wrap_request2 = __esm({ + "node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/wrap-request.js"() { + noop2 = () => Promise.resolve(); } +}); - return base; -}; - - -/***/ }), - -/***/ 59101: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * content-disposition - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = contentDisposition -module.exports.parse = parse - -/** - * Module dependencies. - * @private - */ - -var basename = (__nccwpck_require__(16928).basename) -var Buffer = (__nccwpck_require__(53476).Buffer) - -/** - * RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%") - * @private - */ - -var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g // eslint-disable-line no-control-regex - -/** - * RegExp to match percent encoding escape. - * @private - */ - -var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/ -var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g - -/** - * RegExp to match non-latin1 characters. - * @private - */ - -var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g - -/** - * RegExp to match quoted-pair in RFC 2616 - * - * quoted-pair = "\" CHAR - * CHAR = - * @private - */ - -var QESC_REGEXP = /\\([\u0000-\u007f])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 2616 - * @private - */ - -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp for various RFC 2616 grammar - * - * parameter = token "=" ( token | quoted-string ) - * token = 1* - * separators = "(" | ")" | "<" | ">" | "@" - * | "," | ";" | ":" | "\" | <"> - * | "/" | "[" | "]" | "?" | "=" - * | "{" | "}" | SP | HT - * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) - * qdtext = > - * quoted-pair = "\" CHAR - * CHAR = - * TEXT = - * LWS = [CRLF] 1*( SP | HT ) - * CRLF = CR LF - * CR = - * LF = - * SP = - * HT = - * CTL = - * OCTET = - * @private - */ - -var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/ -var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/ - -/** - * RegExp for various RFC 5987 grammar - * - * ext-value = charset "'" [ language ] "'" value-chars - * charset = "UTF-8" / "ISO-8859-1" / mime-charset - * mime-charset = 1*mime-charsetc - * mime-charsetc = ALPHA / DIGIT - * / "!" / "#" / "$" / "%" / "&" - * / "+" / "-" / "^" / "_" / "`" - * / "{" / "}" / "~" - * language = ( 2*3ALPHA [ extlang ] ) - * / 4ALPHA - * / 5*8ALPHA - * extlang = *3( "-" 3ALPHA ) - * value-chars = *( pct-encoded / attr-char ) - * pct-encoded = "%" HEXDIG HEXDIG - * attr-char = ALPHA / DIGIT - * / "!" / "#" / "$" / "&" / "+" / "-" / "." - * / "^" / "_" / "`" / "|" / "~" - * @private - */ - -var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/ - -/** - * RegExp for various RFC 6266 grammar - * - * disposition-type = "inline" | "attachment" | disp-ext-type - * disp-ext-type = token - * disposition-parm = filename-parm | disp-ext-parm - * filename-parm = "filename" "=" value - * | "filename*" "=" ext-value - * disp-ext-parm = token "=" value - * | ext-token "=" ext-value - * ext-token = - * @private - */ - -var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/ // eslint-disable-line no-control-regex - -/** - * Create an attachment Content-Disposition header. - * - * @param {string} [filename] - * @param {object} [options] - * @param {string} [options.type=attachment] - * @param {string|boolean} [options.fallback=true] - * @return {string} - * @public - */ - -function contentDisposition (filename, options) { - var opts = options || {} - - // get type - var type = opts.type || 'attachment' - - // get parameters - var params = createparams(filename, opts.fallback) - - // format into string - return format(new ContentDisposition(type, params)) -} - -/** - * Create parameters object from filename and fallback. - * - * @param {string} [filename] - * @param {string|boolean} [fallback=true] - * @return {object} - * @private - */ - -function createparams (filename, fallback) { - if (filename === undefined) { - return - } - - var params = {} - - if (typeof filename !== 'string') { - throw new TypeError('filename must be a string') +// node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/generated/triggers-notification-paths.js +var triggers_notification_paths_default; +var init_triggers_notification_paths = __esm({ + "node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/generated/triggers-notification-paths.js"() { + triggers_notification_paths_default = [ + "/orgs/{org}/invitations", + "/orgs/{org}/invitations/{invitation_id}", + "/orgs/{org}/teams/{team_slug}/discussions", + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "/repos/{owner}/{repo}/collaborators/{username}", + "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "/repos/{owner}/{repo}/issues", + "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "/repos/{owner}/{repo}/pulls", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "/repos/{owner}/{repo}/releases", + "/teams/{team_id}/discussions", + "/teams/{team_id}/discussions/{discussion_number}/comments" + ]; } +}); - // fallback defaults to true - if (fallback === undefined) { - fallback = true +// node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/route-matcher.js +function routeMatcher(paths) { + const regexes = paths.map( + (path2) => path2.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; + return new RegExp(regex2, "i"); +} +var init_route_matcher = __esm({ + "node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/route-matcher.js"() { } +}); - if (typeof fallback !== 'string' && typeof fallback !== 'boolean') { - throw new TypeError('fallback must be a string or boolean') +// node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/index.js +var dist_src_exports7 = {}; +__export(dist_src_exports7, { + throttling: () => throttling +}); +function throttling(octokit, octokitOptions) { + const { + enabled = true, + Bottleneck: Bottleneck2 = import_light2.default, + id = "no-id", + timeout = 1e3 * 60 * 2, + // Redis TTL: 2 minutes + connection + } = octokitOptions.throttle || {}; + if (!enabled) { + return {}; } - - if (typeof fallback === 'string' && NON_LATIN1_REGEXP.test(fallback)) { - throw new TypeError('fallback must be ISO-8859-1 string') - } - - // restrict to file base name - var name = basename(filename) - - // determine if name is suitable for quoted string - var isQuotedString = TEXT_REGEXP.test(name) - - // generate fallback name - var fallbackName = typeof fallback !== 'string' - ? fallback && getlatin1(name) - : basename(fallback) - var hasFallback = typeof fallbackName === 'string' && fallbackName !== name - - // set extended filename parameter - if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { - params['filename*'] = name + const common2 = { connection, timeout }; + if (groups.global == null) { + createGroups(Bottleneck2, common2); } + const state = Object.assign( + { + clustering: connection != null, + triggersNotification, + fallbackSecondaryRateRetryAfter: 60, + retryAfterBaseValue: 1e3, + retryLimiter: new Bottleneck2(), + id, + ...groups + }, + octokitOptions.throttle + ); + if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { + throw new Error(`octokit/plugin-throttling error: + You must pass the onSecondaryRateLimit and onRateLimit error handlers. + See https://octokit.github.io/rest.js/#throttling - // set filename parameter - if (isQuotedString || hasFallback) { - params.filename = hasFallback - ? fallbackName - : name + const octokit = new Octokit({ + throttle: { + onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, + onRateLimit: (retryAfter, options) => {/* ... */} + } + }) + `); } - - return params + const events = {}; + const emitter = new Bottleneck2.Events(events); + events.on("secondary-limit", state.onSecondaryRateLimit); + events.on("rate-limit", state.onRateLimit); + events.on( + "error", + (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) + ); + state.retryLimiter.on("failed", async function(error, info) { + const [state2, request2, options2] = info.args; + const { pathname } = new URL(options2.url, "http://github.test"); + const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; + if (!(shouldRetryGraphQL || error.status === 403)) { + return; + } + const retryCount = ~~request2.retryCount; + request2.retryCount = retryCount; + options2.request.retryCount = retryCount; + const { wantRetry, retryAfter = 0 } = await async function() { + var _a2; + if (/\bsecondary rate\b/i.test(error.message)) { + const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; + const wantRetry2 = await emitter.trigger( + "secondary-limit", + retryAfter2, + options2, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0" || (((_a2 = error.response.data) == null ? void 0 : _a2.errors) ?? []).some( + (error2) => error2.type === "RATE_LIMITED" + )) { + const rateLimitReset = new Date( + ~~error.response.headers["x-ratelimit-reset"] * 1e3 + ).getTime(); + const retryAfter2 = Math.max( + // Add one second so we retry _after_ the reset time + // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit + Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, + 0 + ); + const wantRetry2 = await emitter.trigger( + "rate-limit", + retryAfter2, + options2, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + return {}; + }(); + if (wantRetry) { + request2.retryCount++; + return retryAfter * state2.retryAfterBaseValue; + } + }); + octokit.hook.wrap("request", wrapRequest2.bind(null, state)); + return {}; } - -/** - * Format object to Content-Disposition header. - * - * @param {object} obj - * @param {string} obj.type - * @param {object} [obj.parameters] - * @return {string} - * @private - */ - -function format (obj) { - var parameters = obj.parameters - var type = obj.type - - if (!type || typeof type !== 'string' || !TOKEN_REGEXP.test(type)) { - throw new TypeError('invalid type') +var import_light2, regex, triggersNotification, groups, createGroups; +var init_dist_src10 = __esm({ + "node_modules/.pnpm/@octokit+plugin-throttling@8.2.0_@octokit+core@5.2.0/node_modules/@octokit/plugin-throttling/dist-src/index.js"() { + import_light2 = __toESM(require_light()); + init_version7(); + init_wrap_request2(); + init_triggers_notification_paths(); + init_route_matcher(); + regex = routeMatcher(triggers_notification_paths_default); + triggersNotification = regex.test.bind(regex); + groups = {}; + createGroups = function(Bottleneck2, common2) { + groups.global = new Bottleneck2.Group({ + id: "octokit-global", + maxConcurrent: 10, + ...common2 + }); + groups.search = new Bottleneck2.Group({ + id: "octokit-search", + maxConcurrent: 1, + minTime: 2e3, + ...common2 + }); + groups.write = new Bottleneck2.Group({ + id: "octokit-write", + maxConcurrent: 1, + minTime: 1e3, + ...common2 + }); + groups.notifications = new Bottleneck2.Group({ + id: "octokit-notifications", + maxConcurrent: 1, + minTime: 3e3, + ...common2 + }); + }; + throttling.VERSION = VERSION10; + throttling.triggersNotification = triggersNotification; } +}); - // start with normalized type - var string = String(type).toLowerCase() - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - var val = param.substr(-1) === '*' - ? ustring(parameters[param]) - : qstring(parameters[param]) - - string += '; ' + param + '=' + val +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/dist/js-yaml.mjs +function isNothing(subject) { + return typeof subject === "undefined" || subject === null; +} +function isObject(subject) { + return typeof subject === "object" && subject !== null; +} +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + return [sequence]; +} +function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; } } - - return string + return target; } - -/** - * Decode a RFC 5987 field value (gracefully). - * - * @param {string} str - * @return {string} - * @private - */ - -function decodefield (str) { - var match = EXT_VALUE_REGEXP.exec(str) - - if (!match) { - throw new TypeError('invalid extended field value') +function repeat(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; } - - var charset = match[1].toLowerCase() - var encoded = match[2] - var value - - // to binary string - var binary = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode) - - switch (charset) { - case 'iso-8859-1': - value = getlatin1(binary) - break - case 'utf-8': - value = Buffer.from(binary, 'binary').toString('utf8') - break - default: - throw new TypeError('unsupported charset in extended field') + return result; +} +function isNegativeZero(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; +} +function formatError(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; } - - return value + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; } - -/** - * Get ISO-8859-1 version of string. - * - * @param {string} val - * @return {string} - * @private - */ - -function getlatin1 (val) { - // simple Unicode -> ISO-8859-1 transformation - return String(val).replace(NON_LATIN1_REGEXP, '?') +function YAMLException$1(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } } - -/** - * Parse Content-Disposition header string. - * - * @param {string} string - * @return {object} - * @public - */ - -function parse (string) { - if (!string || typeof string !== 'string') { - throw new TypeError('argument string is required') +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; } - - var match = DISPOSITION_TYPE_REGEXP.exec(string) - - if (!match) { - throw new TypeError('invalid type format') + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; } - - // normalize type - var index = match[0].length - var type = match[1].toLowerCase() - - var key - var names = [] - var params = {} - var value - - // calculate index to start at - index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';' - ? index - 1 - : index - - // match parameters - while ((match = PARAM_REGEXP.exec(string))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') - } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (names.indexOf(key) !== -1) { - throw new TypeError('invalid duplicate parameter') - } - - names.push(key) - - if (key.indexOf('*') + 1 === key.length) { - // decode extended value - key = key.slice(0, -1) - value = decodefield(value) - - // overwrite existing value - params[key] = value - continue + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + // relative position + }; +} +function padStart(string, max) { + return common.repeat(" ", max - string.length) + string; +} +function makeSnippet(mark, options2) { + options2 = Object.create(options2 || null); + if (!mark.buffer) return null; + if (!options2.maxLength) options2.maxLength = 79; + if (typeof options2.indent !== "number") options2.indent = 1; + if (typeof options2.linesBefore !== "number") options2.linesBefore = 3; + if (typeof options2.linesAfter !== "number") options2.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; } - - if (typeof params[key] === 'string') { - continue + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options2.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options2.maxLength - (options2.indent + lineNoLength + 3); + for (i = 1; i <= options2.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(" ", options2.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(" ", options2.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common.repeat("-", options2.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options2.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(" ", options2.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + } + return result.replace(/\n$/, ""); +} +function compileStyleAliases(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; +} +function Type$1(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); } - - if (value[0] === '"') { - // remove quotes and escapes - value = value - .substr(1, value.length - 2) - .replace(QESC_REGEXP, '$1') + }); + this.options = options2; + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data) { + return data; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.representName = options2["representName"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.multi = options2["multi"] || false; + this.styleAliases = compileStyleAliases(options2["styleAliases"] || null); + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} +function compileList(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; +} +function compileMap() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; } - - params[key] = value } - - if (index !== -1 && index !== string.length) { - throw new TypeError('invalid parameter format') + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); } - - return new ContentDisposition(type, params) + return result; } - -/** - * Percent decode a single character. - * - * @param {string} str - * @param {string} hex - * @return {string} - * @private - */ - -function pdecode (str, hex) { - return String.fromCharCode(parseInt(hex, 16)) +function Schema$1(definition) { + return this.extend(definition); } - -/** - * Percent encode a single character. - * - * @param {string} char - * @return {string} - * @private - */ - -function pencode (char) { - return '%' + String(char) - .charCodeAt(0) - .toString(16) - .toUpperCase() +function resolveYamlNull(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); } - -/** - * Quote a string for HTTP. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' +function constructYamlNull() { + return null; } - -/** - * Encode a Unicode string for HTTP (RFC 5987). - * - * @param {string} val - * @return {string} - * @private - */ - -function ustring (val) { - var str = String(val) - - // percent encode as UTF-8 - var encoded = encodeURIComponent(str) - .replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode) - - return 'UTF-8\'\'' + encoded +function isNull(object) { + return object === null; } - -/** - * Class for parsed Content-Disposition header for v8 optimization - * - * @public - * @param {string} type - * @param {object} parameters - * @constructor - */ - -function ContentDisposition (type, parameters) { - this.type = type - this.parameters = parameters +function resolveYamlBoolean(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); } - - -/***/ }), - -/***/ 6790: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/*! - * content-type - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1 - * - * parameter = token "=" ( token / quoted-string ) - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE - * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text - * obs-text = %x80-FF - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - */ -var PARAM_REGEXP = /; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g // eslint-disable-line no-control-regex -var TEXT_REGEXP = /^[\u000b\u0020-\u007e\u0080-\u00ff]+$/ // eslint-disable-line no-control-regex -var TOKEN_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * RegExp to match quoted-pair in RFC 7230 sec 3.2.6 - * - * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text ) - * obs-text = %x80-FF - */ -var QESC_REGEXP = /\\([\u000b\u0020-\u00ff])/g // eslint-disable-line no-control-regex - -/** - * RegExp to match chars that must be quoted-pair in RFC 7230 sec 3.2.6 - */ -var QUOTE_REGEXP = /([\\"])/g - -/** - * RegExp to match type in RFC 7231 sec 3.1.1.1 - * - * media-type = type "/" subtype - * type = token - * subtype = token - */ -var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/ - -/** - * Module exports. - * @public - */ - -exports.format = format -exports.parse = parse - -/** - * Format object to media type. - * - * @param {object} obj - * @return {string} - * @public - */ - -function format (obj) { - if (!obj || typeof obj !== 'object') { - throw new TypeError('argument obj is required') - } - - var parameters = obj.parameters - var type = obj.type - - if (!type || !TYPE_REGEXP.test(type)) { - throw new TypeError('invalid type') +function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; +} +function isBoolean(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; +} +function isHexCode(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; +} +function isOctCode(c) { + return 48 <= c && c <= 55; +} +function isDecCode(c) { + return 48 <= c && c <= 57; +} +function resolveYamlInteger(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; } - - var string = type - - // append parameters - if (parameters && typeof parameters === 'object') { - var param - var params = Object.keys(parameters).sort() - - for (var i = 0; i < params.length; i++) { - param = params[i] - - if (!TOKEN_REGEXP.test(param)) { - throw new TypeError('invalid parameter name') + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; } - - string += '; ' + param + '=' + qstring(parameters[param]) + return hasDigits && ch !== "_"; } - } - - return string -} - -/** - * Parse media type to object. - * - * @param {string|object} string - * @return {Object} - * @public - */ - -function parse (string) { - if (!string) { - throw new TypeError('argument string is required') - } - - // support req/res-like objects as argument - var header = typeof string === 'object' - ? getcontenttype(string) - : string - - if (typeof header !== 'string') { - throw new TypeError('argument string is required to be a string') - } - - var index = header.indexOf(';') - var type = index !== -1 - ? header.slice(0, index).trim() - : header.trim() - - if (!TYPE_REGEXP.test(type)) { - throw new TypeError('invalid media type') - } - - var obj = new ContentType(type.toLowerCase()) - - // parse parameters - if (index !== -1) { - var key - var match - var value - - PARAM_REGEXP.lastIndex = index - - while ((match = PARAM_REGEXP.exec(header))) { - if (match.index !== index) { - throw new TypeError('invalid parameter format') + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; } - - index += match[0].length - key = match[1].toLowerCase() - value = match[2] - - if (value.charCodeAt(0) === 0x22 /* " */) { - // remove quotes - value = value.slice(1, -1) - - // remove escapes - if (value.indexOf('\\') !== -1) { - value = value.replace(QESC_REGEXP, '$1') - } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; } - - obj.parameters[key] = value + return hasDigits && ch !== "_"; } - - if (index !== header.length) { - throw new TypeError('invalid parameter format') + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; } + hasDigits = true; } - - return obj + if (!hasDigits || ch === "_") return false; + return true; } - -/** - * Get content-type from req/res objects. - * - * @param {object} - * @return {Object} - * @private - */ - -function getcontenttype (obj) { - var header - - if (typeof obj.getHeader === 'function') { - // res-like - header = obj.getHeader('content-type') - } else if (typeof obj.headers === 'object') { - // req-like - header = obj.headers && obj.headers['content-type'] - } - - if (typeof header !== 'string') { - throw new TypeError('content-type header is missing from object') +function constructYamlInteger(data) { + var value = data, sign2 = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); } - - return header -} - -/** - * Quote a string if necessary. - * - * @param {string} val - * @return {string} - * @private - */ - -function qstring (val) { - var str = String(val) - - // no need to quote tokens - if (TOKEN_REGEXP.test(str)) { - return str + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign2 = -1; + value = value.slice(1); + ch = value[0]; } - - if (str.length > 0 && !TEXT_REGEXP.test(str)) { - throw new TypeError('invalid parameter value') + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign2 * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign2 * parseInt(value.slice(2), 16); + if (value[1] === "o") return sign2 * parseInt(value.slice(2), 8); } - - return '"' + str.replace(QUOTE_REGEXP, '\\$1') + '"' -} - -/** - * Class to represent a content type. - * @private - */ -function ContentType (type) { - this.parameters = Object.create(null) - this.type = type -} - - -/***/ }), - -/***/ 92739: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -/** - * Module dependencies. - */ - -var crypto = __nccwpck_require__(76982); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError("Cookie value must be provided as a string."); - if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError("Signed cookie string must be provided."); - if ('string' != typeof secret) throw new TypeError("Secret string must be provided."); - var str = val.slice(0, val.lastIndexOf('.')) - , mac = exports.sign(str, secret); - - return sha1(mac) == sha1(val) ? str : false; -}; - -/** - * Private - */ - -function sha1(str){ - return crypto.createHash('sha1').update(str).digest('hex'); -} - - -/***/ }), - -/***/ 98248: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; -/*! - * cookie - * Copyright(c) 2012-2014 Roman Shtylman - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -exports.parse = parse; -exports.serialize = serialize; - -/** - * Module variables. - * @private - */ - -var __toString = Object.prototype.toString - -/** - * RegExp to match cookie-name in RFC 6265 sec 4.1.1 - * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2 - * which has been replaced by the token definition in RFC 7230 appendix B. - * - * cookie-name = token - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / - * "*" / "+" / "-" / "." / "^" / "_" / - * "`" / "|" / "~" / DIGIT / ALPHA - */ - -var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; - -/** - * RegExp to match cookie-value in RFC 6265 sec 4.1.1 - * - * 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 - */ - -var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; - -/** - * RegExp to match domain-value in RFC 6265 sec 4.1.1 - * - * domain-value = - * ; defined in [RFC1034], Section 3.5, as - * ; enhanced by [RFC1123], Section 2.1 - * =
- Probot Logo -
-

Use existing Github App

-
- -

Step 1:

-

- Replace your app's Webhook URL with
- ${WEBHOOK_PROXY_URL} -

- - You can do it here - - -
-

Step 2:

-

Fill out this form

-
- -
- - -
- - - -
- - -
-
- -
-

Need help?

- -
-
- - - -`; -} -//# sourceMappingURL=import.js.map - -/***/ }), - -/***/ 39071: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.probotView = probotView; -function probotView({ name, description, version, }) { - return ` - - - - - - ${name || "Your App"} | built with Probot - - - - -
- Probot Logo -
-

- Welcome to ${name || "your Probot App"} -${version - ? ` v${version}\n` - : ""}

- -

${description - ? description - : 'This bot was built using Probot, a framework for building GitHub Apps.'}

-
- -
-

Need help?

- -
-
- -`; -} -//# sourceMappingURL=probot.js.map - -/***/ }), - -/***/ 17550: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.setupView = setupView; -function setupView({ name, description, version, createAppUrl, manifest, }) { - return ` - - - - - - - Setup ${name || "Your App"} | built with Probot - - - - -
- Probot Logo -
-

- Welcome to ${name || "your Probot App"} - ${version - ? `v${version}` - : ""} -

- -

${description - ? description - : 'This app was built using Probot, a framework for building GitHub Apps.'}

- -
-

Getting Started

- -

To start building a GitHub App, you'll need to register a new app on GitHub.

-
- -
- - or use an existing Github App -
-
-
- -
-

Need help?

- -
-
- -`; -} -//# sourceMappingURL=setup.js.map - -/***/ }), - -/***/ 66544: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.successView = successView; -function successView({ name }) { - return ` - - - - - - Setup ${name || "Your App"} | built with Probot - - - - -
- Probot Logo -
-
-

Congrats! You have successfully installed your app! -
- Checkout Receiving webhooks and Interacting with GitHub to learn more!

-
-
- -
-

Need help?

- -
-
- -`; -} -//# sourceMappingURL=success.js.map - -/***/ }), - -/***/ 80197: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * proxy-addr - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = proxyaddr -module.exports.all = alladdrs -module.exports.compile = compile - -/** - * Module dependencies. - * @private - */ - -var forwarded = __nccwpck_require__(31252) -var ipaddr = __nccwpck_require__(54287) - -/** - * Variables. - * @private - */ - -var DIGIT_REGEXP = /^[0-9]+$/ -var isip = ipaddr.isValid -var parseip = ipaddr.parse - -/** - * Pre-defined IP ranges. - * @private - */ - -var IP_RANGES = { - linklocal: ['169.254.0.0/16', 'fe80::/10'], - loopback: ['127.0.0.1/8', '::1/128'], - uniquelocal: ['10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', 'fc00::/7'] -} - -/** - * Get all addresses in the request, optionally stopping - * at the first untrusted. - * - * @param {Object} request - * @param {Function|Array|String} [trust] - * @public - */ - -function alladdrs (req, trust) { - // get addresses - var addrs = forwarded(req) - - if (!trust) { - // Return all addresses - return addrs - } - - if (typeof trust !== 'function') { - trust = compile(trust) - } - - for (var i = 0; i < addrs.length - 1; i++) { - if (trust(addrs[i], i)) continue - - addrs.length = i + 1 - } - - return addrs -} - -/** - * Compile argument into trust function. - * - * @param {Array|String} val - * @private - */ - -function compile (val) { - if (!val) { - throw new TypeError('argument is required') - } - - var trust - - if (typeof val === 'string') { - trust = [val] - } else if (Array.isArray(val)) { - trust = val.slice() - } else { - throw new TypeError('unsupported trust argument') - } - - for (var i = 0; i < trust.length; i++) { - val = trust[i] - - if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { - continue - } - - // Splice in pre-defined range - val = IP_RANGES[val] - trust.splice.apply(trust, [i, 1].concat(val)) - i += val.length - 1 - } - - return compileTrust(compileRangeSubnets(trust)) -} - -/** - * Compile `arr` elements into range subnets. - * - * @param {Array} arr - * @private - */ - -function compileRangeSubnets (arr) { - var rangeSubnets = new Array(arr.length) - - for (var i = 0; i < arr.length; i++) { - rangeSubnets[i] = parseipNotation(arr[i]) - } - - return rangeSubnets -} - -/** - * Compile range subnet array into trust function. - * - * @param {Array} rangeSubnets - * @private - */ - -function compileTrust (rangeSubnets) { - // Return optimized function based on length - var len = rangeSubnets.length - return len === 0 - ? trustNone - : len === 1 - ? trustSingle(rangeSubnets[0]) - : trustMulti(rangeSubnets) -} - -/** - * Parse IP notation string into range subnet. - * - * @param {String} note - * @private - */ - -function parseipNotation (note) { - var pos = note.lastIndexOf('/') - var str = pos !== -1 - ? note.substring(0, pos) - : note - - if (!isip(str)) { - throw new TypeError('invalid IP address: ' + str) - } - - var ip = parseip(str) - - if (pos === -1 && ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) { - // Store as IPv4 - ip = ip.toIPv4Address() - } - - var max = ip.kind() === 'ipv6' - ? 128 - : 32 - - var range = pos !== -1 - ? note.substring(pos + 1, note.length) - : null - - if (range === null) { - range = max - } else if (DIGIT_REGEXP.test(range)) { - range = parseInt(range, 10) - } else if (ip.kind() === 'ipv4' && isip(range)) { - range = parseNetmask(range) - } else { - range = null - } - - if (range <= 0 || range > max) { - throw new TypeError('invalid range on address: ' + note) - } - - return [ip, range] -} - -/** - * Parse netmask string into CIDR range. - * - * @param {String} netmask - * @private - */ - -function parseNetmask (netmask) { - var ip = parseip(netmask) - var kind = ip.kind() - - return kind === 'ipv4' - ? ip.prefixLengthFromSubnetMask() - : null -} - -/** - * Determine address of proxied request. - * - * @param {Object} request - * @param {Function|Array|String} trust - * @public - */ - -function proxyaddr (req, trust) { - if (!req) { - throw new TypeError('req argument is required') - } - - if (!trust) { - throw new TypeError('trust argument is required') - } - - var addrs = alladdrs(req, trust) - var addr = addrs[addrs.length - 1] - - return addr -} - -/** - * Static trust function to trust nothing. - * - * @private - */ - -function trustNone () { - return false -} - -/** - * Compile trust function for multiple subnets. - * - * @param {Array} subnets - * @private - */ - -function trustMulti (subnets) { - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var ipconv - var kind = ip.kind() - - for (var i = 0; i < subnets.length; i++) { - var subnet = subnets[i] - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetrange = subnet[1] - var trusted = ip - - if (kind !== subnetkind) { - if (subnetkind === 'ipv4' && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - continue - } - - if (!ipconv) { - // Convert IP to match subnet IP kind - ipconv = subnetkind === 'ipv4' - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - trusted = ipconv - } - - if (trusted.match(subnetip, subnetrange)) { - return true - } - } - - return false - } -} - -/** - * Compile trust function for single subnet. - * - * @param {Object} subnet - * @private - */ - -function trustSingle (subnet) { - var subnetip = subnet[0] - var subnetkind = subnetip.kind() - var subnetisipv4 = subnetkind === 'ipv4' - var subnetrange = subnet[1] - - return function trust (addr) { - if (!isip(addr)) return false - - var ip = parseip(addr) - var kind = ip.kind() - - if (kind !== subnetkind) { - if (subnetisipv4 && !ip.isIPv4MappedAddress()) { - // Incompatible IP addresses - return false - } - - // Convert IP to match subnet IP kind - ip = subnetisipv4 - ? ip.toIPv4Address() - : ip.toIPv4MappedAddress() - } - - return ip.match(subnetip, subnetrange) - } -} - - -/***/ }), - -/***/ 93608: -/***/ ((module) => { - -"use strict"; - - -var replace = String.prototype.replace; -var percentTwenties = /%20/g; - -var Format = { - RFC1738: 'RFC1738', - RFC3986: 'RFC3986' -}; - -module.exports = { - 'default': Format.RFC3986, - formatters: { - RFC1738: function (value) { - return replace.call(value, percentTwenties, '+'); - }, - RFC3986: function (value) { - return String(value); - } - }, - RFC1738: Format.RFC1738, - RFC3986: Format.RFC3986 -}; - - -/***/ }), - -/***/ 96792: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var stringify = __nccwpck_require__(85973); -var parse = __nccwpck_require__(45547); -var formats = __nccwpck_require__(93608); - -module.exports = { - formats: formats, - parse: parse, - stringify: stringify -}; - - -/***/ }), - -/***/ 45547: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var utils = __nccwpck_require__(47009); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var defaults = { - allowDots: false, - allowEmptyArrays: false, - allowPrototypes: false, - allowSparse: false, - arrayLimit: 20, - charset: 'utf-8', - charsetSentinel: false, - comma: false, - decodeDotInKeys: false, - decoder: utils.decode, - delimiter: '&', - depth: 5, - duplicates: 'combine', - ignoreQueryPrefix: false, - interpretNumericEntities: false, - parameterLimit: 1000, - parseArrays: true, - plainObjects: false, - strictDepth: false, - strictNullHandling: false -}; - -var interpretNumericEntities = function (str) { - return str.replace(/&#(\d+);/g, function ($0, numberStr) { - return String.fromCharCode(parseInt(numberStr, 10)); - }); -}; - -var parseArrayValue = function (val, options) { - if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { - return val.split(','); - } - - return val; -}; - -// This is what browsers will submit when the ✓ character occurs in an -// application/x-www-form-urlencoded body and the encoding of the page containing -// the form is iso-8859-1, or when the submitted form has an accept-charset -// attribute of iso-8859-1. Presumably also with other charsets that do not contain -// the ✓ character, such as us-ascii. -var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') - -// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. -var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') - -var parseValues = function parseQueryStringValues(str, options) { - var obj = { __proto__: null }; - - var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; - cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']'); - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; - var parts = cleanStr.split(options.delimiter, limit); - var skipIndex = -1; // Keep track of where the utf8 sentinel was found - var i; - - var charset = options.charset; - if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf('utf8=') === 0) { - if (parts[i] === charsetSentinel) { - charset = 'utf-8'; - } else if (parts[i] === isoSentinel) { - charset = 'iso-8859-1'; - } - skipIndex = i; - i = parts.length; // The eslint settings do not allow break; - } - } - } - - for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } - var part = parts[i]; - - var bracketEqualsPos = part.indexOf(']='); - var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - - var key, val; - if (pos === -1) { - key = options.decoder(part, defaults.decoder, charset, 'key'); - val = options.strictNullHandling ? null : ''; - } else { - key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); - val = utils.maybeMap( - parseArrayValue(part.slice(pos + 1), options), - function (encodedVal) { - return options.decoder(encodedVal, defaults.decoder, charset, 'value'); - } - ); - } - - if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { - val = interpretNumericEntities(val); - } - - if (part.indexOf('[]=') > -1) { - val = isArray(val) ? [val] : val; - } - - var existing = has.call(obj, key); - if (existing && options.duplicates === 'combine') { - obj[key] = utils.combine(obj[key], val); - } else if (!existing || options.duplicates === 'last') { - obj[key] = val; - } - } - - return obj; -}; - -var parseObject = function (chain, val, options, valuesParsed) { - var leaf = valuesParsed ? val : parseArrayValue(val, options); - - for (var i = chain.length - 1; i >= 0; --i) { - var obj; - var root = chain[i]; - - if (root === '[]' && options.parseArrays) { - obj = options.allowEmptyArrays && (leaf === '' || (options.strictNullHandling && leaf === null)) - ? [] - : [].concat(leaf); - } else { - obj = options.plainObjects ? Object.create(null) : {}; - var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; - var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot; - var index = parseInt(decodedRoot, 10); - if (!options.parseArrays && decodedRoot === '') { - obj = { 0: leaf }; - } else if ( - !isNaN(index) - && root !== decodedRoot - && String(index) === decodedRoot - && index >= 0 - && (options.parseArrays && index <= options.arrayLimit) - ) { - obj = []; - obj[index] = leaf; - } else if (decodedRoot !== '__proto__') { - obj[decodedRoot] = leaf; - } - } - - leaf = obj; - } - - return leaf; -}; - -var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } - - // Transform dot notation to bracket notation - var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - - // The regex chunks - - var brackets = /(\[[^[\]]*])/; - var child = /(\[[^[\]]*])/g; - - // Get the parent - - var segment = options.depth > 0 && brackets.exec(key); - var parent = segment ? key.slice(0, segment.index) : key; - - // Stash the parent if it exists - - var keys = []; - if (parent) { - // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties - if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } - } - - keys.push(parent); - } - - // Loop through children appending to the array until we hit depth - - var i = 0; - while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { - i += 1; - if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } - } - keys.push(segment[1]); - } - - // If there's a remainder, check strictDepth option for throw, else just add whatever is left - - if (segment) { - if (options.strictDepth === true) { - throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true'); - } - keys.push('[' + key.slice(segment.index) + ']'); - } - - return parseObject(keys, val, options, valuesParsed); -}; - -var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') { - throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') { - throw new TypeError('Decoder has to be a function.'); - } - - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; - - var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates; - - if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') { - throw new TypeError('The duplicates option must be either combine, first, or last'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, - allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, - arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, - decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys, - decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, - delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, - // eslint-disable-next-line no-implicit-coercion, no-extra-parens - depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, - duplicates: duplicates, - ignoreQueryPrefix: opts.ignoreQueryPrefix === true, - interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, - parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, - parseArrays: opts.parseArrays !== false, - plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, - strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (str, opts) { - var options = normalizeParseOptions(opts); - - if (str === '' || str === null || typeof str === 'undefined') { - return options.plainObjects ? Object.create(null) : {}; - } - - var tempObj = typeof str === 'string' ? parseValues(str, options) : str; - var obj = options.plainObjects ? Object.create(null) : {}; - - // Iterate over the keys and setup the new object - - var keys = Object.keys(tempObj); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); - obj = utils.merge(obj, newObj, options); - } - - if (options.allowSparse === true) { - return obj; - } - - return utils.compact(obj); -}; - - -/***/ }), - -/***/ 85973: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var getSideChannel = __nccwpck_require__(81779); -var utils = __nccwpck_require__(47009); -var formats = __nccwpck_require__(93608); -var has = Object.prototype.hasOwnProperty; - -var arrayPrefixGenerators = { - brackets: function brackets(prefix) { - return prefix + '[]'; - }, - comma: 'comma', - indices: function indices(prefix, key) { - return prefix + '[' + key + ']'; - }, - repeat: function repeat(prefix) { - return prefix; - } -}; - -var isArray = Array.isArray; -var push = Array.prototype.push; -var pushToArray = function (arr, valueOrArray) { - push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); -}; - -var toISO = Date.prototype.toISOString; - -var defaultFormat = formats['default']; -var defaults = { - addQueryPrefix: false, - allowDots: false, - allowEmptyArrays: false, - arrayFormat: 'indices', - charset: 'utf-8', - charsetSentinel: false, - delimiter: '&', - encode: true, - encodeDotInKeys: false, - encoder: utils.encode, - encodeValuesOnly: false, - format: defaultFormat, - formatter: formats.formatters[defaultFormat], - // deprecated - indices: false, - serializeDate: function serializeDate(date) { - return toISO.call(date); - }, - skipNulls: false, - strictNullHandling: false -}; - -var isNonNullishPrimitive = function isNonNullishPrimitive(v) { - return typeof v === 'string' - || typeof v === 'number' - || typeof v === 'boolean' - || typeof v === 'symbol' - || typeof v === 'bigint'; -}; - -var sentinel = {}; - -var stringify = function stringify( - object, - prefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - sideChannel -) { - var obj = object; - - var tmpSc = sideChannel; - var step = 0; - var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { - // Where object last appeared in the ref tree - var pos = tmpSc.get(object); - step += 1; - if (typeof pos !== 'undefined') { - if (pos === step) { - throw new RangeError('Cyclic object value'); - } else { - findFlag = true; // Break while - } - } - if (typeof tmpSc.get(sentinel) === 'undefined') { - step = 0; - } - } - - if (typeof filter === 'function') { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === 'comma' && isArray(obj)) { - obj = utils.maybeMap(obj, function (value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } - - if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; - } - - obj = ''; - } - - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); - return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; - } - return [formatter(prefix) + '=' + formatter(String(obj))]; - } - - var values = []; - - if (typeof obj === 'undefined') { - return values; - } - - var objKeys; - if (generateArrayPrefix === 'comma' && isArray(obj)) { - // we need to join elements in - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { - var keys = Object.keys(obj); - objKeys = sort ? keys.sort(sort) : keys; - } - - var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix; - - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix; - - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { - return adjustedPrefix + '[]'; - } - - for (var j = 0; j < objKeys.length; ++j) { - var key = objKeys[j]; - var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; - - if (skipNulls && value === null) { - continue; - } - - var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key; - var keyPrefix = isArray(obj) - ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix - : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']'); - - sideChannel.set(object, step); - var valueSideChannel = getSideChannel(); - valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify( - value, - keyPrefix, - generateArrayPrefix, - commaRoundTrip, - allowEmptyArrays, - strictNullHandling, - skipNulls, - encodeDotInKeys, - generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder, - filter, - sort, - allowDots, - serializeDate, - format, - formatter, - encodeValuesOnly, - charset, - valueSideChannel - )); - } - - return values; -}; - -var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - - if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') { - throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided'); - } - - if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') { - throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided'); - } - - if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { - throw new TypeError('Encoder has to be a function.'); - } - - var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { - throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); - } - - var format = formats['default']; - if (typeof opts.format !== 'undefined') { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError('Unknown format option provided.'); - } - format = opts.format; - } - var formatter = formats.formatters[format]; - - var filter = defaults.filter; - if (typeof opts.filter === 'function' || isArray(opts.filter)) { - filter = opts.filter; - } - - var arrayFormat; - if (opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if ('indices' in opts) { - arrayFormat = opts.indices ? 'indices' : 'repeat'; - } else { - arrayFormat = defaults.arrayFormat; - } - - if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { - throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); - } - - var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; - - return { - addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, - allowDots: allowDots, - allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, - arrayFormat: arrayFormat, - charset: charset, - charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, - commaRoundTrip: opts.commaRoundTrip, - delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, - encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, - encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys, - encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, - encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, - filter: filter, - format: format, - formatter: formatter, - serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, - skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, - sort: typeof opts.sort === 'function' ? opts.sort : null, - strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling - }; -}; - -module.exports = function (object, opts) { - var obj = object; - var options = normalizeStringifyOptions(opts); - - var objKeys; - var filter; - - if (typeof options.filter === 'function') { - filter = options.filter; - obj = filter('', obj); - } else if (isArray(options.filter)) { - filter = options.filter; - objKeys = filter; - } - - var keys = []; - - if (typeof obj !== 'object' || obj === null) { - return ''; - } - - var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; - var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip; - - if (!objKeys) { - objKeys = Object.keys(obj); - } - - if (options.sort) { - objKeys.sort(options.sort); - } - - var sideChannel = getSideChannel(); - for (var i = 0; i < objKeys.length; ++i) { - var key = objKeys[i]; - - if (options.skipNulls && obj[key] === null) { - continue; - } - pushToArray(keys, stringify( - obj[key], - key, - generateArrayPrefix, - commaRoundTrip, - options.allowEmptyArrays, - options.strictNullHandling, - options.skipNulls, - options.encodeDotInKeys, - options.encode ? options.encoder : null, - options.filter, - options.sort, - options.allowDots, - options.serializeDate, - options.format, - options.formatter, - options.encodeValuesOnly, - options.charset, - sideChannel - )); - } - - var joined = keys.join(options.delimiter); - var prefix = options.addQueryPrefix === true ? '?' : ''; - - if (options.charsetSentinel) { - if (options.charset === 'iso-8859-1') { - // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark - prefix += 'utf8=%26%2310003%3B&'; - } else { - // encodeURIComponent('✓') - prefix += 'utf8=%E2%9C%93&'; - } - } - - return joined.length > 0 ? prefix + joined : ''; -}; - - -/***/ }), - -/***/ 47009: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var formats = __nccwpck_require__(93608); - -var has = Object.prototype.hasOwnProperty; -var isArray = Array.isArray; - -var hexTable = (function () { - var array = []; - for (var i = 0; i < 256; ++i) { - array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); - } - - return array; -}()); - -var compactQueue = function compactQueue(queue) { - while (queue.length > 1) { - var item = queue.pop(); - var obj = item.obj[item.prop]; - - if (isArray(obj)) { - var compacted = []; - - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== 'undefined') { - compacted.push(obj[j]); - } - } - - item.obj[item.prop] = compacted; - } - } -}; - -var arrayToObject = function arrayToObject(source, options) { - var obj = options && options.plainObjects ? Object.create(null) : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== 'undefined') { - obj[i] = source[i]; - } - } - - return obj; -}; - -var merge = function merge(target, source, options) { - /* eslint no-param-reassign: 0 */ - if (!source) { - return target; - } - - if (typeof source !== 'object') { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } - - return target; - } - - if (!target || typeof target !== 'object') { - return [target].concat(source); - } - - var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } - - if (isArray(target) && isArray(source)) { - source.forEach(function (item, i) { - if (has.call(target, i)) { - var targetItem = target[i]; - if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } - }); - return target; - } - - return Object.keys(source).reduce(function (acc, key) { - var value = source[key]; - - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } - return acc; - }, mergeTarget); -}; - -var assign = function assignSingleSource(target, source) { - return Object.keys(source).reduce(function (acc, key) { - acc[key] = source[key]; - return acc; - }, target); -}; - -var decode = function (str, decoder, charset) { - var strWithoutPlus = str.replace(/\+/g, ' '); - if (charset === 'iso-8859-1') { - // unescape never throws, no try...catch needed: - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } - // utf-8 - try { - return decodeURIComponent(strWithoutPlus); - } catch (e) { - return strWithoutPlus; - } -}; - -var limit = 1024; - -/* eslint operator-linebreak: [2, "before"] */ - -var encode = function encode(str, defaultEncoder, charset, kind, format) { - // This code was originally written by Brian White (mscdex) for the io.js core querystring library. - // It has been adapted here for stricter adherence to RFC 3986 - if (str.length === 0) { - return str; - } - - var string = str; - if (typeof str === 'symbol') { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== 'string') { - string = String(str); - } - - if (charset === 'iso-8859-1') { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { - return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; - }); - } - - var out = ''; - for (var j = 0; j < string.length; j += limit) { - var segment = string.length >= limit ? string.slice(j, j + limit) : string; - var arr = []; - - for (var i = 0; i < segment.length; ++i) { - var c = segment.charCodeAt(i); - if ( - c === 0x2D // - - || c === 0x2E // . - || c === 0x5F // _ - || c === 0x7E // ~ - || (c >= 0x30 && c <= 0x39) // 0-9 - || (c >= 0x41 && c <= 0x5A) // a-z - || (c >= 0x61 && c <= 0x7A) // A-Z - || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) - ) { - arr[arr.length] = segment.charAt(i); - continue; - } - - if (c < 0x80) { - arr[arr.length] = hexTable[c]; - continue; - } - - if (c < 0x800) { - arr[arr.length] = hexTable[0xC0 | (c >> 6)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - if (c < 0xD800 || c >= 0xE000) { - arr[arr.length] = hexTable[0xE0 | (c >> 12)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - continue; - } - - i += 1; - c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF)); - - arr[arr.length] = hexTable[0xF0 | (c >> 18)] - + hexTable[0x80 | ((c >> 12) & 0x3F)] - + hexTable[0x80 | ((c >> 6) & 0x3F)] - + hexTable[0x80 | (c & 0x3F)]; - } - - out += arr.join(''); - } - - return out; -}; - -var compact = function compact(value) { - var queue = [{ obj: { o: value }, prop: 'o' }]; - var refs = []; - - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { - queue.push({ obj: obj, prop: key }); - refs.push(val); - } - } - } - - compactQueue(queue); - - return value; -}; - -var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === '[object RegExp]'; -}; - -var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== 'object') { - return false; - } - - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); -}; - -var combine = function combine(a, b) { - return [].concat(a, b); -}; - -var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); - } - return mapped; - } - return fn(val); -}; - -module.exports = { - arrayToObject: arrayToObject, - assign: assign, - combine: combine, - compact: compact, - decode: decode, - encode: encode, - isBuffer: isBuffer, - isRegExp: isRegExp, - maybeMap: maybeMap, - merge: merge -}; - - -/***/ }), - -/***/ 56698: -/***/ ((module) => { - -"use strict"; - -function tryStringify (o) { - try { return JSON.stringify(o) } catch(e) { return '"[Circular]"' } -} - -module.exports = format - -function format(f, args, opts) { - var ss = (opts && opts.stringify) || tryStringify - var offset = 1 - if (typeof f === 'object' && f !== null) { - var len = args.length + offset - if (len === 1) return f - var objects = new Array(len) - objects[0] = ss(f) - for (var index = 1; index < len; index++) { - objects[index] = ss(args[index]) - } - return objects.join(' ') - } - if (typeof f !== 'string') { - return f - } - var argLen = args.length - if (argLen === 0) return f - var str = '' - var a = 1 - offset - var lastPos = -1 - var flen = (f && f.length) || 0 - for (var i = 0; i < flen;) { - if (f.charCodeAt(i) === 37 && i + 1 < flen) { - lastPos = lastPos > -1 ? lastPos : 0 - switch (f.charCodeAt(i + 1)) { - case 100: // 'd' - case 102: // 'f' - if (a >= argLen) - break - if (args[a] == null) break - if (lastPos < i) - str += f.slice(lastPos, i) - str += Number(args[a]) - lastPos = i + 2 - i++ - break - case 105: // 'i' - if (a >= argLen) - break - if (args[a] == null) break - if (lastPos < i) - str += f.slice(lastPos, i) - str += Math.floor(Number(args[a])) - lastPos = i + 2 - i++ - break - case 79: // 'O' - case 111: // 'o' - case 106: // 'j' - if (a >= argLen) - break - if (args[a] === undefined) break - if (lastPos < i) - str += f.slice(lastPos, i) - var type = typeof args[a] - if (type === 'string') { - str += '\'' + args[a] + '\'' - lastPos = i + 2 - i++ - break - } - if (type === 'function') { - str += args[a].name || '' - lastPos = i + 2 - i++ - break - } - str += ss(args[a]) - lastPos = i + 2 - i++ - break - case 115: // 's' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - str += String(args[a]) - lastPos = i + 2 - i++ - break - case 37: // '%' - if (lastPos < i) - str += f.slice(lastPos, i) - str += '%' - lastPos = i + 2 - i++ - a-- - break - } - ++a - } - ++i - } - if (lastPos === -1) - return f - else if (lastPos < flen) { - str += f.slice(lastPos) - } - - return str -} - - -/***/ }), - -/***/ 86200: -/***/ ((module) => { - -"use strict"; -/*! - * range-parser - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015-2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = rangeParser - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @param {Object} [options] - * @return {Array} - * @public - */ - -function rangeParser (size, str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string') - } - - var index = str.indexOf('=') - - if (index === -1) { - return -2 - } - - // split the range string - var arr = str.slice(index + 1).split(',') - var ranges = [] - - // add ranges type - ranges.type = str.slice(0, index) - - // parse all ranges - for (var i = 0; i < arr.length; i++) { - var range = arr[i].split('-') - var start = parseInt(range[0], 10) - var end = parseInt(range[1], 10) - - // -nnn - if (isNaN(start)) { - start = size - end - end = size - 1 - // nnn- - } else if (isNaN(end)) { - end = size - 1 - } - - // limit last-byte-pos to current length - if (end > size - 1) { - end = size - 1 - } - - // invalid or unsatisifiable - if (isNaN(start) || isNaN(end) || start > end || start < 0) { - continue - } - - // add range - ranges.push({ - start: start, - end: end - }) - } - - if (ranges.length < 1) { - // unsatisifiable - return -1 - } - - return options && options.combine - ? combineRanges(ranges) - : ranges -} - -/** - * Combine overlapping & adjacent ranges. - * @private - */ - -function combineRanges (ranges) { - var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart) - - for (var j = 0, i = 1; i < ordered.length; i++) { - var range = ordered[i] - var current = ordered[j] - - if (range.start > current.end + 1) { - // next range - ordered[++j] = range - } else if (range.end > current.end) { - // extend range - current.end = range.end - current.index = Math.min(current.index, range.index) - } - } - - // trim ordered array - ordered.length = j + 1 - - // generate combined range - var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex) - - // copy ranges type - combined.type = ranges.type - - return combined -} - -/** - * Map function to add index value to ranges. - * @private - */ - -function mapWithIndex (range, index) { - return { - start: range.start, - end: range.end, - index: index - } -} - -/** - * Map function to remove index value from ranges. - * @private - */ - -function mapWithoutIndex (range) { - return { - start: range.start, - end: range.end - } -} - -/** - * Sort function to sort ranges by index. - * @private - */ - -function sortByRangeIndex (a, b) { - return a.index - b.index -} - -/** - * Sort function to sort ranges by start position. - * @private - */ - -function sortByRangeStart (a, b) { - return a.start - b.start -} - - -/***/ }), - -/***/ 90017: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * raw-body - * Copyright(c) 2013-2014 Jonathan Ong - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var asyncHooks = tryRequireAsyncHooks() -var bytes = __nccwpck_require__(59576) -var createError = __nccwpck_require__(24700) -var iconv = __nccwpck_require__(10128) -var unpipe = __nccwpck_require__(63513) - -/** - * Module exports. - * @public - */ - -module.exports = getRawBody - -/** - * Module variables. - * @private - */ - -var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / - -/** - * Get the decoder for a given encoding. - * - * @param {string} encoding - * @private - */ - -function getDecoder (encoding) { - if (!encoding) return null - - try { - return iconv.getDecoder(encoding) - } catch (e) { - // error getting decoder - if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e - - // the encoding was not found - throw createError(415, 'specified encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} - -/** - * Get the raw body of a stream (typically HTTP). - * - * @param {object} stream - * @param {object|string|function} [options] - * @param {function} [callback] - * @public - */ - -function getRawBody (stream, options, callback) { - var done = callback - var opts = options || {} - - // light validation - if (stream === undefined) { - throw new TypeError('argument stream is required') - } else if (typeof stream !== 'object' || stream === null || typeof stream.on !== 'function') { - throw new TypeError('argument stream must be a stream') - } - - if (options === true || typeof options === 'string') { - // short cut for encoding - opts = { - encoding: options - } - } - - if (typeof options === 'function') { - done = options - opts = {} - } - - // validate callback is a function, if provided - if (done !== undefined && typeof done !== 'function') { - throw new TypeError('argument callback must be a function') - } - - // require the callback without promises - if (!done && !global.Promise) { - throw new TypeError('argument callback is required') - } - - // get encoding - var encoding = opts.encoding !== true - ? opts.encoding - : 'utf-8' - - // convert the limit to an integer - var limit = bytes.parse(opts.limit) - - // convert the expected length to an integer - var length = opts.length != null && !isNaN(opts.length) - ? parseInt(opts.length, 10) - : null - - if (done) { - // classic callback style - return readStream(stream, encoding, length, limit, wrap(done)) - } - - return new Promise(function executor (resolve, reject) { - readStream(stream, encoding, length, limit, function onRead (err, buf) { - if (err) return reject(err) - resolve(buf) - }) - }) -} - -/** - * Halt a stream. - * - * @param {Object} stream - * @private - */ - -function halt (stream) { - // unpipe everything from the stream - unpipe(stream) - - // pause stream - if (typeof stream.pause === 'function') { - stream.pause() - } -} - -/** - * Read the data from the stream. - * - * @param {object} stream - * @param {string} encoding - * @param {number} length - * @param {number} limit - * @param {function} callback - * @public - */ - -function readStream (stream, encoding, length, limit, callback) { - var complete = false - var sync = true - - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - return done(createError(413, 'request entity too large', { - expected: length, - length: length, - limit: limit, - type: 'entity.too.large' - })) - } - - // streams1: assert request encoding is buffer. - // streams2+: assert the stream encoding is buffer. - // stream._decoder: streams1 - // state.encoding: streams2 - // state.decoder: streams2, specifically < 0.10.6 - var state = stream._readableState - if (stream._decoder || (state && (state.encoding || state.decoder))) { - // developer error - return done(createError(500, 'stream encoding should not be set', { - type: 'stream.encoding.set' - })) - } - - if (typeof stream.readable !== 'undefined' && !stream.readable) { - return done(createError(500, 'stream is not readable', { - type: 'stream.not.readable' - })) - } - - var received = 0 - var decoder - - try { - decoder = getDecoder(encoding) - } catch (err) { - return done(err) - } - - var buffer = decoder - ? '' - : [] - - // attach listeners - stream.on('aborted', onAborted) - stream.on('close', cleanup) - stream.on('data', onData) - stream.on('end', onEnd) - stream.on('error', onEnd) - - // mark sync section complete - sync = false - - function done () { - var args = new Array(arguments.length) - - // copy arguments - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - - // mark complete - complete = true - - if (sync) { - process.nextTick(invokeCallback) - } else { - invokeCallback() - } - - function invokeCallback () { - cleanup() - - if (args[0]) { - // halt the stream on error - halt(stream) - } - - callback.apply(null, args) - } - } - - function onAborted () { - if (complete) return - - done(createError(400, 'request aborted', { - code: 'ECONNABORTED', - expected: length, - length: length, - received: received, - type: 'request.aborted' - })) - } - - function onData (chunk) { - if (complete) return - - received += chunk.length - - if (limit !== null && received > limit) { - done(createError(413, 'request entity too large', { - limit: limit, - received: received, - type: 'entity.too.large' - })) - } else if (decoder) { - buffer += decoder.write(chunk) - } else { - buffer.push(chunk) - } - } - - function onEnd (err) { - if (complete) return - if (err) return done(err) - - if (length !== null && received !== length) { - done(createError(400, 'request size did not match content length', { - expected: length, - length: length, - received: received, - type: 'request.size.invalid' - })) - } else { - var string = decoder - ? buffer + (decoder.end() || '') - : Buffer.concat(buffer) - done(null, string) - } - } - - function cleanup () { - buffer = null - - stream.removeListener('aborted', onAborted) - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} - -/** - * Try to require async_hooks - * @private - */ - -function tryRequireAsyncHooks () { - try { - return __nccwpck_require__(90290) - } catch (e) { - return {} - } -} - -/** - * Wrap function with async resource, if possible. - * AsyncResource.bind static method backported. - * @private - */ - -function wrap (fn) { - var res - - // create anonymous resource - if (asyncHooks.AsyncResource) { - res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn') - } - - // incompatible node.js - if (!res || !res.runInAsyncScope) { - return fn - } - - // return bound function - return res.runInAsyncScope.bind(res, fn, null) -} - - -/***/ }), - -/***/ 14804: -/***/ ((module) => { - -"use strict"; - - -const codes = {}; - -function createErrorType(code, message, Base) { - if (!Base) { - Base = Error - } - - function getMessage (arg1, arg2, arg3) { - if (typeof message === 'string') { - return message - } else { - return message(arg1, arg2, arg3) - } - } - - class NodeError extends Base { - constructor (arg1, arg2, arg3) { - super(getMessage(arg1, arg2, arg3)); - } - } - - NodeError.prototype.name = Base.name; - NodeError.prototype.code = code; - - codes[code] = NodeError; -} - -// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js -function oneOf(expected, thing) { - if (Array.isArray(expected)) { - const len = expected.length; - expected = expected.map((i) => String(i)); - if (len > 2) { - return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` + - expected[len - 1]; - } else if (len === 2) { - return `one of ${thing} ${expected[0]} or ${expected[1]}`; - } else { - return `of ${thing} ${expected[0]}`; - } - } else { - return `of ${thing} ${String(expected)}`; - } -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith -function startsWith(str, search, pos) { - return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith -function endsWith(str, search, this_len) { - if (this_len === undefined || this_len > str.length) { - this_len = str.length; - } - return str.substring(this_len - search.length, this_len) === search; -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes -function includes(str, search, start) { - if (typeof start !== 'number') { - start = 0; - } - - if (start + search.length > str.length) { - return false; - } else { - return str.indexOf(search, start) !== -1; - } -} - -createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) { - return 'The value "' + value + '" is invalid for option "' + name + '"' -}, TypeError); -createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { - // determiner: 'must be' or 'must not be' - let determiner; - if (typeof expected === 'string' && startsWith(expected, 'not ')) { - determiner = 'must not be'; - expected = expected.replace(/^not /, ''); - } else { - determiner = 'must be'; - } - - let msg; - if (endsWith(name, ' argument')) { - // For cases like 'first argument' - msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`; - } else { - const type = includes(name, '.') ? 'property' : 'argument'; - msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`; - } - - msg += `. Received type ${typeof actual}`; - return msg; -}, TypeError); -createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF'); -createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) { - return 'The ' + name + ' method is not implemented' -}); -createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close'); -createErrorType('ERR_STREAM_DESTROYED', function (name) { - return 'Cannot call ' + name + ' after a stream was destroyed'; -}); -createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times'); -createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable'); -createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end'); -createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError); -createErrorType('ERR_UNKNOWN_ENCODING', function (arg) { - return 'Unknown encoding: ' + arg -}, TypeError); -createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event'); - -module.exports.F = codes; - - -/***/ }), - -/***/ 77591: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - - - -/**/ -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; -/**/ - -module.exports = Duplex; -var Readable = __nccwpck_require__(86437); -var Writable = __nccwpck_require__(38709); -__nccwpck_require__(84070)(Duplex, Readable); -{ - // Allow the keys array to be GC'ed. - var keys = objectKeys(Writable.prototype); - for (var v = 0; v < keys.length; v++) { - var method = keys[v]; - if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; - } -} -function Duplex(options) { - if (!(this instanceof Duplex)) return new Duplex(options); - Readable.call(this, options); - Writable.call(this, options); - this.allowHalfOpen = true; - if (options) { - if (options.readable === false) this.readable = false; - if (options.writable === false) this.writable = false; - if (options.allowHalfOpen === false) { - this.allowHalfOpen = false; - this.once('end', onend); - } - } -} -Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); -Object.defineProperty(Duplex.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -Object.defineProperty(Duplex.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); - -// the no-half-open enforcer -function onend() { - // If the writable side ended, then we're ok. - if (this._writableState.ended) return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(onEndNT, this); -} -function onEndNT(self) { - self.end(); -} -Object.defineProperty(Duplex.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined || this._writableState === undefined) { - return false; - } - return this._readableState.destroyed && this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (this._readableState === undefined || this._writableState === undefined) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - this._writableState.destroyed = value; - } -}); - -/***/ }), - -/***/ 95643: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - - - -module.exports = PassThrough; -var Transform = __nccwpck_require__(81625); -__nccwpck_require__(84070)(PassThrough, Transform); -function PassThrough(options) { - if (!(this instanceof PassThrough)) return new PassThrough(options); - Transform.call(this, options); -} -PassThrough.prototype._transform = function (chunk, encoding, cb) { - cb(null, chunk); -}; - -/***/ }), - -/***/ 86437: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -module.exports = Readable; - -/**/ -var Duplex; -/**/ - -Readable.ReadableState = ReadableState; - -/**/ -var EE = (__nccwpck_require__(24434).EventEmitter); -var EElistenerCount = function EElistenerCount(emitter, type) { - return emitter.listeners(type).length; -}; -/**/ - -/**/ -var Stream = __nccwpck_require__(75451); -/**/ - -var Buffer = (__nccwpck_require__(20181).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} - -/**/ -var debugUtil = __nccwpck_require__(39023); -var debug; -if (debugUtil && debugUtil.debuglog) { - debug = debugUtil.debuglog('stream'); -} else { - debug = function debug() {}; -} -/**/ - -var BufferList = __nccwpck_require__(55344); -var destroyImpl = __nccwpck_require__(30345); -var _require = __nccwpck_require__(46562), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(14804)/* .codes */ .F), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; - -// Lazy loaded to improve the startup performance. -var StringDecoder; -var createReadableStreamAsyncIterator; -var from; -__nccwpck_require__(84070)(Readable, Stream); -var errorOrDestroy = destroyImpl.errorOrDestroy; -var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; -function prependListener(emitter, event, fn) { - // Sadly this is not cacheable as some libraries bundle their own - // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any - // userland ones. NEVER DO THIS. This is here only because this code needs - // to continue to work with older versions of Node.js that do not include - // the prependListener() method. The goal is to eventually remove this hack. - if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; -} -function ReadableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(77591); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream. - // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); - - // A linked list is used to store data chunks instead of an array because the - // linked list can remove elements from the beginning faster than - // array.shift() - this.buffer = new BufferList(); - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = null; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted - // immediately, or on a later tick. We set this to true at first, because - // any actions that shouldn't happen until "later" should generally also - // not happen before the first read call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - this.resumeScheduled = false; - this.paused = true; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; - - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(23252)/* .StringDecoder */ .I); - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} -function Readable(options) { - Duplex = Duplex || __nccwpck_require__(77591); - if (!(this instanceof Readable)) return new Readable(options); - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); - - // legacy - this.readable = true; - if (options) { - if (typeof options.read === 'function') this._read = options.read; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - } - Stream.call(this); -} -Object.defineProperty(Readable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._readableState === undefined) { - return false; - } - return this._readableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._readableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._readableState.destroyed = value; - } -}); -Readable.prototype.destroy = destroyImpl.destroy; -Readable.prototype._undestroy = destroyImpl.undestroy; -Readable.prototype._destroy = function (err, cb) { - cb(err); -}; - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function (chunk, encoding) { - var state = this._readableState; - var skipChunkCheck; - if (!state.objectMode) { - if (typeof chunk === 'string') { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = Buffer.from(chunk, encoding); - encoding = ''; - } - skipChunkCheck = true; - } - } else { - skipChunkCheck = true; - } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function (chunk) { - return readableAddChunk(this, chunk, null, true, false); -}; -function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { - debug('readableAddChunk', chunk); - var state = stream._readableState; - if (chunk === null) { - state.reading = false; - onEofChunk(stream, state); - } else { - var er; - if (!skipChunkCheck) er = chunkInvalid(state, chunk); - if (er) { - errorOrDestroy(stream, er); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (addToFront) { - if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); - } else if (state.ended) { - errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); - } else if (state.destroyed) { - return false; - } else { - state.reading = false; - if (state.decoder && !encoding) { - chunk = state.decoder.write(chunk); - if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); - } else { - addChunk(stream, state, chunk, false); - } - } - } else if (!addToFront) { - state.reading = false; - maybeReadMore(stream, state); - } - } - - // We can push more data if we are below the highWaterMark. - // Also, if we have no data yet, we can stand some more bytes. - // This is to work around cases where hwm=0, such as the repl. - return !state.ended && (state.length < state.highWaterMark || state.length === 0); -} -function addChunk(stream, state, chunk, addToFront) { - if (state.flowing && state.length === 0 && !state.sync) { - state.awaitDrain = 0; - stream.emit('data', chunk); - } else { - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); - if (state.needReadable) emitReadable(stream); - } - maybeReadMore(stream, state); -} -function chunkInvalid(state, chunk) { - var er; - if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); - } - return er; -} -Readable.prototype.isPaused = function () { - return this._readableState.flowing === false; -}; - -// backwards compatibility. -Readable.prototype.setEncoding = function (enc) { - if (!StringDecoder) StringDecoder = (__nccwpck_require__(23252)/* .StringDecoder */ .I); - var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; - - // Iterate over current buffer to convert already stored Buffers: - var p = this._readableState.buffer.head; - var content = ''; - while (p !== null) { - content += decoder.write(p.data); - p = p.next; - } - this._readableState.buffer.clear(); - if (content !== '') this._readableState.buffer.push(content); - this._readableState.length = content.length; - return this; -}; - -// Don't raise the hwm > 1GB -var MAX_HWM = 0x40000000; -function computeNewHighWaterMark(n) { - if (n >= MAX_HWM) { - // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. - n = MAX_HWM; - } else { - // Get the next highest power of 2 to prevent increasing hwm excessively in - // tiny amounts - n--; - n |= n >>> 1; - n |= n >>> 2; - n |= n >>> 4; - n |= n >>> 8; - n |= n >>> 16; - n++; - } - return n; -} - -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function howMuchToRead(n, state) { - if (n <= 0 || state.length === 0 && state.ended) return 0; - if (state.objectMode) return 1; - if (n !== n) { - // Only flow one buffer at a time - if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. - if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough - if (!state.ended) { - state.needReadable = true; - return 0; - } - return state.length; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function (n) { - debug('read', n); - n = parseInt(n, 10); - var state = this._readableState; - var nOrig = n; - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { - debug('read: emitReadable', state.length, state.ended); - if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); - return null; - } - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - - // if we currently have less than the highWaterMark, then also read some - if (state.length === 0 || state.length - n < state.highWaterMark) { - doRead = true; - debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) { - doRead = false; - debug('reading or ended', doRead); - } else if (doRead) { - debug('do read'); - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, - // and we need to re-evaluate how much data we can return to the user. - if (!state.reading) n = howMuchToRead(nOrig, state); - } - var ret; - if (n > 0) ret = fromList(n, state);else ret = null; - if (ret === null) { - state.needReadable = state.length <= state.highWaterMark; - n = 0; - } else { - state.length -= n; - state.awaitDrain = 0; - } - if (state.length === 0) { - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; - - // If we tried to read() past the EOF, then emit end on the next tick. - if (nOrig !== n && state.ended) endReadable(this); - } - if (ret !== null) this.emit('data', ret); - return ret; -}; -function onEofChunk(stream, state) { - debug('onEofChunk'); - if (state.ended) return; - if (state.decoder) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - if (state.sync) { - // if we are sync, wait until next tick to emit the data. - // Otherwise we risk emitting data in the flow() - // the readable code triggers during a read() call - emitReadable(stream); - } else { - // emit 'readable' now to make sure it gets picked up. - state.needReadable = false; - if (!state.emittedReadable) { - state.emittedReadable = true; - emitReadable_(stream); - } - } -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - debug('emitReadable', state.needReadable, state.emittedReadable); - state.needReadable = false; - if (!state.emittedReadable) { - debug('emitReadable', state.flowing); - state.emittedReadable = true; - process.nextTick(emitReadable_, stream); - } -} -function emitReadable_(stream) { - var state = stream._readableState; - debug('emitReadable_', state.destroyed, state.length, state.ended); - if (!state.destroyed && (state.length || state.ended)) { - stream.emit('readable'); - state.emittedReadable = false; - } - - // The stream needs another readable event if - // 1. It is not flowing, as the flow mechanism will take - // care of it. - // 2. It is not ended. - // 3. It is below the highWaterMark, so we can schedule - // another readable later. - state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; - flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(maybeReadMore_, stream, state); - } -} -function maybeReadMore_(stream, state) { - // Attempt to read more data if we should. - // - // The conditions for reading more data are (one of): - // - Not enough data buffered (state.length < state.highWaterMark). The loop - // is responsible for filling the buffer with enough data if such data - // is available. If highWaterMark is 0 and we are not in the flowing mode - // we should _not_ attempt to buffer any extra data. We'll get more data - // when the stream consumer calls read() instead. - // - No data in the buffer, and the stream is in flowing mode. In this mode - // the loop below is responsible for ensuring read() is called. Failing to - // call read here would abort the flow and there's no other mechanism for - // continuing the flow if the stream consumer has just subscribed to the - // 'data' event. - // - // In addition to the above conditions to keep reading data, the following - // conditions prevent the data from being read: - // - The stream has ended (state.ended). - // - There is already a pending 'read' operation (state.reading). This is a - // case where the the stream has called the implementation defined _read() - // method, but they are processing the call asynchronously and have _not_ - // called push() with new data. In this case we skip performing more - // read()s. The execution ends in this method again after the _read() ends - // up calling push() with more data. - while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) { - var len = state.length; - debug('maybeReadMore read 0'); - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function (n) { - errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); -}; -Readable.prototype.pipe = function (dest, pipeOpts) { - var src = this; - var state = this._readableState; - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); - var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); - dest.on('unpipe', onunpipe); - function onunpipe(readable, unpipeInfo) { - debug('onunpipe'); - if (readable === src) { - if (unpipeInfo && unpipeInfo.hasUnpiped === false) { - unpipeInfo.hasUnpiped = true; - cleanup(); - } - } - } - function onend() { - debug('onend'); - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - var cleanedUp = false; - function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', unpipe); - src.removeListener('data', ondata); - cleanedUp = true; - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); - } - src.on('data', ondata); - function ondata(chunk) { - debug('ondata'); - var ret = dest.write(chunk); - debug('dest.write', ret); - if (ret === false) { - // If the user unpiped during `dest.write()`, it is possible - // to get stuck in a permanently paused state if that write - // also returned false. - // => Check whether `dest` is still a piping destination. - if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { - debug('false write response, pause', state.awaitDrain); - state.awaitDrain++; - } - src.pause(); - } - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - debug('onerror', er); - unpipe(); - dest.removeListener('error', onerror); - if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } - - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - debug('onfinish'); - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - function unpipe() { - debug('unpipe'); - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - debug('pipe resume'); - src.resume(); - } - return dest; -}; -function pipeOnDrain(src) { - return function pipeOnDrainFunctionResult() { - var state = src._readableState; - debug('pipeOnDrain', state.awaitDrain); - if (state.awaitDrain) state.awaitDrain--; - if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { - state.flowing = true; - flow(src); - } - }; -} -Readable.prototype.unpipe = function (dest) { - var state = this._readableState; - var unpipeInfo = { - hasUnpiped: false - }; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - if (dest) dest.emit('unpipe', this, unpipeInfo); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; - } - - // try to find the right one. - var index = indexOf(state.pipes, dest); - if (index === -1) return this; - state.pipes.splice(index, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) state.pipes = state.pipes[0]; - dest.emit('unpipe', this, unpipeInfo); - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function (ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - var state = this._readableState; - if (ev === 'data') { - // update readableListening so that resume() may be a no-op - // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; - - // Try start flowing on next tick if stream isn't explicitly paused - if (state.flowing !== false) this.resume(); - } else if (ev === 'readable') { - if (!state.endEmitted && !state.readableListening) { - state.readableListening = state.needReadable = true; - state.flowing = false; - state.emittedReadable = false; - debug('on readable', state.length, state.reading); - if (state.length) { - emitReadable(this); - } else if (!state.reading) { - process.nextTick(nReadingNextTick, this); - } - } - } - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; -Readable.prototype.removeListener = function (ev, fn) { - var res = Stream.prototype.removeListener.call(this, ev, fn); - if (ev === 'readable') { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -Readable.prototype.removeAllListeners = function (ev) { - var res = Stream.prototype.removeAllListeners.apply(this, arguments); - if (ev === 'readable' || ev === undefined) { - // We need to check if there is someone still listening to - // readable and reset the state. However this needs to happen - // after readable has been emitted but before I/O (nextTick) to - // support once('readable', fn) cycles. This means that calling - // resume within the same tick will have no - // effect. - process.nextTick(updateReadableListening, this); - } - return res; -}; -function updateReadableListening(self) { - var state = self._readableState; - state.readableListening = self.listenerCount('readable') > 0; - if (state.resumeScheduled && !state.paused) { - // flowing needs to be set to true now, otherwise - // the upcoming resume will not flow. - state.flowing = true; - - // crude way to check if we should resume - } else if (self.listenerCount('data') > 0) { - self.resume(); - } -} -function nReadingNextTick(self) { - debug('readable nexttick read 0'); - self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function () { - var state = this._readableState; - if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening - // for readable, but we still have to call - // resume() - state.flowing = !state.readableListening; - resume(this, state); - } - state.paused = false; - return this; -}; -function resume(stream, state) { - if (!state.resumeScheduled) { - state.resumeScheduled = true; - process.nextTick(resume_, stream, state); - } -} -function resume_(stream, state) { - debug('resume', state.reading); - if (!state.reading) { - stream.read(0); - } - state.resumeScheduled = false; - stream.emit('resume'); - flow(stream); - if (state.flowing && !state.reading) stream.read(0); -} -Readable.prototype.pause = function () { - debug('call pause flowing=%j', this._readableState.flowing); - if (this._readableState.flowing !== false) { - debug('pause'); - this._readableState.flowing = false; - this.emit('pause'); - } - this._readableState.paused = true; - return this; -}; -function flow(stream) { - var state = stream._readableState; - debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function (stream) { - var _this = this; - var state = this._readableState; - var paused = false; - stream.on('end', function () { - debug('wrapped end'); - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) _this.push(chunk); - } - _this.push(null); - }); - stream.on('data', function (chunk) { - debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); - - // don't skip over falsy values in objectMode - if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (this[i] === undefined && typeof stream[i] === 'function') { - this[i] = function methodWrap(method) { - return function methodWrapReturnFunction() { - return stream[method].apply(stream, arguments); - }; - }(i); - } - } - - // proxy certain important events. - for (var n = 0; n < kProxyEvents.length; n++) { - stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - this._read = function (n) { - debug('wrapped _read', n); - if (paused) { - paused = false; - stream.resume(); - } - }; - return this; -}; -if (typeof Symbol === 'function') { - Readable.prototype[Symbol.asyncIterator] = function () { - if (createReadableStreamAsyncIterator === undefined) { - createReadableStreamAsyncIterator = __nccwpck_require__(69756); - } - return createReadableStreamAsyncIterator(this); - }; -} -Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.highWaterMark; - } -}); -Object.defineProperty(Readable.prototype, 'readableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState && this._readableState.buffer; - } -}); -Object.defineProperty(Readable.prototype, 'readableFlowing', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.flowing; - }, - set: function set(state) { - if (this._readableState) { - this._readableState.flowing = state; - } - } -}); - -// exposed for testing purposes only. -Readable._fromList = fromList; -Object.defineProperty(Readable.prototype, 'readableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._readableState.length; - } -}); - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -// This function is designed to be inlinable, so please take care when making -// changes to the function body. -function fromList(n, state) { - // nothing buffered - if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { - // read it all, truncate the list - if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length); - state.buffer.clear(); - } else { - // read part of list - ret = state.buffer.consume(n, state.decoder); - } - return ret; -} -function endReadable(stream) { - var state = stream._readableState; - debug('endReadable', state.endEmitted); - if (!state.endEmitted) { - state.ended = true; - process.nextTick(endReadableNT, state, stream); - } -} -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); - - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the writable side is ready for autoDestroy as well - var wState = stream._writableState; - if (!wState || wState.autoDestroy && wState.finished) { - stream.destroy(); - } - } - } -} -if (typeof Symbol === 'function') { - Readable.from = function (iterable, opts) { - if (from === undefined) { - from = __nccwpck_require__(69995); - } - return from(Readable, iterable, opts); - }; -} -function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) return i; - } - return -1; -} - -/***/ }), - -/***/ 81625: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - - - -module.exports = Transform; -var _require$codes = (__nccwpck_require__(14804)/* .codes */ .F), - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; -var Duplex = __nccwpck_require__(77591); -__nccwpck_require__(84070)(Transform, Duplex); -function afterTransform(er, data) { - var ts = this._transformState; - ts.transforming = false; - var cb = ts.writecb; - if (cb === null) { - return this.emit('error', new ERR_MULTIPLE_CALLBACK()); - } - ts.writechunk = null; - ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` - this.push(data); - cb(er); - var rs = this._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - this._read(rs.highWaterMark); - } -} -function Transform(options) { - if (!(this instanceof Transform)) return new Transform(options); - Duplex.call(this, options); - this._transformState = { - afterTransform: afterTransform.bind(this), - needTransform: false, - transforming: false, - writecb: null, - writechunk: null, - writeencoding: null - }; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - if (options) { - if (typeof options.transform === 'function') this._transform = options.transform; - if (typeof options.flush === 'function') this._flush = options.flush; - } - - // When the writable side finishes, then flush out anything remaining. - this.on('prefinish', prefinish); -} -function prefinish() { - var _this = this; - if (typeof this._flush === 'function' && !this._readableState.destroyed) { - this._flush(function (er, data) { - done(_this, er, data); - }); - } else { - done(this, null, null); - } -} -Transform.prototype.push = function (chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); -}; -Transform.prototype._write = function (chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function (n) { - var ts = this._transformState; - if (ts.writechunk !== null && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; -Transform.prototype._destroy = function (err, cb) { - Duplex.prototype._destroy.call(this, err, function (err2) { - cb(err2); - }); -}; -function done(stream, er, data) { - if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); - - // TODO(BridgeAR): Write a test for these two error cases - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); - if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); - return stream.push(null); -} - -/***/ }), - -/***/ 38709: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, encoding, cb), and it'll handle all -// the drain event emission and buffering. - - - -module.exports = Writable; - -/* */ -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; - this.next = null; -} - -// It seems a linked list but it is not -// there will be only 2 of these for each stream -function CorkedRequest(state) { - var _this = this; - this.next = null; - this.entry = null; - this.finish = function () { - onCorkedFinish(_this, state); - }; -} -/* */ - -/**/ -var Duplex; -/**/ - -Writable.WritableState = WritableState; - -/**/ -var internalUtil = { - deprecate: __nccwpck_require__(39987) -}; -/**/ - -/**/ -var Stream = __nccwpck_require__(75451); -/**/ - -var Buffer = (__nccwpck_require__(20181).Buffer); -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; -function _uint8ArrayToBuffer(chunk) { - return Buffer.from(chunk); -} -function _isUint8Array(obj) { - return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; -} -var destroyImpl = __nccwpck_require__(30345); -var _require = __nccwpck_require__(46562), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = (__nccwpck_require__(14804)/* .codes */ .F), - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; -var errorOrDestroy = destroyImpl.errorOrDestroy; -__nccwpck_require__(84070)(Writable, Stream); -function nop() {} -function WritableState(options, stream, isDuplex) { - Duplex = Duplex || __nccwpck_require__(77591); - options = options || {}; - - // Duplex streams are both readable and writable, but share - // the same options object. - // However, some cases require setting options to different - // values for the readable and the writable sides of the duplex stream, - // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); - - // if _final has been called - this.finalCalled = false; - - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // has it been destroyed - this.destroyed = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // when true all writes will be buffered until .uncork() call - this.corked = 0; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, because any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function (er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks - // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - - // emit prefinish if the only thing we're waiting for is _write cbs - // This is relevant for synchronous Transform streams - this.prefinished = false; - - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; - - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; - - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; - - // count buffered requests - this.bufferedRequestCount = 0; - - // allocate the first CorkedRequest, there is always - // one allocated and free to use, and we maintain at most two - this.corkedRequestsFree = new CorkedRequest(this); -} -WritableState.prototype.getBuffer = function getBuffer() { - var current = this.bufferedRequest; - var out = []; - while (current) { - out.push(current); - current = current.next; - } - return out; -}; -(function () { - try { - Object.defineProperty(WritableState.prototype, 'buffer', { - get: internalUtil.deprecate(function writableStateBufferGetter() { - return this.getBuffer(); - }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') - }); - } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, -// whose prototype chain only points to Readable. -var realHasInstance; -if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { - realHasInstance = Function.prototype[Symbol.hasInstance]; - Object.defineProperty(Writable, Symbol.hasInstance, { - value: function value(object) { - if (realHasInstance.call(this, object)) return true; - if (this !== Writable) return false; - return object && object._writableState instanceof WritableState; - } - }); -} else { - realHasInstance = function realHasInstance(object) { - return object instanceof this; - }; -} -function Writable(options) { - Duplex = Duplex || __nccwpck_require__(77591); - - // Writable ctor is applied to Duplexes, too. - // `realHasInstance` is necessary because using plain `instanceof` - // would return false, as no `_writableState` property is attached. - - // Trying to use the custom `instanceof` for Writable here will also break the - // Node.js LazyTransform implementation, which has a non-trivial getter for - // `_writableState` that would lead to infinite recursion. - - // Checking for a Stream.Duplex instance is faster here instead of inside - // the WritableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); - - // legacy. - this.writable = true; - if (options) { - if (typeof options.write === 'function') this._write = options.write; - if (typeof options.writev === 'function') this._writev = options.writev; - if (typeof options.destroy === 'function') this._destroy = options.destroy; - if (typeof options.final === 'function') this._final = options.final; - } - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function () { - errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); -}; -function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb - errorOrDestroy(stream, er); - process.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular -// mode the stream is in. Currently this means that `null` is never accepted -// and undefined/non-string values are only allowed in object mode. -function validChunk(stream, state, chunk, cb) { - var er; - if (chunk === null) { - er = new ERR_STREAM_NULL_VALUES(); - } else if (typeof chunk !== 'string' && !state.objectMode) { - er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); - } - if (er) { - errorOrDestroy(stream, er); - process.nextTick(cb, er); - return false; - } - return true; -} -Writable.prototype.write = function (chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - var isBuf = !state.objectMode && _isUint8Array(chunk); - if (isBuf && !Buffer.isBuffer(chunk)) { - chunk = _uint8ArrayToBuffer(chunk); - } - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; - if (typeof cb !== 'function') cb = nop; - if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { - state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); - } - return ret; -}; -Writable.prototype.cork = function () { - this._writableState.corked++; -}; -Writable.prototype.uncork = function () { - var state = this._writableState; - if (state.corked) { - state.corked--; - if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); - } -}; -Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { - // node::ParseEncoding() requires lower case. - if (typeof encoding === 'string') encoding = encoding.toLowerCase(); - if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding); - this._writableState.defaultEncoding = encoding; - return this; -}; -Object.defineProperty(Writable.prototype, 'writableBuffer', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState && this._writableState.getBuffer(); - } -}); -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = Buffer.from(chunk, encoding); - } - return chunk; -} -Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.highWaterMark; - } -}); - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { - if (!isBuf) { - var newChunk = decodeChunk(state, chunk, encoding); - if (chunk !== newChunk) { - isBuf = true; - encoding = 'buffer'; - chunk = newChunk; - } - } - var len = state.objectMode ? 1 : chunk.length; - state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. - if (!ret) state.needDrain = true; - if (state.writing || state.corked) { - var last = state.lastBufferedRequest; - state.lastBufferedRequest = { - chunk: chunk, - encoding: encoding, - isBuf: isBuf, - callback: cb, - next: null - }; - if (last) { - last.next = state.lastBufferedRequest; - } else { - state.bufferedRequest = state.lastBufferedRequest; - } - state.bufferedRequestCount += 1; - } else { - doWrite(stream, state, false, len, chunk, encoding, cb); - } - return ret; -} -function doWrite(stream, state, writev, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} -function onwriteError(stream, state, sync, er, cb) { - --state.pendingcb; - if (sync) { - // defer the callback if we are being called synchronously - // to avoid piling up things on the stack - process.nextTick(cb, er); - // this can emit finish, and it will always happen - // after error - process.nextTick(finishMaybe, stream, state); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - } else { - // the caller expect this to happen before if - // it is async - cb(er); - stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - // this can emit finish, but finish must - // always follow error - finishMaybe(stream, state); - } -} -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK(); - onwriteStateUpdate(state); - if (er) onwriteError(stream, state, sync, er, cb);else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(state) || stream.destroyed; - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { - clearBuffer(stream, state); - } - if (sync) { - process.nextTick(afterWrite, stream, state, finished, cb); - } else { - afterWrite(stream, state, finished, cb); - } - } -} -function afterWrite(stream, state, finished, cb) { - if (!finished) onwriteDrain(stream, state); - state.pendingcb--; - cb(); - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - var entry = state.bufferedRequest; - if (stream._writev && entry && entry.next) { - // Fast case, write everything using _writev() - var l = state.bufferedRequestCount; - var buffer = new Array(l); - var holder = state.corkedRequestsFree; - holder.entry = entry; - var count = 0; - var allBuffers = true; - while (entry) { - buffer[count] = entry; - if (!entry.isBuf) allBuffers = false; - entry = entry.next; - count += 1; - } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - - // doWrite is almost always async, defer these to save a bit of time - // as the hot path ends with doWrite - state.pendingcb++; - state.lastBufferedRequest = null; - if (holder.next) { - state.corkedRequestsFree = holder.next; - holder.next = null; - } else { - state.corkedRequestsFree = new CorkedRequest(state); - } - state.bufferedRequestCount = 0; - } else { - // Slow case, write chunks one-by-one - while (entry) { - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - doWrite(stream, state, false, len, chunk, encoding, cb); - entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - break; - } - } - if (entry === null) state.lastBufferedRequest = null; - } - state.bufferedRequest = entry; - state.bufferProcessing = false; -} -Writable.prototype._write = function (chunk, encoding, cb) { - cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); -}; -Writable.prototype._writev = null; -Writable.prototype.end = function (chunk, encoding, cb) { - var state = this._writableState; - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - - // .end() fully uncorks - if (state.corked) { - state.corked = 1; - this.uncork(); - } - - // ignore unnecessary end() calls. - if (!state.ending) endWritable(this, state, cb); - return this; -}; -Object.defineProperty(Writable.prototype, 'writableLength', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - return this._writableState.length; - } -}); -function needFinish(state) { - return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; -} -function callFinal(stream, state) { - stream._final(function (err) { - state.pendingcb--; - if (err) { - errorOrDestroy(stream, err); - } - state.prefinished = true; - stream.emit('prefinish'); - finishMaybe(stream, state); - }); -} -function prefinish(stream, state) { - if (!state.prefinished && !state.finalCalled) { - if (typeof stream._final === 'function' && !state.destroyed) { - state.pendingcb++; - state.finalCalled = true; - process.nextTick(callFinal, stream, state); - } else { - state.prefinished = true; - stream.emit('prefinish'); - } - } -} -function finishMaybe(stream, state) { - var need = needFinish(state); - if (need) { - prefinish(stream, state); - if (state.pendingcb === 0) { - state.finished = true; - stream.emit('finish'); - if (state.autoDestroy) { - // In case of duplex streams we need a way to detect - // if the readable side is ready for autoDestroy as well - var rState = stream._readableState; - if (!rState || rState.autoDestroy && rState.endEmitted) { - stream.destroy(); - } - } - } - } - return need; -} -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) process.nextTick(cb);else stream.once('finish', cb); - } - state.ended = true; - stream.writable = false; -} -function onCorkedFinish(corkReq, state, err) { - var entry = corkReq.entry; - corkReq.entry = null; - while (entry) { - var cb = entry.callback; - state.pendingcb--; - cb(err); - entry = entry.next; - } - - // reuse the free corkReq. - state.corkedRequestsFree.next = corkReq; -} -Object.defineProperty(Writable.prototype, 'destroyed', { - // making it explicit this property is not enumerable - // because otherwise some prototype manipulation in - // userland will fail - enumerable: false, - get: function get() { - if (this._writableState === undefined) { - return false; - } - return this._writableState.destroyed; - }, - set: function set(value) { - // we ignore the value if the stream - // has not been initialized yet - if (!this._writableState) { - return; - } - - // backward compatibility, the user is explicitly - // managing destroyed - this._writableState.destroyed = value; - } -}); -Writable.prototype.destroy = destroyImpl.destroy; -Writable.prototype._undestroy = destroyImpl.undestroy; -Writable.prototype._destroy = function (err, cb) { - cb(err); -}; - -/***/ }), - -/***/ 69756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var finished = __nccwpck_require__(18951); -var kLastResolve = Symbol('lastResolve'); -var kLastReject = Symbol('lastReject'); -var kError = Symbol('error'); -var kEnded = Symbol('ended'); -var kLastPromise = Symbol('lastPromise'); -var kHandlePromise = Symbol('handlePromise'); -var kStream = Symbol('stream'); -function createIterResult(value, done) { - return { - value: value, - done: done - }; -} -function readAndResolve(iter) { - var resolve = iter[kLastResolve]; - if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null - // we can be expecting either 'end' or - // 'error' - if (data !== null) { - iter[kLastPromise] = null; - iter[kLastResolve] = null; - iter[kLastReject] = null; - resolve(createIterResult(data, false)); - } - } -} -function onReadable(iter) { - // we wait for the next tick, because it might - // emit an error with process.nextTick - process.nextTick(readAndResolve, iter); -} -function wrapForNext(lastPromise, iter) { - return function (resolve, reject) { - lastPromise.then(function () { - if (iter[kEnded]) { - resolve(createIterResult(undefined, true)); - return; - } - iter[kHandlePromise](resolve, reject); - }, reject); - }; -} -var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); -var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { - get stream() { - return this[kStream]; - }, - next: function next() { - var _this = this; - // if we have detected an error in the meanwhile - // reject straight away - var error = this[kError]; - if (error !== null) { - return Promise.reject(error); - } - if (this[kEnded]) { - return Promise.resolve(createIterResult(undefined, true)); - } - if (this[kStream].destroyed) { - // We need to defer via nextTick because if .destroy(err) is - // called, the error will be emitted via nextTick, and - // we cannot guarantee that there is no error lingering around - // waiting to be emitted. - return new Promise(function (resolve, reject) { - process.nextTick(function () { - if (_this[kError]) { - reject(_this[kError]); - } else { - resolve(createIterResult(undefined, true)); - } - }); - }); - } - - // if we have multiple next() calls - // we will wait for the previous Promise to finish - // this logic is optimized to support for await loops, - // where next() is only called once at a time - var lastPromise = this[kLastPromise]; - var promise; - if (lastPromise) { - promise = new Promise(wrapForNext(lastPromise, this)); - } else { - // fast path needed to support multiple this.push() - // without triggering the next() queue - var data = this[kStream].read(); - if (data !== null) { - return Promise.resolve(createIterResult(data, false)); - } - promise = new Promise(this[kHandlePromise]); - } - this[kLastPromise] = promise; - return promise; - } -}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () { - return this; -}), _defineProperty(_Object$setPrototypeO, "return", function _return() { - var _this2 = this; - // destroy(err, cb) is a private API - // we can guarantee we have that here, because we control the - // Readable class this is attached to - return new Promise(function (resolve, reject) { - _this2[kStream].destroy(null, function (err) { - if (err) { - reject(err); - return; - } - resolve(createIterResult(undefined, true)); - }); - }); -}), _Object$setPrototypeO), AsyncIteratorPrototype); -var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { - var _Object$create; - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { - value: stream, - writable: true - }), _defineProperty(_Object$create, kLastResolve, { - value: null, - writable: true - }), _defineProperty(_Object$create, kLastReject, { - value: null, - writable: true - }), _defineProperty(_Object$create, kError, { - value: null, - writable: true - }), _defineProperty(_Object$create, kEnded, { - value: stream._readableState.endEmitted, - writable: true - }), _defineProperty(_Object$create, kHandlePromise, { - value: function value(resolve, reject) { - var data = iterator[kStream].read(); - if (data) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(data, false)); - } else { - iterator[kLastResolve] = resolve; - iterator[kLastReject] = reject; - } - }, - writable: true - }), _Object$create)); - iterator[kLastPromise] = null; - finished(stream, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise - // returned by next() and store the error - if (reject !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - reject(err); - } - iterator[kError] = err; - return; - } - var resolve = iterator[kLastResolve]; - if (resolve !== null) { - iterator[kLastPromise] = null; - iterator[kLastResolve] = null; - iterator[kLastReject] = null; - resolve(createIterResult(undefined, true)); - } - iterator[kEnded] = true; - }); - stream.on('readable', onReadable.bind(null, iterator)); - return iterator; -}; -module.exports = createReadableStreamAsyncIterator; - -/***/ }), - -/***/ 55344: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var _require = __nccwpck_require__(20181), - Buffer = _require.Buffer; -var _require2 = __nccwpck_require__(39023), - inspect = _require2.inspect; -var custom = inspect && inspect.custom || 'inspect'; -function copyBuffer(src, target, offset) { - Buffer.prototype.copy.call(src, target, offset); -} -module.exports = /*#__PURE__*/function () { - function BufferList() { - _classCallCheck(this, BufferList); - this.head = null; - this.tail = null; - this.length = 0; - } - _createClass(BufferList, [{ - key: "push", - value: function push(v) { - var entry = { - data: v, - next: null - }; - if (this.length > 0) this.tail.next = entry;else this.head = entry; - this.tail = entry; - ++this.length; - } - }, { - key: "unshift", - value: function unshift(v) { - var entry = { - data: v, - next: this.head - }; - if (this.length === 0) this.tail = entry; - this.head = entry; - ++this.length; - } - }, { - key: "shift", - value: function shift() { - if (this.length === 0) return; - var ret = this.head.data; - if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; - --this.length; - return ret; - } - }, { - key: "clear", - value: function clear() { - this.head = this.tail = null; - this.length = 0; - } - }, { - key: "join", - value: function join(s) { - if (this.length === 0) return ''; - var p = this.head; - var ret = '' + p.data; - while (p = p.next) ret += s + p.data; - return ret; - } - }, { - key: "concat", - value: function concat(n) { - if (this.length === 0) return Buffer.alloc(0); - var ret = Buffer.allocUnsafe(n >>> 0); - var p = this.head; - var i = 0; - while (p) { - copyBuffer(p.data, ret, i); - i += p.data.length; - p = p.next; - } - return ret; - } - - // Consumes a specified amount of bytes or characters from the buffered data. - }, { - key: "consume", - value: function consume(n, hasStrings) { - var ret; - if (n < this.head.data.length) { - // `slice` is the same for buffers and strings. - ret = this.head.data.slice(0, n); - this.head.data = this.head.data.slice(n); - } else if (n === this.head.data.length) { - // First chunk is a perfect match. - ret = this.shift(); - } else { - // Result spans more than one buffer. - ret = hasStrings ? this._getString(n) : this._getBuffer(n); - } - return ret; - } - }, { - key: "first", - value: function first() { - return this.head.data; - } - - // Consumes a specified amount of characters from the buffered data. - }, { - key: "_getString", - value: function _getString(n) { - var p = this.head; - var c = 1; - var ret = p.data; - n -= ret.length; - while (p = p.next) { - var str = p.data; - var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str;else ret += str.slice(0, n); - n -= nb; - if (n === 0) { - if (nb === str.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = str.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Consumes a specified amount of bytes from the buffered data. - }, { - key: "_getBuffer", - value: function _getBuffer(n) { - var ret = Buffer.allocUnsafe(n); - var p = this.head; - var c = 1; - p.data.copy(ret); - n -= p.data.length; - while (p = p.next) { - var buf = p.data; - var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); - n -= nb; - if (n === 0) { - if (nb === buf.length) { - ++c; - if (p.next) this.head = p.next;else this.head = this.tail = null; - } else { - this.head = p; - p.data = buf.slice(nb); - } - break; - } - ++c; - } - this.length -= c; - return ret; - } - - // Make sure the linked list only shows the minimal necessary information. - }, { - key: custom, - value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { - // Only inspect one level. - depth: 0, - // It should not recurse. - customInspect: false - })); - } - }]); - return BufferList; -}(); - -/***/ }), - -/***/ 30345: -/***/ ((module) => { - -"use strict"; - - -// undocumented cb() API, needed for core, not for public API -function destroy(err, cb) { - var _this = this; - var readableDestroyed = this._readableState && this._readableState.destroyed; - var writableDestroyed = this._writableState && this._writableState.destroyed; - if (readableDestroyed || writableDestroyed) { - if (cb) { - cb(err); - } else if (err) { - if (!this._writableState) { - process.nextTick(emitErrorNT, this, err); - } else if (!this._writableState.errorEmitted) { - this._writableState.errorEmitted = true; - process.nextTick(emitErrorNT, this, err); - } - } - return this; - } - - // we set destroyed to true before firing error callbacks in order - // to make it re-entrance safe in case destroy() is called within callbacks - - if (this._readableState) { - this._readableState.destroyed = true; - } - - // if this is a duplex stream mark the writable part as destroyed as well - if (this._writableState) { - this._writableState.destroyed = true; - } - this._destroy(err || null, function (err) { - if (!cb && err) { - if (!_this._writableState) { - process.nextTick(emitErrorAndCloseNT, _this, err); - } else if (!_this._writableState.errorEmitted) { - _this._writableState.errorEmitted = true; - process.nextTick(emitErrorAndCloseNT, _this, err); - } else { - process.nextTick(emitCloseNT, _this); - } - } else if (cb) { - process.nextTick(emitCloseNT, _this); - cb(err); - } else { - process.nextTick(emitCloseNT, _this); - } - }); - return this; -} -function emitErrorAndCloseNT(self, err) { - emitErrorNT(self, err); - emitCloseNT(self); -} -function emitCloseNT(self) { - if (self._writableState && !self._writableState.emitClose) return; - if (self._readableState && !self._readableState.emitClose) return; - self.emit('close'); -} -function undestroy() { - if (this._readableState) { - this._readableState.destroyed = false; - this._readableState.reading = false; - this._readableState.ended = false; - this._readableState.endEmitted = false; - } - if (this._writableState) { - this._writableState.destroyed = false; - this._writableState.ended = false; - this._writableState.ending = false; - this._writableState.finalCalled = false; - this._writableState.prefinished = false; - this._writableState.finished = false; - this._writableState.errorEmitted = false; - } -} -function emitErrorNT(self, err) { - self.emit('error', err); -} -function errorOrDestroy(stream, err) { - // We have tests that rely on errors being emitted - // in the same tick, so changing this is semver major. - // For now when you opt-in to autoDestroy we allow - // the error to be emitted nextTick. In a future - // semver major update we should change the default to this. - - var rState = stream._readableState; - var wState = stream._writableState; - if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); -} -module.exports = { - destroy: destroy, - undestroy: undestroy, - errorOrDestroy: errorOrDestroy -}; - -/***/ }), - -/***/ 18951: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Ported from https://github.com/mafintosh/end-of-stream with -// permission from the author, Mathias Buus (@mafintosh). - - - -var ERR_STREAM_PREMATURE_CLOSE = (__nccwpck_require__(14804)/* .codes */ .F).ERR_STREAM_PREMATURE_CLOSE; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - callback.apply(this, args); - }; -} -function noop() {} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function eos(stream, opts, callback) { - if (typeof opts === 'function') return eos(stream, null, opts); - if (!opts) opts = {}; - callback = once(callback || noop); - var readable = opts.readable || opts.readable !== false && stream.readable; - var writable = opts.writable || opts.writable !== false && stream.writable; - var onlegacyfinish = function onlegacyfinish() { - if (!stream.writable) onfinish(); - }; - var writableEnded = stream._writableState && stream._writableState.finished; - var onfinish = function onfinish() { - writable = false; - writableEnded = true; - if (!readable) callback.call(stream); - }; - var readableEnded = stream._readableState && stream._readableState.endEmitted; - var onend = function onend() { - readable = false; - readableEnded = true; - if (!writable) callback.call(stream); - }; - var onerror = function onerror(err) { - callback.call(stream, err); - }; - var onclose = function onclose() { - var err; - if (readable && !readableEnded) { - if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - if (writable && !writableEnded) { - if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); - return callback.call(stream, err); - } - }; - var onrequest = function onrequest() { - stream.req.on('finish', onfinish); - }; - if (isRequest(stream)) { - stream.on('complete', onfinish); - stream.on('abort', onclose); - if (stream.req) onrequest();else stream.on('request', onrequest); - } else if (writable && !stream._writableState) { - // legacy streams - stream.on('end', onlegacyfinish); - stream.on('close', onlegacyfinish); - } - stream.on('end', onend); - stream.on('finish', onfinish); - if (opts.error !== false) stream.on('error', onerror); - stream.on('close', onclose); - return function () { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('end', onend); - stream.removeListener('error', onerror); - stream.removeListener('close', onclose); - }; -} -module.exports = eos; - -/***/ }), - -/***/ 69995: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } -var ERR_INVALID_ARG_TYPE = (__nccwpck_require__(14804)/* .codes */ .F).ERR_INVALID_ARG_TYPE; -function from(Readable, iterable, opts) { - var iterator; - if (iterable && typeof iterable.next === 'function') { - iterator = iterable; - } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); - var readable = new Readable(_objectSpread({ - objectMode: true - }, opts)); - // Reading boolean to protect against _read - // being called before last iteration completion. - var reading = false; - readable._read = function () { - if (!reading) { - reading = true; - next(); - } - }; - function next() { - return _next2.apply(this, arguments); - } - function _next2() { - _next2 = _asyncToGenerator(function* () { - try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; - if (done) { - readable.push(null); - } else if (readable.push(yield value)) { - next(); - } else { - reading = false; - } - } catch (err) { - readable.destroy(err); - } - }); - return _next2.apply(this, arguments); - } - return readable; -} -module.exports = from; - - -/***/ }), - -/***/ 42165: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Ported from https://github.com/mafintosh/pump with -// permission from the author, Mathias Buus (@mafintosh). - - - -var eos; -function once(callback) { - var called = false; - return function () { - if (called) return; - called = true; - callback.apply(void 0, arguments); - }; -} -var _require$codes = (__nccwpck_require__(14804)/* .codes */ .F), - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; -function noop(err) { - // Rethrow the error if it exists to avoid swallowing it - if (err) throw err; -} -function isRequest(stream) { - return stream.setHeader && typeof stream.abort === 'function'; -} -function destroyer(stream, reading, writing, callback) { - callback = once(callback); - var closed = false; - stream.on('close', function () { - closed = true; - }); - if (eos === undefined) eos = __nccwpck_require__(18951); - eos(stream, { - readable: reading, - writable: writing - }, function (err) { - if (err) return callback(err); - closed = true; - callback(); - }); - var destroyed = false; - return function (err) { - if (closed) return; - if (destroyed) return; - destroyed = true; - - // request.destroy just do .end - .abort is what we want - if (isRequest(stream)) return stream.abort(); - if (typeof stream.destroy === 'function') return stream.destroy(); - callback(err || new ERR_STREAM_DESTROYED('pipe')); - }; -} -function call(fn) { - fn(); -} -function pipe(from, to) { - return from.pipe(to); -} -function popCallback(streams) { - if (!streams.length) return noop; - if (typeof streams[streams.length - 1] !== 'function') return noop; - return streams.pop(); -} -function pipeline() { - for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { - streams[_key] = arguments[_key]; - } - var callback = popCallback(streams); - if (Array.isArray(streams[0])) streams = streams[0]; - if (streams.length < 2) { - throw new ERR_MISSING_ARGS('streams'); - } - var error; - var destroys = streams.map(function (stream, i) { - var reading = i < streams.length - 1; - var writing = i > 0; - return destroyer(stream, reading, writing, function (err) { - if (!error) error = err; - if (err) destroys.forEach(call); - if (reading) return; - destroys.forEach(call); - callback(error); - }); - }); - return streams.reduce(pipe); -} -module.exports = pipeline; - -/***/ }), - -/***/ 46562: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var ERR_INVALID_OPT_VALUE = (__nccwpck_require__(14804)/* .codes */ .F).ERR_INVALID_OPT_VALUE; -function highWaterMarkFrom(options, isDuplex, duplexKey) { - return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; -} -function getHighWaterMark(state, options, duplexKey, isDuplex) { - var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); - if (hwm != null) { - if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { - var name = isDuplex ? duplexKey : 'highWaterMark'; - throw new ERR_INVALID_OPT_VALUE(name, hwm); - } - return Math.floor(hwm); - } - - // Default value - return state.objectMode ? 16 : 16 * 1024; -} -module.exports = { - getHighWaterMark: getHighWaterMark -}; - -/***/ }), - -/***/ 75451: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(2203); - - -/***/ }), - -/***/ 81643: -/***/ ((module, exports, __nccwpck_require__) => { - -var Stream = __nccwpck_require__(2203); -if (process.env.READABLE_STREAM === 'disable' && Stream) { - module.exports = Stream.Readable; - Object.assign(module.exports, Stream); - module.exports.Stream = Stream; -} else { - exports = module.exports = __nccwpck_require__(86437); - exports.Stream = Stream || exports; - exports.Readable = exports; - exports.Writable = __nccwpck_require__(38709); - exports.Duplex = __nccwpck_require__(77591); - exports.Transform = __nccwpck_require__(81625); - exports.PassThrough = __nccwpck_require__(95643); - exports.finished = __nccwpck_require__(18951); - exports.pipeline = __nccwpck_require__(42165); -} - - -/***/ }), - -/***/ 48287: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Errors = process.version.charCodeAt(1) < 55 && process.version.charCodeAt(2) === 46 - ? __nccwpck_require__(3554) // Node.js < 7 - : __nccwpck_require__(74144) - -module.exports = Errors - - -/***/ }), - -/***/ 74144: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(42613) - -class RedisError extends Error { - get name () { - return this.constructor.name - } -} - -class ParserError extends RedisError { - constructor (message, buffer, offset) { - assert(buffer) - assert.strictEqual(typeof offset, 'number') - - const tmp = Error.stackTraceLimit - Error.stackTraceLimit = 2 - super(message) - Error.stackTraceLimit = tmp - this.offset = offset - this.buffer = buffer - } - - get name () { - return this.constructor.name - } -} - -class ReplyError extends RedisError { - constructor (message) { - const tmp = Error.stackTraceLimit - Error.stackTraceLimit = 2 - super(message) - Error.stackTraceLimit = tmp - } - get name () { - return this.constructor.name - } -} - -class AbortError extends RedisError { - get name () { - return this.constructor.name - } -} - -class InterruptError extends AbortError { - get name () { - return this.constructor.name - } -} - -module.exports = { - RedisError, - ParserError, - ReplyError, - AbortError, - InterruptError -} - - -/***/ }), - -/***/ 3554: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(42613) -const util = __nccwpck_require__(39023) - -// RedisError - -function RedisError (message) { - Object.defineProperty(this, 'message', { - value: message || '', - configurable: true, - writable: true - }) - Error.captureStackTrace(this, this.constructor) -} - -util.inherits(RedisError, Error) - -Object.defineProperty(RedisError.prototype, 'name', { - value: 'RedisError', - configurable: true, - writable: true -}) - -// ParserError - -function ParserError (message, buffer, offset) { - assert(buffer) - assert.strictEqual(typeof offset, 'number') - - Object.defineProperty(this, 'message', { - value: message || '', - configurable: true, - writable: true - }) - - const tmp = Error.stackTraceLimit - Error.stackTraceLimit = 2 - Error.captureStackTrace(this, this.constructor) - Error.stackTraceLimit = tmp - this.offset = offset - this.buffer = buffer -} - -util.inherits(ParserError, RedisError) - -Object.defineProperty(ParserError.prototype, 'name', { - value: 'ParserError', - configurable: true, - writable: true -}) - -// ReplyError - -function ReplyError (message) { - Object.defineProperty(this, 'message', { - value: message || '', - configurable: true, - writable: true - }) - const tmp = Error.stackTraceLimit - Error.stackTraceLimit = 2 - Error.captureStackTrace(this, this.constructor) - Error.stackTraceLimit = tmp -} - -util.inherits(ReplyError, RedisError) - -Object.defineProperty(ReplyError.prototype, 'name', { - value: 'ReplyError', - configurable: true, - writable: true -}) - -// AbortError - -function AbortError (message) { - Object.defineProperty(this, 'message', { - value: message || '', - configurable: true, - writable: true - }) - Error.captureStackTrace(this, this.constructor) -} - -util.inherits(AbortError, RedisError) - -Object.defineProperty(AbortError.prototype, 'name', { - value: 'AbortError', - configurable: true, - writable: true -}) - -// InterruptError - -function InterruptError (message) { - Object.defineProperty(this, 'message', { - value: message || '', - configurable: true, - writable: true - }) - Error.captureStackTrace(this, this.constructor) -} - -util.inherits(InterruptError, AbortError) - -Object.defineProperty(InterruptError.prototype, 'name', { - value: 'InterruptError', - configurable: true, - writable: true -}) - -module.exports = { - RedisError, - ParserError, - ReplyError, - AbortError, - InterruptError -} - - -/***/ }), - -/***/ 49751: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = __nccwpck_require__(44072) - - -/***/ }), - -/***/ 44072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Buffer = (__nccwpck_require__(20181).Buffer) -const StringDecoder = (__nccwpck_require__(13193).StringDecoder) -const decoder = new StringDecoder() -const errors = __nccwpck_require__(48287) -const ReplyError = errors.ReplyError -const ParserError = errors.ParserError -var bufferPool = Buffer.allocUnsafe(32 * 1024) -var bufferOffset = 0 -var interval = null -var counter = 0 -var notDecreased = 0 - -/** - * Used for integer numbers only - * @param {JavascriptRedisParser} parser - * @returns {undefined|number} - */ -function parseSimpleNumbers (parser) { - const length = parser.buffer.length - 1 - var offset = parser.offset - var number = 0 - var sign = 1 - - if (parser.buffer[offset] === 45) { - sign = -1 - offset++ - } - - while (offset < length) { - const c1 = parser.buffer[offset++] - if (c1 === 13) { // \r\n - parser.offset = offset + 1 - return sign * number - } - number = (number * 10) + (c1 - 48) - } -} - -/** - * Used for integer numbers in case of the returnNumbers option - * - * Reading the string as parts of n SMI is more efficient than - * using a string directly. - * - * @param {JavascriptRedisParser} parser - * @returns {undefined|string} - */ -function parseStringNumbers (parser) { - const length = parser.buffer.length - 1 - var offset = parser.offset - var number = 0 - var res = '' - - if (parser.buffer[offset] === 45) { - res += '-' - offset++ - } - - while (offset < length) { - var c1 = parser.buffer[offset++] - if (c1 === 13) { // \r\n - parser.offset = offset + 1 - if (number !== 0) { - res += number - } - return res - } else if (number > 429496728) { - res += (number * 10) + (c1 - 48) - number = 0 - } else if (c1 === 48 && number === 0) { - res += 0 - } else { - number = (number * 10) + (c1 - 48) - } - } -} - -/** - * Parse a '+' redis simple string response but forward the offsets - * onto convertBufferRange to generate a string. - * @param {JavascriptRedisParser} parser - * @returns {undefined|string|Buffer} - */ -function parseSimpleString (parser) { - const start = parser.offset - const buffer = parser.buffer - const length = buffer.length - 1 - var offset = start - - while (offset < length) { - if (buffer[offset++] === 13) { // \r\n - parser.offset = offset + 1 - if (parser.optionReturnBuffers === true) { - return parser.buffer.slice(start, offset - 1) - } - return parser.buffer.toString('utf8', start, offset - 1) - } - } -} - -/** - * Returns the read length - * @param {JavascriptRedisParser} parser - * @returns {undefined|number} - */ -function parseLength (parser) { - const length = parser.buffer.length - 1 - var offset = parser.offset - var number = 0 - - while (offset < length) { - const c1 = parser.buffer[offset++] - if (c1 === 13) { - parser.offset = offset + 1 - return number - } - number = (number * 10) + (c1 - 48) - } -} - -/** - * Parse a ':' redis integer response - * - * If stringNumbers is activated the parser always returns numbers as string - * This is important for big numbers (number > Math.pow(2, 53)) as js numbers - * are 64bit floating point numbers with reduced precision - * - * @param {JavascriptRedisParser} parser - * @returns {undefined|number|string} - */ -function parseInteger (parser) { - if (parser.optionStringNumbers === true) { - return parseStringNumbers(parser) - } - return parseSimpleNumbers(parser) -} - -/** - * Parse a '$' redis bulk string response - * @param {JavascriptRedisParser} parser - * @returns {undefined|null|string} - */ -function parseBulkString (parser) { - const length = parseLength(parser) - if (length === undefined) { - return - } - if (length < 0) { - return null - } - const offset = parser.offset + length - if (offset + 2 > parser.buffer.length) { - parser.bigStrSize = offset + 2 - parser.totalChunkSize = parser.buffer.length - parser.bufferCache.push(parser.buffer) - return - } - const start = parser.offset - parser.offset = offset + 2 - if (parser.optionReturnBuffers === true) { - return parser.buffer.slice(start, offset) - } - return parser.buffer.toString('utf8', start, offset) -} - -/** - * Parse a '-' redis error response - * @param {JavascriptRedisParser} parser - * @returns {ReplyError} - */ -function parseError (parser) { - var string = parseSimpleString(parser) - if (string !== undefined) { - if (parser.optionReturnBuffers === true) { - string = string.toString() - } - return new ReplyError(string) - } -} - -/** - * Parsing error handler, resets parser buffer - * @param {JavascriptRedisParser} parser - * @param {number} type - * @returns {undefined} - */ -function handleError (parser, type) { - const err = new ParserError( - 'Protocol error, got ' + JSON.stringify(String.fromCharCode(type)) + ' as reply type byte', - JSON.stringify(parser.buffer), - parser.offset - ) - parser.buffer = null - parser.returnFatalError(err) -} - -/** - * Parse a '*' redis array response - * @param {JavascriptRedisParser} parser - * @returns {undefined|null|any[]} - */ -function parseArray (parser) { - const length = parseLength(parser) - if (length === undefined) { - return - } - if (length < 0) { - return null - } - const responses = new Array(length) - return parseArrayElements(parser, responses, 0) -} - -/** - * Push a partly parsed array to the stack - * - * @param {JavascriptRedisParser} parser - * @param {any[]} array - * @param {number} pos - * @returns {undefined} - */ -function pushArrayCache (parser, array, pos) { - parser.arrayCache.push(array) - parser.arrayPos.push(pos) -} - -/** - * Parse chunked redis array response - * @param {JavascriptRedisParser} parser - * @returns {undefined|any[]} - */ -function parseArrayChunks (parser) { - const tmp = parser.arrayCache.pop() - var pos = parser.arrayPos.pop() - if (parser.arrayCache.length) { - const res = parseArrayChunks(parser) - if (res === undefined) { - pushArrayCache(parser, tmp, pos) - return - } - tmp[pos++] = res - } - return parseArrayElements(parser, tmp, pos) -} - -/** - * Parse redis array response elements - * @param {JavascriptRedisParser} parser - * @param {Array} responses - * @param {number} i - * @returns {undefined|null|any[]} - */ -function parseArrayElements (parser, responses, i) { - const bufferLength = parser.buffer.length - while (i < responses.length) { - const offset = parser.offset - if (parser.offset >= bufferLength) { - pushArrayCache(parser, responses, i) - return - } - const response = parseType(parser, parser.buffer[parser.offset++]) - if (response === undefined) { - if (!(parser.arrayCache.length || parser.bufferCache.length)) { - parser.offset = offset - } - pushArrayCache(parser, responses, i) - return - } - responses[i] = response - i++ - } - - return responses -} - -/** - * Called the appropriate parser for the specified type. - * - * 36: $ - * 43: + - * 42: * - * 58: : - * 45: - - * - * @param {JavascriptRedisParser} parser - * @param {number} type - * @returns {*} - */ -function parseType (parser, type) { - switch (type) { - case 36: - return parseBulkString(parser) - case 43: - return parseSimpleString(parser) - case 42: - return parseArray(parser) - case 58: - return parseInteger(parser) - case 45: - return parseError(parser) - default: - return handleError(parser, type) - } -} - -/** - * Decrease the bufferPool size over time - * - * Balance between increasing and decreasing the bufferPool. - * Decrease the bufferPool by 10% by removing the first 10% of the current pool. - * @returns {undefined} - */ -function decreaseBufferPool () { - if (bufferPool.length > 50 * 1024) { - if (counter === 1 || notDecreased > counter * 2) { - const minSliceLen = Math.floor(bufferPool.length / 10) - const sliceLength = minSliceLen < bufferOffset - ? bufferOffset - : minSliceLen - bufferOffset = 0 - bufferPool = bufferPool.slice(sliceLength, bufferPool.length) - } else { - notDecreased++ - counter-- - } - } else { - clearInterval(interval) - counter = 0 - notDecreased = 0 - interval = null - } -} - -/** - * Check if the requested size fits in the current bufferPool. - * If it does not, reset and increase the bufferPool accordingly. - * - * @param {number} length - * @returns {undefined} - */ -function resizeBuffer (length) { - if (bufferPool.length < length + bufferOffset) { - const multiplier = length > 1024 * 1024 * 75 ? 2 : 3 - if (bufferOffset > 1024 * 1024 * 111) { - bufferOffset = 1024 * 1024 * 50 - } - bufferPool = Buffer.allocUnsafe(length * multiplier + bufferOffset) - bufferOffset = 0 - counter++ - if (interval === null) { - interval = setInterval(decreaseBufferPool, 50) - } - } -} - -/** - * Concat a bulk string containing multiple chunks - * - * Notes: - * 1) The first chunk might contain the whole bulk string including the \r - * 2) We are only safe to fully add up elements that are neither the first nor any of the last two elements - * - * @param {JavascriptRedisParser} parser - * @returns {String} - */ -function concatBulkString (parser) { - const list = parser.bufferCache - const oldOffset = parser.offset - var chunks = list.length - var offset = parser.bigStrSize - parser.totalChunkSize - parser.offset = offset - if (offset <= 2) { - if (chunks === 2) { - return list[0].toString('utf8', oldOffset, list[0].length + offset - 2) - } - chunks-- - offset = list[list.length - 2].length + offset - } - var res = decoder.write(list[0].slice(oldOffset)) - for (var i = 1; i < chunks - 1; i++) { - res += decoder.write(list[i]) - } - res += decoder.end(list[i].slice(0, offset - 2)) - return res -} - -/** - * Concat the collected chunks from parser.bufferCache. - * - * Increases the bufferPool size beforehand if necessary. - * - * @param {JavascriptRedisParser} parser - * @returns {Buffer} - */ -function concatBulkBuffer (parser) { - const list = parser.bufferCache - const oldOffset = parser.offset - const length = parser.bigStrSize - oldOffset - 2 - var chunks = list.length - var offset = parser.bigStrSize - parser.totalChunkSize - parser.offset = offset - if (offset <= 2) { - if (chunks === 2) { - return list[0].slice(oldOffset, list[0].length + offset - 2) - } - chunks-- - offset = list[list.length - 2].length + offset - } - resizeBuffer(length) - const start = bufferOffset - list[0].copy(bufferPool, start, oldOffset, list[0].length) - bufferOffset += list[0].length - oldOffset - for (var i = 1; i < chunks - 1; i++) { - list[i].copy(bufferPool, bufferOffset) - bufferOffset += list[i].length - } - list[i].copy(bufferPool, bufferOffset, 0, offset - 2) - bufferOffset += offset - 2 - return bufferPool.slice(start, bufferOffset) -} - -class JavascriptRedisParser { - /** - * Javascript Redis Parser constructor - * @param {{returnError: Function, returnReply: Function, returnFatalError?: Function, returnBuffers: boolean, stringNumbers: boolean }} options - * @constructor - */ - constructor (options) { - if (!options) { - throw new TypeError('Options are mandatory.') - } - if (typeof options.returnError !== 'function' || typeof options.returnReply !== 'function') { - throw new TypeError('The returnReply and returnError options have to be functions.') - } - this.setReturnBuffers(!!options.returnBuffers) - this.setStringNumbers(!!options.stringNumbers) - this.returnError = options.returnError - this.returnFatalError = options.returnFatalError || options.returnError - this.returnReply = options.returnReply - this.reset() - } - - /** - * Reset the parser values to the initial state - * - * @returns {undefined} - */ - reset () { - this.offset = 0 - this.buffer = null - this.bigStrSize = 0 - this.totalChunkSize = 0 - this.bufferCache = [] - this.arrayCache = [] - this.arrayPos = [] - } - - /** - * Set the returnBuffers option - * - * @param {boolean} returnBuffers - * @returns {undefined} - */ - setReturnBuffers (returnBuffers) { - if (typeof returnBuffers !== 'boolean') { - throw new TypeError('The returnBuffers argument has to be a boolean') - } - this.optionReturnBuffers = returnBuffers - } - - /** - * Set the stringNumbers option - * - * @param {boolean} stringNumbers - * @returns {undefined} - */ - setStringNumbers (stringNumbers) { - if (typeof stringNumbers !== 'boolean') { - throw new TypeError('The stringNumbers argument has to be a boolean') - } - this.optionStringNumbers = stringNumbers - } - - /** - * Parse the redis buffer - * @param {Buffer} buffer - * @returns {undefined} - */ - execute (buffer) { - if (this.buffer === null) { - this.buffer = buffer - this.offset = 0 - } else if (this.bigStrSize === 0) { - const oldLength = this.buffer.length - const remainingLength = oldLength - this.offset - const newBuffer = Buffer.allocUnsafe(remainingLength + buffer.length) - this.buffer.copy(newBuffer, 0, this.offset, oldLength) - buffer.copy(newBuffer, remainingLength, 0, buffer.length) - this.buffer = newBuffer - this.offset = 0 - if (this.arrayCache.length) { - const arr = parseArrayChunks(this) - if (arr === undefined) { - return - } - this.returnReply(arr) - } - } else if (this.totalChunkSize + buffer.length >= this.bigStrSize) { - this.bufferCache.push(buffer) - var tmp = this.optionReturnBuffers ? concatBulkBuffer(this) : concatBulkString(this) - this.bigStrSize = 0 - this.bufferCache = [] - this.buffer = buffer - if (this.arrayCache.length) { - this.arrayCache[0][this.arrayPos[0]++] = tmp - tmp = parseArrayChunks(this) - if (tmp === undefined) { - return - } - } - this.returnReply(tmp) - } else { - this.bufferCache.push(buffer) - this.totalChunkSize += buffer.length - return - } - - while (this.offset < this.buffer.length) { - const offset = this.offset - const type = this.buffer[this.offset++] - const response = parseType(this, type) - if (response === undefined) { - if (!(this.arrayCache.length || this.bufferCache.length)) { - this.offset = offset - } - return - } - - if (type === 45) { - this.returnError(response) - } else { - this.returnReply(response) - } - } - - this.buffer = null - } -} - -module.exports = JavascriptRedisParser - - -/***/ }), - -/***/ 73934: -/***/ ((module) => { - -"use strict"; - -module.exports = rfdc - -function copyBuffer (cur) { - if (cur instanceof Buffer) { - return Buffer.from(cur) - } - - return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length) -} - -function rfdc (opts) { - opts = opts || {} - if (opts.circles) return rfdcCircles(opts) - - const constructorHandlers = new Map() - constructorHandlers.set(Date, (o) => new Date(o)) - constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))) - constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))) - if (opts.constructorHandlers) { - for (const handler of opts.constructorHandlers) { - constructorHandlers.set(handler[0], handler[1]) - } - } - - let handler = null - - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - const keys = Object.keys(a) - const a2 = new Array(keys.length) - for (let i = 0; i < keys.length; i++) { - const k = keys[i] - const cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - a2[k] = handler(cur, fn) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - a2[k] = fn(cur) - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (Array.isArray(o)) return cloneArray(o, clone) - if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { - return handler(o, clone) - } - const o2 = {} - for (const k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - const cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - o2[k] = handler(cur, clone) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = clone(cur) - } - } - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { - return handler(o, cloneProto) - } - const o2 = {} - for (const k in o) { - const cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - o2[k] = handler(cur, cloneProto) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - o2[k] = cloneProto(cur) - } - } - return o2 - } -} - -function rfdcCircles (opts) { - const refs = [] - const refsNew = [] - - const constructorHandlers = new Map() - constructorHandlers.set(Date, (o) => new Date(o)) - constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn))) - constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn))) - if (opts.constructorHandlers) { - for (const handler of opts.constructorHandlers) { - constructorHandlers.set(handler[0], handler[1]) - } - } - - let handler = null - return opts.proto ? cloneProto : clone - - function cloneArray (a, fn) { - const keys = Object.keys(a) - const a2 = new Array(keys.length) - for (let i = 0; i < keys.length; i++) { - const k = keys[i] - const cur = a[k] - if (typeof cur !== 'object' || cur === null) { - a2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - a2[k] = handler(cur, fn) - } else if (ArrayBuffer.isView(cur)) { - a2[k] = copyBuffer(cur) - } else { - const index = refs.indexOf(cur) - if (index !== -1) { - a2[k] = refsNew[index] - } else { - a2[k] = fn(cur) - } - } - } - return a2 - } - - function clone (o) { - if (typeof o !== 'object' || o === null) return o - if (Array.isArray(o)) return cloneArray(o, clone) - if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { - return handler(o, clone) - } - const o2 = {} - refs.push(o) - refsNew.push(o2) - for (const k in o) { - if (Object.hasOwnProperty.call(o, k) === false) continue - const cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - o2[k] = handler(cur, clone) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - const i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = clone(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } - - function cloneProto (o) { - if (typeof o !== 'object' || o === null) return o - if (Array.isArray(o)) return cloneArray(o, cloneProto) - if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) { - return handler(o, cloneProto) - } - const o2 = {} - refs.push(o) - refsNew.push(o2) - for (const k in o) { - const cur = o[k] - if (typeof cur !== 'object' || cur === null) { - o2[k] = cur - } else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) { - o2[k] = handler(cur, cloneProto) - } else if (ArrayBuffer.isView(cur)) { - o2[k] = copyBuffer(cur) - } else { - const i = refs.indexOf(cur) - if (i !== -1) { - o2[k] = refsNew[i] - } else { - o2[k] = cloneProto(cur) - } - } - } - refs.pop() - refsNew.pop() - return o2 - } -} - - -/***/ }), - -/***/ 53476: -/***/ ((module, exports, __nccwpck_require__) => { - -/*! safe-buffer. MIT License. Feross Aboukhadijeh */ -/* eslint-disable node/no-deprecated-api */ -var buffer = __nccwpck_require__(20181) -var Buffer = buffer.Buffer - -// alternative to using Object.keys for old browsers -function copyProps (src, dst) { - for (var key in src) { - dst[key] = src[key] - } -} -if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { - module.exports = buffer -} else { - // Copy properties from require('buffer') - copyProps(buffer, exports) - exports.Buffer = SafeBuffer -} - -function SafeBuffer (arg, encodingOrOffset, length) { - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.prototype = Object.create(Buffer.prototype) - -// Copy static methods from Buffer -copyProps(Buffer, SafeBuffer) - -SafeBuffer.from = function (arg, encodingOrOffset, length) { - if (typeof arg === 'number') { - throw new TypeError('Argument must not be a number') - } - return Buffer(arg, encodingOrOffset, length) -} - -SafeBuffer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - var buf = Buffer(size) - if (fill !== undefined) { - if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - } else { - buf.fill(0) - } - return buf -} - -SafeBuffer.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return Buffer(size) -} - -SafeBuffer.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('Argument must be a number') - } - return buffer.SlowBuffer(size) -} - - -/***/ }), - -/***/ 39195: -/***/ ((module, exports) => { - -"use strict"; - - -const { hasOwnProperty } = Object.prototype - -const stringify = configure() - -// @ts-expect-error -stringify.configure = configure -// @ts-expect-error -stringify.stringify = stringify - -// @ts-expect-error -stringify.default = stringify - -// @ts-expect-error used for named export -exports.stringify = stringify -// @ts-expect-error used for named export -exports.configure = configure - -module.exports = stringify - -// eslint-disable-next-line no-control-regex -const strEscapeSequencesRegExp = /[\u0000-\u001f\u0022\u005c\ud800-\udfff]/ - -// Escape C0 control characters, double quotes, the backslash and every code -// unit with a numeric value in the inclusive range 0xD800 to 0xDFFF. -function strEscape (str) { - // Some magic numbers that worked out fine while benchmarking with v8 8.0 - if (str.length < 5000 && !strEscapeSequencesRegExp.test(str)) { - return `"${str}"` - } - return JSON.stringify(str) -} - -function sort (array, comparator) { - // Insertion sort is very efficient for small input sizes, but it has a bad - // worst case complexity. Thus, use native array sort for bigger values. - if (array.length > 2e2 || comparator) { - return array.sort(comparator) - } - for (let i = 1; i < array.length; i++) { - const currentValue = array[i] - let position = i - while (position !== 0 && array[position - 1] > currentValue) { - array[position] = array[position - 1] - position-- - } - array[position] = currentValue - } - return array -} - -const typedArrayPrototypeGetSymbolToStringTag = - Object.getOwnPropertyDescriptor( - Object.getPrototypeOf( - Object.getPrototypeOf( - new Int8Array() - ) - ), - Symbol.toStringTag - ).get - -function isTypedArrayWithEntries (value) { - return typedArrayPrototypeGetSymbolToStringTag.call(value) !== undefined && value.length !== 0 -} - -function stringifyTypedArray (array, separator, maximumBreadth) { - if (array.length < maximumBreadth) { - maximumBreadth = array.length - } - const whitespace = separator === ',' ? '' : ' ' - let res = `"0":${whitespace}${array[0]}` - for (let i = 1; i < maximumBreadth; i++) { - res += `${separator}"${i}":${whitespace}${array[i]}` - } - return res -} - -function getCircularValueOption (options) { - if (hasOwnProperty.call(options, 'circularValue')) { - const circularValue = options.circularValue - if (typeof circularValue === 'string') { - return `"${circularValue}"` - } - if (circularValue == null) { - return circularValue - } - if (circularValue === Error || circularValue === TypeError) { - return { - toString () { - throw new TypeError('Converting circular structure to JSON') - } - } - } - throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined') - } - return '"[Circular]"' -} - -function getDeterministicOption (options) { - let value - if (hasOwnProperty.call(options, 'deterministic')) { - value = options.deterministic - if (typeof value !== 'boolean' && typeof value !== 'function') { - throw new TypeError('The "deterministic" argument must be of type boolean or comparator function') - } - } - return value === undefined ? true : value -} - -function getBooleanOption (options, key) { - let value - if (hasOwnProperty.call(options, key)) { - value = options[key] - if (typeof value !== 'boolean') { - throw new TypeError(`The "${key}" argument must be of type boolean`) - } - } - return value === undefined ? true : value -} - -function getPositiveIntegerOption (options, key) { - let value - if (hasOwnProperty.call(options, key)) { - value = options[key] - if (typeof value !== 'number') { - throw new TypeError(`The "${key}" argument must be of type number`) - } - if (!Number.isInteger(value)) { - throw new TypeError(`The "${key}" argument must be an integer`) - } - if (value < 1) { - throw new RangeError(`The "${key}" argument must be >= 1`) - } - } - return value === undefined ? Infinity : value -} - -function getItemCount (number) { - if (number === 1) { - return '1 item' - } - return `${number} items` -} - -function getUniqueReplacerSet (replacerArray) { - const replacerSet = new Set() - for (const value of replacerArray) { - if (typeof value === 'string' || typeof value === 'number') { - replacerSet.add(String(value)) - } - } - return replacerSet -} - -function getStrictOption (options) { - if (hasOwnProperty.call(options, 'strict')) { - const value = options.strict - if (typeof value !== 'boolean') { - throw new TypeError('The "strict" argument must be of type boolean') - } - if (value) { - return (value) => { - let message = `Object can not safely be stringified. Received type ${typeof value}` - if (typeof value !== 'function') message += ` (${value.toString()})` - throw new Error(message) - } - } - } -} - -function configure (options) { - options = { ...options } - const fail = getStrictOption(options) - if (fail) { - if (options.bigint === undefined) { - options.bigint = false - } - if (!('circularValue' in options)) { - options.circularValue = Error - } - } - const circularValue = getCircularValueOption(options) - const bigint = getBooleanOption(options, 'bigint') - const deterministic = getDeterministicOption(options) - const comparator = typeof deterministic === 'function' ? deterministic : undefined - const maximumDepth = getPositiveIntegerOption(options, 'maximumDepth') - const maximumBreadth = getPositiveIntegerOption(options, 'maximumBreadth') - - function stringifyFnReplacer (key, parent, stack, replacer, spacer, indentation) { - let value = parent[key] - - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - value = replacer.call(parent, key, value) - - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - let join = ',' - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let whitespace = '' - let separator = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - const maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (deterministic && !isTypedArrayWithEntries(value)) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyFnReplacer(key, value, stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${whitespace}${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifyArrayReplacer (key, value, stack, replacer, spacer, indentation) { - if (typeof value === 'object' && value !== null && typeof value.toJSON === 'function') { - value = value.toJSON(key) - } - - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - const originalIndentation = indentation - let res = '' - let join = ',' - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - if (spacer !== '') { - indentation += spacer - res += `\n${indentation}` - join = `,\n${indentation}` - } - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - if (spacer !== '') { - res += `\n${originalIndentation}` - } - stack.pop() - return `[${res}]` - } - stack.push(value) - let whitespace = '' - if (spacer !== '') { - indentation += spacer - join = `,\n${indentation}` - whitespace = ' ' - } - let separator = '' - for (const key of replacer) { - const tmp = stringifyArrayReplacer(key, value[key], stack, replacer, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${whitespace}${tmp}` - separator = join - } - } - if (spacer !== '' && separator.length > 1) { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifyIndent (key, value, stack, spacer, indentation) { - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again. - if (typeof value !== 'object') { - return stringifyIndent(key, value, stack, spacer, indentation) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - const originalIndentation = indentation - - if (Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - indentation += spacer - let res = `\n${indentation}` - const join = `,\n${indentation}` - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - res += join - } - const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `${join}"... ${getItemCount(removedKeys)} not stringified"` - } - res += `\n${originalIndentation}` - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - indentation += spacer - const join = `,\n${indentation}` - let res = '' - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, join, maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = join - } - if (deterministic) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifyIndent(key, value[key], stack, spacer, indentation) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}: ${tmp}` - separator = join - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"` - separator = join - } - if (separator !== '') { - res = `\n${indentation}${res}\n${originalIndentation}` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringifySimple (key, value, stack) { - switch (typeof value) { - case 'string': - return strEscape(value) - case 'object': { - if (value === null) { - return 'null' - } - if (typeof value.toJSON === 'function') { - value = value.toJSON(key) - // Prevent calling `toJSON` again - if (typeof value !== 'object') { - return stringifySimple(key, value, stack) - } - if (value === null) { - return 'null' - } - } - if (stack.indexOf(value) !== -1) { - return circularValue - } - - let res = '' - - const hasLength = value.length !== undefined - if (hasLength && Array.isArray(value)) { - if (value.length === 0) { - return '[]' - } - if (maximumDepth < stack.length + 1) { - return '"[Array]"' - } - stack.push(value) - const maximumValuesToStringify = Math.min(value.length, maximumBreadth) - let i = 0 - for (; i < maximumValuesToStringify - 1; i++) { - const tmp = stringifySimple(String(i), value[i], stack) - res += tmp !== undefined ? tmp : 'null' - res += ',' - } - const tmp = stringifySimple(String(i), value[i], stack) - res += tmp !== undefined ? tmp : 'null' - if (value.length - 1 > maximumBreadth) { - const removedKeys = value.length - maximumBreadth - 1 - res += `,"... ${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `[${res}]` - } - - let keys = Object.keys(value) - const keyLength = keys.length - if (keyLength === 0) { - return '{}' - } - if (maximumDepth < stack.length + 1) { - return '"[Object]"' - } - let separator = '' - let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth) - if (hasLength && isTypedArrayWithEntries(value)) { - res += stringifyTypedArray(value, ',', maximumBreadth) - keys = keys.slice(value.length) - maximumPropertiesToStringify -= value.length - separator = ',' - } - if (deterministic) { - keys = sort(keys, comparator) - } - stack.push(value) - for (let i = 0; i < maximumPropertiesToStringify; i++) { - const key = keys[i] - const tmp = stringifySimple(key, value[key], stack) - if (tmp !== undefined) { - res += `${separator}${strEscape(key)}:${tmp}` - separator = ',' - } - } - if (keyLength > maximumBreadth) { - const removedKeys = keyLength - maximumBreadth - res += `${separator}"...":"${getItemCount(removedKeys)} not stringified"` - } - stack.pop() - return `{${res}}` - } - case 'number': - return isFinite(value) ? String(value) : fail ? fail(value) : 'null' - case 'boolean': - return value === true ? 'true' : 'false' - case 'undefined': - return undefined - case 'bigint': - if (bigint) { - return String(value) - } - // fallthrough - default: - return fail ? fail(value) : undefined - } - } - - function stringify (value, replacer, space) { - if (arguments.length > 1) { - let spacer = '' - if (typeof space === 'number') { - spacer = ' '.repeat(Math.min(space, 10)) - } else if (typeof space === 'string') { - spacer = space.slice(0, 10) - } - if (replacer != null) { - if (typeof replacer === 'function') { - return stringifyFnReplacer('', { '': value }, [], replacer, spacer, '') - } - if (Array.isArray(replacer)) { - return stringifyArrayReplacer('', value, [], getUniqueReplacerSet(replacer), spacer, '') - } - } - if (spacer.length !== 0) { - return stringifyIndent('', value, [], spacer, '') - } - } - return stringifySimple('', value, []) - } - - return stringify -} - - -/***/ }), - -/***/ 39392: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable node/no-deprecated-api */ - - - -var buffer = __nccwpck_require__(20181) -var Buffer = buffer.Buffer - -var safer = {} - -var key - -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} - -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} - -safer.Buffer.prototype = Buffer.prototype - -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} - -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf - } -} - -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} - -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength - } -} - -module.exports = safer - - -/***/ }), - -/***/ 11691: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const ANY = Symbol('SemVer ANY') -// hoisted class for cyclic dependency -class Comparator { - static get ANY () { - return ANY - } - - constructor (comp, options) { - options = parseOptions(options) - - if (comp instanceof Comparator) { - if (comp.loose === !!options.loose) { - return comp - } else { - comp = comp.value - } - } - - comp = comp.trim().split(/\s+/).join(' ') - debug('comparator', comp, options) - this.options = options - this.loose = !!options.loose - this.parse(comp) - - if (this.semver === ANY) { - this.value = '' - } else { - this.value = this.operator + this.semver.version - } - - debug('comp', this) - } - - parse (comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] - const m = comp.match(r) - - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`) - } - - this.operator = m[1] !== undefined ? m[1] : '' - if (this.operator === '=') { - this.operator = '' - } - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) { - this.semver = ANY - } else { - this.semver = new SemVer(m[2], this.options.loose) - } - } - - toString () { - return this.value - } - - test (version) { - debug('Comparator.test', version, this.options.loose) - - if (this.semver === ANY || version === ANY) { - return true - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - return cmp(version, this.operator, this.semver, this.options) - } - - intersects (comp, options) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required') - } - - if (this.operator === '') { - if (this.value === '') { - return true - } - return new Range(comp.value, options).test(this.value) - } else if (comp.operator === '') { - if (comp.value === '') { - return true - } - return new Range(this.value, options).test(comp.semver) - } - - options = parseOptions(options) - - // Special cases where nothing can possibly be lower - if (options.includePrerelease && - (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) { - return false - } - if (!options.includePrerelease && - (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) { - return false - } - - // Same direction increasing (> or >=) - if (this.operator.startsWith('>') && comp.operator.startsWith('>')) { - return true - } - // Same direction decreasing (< or <=) - if (this.operator.startsWith('<') && comp.operator.startsWith('<')) { - return true - } - // same SemVer and both sides are inclusive (<= or >=) - if ( - (this.semver.version === comp.semver.version) && - this.operator.includes('=') && comp.operator.includes('=')) { - return true - } - // opposite directions less than - if (cmp(this.semver, '<', comp.semver, options) && - this.operator.startsWith('>') && comp.operator.startsWith('<')) { - return true - } - // opposite directions greater than - if (cmp(this.semver, '>', comp.semver, options) && - this.operator.startsWith('<') && comp.operator.startsWith('>')) { - return true - } - return false - } -} - -module.exports = Comparator - -const parseOptions = __nccwpck_require__(82956) -const { safeRe: re, t } = __nccwpck_require__(90471) -const cmp = __nccwpck_require__(13518) -const debug = __nccwpck_require__(24879) -const SemVer = __nccwpck_require__(73091) -const Range = __nccwpck_require__(27846) - - -/***/ }), - -/***/ 27846: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SPACE_CHARACTERS = /\s+/g - -// hoisted class for cyclic dependency -class Range { - constructor (range, options) { - options = parseOptions(options) - - if (range instanceof Range) { - if ( - range.loose === !!options.loose && - range.includePrerelease === !!options.includePrerelease - ) { - return range - } else { - return new Range(range.raw, options) - } - } - - if (range instanceof Comparator) { - // just put it in the set and return - this.raw = range.value - this.set = [[range]] - this.formatted = undefined - return this - } - - this.options = options - this.loose = !!options.loose - this.includePrerelease = !!options.includePrerelease - - // First reduce all whitespace as much as possible so we do not have to rely - // on potentially slow regexes like \s*. This is then stored and used for - // future error messages as well. - this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') - - // First, split on || - this.set = this.raw - .split('||') - // map the range to a 2d array of comparators - .map(r => this.parseRange(r.trim())) - // throw out any comparator lists that are empty - // this generally means that it was not a valid range, which is allowed - // in loose mode, but will still throw if the WHOLE range is invalid. - .filter(c => c.length) - - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`) - } - - // if we have any that are not the null set, throw out null sets. - if (this.set.length > 1) { - // keep the first one, in case they're all null sets - const first = this.set[0] - this.set = this.set.filter(c => !isNullSet(c[0])) - if (this.set.length === 0) { - this.set = [first] - } else if (this.set.length > 1) { - // if we have any that are *, then the range is just * - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c] - break - } - } - } - } - - this.formatted = undefined - } - - get range () { - if (this.formatted === undefined) { - this.formatted = '' - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += '||' - } - const comps = this.set[i] - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += ' ' - } - this.formatted += comps[k].toString().trim() - } - } - } - return this.formatted - } - - format () { - return this.range - } - - toString () { - return this.range - } - - parseRange (range) { - // memoize range parsing for performance. - // this is a very hot path, and fully deterministic. - const memoOpts = - (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | - (this.options.loose && FLAG_LOOSE) - const memoKey = memoOpts + ':' + range - const cached = cache.get(memoKey) - if (cached) { - return cached - } - - const loose = this.options.loose - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) - debug('hyphen replace', range) - - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range) - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) - debug('tilde trim', range) - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) - debug('caret trim', range) - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - let rangeList = range - .split(' ') - .map(comp => parseComparator(comp, this.options)) - .join(' ') - .split(/\s+/) - // >=0.0.0 is equivalent to * - .map(comp => replaceGTE0(comp, this.options)) - - if (loose) { - // in loose mode, throw out any that are not valid comparators - rangeList = rangeList.filter(comp => { - debug('loose invalid filter', comp, this.options) - return !!comp.match(re[t.COMPARATORLOOSE]) - }) - } - debug('range list', rangeList) - - // if any comparators are the null set, then replace with JUST null set - // if more than one comparator, remove any * comparators - // also, don't include the same comparator more than once - const rangeMap = new Map() - const comparators = rangeList.map(comp => new Comparator(comp, this.options)) - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp] - } - rangeMap.set(comp.value, comp) - } - if (rangeMap.size > 1 && rangeMap.has('')) { - rangeMap.delete('') - } - - const result = [...rangeMap.values()] - cache.set(memoKey, result) - return result - } - - intersects (range, options) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required') - } - - return this.set.some((thisComparators) => { - return ( - isSatisfiable(thisComparators, options) && - range.set.some((rangeComparators) => { - return ( - isSatisfiable(rangeComparators, options) && - thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options) - }) - }) - ) - }) - ) - }) - } - - // if ANY of the sets match ALL of its comparators, then pass - test (version) { - if (!version) { - return false - } - - if (typeof version === 'string') { - try { - version = new SemVer(version, this.options) - } catch (er) { - return false - } - } - - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true - } - } - return false - } -} - -module.exports = Range - -const LRU = __nccwpck_require__(8127) -const cache = new LRU() - -const parseOptions = __nccwpck_require__(82956) -const Comparator = __nccwpck_require__(11691) -const debug = __nccwpck_require__(24879) -const SemVer = __nccwpck_require__(73091) -const { - safeRe: re, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace, -} = __nccwpck_require__(90471) -const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = __nccwpck_require__(86565) - -const isNullSet = c => c.value === '<0.0.0-0' -const isAny = c => c.value === '' - -// take a set of comparators and determine whether there -// exists a version which can satisfy it -const isSatisfiable = (comparators, options) => { - let result = true - const remainingComparators = comparators.slice() - let testComparator = remainingComparators.pop() - - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options) - }) - - testComparator = remainingComparators.pop() - } - - return result -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -const parseComparator = (comp, options) => { - debug('comp', comp, options) - comp = replaceCarets(comp, options) - debug('caret', comp) - comp = replaceTildes(comp, options) - debug('tildes', comp) - comp = replaceXRanges(comp, options) - debug('xrange', comp) - comp = replaceStars(comp, options) - debug('stars', comp) - return comp -} - -const isX = id => !id || id.toLowerCase() === 'x' || id === '*' - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 -// ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} - -const replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] - return comp.replace(r, (_, M, m, p, pr) => { - debug('tilde', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0 <${+M + 1}.0.0-0` - } else if (isX(p)) { - // ~1.2 == >=1.2.0 <1.3.0-0 - ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` - } else if (pr) { - debug('replaceTilde pr', pr) - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } else { - // ~1.2.3 == >=1.2.3 <1.3.0-0 - ret = `>=${M}.${m}.${p - } <${M}.${+m + 1}.0-0` - } - - debug('tilde return', ret) - return ret - }) -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 -// ^1.2.3 --> >=1.2.3 <2.0.0-0 -// ^1.2.0 --> >=1.2.0 <2.0.0-0 -// ^0.0.1 --> >=0.0.1 <0.0.2-0 -// ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} - -const replaceCaret = (comp, options) => { - debug('caret', comp, options) - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] - const z = options.includePrerelease ? '-0' : '' - return comp.replace(r, (_, M, m, p, pr) => { - debug('caret', comp, _, M, m, p, pr) - let ret - - if (isX(M)) { - ret = '' - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` - } else if (isX(p)) { - if (M === '0') { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` - } - } else if (pr) { - debug('replaceCaret pr', pr) - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p}-${pr - } <${+M + 1}.0.0-0` - } - } else { - debug('no pr') - if (M === '0') { - if (m === '0') { - ret = `>=${M}.${m}.${p - }${z} <${M}.${m}.${+p + 1}-0` - } else { - ret = `>=${M}.${m}.${p - }${z} <${M}.${+m + 1}.0-0` - } - } else { - ret = `>=${M}.${m}.${p - } <${+M + 1}.0.0-0` - } - } - - debug('caret return', ret) - return ret - }) -} - -const replaceXRanges = (comp, options) => { - debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') -} - -const replaceXRange = (comp, options) => { - comp = comp.trim() - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug('xRange', comp, ret, gtlt, M, m, p, pr) - const xM = isX(M) - const xm = xM || isX(m) - const xp = xm || isX(p) - const anyX = xp - - if (gtlt === '=' && anyX) { - gtlt = '' - } - - // if we're including prereleases in the match, then we need - // to fix this to -0, the lowest possible prerelease value - pr = options.includePrerelease ? '-0' : '' - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0-0' - } else { - // nothing is forbidden - ret = '*' - } - } else if (gtlt && anyX) { - // we know patch is an x, because we have any x at all. - // replace X with 0 - if (xm) { - m = 0 - } - p = 0 - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - gtlt = '>=' - if (xm) { - M = +M + 1 - m = 0 - p = 0 - } else { - m = +m + 1 - p = 0 - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<' - if (xm) { - M = +M + 1 - } else { - m = +m + 1 - } - } - - if (gtlt === '<') { - pr = '-0' - } - - ret = `${gtlt + M}.${m}.${p}${pr}` - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` - } else if (xp) { - ret = `>=${M}.${m}.0${pr - } <${M}.${+m + 1}.0-0` - } - - debug('xRange return', ret) - - return ret - }) -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -const replaceStars = (comp, options) => { - debug('replaceStars', comp, options) - // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') -} - -const replaceGTE0 = (comp, options) => { - debug('replaceGTE0', comp, options) - return comp - .trim() - .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') -} - -// This function is passed to string.replace(re[t.HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 -// TODO build? -const hyphenReplace = incPr => ($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = '' - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? '-0' : ''}` - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` - } else if (fpr) { - from = `>=${from}` - } else { - from = `>=${from}${incPr ? '-0' : ''}` - } - - if (isX(tM)) { - to = '' - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0` - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0` - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}` - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0` - } else { - to = `<=${to}` - } - - return `${from} ${to}`.trim() -} - -const testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false - } - } - - if (version.prerelease.length && !options.includePrerelease) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (let i = 0; i < set.length; i++) { - debug(set[i].semver) - if (set[i].semver === Comparator.ANY) { - continue - } - - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) { - return true - } - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false - } - - return true -} - - -/***/ }), - -/***/ 73091: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(24879) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(86565) -const { safeRe: re, t } = __nccwpck_require__(90471) - -const parseOptions = __nccwpck_require__(82956) -const { compareIdentifiers } = __nccwpck_require__(70220) -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('build compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier, identifierBase) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier, identifierBase) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) - } - this.inc('pre', identifier, identifierBase) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 - - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - - if (this.prerelease.length === 0) { - this.prerelease = [base] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease - } - } else { - this.prerelease = prerelease - } - } - break - } - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` - } - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ 38847: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(64537) -const clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ''), options) - return s ? s.version : null -} -module.exports = clean - - -/***/ }), - -/***/ 13518: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const eq = __nccwpck_require__(69202) -const neq = __nccwpck_require__(93014) -const gt = __nccwpck_require__(46527) -const gte = __nccwpck_require__(29676) -const lt = __nccwpck_require__(86840) -const lte = __nccwpck_require__(59029) - -const cmp = (a, op, b, loose) => { - switch (op) { - case '===': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a === b - - case '!==': - if (typeof a === 'object') { - a = a.version - } - if (typeof b === 'object') { - b = b.version - } - return a !== b - - case '': - case '=': - case '==': - return eq(a, b, loose) - - case '!=': - return neq(a, b, loose) - - case '>': - return gt(a, b, loose) - - case '>=': - return gte(a, b, loose) - - case '<': - return lt(a, b, loose) - - case '<=': - return lte(a, b, loose) - - default: - throw new TypeError(`Invalid operator: ${op}`) - } -} -module.exports = cmp - - -/***/ }), - -/***/ 95505: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const parse = __nccwpck_require__(64537) -const { safeRe: re, t } = __nccwpck_require__(90471) - -const coerce = (version, options) => { - if (version instanceof SemVer) { - return version - } - - if (typeof version === 'number') { - version = String(version) - } - - if (typeof version !== 'string') { - return null - } - - options = options || {} - - let match = null - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]) - } else { - // Find the right-most coercible string that does not share - // a terminus with a more left-ward coercible string. - // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' - // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4' - // - // Walk through the string checking with a /g regexp - // Manually set the index so as to pick up overlapping matches. - // Stop when we get a match that ends at the string end, since no - // coercible string can be more right-ward without the same terminus. - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL] - let next - while ((next = coerceRtlRegex.exec(version)) && - (!match || match.index + match[0].length !== version.length) - ) { - if (!match || - next.index + next[0].length !== match.index + match[0].length) { - match = next - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length - } - // leave it in a clean state - coerceRtlRegex.lastIndex = -1 - } - - if (match === null) { - return null - } - - const major = match[2] - const minor = match[3] || '0' - const patch = match[4] || '0' - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : '' - const build = options.includePrerelease && match[6] ? `+${match[6]}` : '' - - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options) -} -module.exports = coerce - - -/***/ }), - -/***/ 59800: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose) - const versionB = new SemVer(b, loose) - return versionA.compare(versionB) || versionA.compareBuild(versionB) -} -module.exports = compareBuild - - -/***/ }), - -/***/ 36162: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const compareLoose = (a, b) => compare(a, b, true) -module.exports = compareLoose - - -/***/ }), - -/***/ 49277: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const compare = (a, b, loose) => - new SemVer(a, loose).compare(new SemVer(b, loose)) - -module.exports = compare - - -/***/ }), - -/***/ 75599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(64537) - -const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) - - if (comparison === 0) { - return null - } - - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' - } - - // Otherwise it can be determined by checking the high version - - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version - return 'patch' - } - - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' - } - - // bumping major/minor/patch all have same result - return 'major' - } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' - } - - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - - // high and low are preleases - return 'prerelease' -} - -module.exports = diff - - -/***/ }), - -/***/ 69202: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const eq = (a, b, loose) => compare(a, b, loose) === 0 -module.exports = eq - - -/***/ }), - -/***/ 46527: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const gt = (a, b, loose) => compare(a, b, loose) > 0 -module.exports = gt - - -/***/ }), - -/***/ 29676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const gte = (a, b, loose) => compare(a, b, loose) >= 0 -module.exports = gte - - -/***/ }), - -/***/ 22842: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) - -const inc = (version, release, options, identifier, identifierBase) => { - if (typeof (options) === 'string') { - identifierBase = identifier - identifier = options - options = undefined - } - - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version - } catch (er) { - return null - } -} -module.exports = inc - - -/***/ }), - -/***/ 86840: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const lt = (a, b, loose) => compare(a, b, loose) < 0 -module.exports = lt - - -/***/ }), - -/***/ 59029: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const lte = (a, b, loose) => compare(a, b, loose) <= 0 -module.exports = lte - - -/***/ }), - -/***/ 22375: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ 28563: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ 93014: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const neq = (a, b, loose) => compare(a, b, loose) !== 0 -module.exports = neq - - -/***/ }), - -/***/ 64537: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version - } - try { - return new SemVer(version, options) - } catch (er) { - if (!throwErrors) { - return null - } - throw er - } -} - -module.exports = parse - - -/***/ }), - -/***/ 98844: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ 86234: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(64537) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ 20725: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compare = __nccwpck_require__(49277) -const rcompare = (a, b, loose) => compare(b, a, loose) -module.exports = rcompare - - -/***/ }), - -/***/ 37696: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compareBuild = __nccwpck_require__(59800) -const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) -module.exports = rsort - - -/***/ }), - -/***/ 52227: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(27846) -const satisfies = (version, range, options) => { - try { - range = new Range(range, options) - } catch (er) { - return false - } - return range.test(version) -} -module.exports = satisfies - - -/***/ }), - -/***/ 63240: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const compareBuild = __nccwpck_require__(59800) -const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) -module.exports = sort - - -/***/ }), - -/***/ 91636: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(64537) -const valid = (version, options) => { - const v = parse(version, options) - return v ? v.version : null -} -module.exports = valid - - -/***/ }), - -/***/ 23360: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// just pre-load all the stuff that index.js lazily exports -const internalRe = __nccwpck_require__(90471) -const constants = __nccwpck_require__(86565) -const SemVer = __nccwpck_require__(73091) -const identifiers = __nccwpck_require__(70220) -const parse = __nccwpck_require__(64537) -const valid = __nccwpck_require__(91636) -const clean = __nccwpck_require__(38847) -const inc = __nccwpck_require__(22842) -const diff = __nccwpck_require__(75599) -const major = __nccwpck_require__(22375) -const minor = __nccwpck_require__(28563) -const patch = __nccwpck_require__(98844) -const prerelease = __nccwpck_require__(86234) -const compare = __nccwpck_require__(49277) -const rcompare = __nccwpck_require__(20725) -const compareLoose = __nccwpck_require__(36162) -const compareBuild = __nccwpck_require__(59800) -const sort = __nccwpck_require__(63240) -const rsort = __nccwpck_require__(37696) -const gt = __nccwpck_require__(46527) -const lt = __nccwpck_require__(86840) -const eq = __nccwpck_require__(69202) -const neq = __nccwpck_require__(93014) -const gte = __nccwpck_require__(29676) -const lte = __nccwpck_require__(59029) -const cmp = __nccwpck_require__(13518) -const coerce = __nccwpck_require__(95505) -const Comparator = __nccwpck_require__(11691) -const Range = __nccwpck_require__(27846) -const satisfies = __nccwpck_require__(52227) -const toComparators = __nccwpck_require__(22646) -const maxSatisfying = __nccwpck_require__(70049) -const minSatisfying = __nccwpck_require__(18907) -const minVersion = __nccwpck_require__(40098) -const validRange = __nccwpck_require__(98329) -const outside = __nccwpck_require__(57440) -const gtr = __nccwpck_require__(41292) -const ltr = __nccwpck_require__(42229) -const intersects = __nccwpck_require__(54961) -const simplifyRange = __nccwpck_require__(34756) -const subset = __nccwpck_require__(857) -module.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers, -} - - -/***/ }), - -/***/ 86565: -/***/ ((module) => { - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const 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 MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] - -module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, -} - - -/***/ }), - -/***/ 24879: -/***/ ((module) => { - -const 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 = debug - - -/***/ }), - -/***/ 70220: -/***/ ((module) => { - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} - - -/***/ }), - -/***/ 8127: -/***/ ((module) => { - -class LRUCache { - constructor () { - this.max = 1000 - this.map = new Map() - } - - get (key) { - const value = this.map.get(key) - if (value === undefined) { - return undefined - } else { - // Remove the key from the map and add it to the end - this.map.delete(key) - this.map.set(key, value) - return value - } - } - - delete (key) { - return this.map.delete(key) - } - - set (key, value) { - const deleted = this.delete(key) - - if (!deleted && value !== undefined) { - // If cache is full, delete the least recently used item - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value - this.delete(firstKey) - } - - this.map.set(key, value) - } - - return this - } -} - -module.exports = LRUCache - - -/***/ }), - -/***/ 82956: -/***/ ((module) => { - -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } - - if (typeof options !== 'object') { - return looseOption - } - - return options -} -module.exports = parseOptions - - -/***/ }), - -/***/ 90471: -/***/ ((module, exports, __nccwpck_require__) => { - -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = __nccwpck_require__(86565) -const debug = __nccwpck_require__(24879) -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const safeRe = exports.safeRe = [] -const src = exports.src = [] -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', MAX_LENGTH], - [LETTERDASHNUMBER, 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++ - debug(name, index, value) - t[name] = index - src[index] = value - 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. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## 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 identifer, 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,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${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*$') - - -/***/ }), - -/***/ 41292: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Determine if version is greater than all the versions possible in the range. -const outside = __nccwpck_require__(57440) -const gtr = (version, range, options) => outside(version, range, '>', options) -module.exports = gtr - - -/***/ }), - -/***/ 54961: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(27846) -const intersects = (r1, r2, options) => { - r1 = new Range(r1, options) - r2 = new Range(r2, options) - return r1.intersects(r2, options) -} -module.exports = intersects - - -/***/ }), - -/***/ 42229: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const outside = __nccwpck_require__(57440) -// Determine if version is less than all the versions possible in the range -const ltr = (version, range, options) => outside(version, range, '<', options) -module.exports = ltr - - -/***/ }), - -/***/ 70049: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const Range = __nccwpck_require__(27846) - -const maxSatisfying = (versions, range, options) => { - let max = null - let maxSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!max || maxSV.compare(v) === -1) { - // compare(max, v, true) - max = v - maxSV = new SemVer(max, options) - } - } - }) - return max -} -module.exports = maxSatisfying - - -/***/ }), - -/***/ 18907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const Range = __nccwpck_require__(27846) -const minSatisfying = (versions, range, options) => { - let min = null - let minSV = null - let rangeObj = null - try { - rangeObj = new Range(range, options) - } catch (er) { - return null - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - // satisfies(v, range, options) - if (!min || minSV.compare(v) === 1) { - // compare(min, v, true) - min = v - minSV = new SemVer(min, options) - } - } - }) - return min -} -module.exports = minSatisfying - - -/***/ }), - -/***/ 40098: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const Range = __nccwpck_require__(27846) -const gt = __nccwpck_require__(46527) - -const minVersion = (range, loose) => { - range = new Range(range, loose) - - let minver = new SemVer('0.0.0') - if (range.test(minver)) { - return minver - } - - minver = new SemVer('0.0.0-0') - if (range.test(minver)) { - return minver - } - - minver = null - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let setMin = null - comparators.forEach((comparator) => { - // Clone to avoid manipulating the comparator's semver object. - const compver = new SemVer(comparator.semver.version) - switch (comparator.operator) { - case '>': - if (compver.prerelease.length === 0) { - compver.patch++ - } else { - compver.prerelease.push(0) - } - compver.raw = compver.format() - /* fallthrough */ - case '': - case '>=': - if (!setMin || gt(compver, setMin)) { - setMin = compver - } - break - case '<': - case '<=': - /* Ignore maximum versions */ - break - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`) - } - }) - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin - } - } - - if (minver && range.test(minver)) { - return minver - } - - return null -} -module.exports = minVersion - - -/***/ }), - -/***/ 57440: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(73091) -const Comparator = __nccwpck_require__(11691) -const { ANY } = Comparator -const Range = __nccwpck_require__(27846) -const satisfies = __nccwpck_require__(52227) -const gt = __nccwpck_require__(46527) -const lt = __nccwpck_require__(86840) -const lte = __nccwpck_require__(59029) -const gte = __nccwpck_require__(29676) - -const outside = (version, range, hilo, options) => { - version = new SemVer(version, options) - range = new Range(range, options) - - let gtfn, ltefn, ltfn, comp, ecomp - switch (hilo) { - case '>': - gtfn = gt - ltefn = lte - ltfn = lt - comp = '>' - ecomp = '>=' - break - case '<': - gtfn = lt - ltefn = gte - ltfn = gt - comp = '<' - ecomp = '<=' - break - default: - throw new TypeError('Must provide a hilo val of "<" or ">"') - } - - // If it satisfies the range it is not outside - if (satisfies(version, range, options)) { - return false - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i] - - let high = null - let low = null - - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator - low = low || comparator - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator - } - }) - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false - } - } - return true -} - -module.exports = outside - - -/***/ }), - -/***/ 34756: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// given a set of versions and a range, create a "simplified" range -// that includes the same versions that the original range does -// If the original range is shorter than the simplified one, return that. -const satisfies = __nccwpck_require__(52227) -const compare = __nccwpck_require__(49277) -module.exports = (versions, range, options) => { - const set = [] - let first = null - let prev = null - const v = versions.sort((a, b) => compare(a, b, options)) - for (const version of v) { - const included = satisfies(version, range, options) - if (included) { - prev = version - if (!first) { - first = version - } - } else { - if (prev) { - set.push([first, prev]) - } - prev = null - first = null - } - } - if (first) { - set.push([first, null]) - } - - const ranges = [] - for (const [min, max] of set) { - if (min === max) { - ranges.push(min) - } else if (!max && min === v[0]) { - ranges.push('*') - } else if (!max) { - ranges.push(`>=${min}`) - } else if (min === v[0]) { - ranges.push(`<=${max}`) - } else { - ranges.push(`${min} - ${max}`) - } - } - const simplified = ranges.join(' || ') - const original = typeof range.raw === 'string' ? range.raw : String(range) - return simplified.length < original.length ? simplified : range -} - - -/***/ }), - -/***/ 857: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(27846) -const Comparator = __nccwpck_require__(11691) -const { ANY } = Comparator -const satisfies = __nccwpck_require__(52227) -const compare = __nccwpck_require__(49277) - -// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: -// - Every simple range `r1, r2, ...` is a null set, OR -// - Every simple range `r1, r2, ...` which is not a null set is a subset of -// some `R1, R2, ...` -// -// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: -// - If c is only the ANY comparator -// - If C is only the ANY comparator, return true -// - Else if in prerelease mode, return false -// - else replace c with `[>=0.0.0]` -// - If C is only the ANY comparator -// - if in prerelease mode, return true -// - else replace C with `[>=0.0.0]` -// - Let EQ be the set of = comparators in c -// - If EQ is more than one, return true (null set) -// - Let GT be the highest > or >= comparator in c -// - Let LT be the lowest < or <= comparator in c -// - If GT and LT, and GT.semver > LT.semver, return true (null set) -// - If any C is a = range, and GT or LT are set, return false -// - If EQ -// - If GT, and EQ does not satisfy GT, return true (null set) -// - If LT, and EQ does not satisfy LT, return true (null set) -// - If EQ satisfies every C, return true -// - Else return false -// - If GT -// - If GT.semver is lower than any > or >= comp in C, return false -// - If GT is >=, and GT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the GT.semver tuple, return false -// - If LT -// - If LT.semver is greater than any < or <= comp in C, return false -// - If LT is <=, and LT.semver does not satisfy every C, return false -// - If GT.semver has a prerelease, and not in prerelease mode -// - If no C has a prerelease and the LT.semver tuple, return false -// - Else return true - -const subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true - } - - sub = new Range(sub, options) - dom = new Range(dom, options) - let sawNonNull = false - - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options) - sawNonNull = sawNonNull || isSub !== null - if (isSub) { - continue OUTER - } - } - // the null set is a subset of everything, but null simple ranges in - // a complex range should be ignored. so if we saw a non-null range, - // then we know this isn't a subset, but if EVERY simple range was null, - // then it is a subset. - if (sawNonNull) { - return false - } - } - return true -} - -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - -const simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true - } - - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease - } else { - sub = minimumVersion - } - } - - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true - } else { - dom = minimumVersion - } - } - - const eqSet = new Set() - let gt, lt - for (const c of sub) { - if (c.operator === '>' || c.operator === '>=') { - gt = higherGT(gt, c, options) - } else if (c.operator === '<' || c.operator === '<=') { - lt = lowerLT(lt, c, options) - } else { - eqSet.add(c.semver) - } - } - - if (eqSet.size > 1) { - return null - } - - let gtltComp - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options) - if (gtltComp > 0) { - return null - } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) { - return null - } - } - - // will iterate one or zero times - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null - } - - if (lt && !satisfies(eq, String(lt), options)) { - return null - } - - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false - } - } - - return true - } - - let higher, lower - let hasDomLT, hasDomGT - // if the subset has a prerelease, we need a comparator in the superset - // with the same tuple and a prerelease, or it's not a subset - let needDomLTPre = lt && - !options.includePrerelease && - lt.semver.prerelease.length ? lt.semver : false - let needDomGTPre = gt && - !options.includePrerelease && - gt.semver.prerelease.length ? gt.semver : false - // exception: <1.2.3-0 is the same as <1.2.3 - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && - lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false - } - - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' - hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomGTPre.major && - c.semver.minor === needDomGTPre.minor && - c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false - } - } - if (c.operator === '>' || c.operator === '>=') { - higher = higherGT(gt, c, options) - if (higher === c && higher !== gt) { - return false - } - } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) { - return false - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && - c.semver.major === needDomLTPre.major && - c.semver.minor === needDomLTPre.minor && - c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false - } - } - if (c.operator === '<' || c.operator === '<=') { - lower = lowerLT(lt, c, options) - if (lower === c && lower !== lt) { - return false - } - } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) { - return false - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false - } - } - - // if there was a < or >, and nothing in the dom, then must be false - // UNLESS it was limited by another range in the other direction. - // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false - } - - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false - } - - // we needed a prerelease range in a specific tuple, but didn't get one - // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, - // because it includes prereleases in the 1.2.3 tuple - if (needDomGTPre || needDomLTPre) { - return false - } - - return true -} - -// >=1.2.3 is lower than >1.2.3 -const higherGT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp > 0 ? a - : comp < 0 ? b - : b.operator === '>' && a.operator === '>=' ? b - : a -} - -// <=1.2.3 is higher than <1.2.3 -const lowerLT = (a, b, options) => { - if (!a) { - return b - } - const comp = compare(a.semver, b.semver, options) - return comp < 0 ? a - : comp > 0 ? b - : b.operator === '<' && a.operator === '<=' ? b - : a -} - -module.exports = subset - - -/***/ }), - -/***/ 22646: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(27846) - -// Mostly just for testing and legacy API reasons -const toComparators = (range, options) => - new Range(range, options).set - .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) - -module.exports = toComparators - - -/***/ }), - -/***/ 98329: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Range = __nccwpck_require__(27846) -const validRange = (range, options) => { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, options).range || '*' - } catch (er) { - return null - } -} -module.exports = validRange - - -/***/ }), - -/***/ 57152: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * send - * Copyright(c) 2012 TJ Holowaychuk - * Copyright(c) 2014-2022 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var createError = __nccwpck_require__(24700) -var debug = __nccwpck_require__(78244)('send') -var deprecate = __nccwpck_require__(97500)('send') -var destroy = __nccwpck_require__(95377) -var encodeUrl = __nccwpck_require__(98279) -var escapeHtml = __nccwpck_require__(40846) -var etag = __nccwpck_require__(10502) -var fresh = __nccwpck_require__(41757) -var fs = __nccwpck_require__(79896) -var mime = __nccwpck_require__(40243) -var ms = __nccwpck_require__(2134) -var onFinished = __nccwpck_require__(41929) -var parseRange = __nccwpck_require__(86200) -var path = __nccwpck_require__(16928) -var statuses = __nccwpck_require__(21443) -var Stream = __nccwpck_require__(2203) -var util = __nccwpck_require__(39023) - -/** - * Path function references. - * @private - */ - -var extname = path.extname -var join = path.join -var normalize = path.normalize -var resolve = path.resolve -var sep = path.sep - -/** - * Regular expression for identifying a bytes Range header. - * @private - */ - -var BYTES_RANGE_REGEXP = /^ *bytes=/ - -/** - * Maximum value allowed for the max age. - * @private - */ - -var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1000 // 1 year - -/** - * Regular expression to match a path with a directory up component. - * @private - */ - -var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/ - -/** - * Module exports. - * @public - */ - -module.exports = send -module.exports.mime = mime - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {object} req - * @param {string} path - * @param {object} [options] - * @return {SendStream} - * @public - */ - -function send (req, path, options) { - return new SendStream(req, path, options) -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * @param {Request} req - * @param {String} path - * @param {object} [options] - * @private - */ - -function SendStream (req, path, options) { - Stream.call(this) - - var opts = options || {} - - this.options = opts - this.path = path - this.req = req - - this._acceptRanges = opts.acceptRanges !== undefined - ? Boolean(opts.acceptRanges) - : true - - this._cacheControl = opts.cacheControl !== undefined - ? Boolean(opts.cacheControl) - : true - - this._etag = opts.etag !== undefined - ? Boolean(opts.etag) - : true - - this._dotfiles = opts.dotfiles !== undefined - ? opts.dotfiles - : 'ignore' - - if (this._dotfiles !== 'ignore' && this._dotfiles !== 'allow' && this._dotfiles !== 'deny') { - throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"') - } - - this._hidden = Boolean(opts.hidden) - - if (opts.hidden !== undefined) { - deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead') - } - - // legacy support - if (opts.dotfiles === undefined) { - this._dotfiles = undefined - } - - this._extensions = opts.extensions !== undefined - ? normalizeList(opts.extensions, 'extensions option') - : [] - - this._immutable = opts.immutable !== undefined - ? Boolean(opts.immutable) - : false - - this._index = opts.index !== undefined - ? normalizeList(opts.index, 'index option') - : ['index.html'] - - this._lastModified = opts.lastModified !== undefined - ? Boolean(opts.lastModified) - : true - - this._maxage = opts.maxAge || opts.maxage - this._maxage = typeof this._maxage === 'string' - ? ms(this._maxage) - : Number(this._maxage) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - - this._root = opts.root - ? resolve(opts.root) - : null - - if (!this._root && opts.from) { - this.from(opts.from) - } -} - -/** - * Inherits from `Stream`. - */ - -util.inherits(SendStream, Stream) - -/** - * Enable or disable etag generation. - * - * @param {Boolean} val - * @return {SendStream} - * @api public - */ - -SendStream.prototype.etag = deprecate.function(function etag (val) { - this._etag = Boolean(val) - debug('etag %s', this._etag) - return this -}, 'send.etag: pass etag as option') - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = deprecate.function(function hidden (val) { - this._hidden = Boolean(val) - this._dotfiles = undefined - debug('hidden %s', this._hidden) - return this -}, 'send.hidden: use dotfiles option') - -/** - * Set index `paths`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean|Array} paths - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = deprecate.function(function index (paths) { - var index = !paths ? [] : normalizeList(paths, 'paths argument') - debug('index %o', paths) - this._index = index - return this -}, 'send.index: pass index as option') - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = function root (path) { - this._root = resolve(String(path)) - debug('root %s', this._root) - return this -} - -SendStream.prototype.from = deprecate.function(SendStream.prototype.root, - 'send.from: pass root as option') - -SendStream.prototype.root = deprecate.function(SendStream.prototype.root, - 'send.root: pass root as option') - -/** - * Set max-age to `maxAge`. - * - * @param {Number} maxAge - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = deprecate.function(function maxage (maxAge) { - this._maxage = typeof maxAge === 'string' - ? ms(maxAge) - : Number(maxAge) - this._maxage = !isNaN(this._maxage) - ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) - : 0 - debug('max-age %d', this._maxage) - return this -}, 'send.maxage: pass maxAge as option') - -/** - * Emit error with `status`. - * - * @param {number} status - * @param {Error} [err] - * @private - */ - -SendStream.prototype.error = function error (status, err) { - // emit if listeners instead of responding - if (hasListeners(this, 'error')) { - return this.emit('error', createHttpError(status, err)) - } - - var res = this.res - var msg = statuses.message[status] || String(status) - var doc = createHtmlDocument('Error', escapeHtml(msg)) - - // clear existing headers - clearHeaders(res) - - // add error headers - if (err && err.headers) { - setHeaders(res, err.headers) - } - - // send basic response - res.statusCode = status - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.end(doc) -} - -/** - * Check if the pathname ends with "/". - * - * @return {boolean} - * @private - */ - -SendStream.prototype.hasTrailingSlash = function hasTrailingSlash () { - return this.path[this.path.length - 1] === '/' -} - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function isConditionalGET () { - return this.req.headers['if-match'] || - this.req.headers['if-unmodified-since'] || - this.req.headers['if-none-match'] || - this.req.headers['if-modified-since'] -} - -/** - * Check if the request preconditions failed. - * - * @return {boolean} - * @private - */ - -SendStream.prototype.isPreconditionFailure = function isPreconditionFailure () { - var req = this.req - var res = this.res - - // if-match - var match = req.headers['if-match'] - if (match) { - var etag = res.getHeader('ETag') - return !etag || (match !== '*' && parseTokenList(match).every(function (match) { - return match !== etag && match !== 'W/' + etag && 'W/' + match !== etag - })) - } - - // if-unmodified-since - var unmodifiedSince = parseHttpDate(req.headers['if-unmodified-since']) - if (!isNaN(unmodifiedSince)) { - var lastModified = parseHttpDate(res.getHeader('Last-Modified')) - return isNaN(lastModified) || lastModified > unmodifiedSince - } - - return false -} - -/** - * Strip various content header fields for a change in entity. - * - * @private - */ - -SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields () { - var res = this.res - - res.removeHeader('Content-Encoding') - res.removeHeader('Content-Language') - res.removeHeader('Content-Length') - res.removeHeader('Content-Range') - res.removeHeader('Content-Type') -} - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function notModified () { - var res = this.res - debug('not modified') - this.removeContentHeaderFields() - res.statusCode = 304 - res.end() -} - -/** - * Raise error that headers already sent. - * - * @api private - */ - -SendStream.prototype.headersAlreadySent = function headersAlreadySent () { - var err = new Error('Can\'t set headers after they are sent.') - debug('headers already sent') - this.error(500, err) -} - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function isCachable () { - var statusCode = this.res.statusCode - return (statusCode >= 200 && statusCode < 300) || - statusCode === 304 -} - -/** - * Handle stat() error. - * - * @param {Error} error - * @private - */ - -SendStream.prototype.onStatError = function onStatError (error) { - switch (error.code) { - case 'ENAMETOOLONG': - case 'ENOENT': - case 'ENOTDIR': - this.error(404, error) - break - default: - this.error(500, error) - break - } -} - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function isFresh () { - return fresh(this.req.headers, { - etag: this.res.getHeader('ETag'), - 'last-modified': this.res.getHeader('Last-Modified') - }) -} - -/** - * Check if the range is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isRangeFresh = function isRangeFresh () { - var ifRange = this.req.headers['if-range'] - - if (!ifRange) { - return true - } - - // if-range as etag - if (ifRange.indexOf('"') !== -1) { - var etag = this.res.getHeader('ETag') - return Boolean(etag && ifRange.indexOf(etag) !== -1) - } - - // if-range as modified date - var lastModified = this.res.getHeader('Last-Modified') - return parseHttpDate(lastModified) <= parseHttpDate(ifRange) -} - -/** - * Redirect to path. - * - * @param {string} path - * @private - */ - -SendStream.prototype.redirect = function redirect (path) { - var res = this.res - - if (hasListeners(this, 'directory')) { - this.emit('directory', res, path) - return - } - - if (this.hasTrailingSlash()) { - this.error(403) - return - } - - var loc = encodeUrl(collapseLeadingSlashes(this.path + '/')) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // redirect - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) -} - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function pipe (res) { - // root path - var root = this._root - - // references - this.res = res - - // decode the path - var path = decode(this.path) - if (path === -1) { - this.error(400) - return res - } - - // null byte(s) - if (~path.indexOf('\0')) { - this.error(400) - return res - } - - var parts - if (root !== null) { - // normalize - if (path) { - path = normalize('.' + sep + path) - } - - // malicious path - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = path.split(sep) - - // join / normalize from optional root dir - path = normalize(join(root, path)) - } else { - // ".." is malicious without "root" - if (UP_PATH_REGEXP.test(path)) { - debug('malicious path "%s"', path) - this.error(403) - return res - } - - // explode path parts - parts = normalize(path).split(sep) - - // resolve the path - path = resolve(path) - } - - // dotfile handling - if (containsDotFile(parts)) { - var access = this._dotfiles - - // legacy support - if (access === undefined) { - access = parts[parts.length - 1][0] === '.' - ? (this._hidden ? 'allow' : 'ignore') - : 'allow' - } - - debug('%s dotfile "%s"', access, path) - switch (access) { - case 'allow': - break - case 'deny': - this.error(403) - return res - case 'ignore': - default: - this.error(404) - return res - } - } - - // index file support - if (this._index.length && this.hasTrailingSlash()) { - this.sendIndex(path) - return res - } - - this.sendFile(path) - return res -} - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function send (path, stat) { - var len = stat.size - var options = this.options - var opts = {} - var res = this.res - var req = this.req - var ranges = req.headers.range - var offset = options.start || 0 - - if (headersSent(res)) { - // impossible to send now - this.headersAlreadySent() - return - } - - debug('pipe "%s"', path) - - // set header fields - this.setHeader(path, stat) - - // set content-type - this.type(path) - - // conditional GET support - if (this.isConditionalGET()) { - if (this.isPreconditionFailure()) { - this.error(412) - return - } - - if (this.isCachable() && this.isFresh()) { - this.notModified() - return - } - } - - // adjust len to start/end options - len = Math.max(0, len - offset) - if (options.end !== undefined) { - var bytes = options.end - offset + 1 - if (len > bytes) len = bytes - } - - // Range support - if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { - // parse - ranges = parseRange(len, ranges, { - combine: true - }) - - // If-Range support - if (!this.isRangeFresh()) { - debug('range stale') - ranges = -2 - } - - // unsatisfiable - if (ranges === -1) { - debug('range unsatisfiable') - - // Content-Range - res.setHeader('Content-Range', contentRange('bytes', len)) - - // 416 Requested Range Not Satisfiable - return this.error(416, { - headers: { 'Content-Range': res.getHeader('Content-Range') } - }) - } - - // valid (syntactically invalid/multiple ranges are treated as a regular response) - if (ranges !== -2 && ranges.length === 1) { - debug('range %j', ranges) - - // Content-Range - res.statusCode = 206 - res.setHeader('Content-Range', contentRange('bytes', len, ranges[0])) - - // adjust for requested range - offset += ranges[0].start - len = ranges[0].end - ranges[0].start + 1 - } - } - - // clone options - for (var prop in options) { - opts[prop] = options[prop] - } - - // set read options - opts.start = offset - opts.end = Math.max(offset, offset + len - 1) - - // content-length - res.setHeader('Content-Length', len) - - // HEAD support - if (req.method === 'HEAD') { - res.end() - return - } - - this.stream(path, opts) -} - -/** - * Transfer file for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendFile = function sendFile (path) { - var i = 0 - var self = this - - debug('stat "%s"', path) - fs.stat(path, function onstat (err, stat) { - if (err && err.code === 'ENOENT' && !extname(path) && path[path.length - 1] !== sep) { - // not found, check extensions - return next(err) - } - if (err) return self.onStatError(err) - if (stat.isDirectory()) return self.redirect(path) - self.emit('file', path, stat) - self.send(path, stat) - }) - - function next (err) { - if (self._extensions.length <= i) { - return err - ? self.onStatError(err) - : self.error(404) - } - - var p = path + '.' + self._extensions[i++] - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } -} - -/** - * Transfer index for `path`. - * - * @param {String} path - * @api private - */ -SendStream.prototype.sendIndex = function sendIndex (path) { - var i = -1 - var self = this - - function next (err) { - if (++i >= self._index.length) { - if (err) return self.onStatError(err) - return self.error(404) - } - - var p = join(path, self._index[i]) - - debug('stat "%s"', p) - fs.stat(p, function (err, stat) { - if (err) return next(err) - if (stat.isDirectory()) return next() - self.emit('file', p, stat) - self.send(p, stat) - }) - } - - next() -} - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function stream (path, options) { - var self = this - var res = this.res - - // pipe - var stream = fs.createReadStream(path, options) - this.emit('stream', stream) - stream.pipe(res) - - // cleanup - function cleanup () { - destroy(stream, true) - } - - // response finished, cleanup - onFinished(res, cleanup) - - // error handling - stream.on('error', function onerror (err) { - // clean up stream early - cleanup() - - // error - self.onStatError(err) - }) - - // end - stream.on('end', function onend () { - self.emit('end') - }) -} - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function type (path) { - var res = this.res - - if (res.getHeader('Content-Type')) return - - var type = mime.lookup(path) - - if (!type) { - debug('no content-type') - return - } - - var charset = mime.charsets.lookup(type) - - debug('content-type %s', type) - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')) -} - -/** - * Set response header fields, most - * fields may be pre-defined. - * - * @param {String} path - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function setHeader (path, stat) { - var res = this.res - - this.emit('headers', res, path, stat) - - if (this._acceptRanges && !res.getHeader('Accept-Ranges')) { - debug('accept ranges') - res.setHeader('Accept-Ranges', 'bytes') - } - - if (this._cacheControl && !res.getHeader('Cache-Control')) { - var cacheControl = 'public, max-age=' + Math.floor(this._maxage / 1000) - - if (this._immutable) { - cacheControl += ', immutable' - } - - debug('cache-control %s', cacheControl) - res.setHeader('Cache-Control', cacheControl) - } - - if (this._lastModified && !res.getHeader('Last-Modified')) { - var modified = stat.mtime.toUTCString() - debug('modified %s', modified) - res.setHeader('Last-Modified', modified) - } - - if (this._etag && !res.getHeader('ETag')) { - var val = etag(stat) - debug('etag %s', val) - res.setHeader('ETag', val) - } -} - -/** - * Clear all headers from a response. - * - * @param {object} res - * @private - */ - -function clearHeaders (res) { - var headers = getHeaderNames(res) - - for (var i = 0; i < headers.length; i++) { - res.removeHeader(headers[i]) - } -} - -/** - * Collapse all leading slashes into a single slash - * - * @param {string} str - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str[i] !== '/') { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Determine if path parts contain a dotfile. - * - * @api private - */ - -function containsDotFile (parts) { - for (var i = 0; i < parts.length; i++) { - var part = parts[i] - if (part.length > 1 && part[0] === '.') { - return true - } - } - - return false -} - -/** - * Create a Content-Range header. - * - * @param {string} type - * @param {number} size - * @param {array} [range] - */ - -function contentRange (type, size, range) { - return type + ' ' + (range ? range.start + '-' + range.end : '*') + '/' + size -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a HttpError object from simple arguments. - * - * @param {number} status - * @param {Error|object} err - * @private - */ - -function createHttpError (status, err) { - if (!err) { - return createError(status) - } - - return err instanceof Error - ? createError(status, err, { expose: false }) - : createError(status, err) -} - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -function decode (path) { - try { - return decodeURIComponent(path) - } catch (err) { - return -1 - } -} - -/** - * Get the header names on a respnse. - * - * @param {object} res - * @returns {array[string]} - * @private - */ - -function getHeaderNames (res) { - return typeof res.getHeaderNames !== 'function' - ? Object.keys(res._headers || {}) - : res.getHeaderNames() -} - -/** - * Determine if emitter has listeners of a given type. - * - * The way to do this check is done three different ways in Node.js >= 0.8 - * so this consolidates them into a minimal set using instance methods. - * - * @param {EventEmitter} emitter - * @param {string} type - * @returns {boolean} - * @private - */ - -function hasListeners (emitter, type) { - var count = typeof emitter.listenerCount !== 'function' - ? emitter.listeners(type).length - : emitter.listenerCount(type) - - return count > 0 -} - -/** - * Determine if the response headers have been sent. - * - * @param {object} res - * @returns {boolean} - * @private - */ - -function headersSent (res) { - return typeof res.headersSent !== 'boolean' - ? Boolean(res._header) - : res.headersSent -} - -/** - * Normalize the index option into an array. - * - * @param {boolean|string|array} val - * @param {string} name - * @private - */ - -function normalizeList (val, name) { - var list = [].concat(val || []) - - for (var i = 0; i < list.length; i++) { - if (typeof list[i] !== 'string') { - throw new TypeError(name + ' must be array of strings or false') - } - } - - return list -} - -/** - * Parse an HTTP Date into a number. - * - * @param {string} date - * @private - */ - -function parseHttpDate (date) { - var timestamp = date && Date.parse(date) - - return typeof timestamp === 'number' - ? timestamp - : NaN -} - -/** - * Parse a HTTP token list. - * - * @param {string} str - * @private - */ - -function parseTokenList (str) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = str.length; i < len; i++) { - switch (str.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 - } - break - case 0x2c: /* , */ - if (start !== end) { - list.push(str.substring(start, end)) - } - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - if (start !== end) { - list.push(str.substring(start, end)) - } - - return list -} - -/** - * Set an object of headers on a response. - * - * @param {object} res - * @param {object} headers - * @private - */ - -function setHeaders (res, headers) { - var keys = Object.keys(headers) - - for (var i = 0; i < keys.length; i++) { - var key = keys[i] - res.setHeader(key, headers[key]) - } -} - - -/***/ }), - -/***/ 52458: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * serve-static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2014-2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var encodeUrl = __nccwpck_require__(76094) -var escapeHtml = __nccwpck_require__(40846) -var parseUrl = __nccwpck_require__(38473) -var resolve = (__nccwpck_require__(16928).resolve) -var send = __nccwpck_require__(57152) -var url = __nccwpck_require__(87016) - -/** - * Module exports. - * @public - */ - -module.exports = serveStatic -module.exports.mime = send.mime - -/** - * @param {string} root - * @param {object} [options] - * @return {function} - * @public - */ - -function serveStatic (root, options) { - if (!root) { - throw new TypeError('root path required') - } - - if (typeof root !== 'string') { - throw new TypeError('root path must be a string') - } - - // copy options object - var opts = Object.create(options || null) - - // fall-though - var fallthrough = opts.fallthrough !== false - - // default redirect - var redirect = opts.redirect !== false - - // headers listener - var setHeaders = opts.setHeaders - - if (setHeaders && typeof setHeaders !== 'function') { - throw new TypeError('option setHeaders must be function') - } - - // setup options for send - opts.maxage = opts.maxage || opts.maxAge || 0 - opts.root = resolve(root) - - // construct directory listener - var onDirectory = redirect - ? createRedirectDirectoryListener() - : createNotFoundDirectoryListener() - - return function serveStatic (req, res, next) { - if (req.method !== 'GET' && req.method !== 'HEAD') { - if (fallthrough) { - return next() - } - - // method not allowed - res.statusCode = 405 - res.setHeader('Allow', 'GET, HEAD') - res.setHeader('Content-Length', '0') - res.end() - return - } - - var forwardError = !fallthrough - var originalUrl = parseUrl.original(req) - var path = parseUrl(req).pathname - - // make sure redirect occurs at mount - if (path === '/' && originalUrl.pathname.substr(-1) !== '/') { - path = '' - } - - // create send stream - var stream = send(req, path, opts) - - // add directory handler - stream.on('directory', onDirectory) - - // add headers listener - if (setHeaders) { - stream.on('headers', setHeaders) - } - - // add file listener for fallthrough - if (fallthrough) { - stream.on('file', function onFile () { - // once file is determined, always forward error - forwardError = true - }) - } - - // forward errors - stream.on('error', function error (err) { - if (forwardError || !(err.statusCode < 500)) { - next(err) - return - } - - next() - }) - - // pipe - stream.pipe(res) - } -} - -/** - * Collapse all leading slashes into a single slash - * @private - */ -function collapseLeadingSlashes (str) { - for (var i = 0; i < str.length; i++) { - if (str.charCodeAt(i) !== 0x2f /* / */) { - break - } - } - - return i > 1 - ? '/' + str.substr(i) - : str -} - -/** - * Create a minimal HTML document. - * - * @param {string} title - * @param {string} body - * @private - */ - -function createHtmlDocument (title, body) { - return '\n' + - '\n' + - '\n' + - '\n' + - '' + title + '\n' + - '\n' + - '\n' + - '
' + body + '
\n' + - '\n' + - '\n' -} - -/** - * Create a directory listener that just 404s. - * @private - */ - -function createNotFoundDirectoryListener () { - return function notFound () { - this.error(404) - } -} - -/** - * Create a directory listener that performs a redirect. - * @private - */ - -function createRedirectDirectoryListener () { - return function redirect (res) { - if (this.hasTrailingSlash()) { - this.error(404) - return - } - - // get original URL - var originalUrl = parseUrl.original(this.req) - - // append trailing slash - originalUrl.path = null - originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + '/') - - // reformat the URL - var loc = encodeUrl(url.format(originalUrl)) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) - - // send redirect response - res.statusCode = 301 - res.setHeader('Content-Type', 'text/html; charset=UTF-8') - res.setHeader('Content-Length', Buffer.byteLength(doc)) - res.setHeader('Content-Security-Policy', "default-src 'none'") - res.setHeader('X-Content-Type-Options', 'nosniff') - res.setHeader('Location', loc) - res.end(doc) - } -} - - -/***/ }), - -/***/ 73239: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var GetIntrinsic = __nccwpck_require__(485); -var define = __nccwpck_require__(68042); -var hasDescriptors = __nccwpck_require__(96951)(); -var gOPD = __nccwpck_require__(23186); - -var $TypeError = __nccwpck_require__(56458); -var $floor = GetIntrinsic('%Math.floor%'); - -/** @type {import('.')} */ -module.exports = function setFunctionLength(fn, length) { - if (typeof fn !== 'function') { - throw new $TypeError('`fn` is not a function'); - } - if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) { - throw new $TypeError('`length` must be a positive 32-bit integer'); - } - - var loose = arguments.length > 2 && !!arguments[2]; - - var functionLengthIsConfigurable = true; - var functionLengthIsWritable = true; - if ('length' in fn && gOPD) { - var desc = gOPD(fn, 'length'); - if (desc && !desc.configurable) { - functionLengthIsConfigurable = false; - } - if (desc && !desc.writable) { - functionLengthIsWritable = false; - } - } - - if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { - if (hasDescriptors) { - define(/** @type {Parameters[0]} */ (fn), 'length', length, true, true); - } else { - define(/** @type {Parameters[0]} */ (fn), 'length', length); - } - } - return fn; -}; - - -/***/ }), - -/***/ 99: -/***/ ((module) => { - -"use strict"; - -/* eslint no-proto: 0 */ -module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) - -function setProtoOf (obj, proto) { - obj.__proto__ = proto - return obj -} - -function mixinProperties (obj, proto) { - for (var prop in proto) { - if (!Object.prototype.hasOwnProperty.call(obj, prop)) { - obj[prop] = proto[prop] - } - } - return obj -} - - -/***/ }), - -/***/ 81779: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var GetIntrinsic = __nccwpck_require__(485); -var callBound = __nccwpck_require__(29196); -var inspect = __nccwpck_require__(79162); - -var $TypeError = __nccwpck_require__(56458); -var $WeakMap = GetIntrinsic('%WeakMap%', true); -var $Map = GetIntrinsic('%Map%', true); - -var $weakMapGet = callBound('WeakMap.prototype.get', true); -var $weakMapSet = callBound('WeakMap.prototype.set', true); -var $weakMapHas = callBound('WeakMap.prototype.has', true); -var $mapGet = callBound('Map.prototype.get', true); -var $mapSet = callBound('Map.prototype.set', true); -var $mapHas = callBound('Map.prototype.has', true); - -/* -* This function traverses the list returning the node corresponding to the given key. -* -* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly. -*/ -/** @type {import('.').listGetNode} */ -var listGetNode = function (list, key) { // eslint-disable-line consistent-return - /** @type {typeof list | NonNullable<(typeof list)['next']>} */ - var prev = list; - /** @type {(typeof list)['next']} */ - var curr; - for (; (curr = prev.next) !== null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - // eslint-disable-next-line no-extra-parens - curr.next = /** @type {NonNullable} */ (list.next); - list.next = curr; // eslint-disable-line no-param-reassign - return curr; - } - } -}; - -/** @type {import('.').listGet} */ -var listGet = function (objects, key) { - var node = listGetNode(objects, key); - return node && node.value; -}; -/** @type {import('.').listSet} */ -var listSet = function (objects, key, value) { - var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - // Prepend the new node to the beginning of the list - objects.next = /** @type {import('.').ListNode} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens - key: key, - next: objects.next, - value: value - }); - } -}; -/** @type {import('.').listHas} */ -var listHas = function (objects, key) { - return !!listGetNode(objects, key); -}; - -/** @type {import('.')} */ -module.exports = function getSideChannel() { - /** @type {WeakMap} */ var $wm; - /** @type {Map} */ var $m; - /** @type {import('.').RootNode} */ var $o; - - /** @type {import('.').Channel} */ - var channel = { - assert: function (key) { - if (!channel.has(key)) { - throw new $TypeError('Side channel does not contain ' + inspect(key)); - } - }, - get: function (key) { // eslint-disable-line consistent-return - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapGet($wm, key); - } - } else if ($Map) { - if ($m) { - return $mapGet($m, key); - } - } else { - if ($o) { // eslint-disable-line no-lonely-if - return listGet($o, key); - } - } - }, - has: function (key) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if ($wm) { - return $weakMapHas($wm, key); - } - } else if ($Map) { - if ($m) { - return $mapHas($m, key); - } - } else { - if ($o) { // eslint-disable-line no-lonely-if - return listHas($o, key); - } - } - return false; - }, - set: function (key, value) { - if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { - if (!$wm) { - $wm = new $WeakMap(); - } - $weakMapSet($wm, key, value); - } else if ($Map) { - if (!$m) { - $m = new $Map(); - } - $mapSet($m, key, value); - } else { - if (!$o) { - // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head - $o = { key: {}, next: null }; - } - listSet($o, key, value); - } - } - }; - return channel; -}; - - -/***/ }), - -/***/ 42460: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -const utils_1 = __nccwpck_require__(10549); -function throwLater(e) { - setTimeout(function () { - throw e; - }, 0); -} -function asCallback(promise, nodeback, options) { - if (typeof nodeback === "function") { - promise.then((val) => { - let ret; - if (options !== undefined && - Object(options).spread && - Array.isArray(val)) { - ret = utils_1.tryCatch(nodeback).apply(undefined, [null].concat(val)); - } - else { - ret = - val === undefined - ? utils_1.tryCatch(nodeback)(null) - : utils_1.tryCatch(nodeback)(null, val); - } - if (ret === utils_1.errorObj) { - throwLater(ret.e); - } - }, (cause) => { - if (!cause) { - const newReason = new Error(cause + ""); - Object.assign(newReason, { cause }); - cause = newReason; - } - const ret = utils_1.tryCatch(nodeback)(cause); - if (ret === utils_1.errorObj) { - throwLater(ret.e); - } - }); - } - return promise; -} -exports["default"] = asCallback; - - -/***/ }), - -/***/ 10549: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.tryCatch = exports.errorObj = void 0; -//Try catch is not supported in optimizing -//compiler, so it is isolated -exports.errorObj = { e: {} }; -let tryCatchTarget; -function tryCatcher(err, val) { - try { - const target = tryCatchTarget; - tryCatchTarget = null; - return target.apply(this, arguments); - } - catch (e) { - exports.errorObj.e = e; - return exports.errorObj; - } -} -function tryCatch(fn) { - tryCatchTarget = fn; - return tryCatcher; -} -exports.tryCatch = tryCatch; - - -/***/ }), - -/***/ 21443: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var codes = __nccwpck_require__(81033) - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.message = codes - -// status message (lower-case) to code map -status.code = createMessageToStatusCodeMap(codes) - -// array of status codes -status.codes = createStatusCodeList(codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Create a map of message to status code. - * @private - */ - -function createMessageToStatusCodeMap (codes) { - var map = {} - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // populate map - map[message.toLowerCase()] = status - }) - - return map -} - -/** - * Create a list of all status codes. - * @private - */ - -function createStatusCodeList (codes) { - return Object.keys(codes).map(function mapCode (code) { - return Number(code) - }) -} - -/** - * Get the status code for given message. - * @private - */ - -function getStatusCode (message) { - var msg = message.toLowerCase() - - if (!Object.prototype.hasOwnProperty.call(status.code, msg)) { - throw new Error('invalid status message: "' + message + '"') - } - - return status.code[msg] -} - -/** - * Get the status message for given code. - * @private - */ - -function getStatusMessage (code) { - if (!Object.prototype.hasOwnProperty.call(status.message, code)) { - throw new Error('invalid status code: ' + code) - } - - return status.message[code] -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - return getStatusMessage(code) - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - return getStatusMessage(n) - } - - return getStatusCode(code) -} - - -/***/ }), - -/***/ 23252: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -/**/ - -var Buffer = (__nccwpck_require__(53476).Buffer); -/**/ - -var isEncoding = Buffer.isEncoding || function (encoding) { - encoding = '' + encoding; - switch (encoding && encoding.toLowerCase()) { - case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': - return true; - default: - return false; - } -}; - -function _normalizeEncoding(enc) { - if (!enc) return 'utf8'; - var retried; - while (true) { - switch (enc) { - case 'utf8': - case 'utf-8': - return 'utf8'; - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return 'utf16le'; - case 'latin1': - case 'binary': - return 'latin1'; - case 'base64': - case 'ascii': - case 'hex': - return enc; - default: - if (retried) return; // undefined - enc = ('' + enc).toLowerCase(); - retried = true; - } - } -}; - -// Do not cache `Buffer.isEncoding` when checking encoding names as some -// modules monkey-patch it to support additional encodings -function normalizeEncoding(enc) { - var nenc = _normalizeEncoding(enc); - if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); - return nenc || enc; -} - -// StringDecoder provides an interface for efficiently splitting a series of -// buffers into a series of JS strings without breaking apart multi-byte -// characters. -exports.I = StringDecoder; -function StringDecoder(encoding) { - this.encoding = normalizeEncoding(encoding); - var nb; - switch (this.encoding) { - case 'utf16le': - this.text = utf16Text; - this.end = utf16End; - nb = 4; - break; - case 'utf8': - this.fillLast = utf8FillLast; - nb = 4; - break; - case 'base64': - this.text = base64Text; - this.end = base64End; - nb = 3; - break; - default: - this.write = simpleWrite; - this.end = simpleEnd; - return; - } - this.lastNeed = 0; - this.lastTotal = 0; - this.lastChar = Buffer.allocUnsafe(nb); -} - -StringDecoder.prototype.write = function (buf) { - if (buf.length === 0) return ''; - var r; - var i; - if (this.lastNeed) { - r = this.fillLast(buf); - if (r === undefined) return ''; - i = this.lastNeed; - this.lastNeed = 0; - } else { - i = 0; - } - if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); - return r || ''; -}; - -StringDecoder.prototype.end = utf8End; - -// Returns only complete characters in a Buffer -StringDecoder.prototype.text = utf8Text; - -// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer -StringDecoder.prototype.fillLast = function (buf) { - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); - this.lastNeed -= buf.length; -}; - -// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a -// continuation byte. If an invalid byte is detected, -2 is returned. -function utf8CheckByte(byte) { - if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; - return byte >> 6 === 0x02 ? -1 : -2; -} - -// Checks at most 3 bytes at the end of a Buffer in order to detect an -// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) -// needed to complete the UTF-8 character (if applicable) are returned. -function utf8CheckIncomplete(self, buf, i) { - var j = buf.length - 1; - if (j < i) return 0; - var nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 1; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) self.lastNeed = nb - 2; - return nb; - } - if (--j < i || nb === -2) return 0; - nb = utf8CheckByte(buf[j]); - if (nb >= 0) { - if (nb > 0) { - if (nb === 2) nb = 0;else self.lastNeed = nb - 3; - } - return nb; - } - return 0; -} - -// Validates as many continuation bytes for a multi-byte UTF-8 character as -// needed or are available. If we see a non-continuation byte where we expect -// one, we "replace" the validated continuation bytes we've seen so far with -// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding -// behavior. The continuation byte check is included three times in the case -// where all of the continuation bytes for a character exist in the same buffer. -// It is also done this way as a slight performance increase instead of using a -// loop. -function utf8CheckExtraBytes(self, buf, p) { - if ((buf[0] & 0xC0) !== 0x80) { - self.lastNeed = 0; - return '\ufffd'; - } - if (self.lastNeed > 1 && buf.length > 1) { - if ((buf[1] & 0xC0) !== 0x80) { - self.lastNeed = 1; - return '\ufffd'; - } - if (self.lastNeed > 2 && buf.length > 2) { - if ((buf[2] & 0xC0) !== 0x80) { - self.lastNeed = 2; - return '\ufffd'; - } - } - } -} - -// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. -function utf8FillLast(buf) { - var p = this.lastTotal - this.lastNeed; - var r = utf8CheckExtraBytes(this, buf, p); - if (r !== undefined) return r; - if (this.lastNeed <= buf.length) { - buf.copy(this.lastChar, p, 0, this.lastNeed); - return this.lastChar.toString(this.encoding, 0, this.lastTotal); - } - buf.copy(this.lastChar, p, 0, buf.length); - this.lastNeed -= buf.length; -} - -// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a -// partial character, the character's bytes are buffered until the required -// number of bytes are available. -function utf8Text(buf, i) { - var total = utf8CheckIncomplete(this, buf, i); - if (!this.lastNeed) return buf.toString('utf8', i); - this.lastTotal = total; - var end = buf.length - (total - this.lastNeed); - buf.copy(this.lastChar, 0, end); - return buf.toString('utf8', i, end); -} - -// For UTF-8, a replacement character is added when ending on a partial -// character. -function utf8End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + '\ufffd'; - return r; -} - -// UTF-16LE typically needs two bytes per character, but even if we have an even -// number of bytes available, we need to check if we end on a leading/high -// surrogate. In that case, we need to wait for the next two bytes in order to -// decode the last character properly. -function utf16Text(buf, i) { - if ((buf.length - i) % 2 === 0) { - var r = buf.toString('utf16le', i); - if (r) { - var c = r.charCodeAt(r.length - 1); - if (c >= 0xD800 && c <= 0xDBFF) { - this.lastNeed = 2; - this.lastTotal = 4; - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - return r.slice(0, -1); - } - } - return r; - } - this.lastNeed = 1; - this.lastTotal = 2; - this.lastChar[0] = buf[buf.length - 1]; - return buf.toString('utf16le', i, buf.length - 1); -} - -// For UTF-16LE we do not explicitly append special replacement characters if we -// end on a partial character, we simply let v8 handle that. -function utf16End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) { - var end = this.lastTotal - this.lastNeed; - return r + this.lastChar.toString('utf16le', 0, end); - } - return r; -} - -function base64Text(buf, i) { - var n = (buf.length - i) % 3; - if (n === 0) return buf.toString('base64', i); - this.lastNeed = 3 - n; - this.lastTotal = 3; - if (n === 1) { - this.lastChar[0] = buf[buf.length - 1]; - } else { - this.lastChar[0] = buf[buf.length - 2]; - this.lastChar[1] = buf[buf.length - 1]; - } - return buf.toString('base64', i, buf.length - n); -} - -function base64End(buf) { - var r = buf && buf.length ? this.write(buf) : ''; - if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); - return r; -} - -// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) -function simpleWrite(buf) { - return buf.toString(this.encoding); -} - -function simpleEnd(buf) { - return buf && buf.length ? this.write(buf) : ''; -} - -/***/ }), - -/***/ 40895: -/***/ ((module) => { - -"use strict"; - -module.exports = x => { - if (typeof x !== 'string') { - throw new TypeError('Expected a string, got ' + typeof x); - } - - // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string - // conversion translates it to FEFF (UTF-16 BOM) - if (x.charCodeAt(0) === 0xFEFF) { - return x.slice(1); - } - - return x; -}; - - -/***/ }), - -/***/ 45414: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const os = __nccwpck_require__(70857); -const hasFlag = __nccwpck_require__(42871); - -const env = process.env; - -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} - -function translateLevel(level) { - if (level === 0) { - return false; - } - - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; -} - -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } - - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } - - if (hasFlag('color=256')) { - return 2; - } - - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } - - const min = forceColor ? 1 : 0; - - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - - return 1; - } - - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - - return min; - } - - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - - if (env.COLORTERM === 'truecolor') { - return 3; - } - - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); - - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - - if ('COLORTERM' in env) { - return 1; - } - - if (env.TERM === 'dumb') { - return min; - } - - return min; -} - -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); -} - -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; - - -/***/ }), - -/***/ 83921: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { version } = __nccwpck_require__(24129) -const { EventEmitter } = __nccwpck_require__(24434) -const { Worker } = __nccwpck_require__(28167) -const { join } = __nccwpck_require__(16928) -const { pathToFileURL } = __nccwpck_require__(87016) -const { wait } = __nccwpck_require__(16860) -const { - WRITE_INDEX, - READ_INDEX -} = __nccwpck_require__(53033) -const buffer = __nccwpck_require__(20181) -const assert = __nccwpck_require__(42613) - -const kImpl = Symbol('kImpl') - -// V8 limit for string size -const MAX_STRING = buffer.constants.MAX_STRING_LENGTH - -class FakeWeakRef { - constructor (value) { - this._value = value - } - - deref () { - return this._value - } -} - -class FakeFinalizationRegistry { - register () {} - - unregister () {} -} - -// Currently using FinalizationRegistry with code coverage breaks the world -// Ref: https://github.com/nodejs/node/issues/49344 -const FinalizationRegistry = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry -const WeakRef = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef - -const registry = new FinalizationRegistry((worker) => { - if (worker.exited) { - return - } - worker.terminate() -}) - -function createWorker (stream, opts) { - const { filename, workerData } = opts - - const bundlerOverrides = '__bundlerPathsOverrides' in globalThis ? globalThis.__bundlerPathsOverrides : {} - const toExecute = bundlerOverrides['thread-stream-worker'] || __nccwpck_require__.ab + "worker1.js" - - const worker = new Worker(toExecute, { - ...opts.workerOpts, - trackUnmanagedFds: false, - workerData: { - filename: filename.indexOf('file://') === 0 - ? filename - : pathToFileURL(filename).href, - dataBuf: stream[kImpl].dataBuf, - stateBuf: stream[kImpl].stateBuf, - workerData: { - $context: { - threadStreamVersion: version - }, - ...workerData - } - } - }) - - // We keep a strong reference for now, - // we need to start writing first - worker.stream = new FakeWeakRef(stream) - - worker.on('message', onWorkerMessage) - worker.on('exit', onWorkerExit) - registry.register(stream, worker) - - return worker -} - -function drain (stream) { - assert(!stream[kImpl].sync) - if (stream[kImpl].needDrain) { - stream[kImpl].needDrain = false - stream.emit('drain') - } -} - -function nextFlush (stream) { - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - let leftover = stream[kImpl].data.length - writeIndex - - if (leftover > 0) { - if (stream[kImpl].buf.length === 0) { - stream[kImpl].flushing = false - - if (stream[kImpl].ending) { - end(stream) - } else if (stream[kImpl].needDrain) { - process.nextTick(drain, stream) - } - - return - } - - let toWrite = stream[kImpl].buf.slice(0, leftover) - let toWriteBytes = Buffer.byteLength(toWrite) - if (toWriteBytes <= leftover) { - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - // process._rawDebug('writing ' + toWrite.length) - write(stream, toWrite, nextFlush.bind(null, stream)) - } else { - // multi-byte utf-8 - stream.flush(() => { - // err is already handled in flush() - if (stream.destroyed) { - return - } - - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - - // Find a toWrite length that fits the buffer - // it must exists as the buffer is at least 4 bytes length - // and the max utf-8 length for a char is 4 bytes. - while (toWriteBytes > stream[kImpl].data.length) { - leftover = leftover / 2 - toWrite = stream[kImpl].buf.slice(0, leftover) - toWriteBytes = Buffer.byteLength(toWrite) - } - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - write(stream, toWrite, nextFlush.bind(null, stream)) - }) - } - } else if (leftover === 0) { - if (writeIndex === 0 && stream[kImpl].buf.length === 0) { - // we had a flushSync in the meanwhile - return - } - stream.flush(() => { - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - nextFlush(stream) - }) - } else { - // This should never happen - destroy(stream, new Error('overwritten')) - } -} - -function onWorkerMessage (msg) { - const stream = this.stream.deref() - if (stream === undefined) { - this.exited = true - // Terminate the worker. - this.terminate() - return - } - - switch (msg.code) { - case 'READY': - // Replace the FakeWeakRef with a - // proper one. - this.stream = new WeakRef(stream) - - stream.flush(() => { - stream[kImpl].ready = true - stream.emit('ready') - }) - break - case 'ERROR': - destroy(stream, msg.err) - break - case 'EVENT': - if (Array.isArray(msg.args)) { - stream.emit(msg.name, ...msg.args) - } else { - stream.emit(msg.name, msg.args) - } - break - case 'WARNING': - process.emitWarning(msg.err) - break - default: - destroy(stream, new Error('this should not happen: ' + msg.code)) - } -} - -function onWorkerExit (code) { - const stream = this.stream.deref() - if (stream === undefined) { - // Nothing to do, the worker already exit - return - } - registry.unregister(stream) - stream.worker.exited = true - stream.worker.off('exit', onWorkerExit) - destroy(stream, code !== 0 ? new Error('the worker thread exited') : null) -} - -class ThreadStream extends EventEmitter { - constructor (opts = {}) { - super() - - if (opts.bufferSize < 4) { - throw new Error('bufferSize must at least fit a 4-byte utf-8 char') - } - - this[kImpl] = {} - this[kImpl].stateBuf = new SharedArrayBuffer(128) - this[kImpl].state = new Int32Array(this[kImpl].stateBuf) - this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024) - this[kImpl].data = Buffer.from(this[kImpl].dataBuf) - this[kImpl].sync = opts.sync || false - this[kImpl].ending = false - this[kImpl].ended = false - this[kImpl].needDrain = false - this[kImpl].destroyed = false - this[kImpl].flushing = false - this[kImpl].ready = false - this[kImpl].finished = false - this[kImpl].errored = null - this[kImpl].closed = false - this[kImpl].buf = '' - - // TODO (fix): Make private? - this.worker = createWorker(this, opts) // TODO (fix): make private - this.on('message', (message, transferList) => { - this.worker.postMessage(message, transferList) - }) - } - - write (data) { - if (this[kImpl].destroyed) { - error(this, new Error('the worker has exited')) - return false - } - - if (this[kImpl].ending) { - error(this, new Error('the worker is ending')) - return false - } - - if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { - try { - writeSync(this) - this[kImpl].flushing = true - } catch (err) { - destroy(this, err) - return false - } - } - - this[kImpl].buf += data - - if (this[kImpl].sync) { - try { - writeSync(this) - return true - } catch (err) { - destroy(this, err) - return false - } - } - - if (!this[kImpl].flushing) { - this[kImpl].flushing = true - setImmediate(nextFlush, this) - } - - this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0 - return !this[kImpl].needDrain - } - - end () { - if (this[kImpl].destroyed) { - return - } - - this[kImpl].ending = true - end(this) - } - - flush (cb) { - if (this[kImpl].destroyed) { - if (typeof cb === 'function') { - process.nextTick(cb, new Error('the worker has exited')) - } - return - } - - // TODO write all .buf - const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX) - // process._rawDebug(`(flush) readIndex (${Atomics.load(this.state, READ_INDEX)}) writeIndex (${Atomics.load(this.state, WRITE_INDEX)})`) - wait(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { - if (err) { - destroy(this, err) - process.nextTick(cb, err) - return - } - if (res === 'not-equal') { - // TODO handle deadlock - this.flush(cb) - return - } - process.nextTick(cb) - }) - } - - flushSync () { - if (this[kImpl].destroyed) { - return - } - - writeSync(this) - flushSync(this) - } - - unref () { - this.worker.unref() - } - - ref () { - this.worker.ref() - } - - get ready () { - return this[kImpl].ready - } - - get destroyed () { - return this[kImpl].destroyed - } - - get closed () { - return this[kImpl].closed - } - - get writable () { - return !this[kImpl].destroyed && !this[kImpl].ending - } - - get writableEnded () { - return this[kImpl].ending - } - - get writableFinished () { - return this[kImpl].finished - } - - get writableNeedDrain () { - return this[kImpl].needDrain - } - - get writableObjectMode () { - return false - } - - get writableErrored () { - return this[kImpl].errored - } -} - -function error (stream, err) { - setImmediate(() => { - stream.emit('error', err) - }) -} - -function destroy (stream, err) { - if (stream[kImpl].destroyed) { - return - } - stream[kImpl].destroyed = true - - if (err) { - stream[kImpl].errored = err - error(stream, err) - } - - if (!stream.worker.exited) { - stream.worker.terminate() - .catch(() => {}) - .then(() => { - stream[kImpl].closed = true - stream.emit('close') - }) - } else { - setImmediate(() => { - stream[kImpl].closed = true - stream.emit('close') - }) - } -} - -function write (stream, data, cb) { - // data is smaller than the shared buffer length - const current = Atomics.load(stream[kImpl].state, WRITE_INDEX) - const length = Buffer.byteLength(data) - stream[kImpl].data.write(data, current) - Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length) - Atomics.notify(stream[kImpl].state, WRITE_INDEX) - cb() - return true -} - -function end (stream) { - if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { - return - } - stream[kImpl].ended = true - - try { - stream.flushSync() - - let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - // process._rawDebug('writing index') - Atomics.store(stream[kImpl].state, WRITE_INDEX, -1) - // process._rawDebug(`(end) readIndex (${Atomics.load(stream.state, READ_INDEX)}) writeIndex (${Atomics.load(stream.state, WRITE_INDEX)})`) - Atomics.notify(stream[kImpl].state, WRITE_INDEX) - - // Wait for the process to complete - let spins = 0 - while (readIndex !== -1) { - // process._rawDebug(`read = ${read}`) - Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) - readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - if (readIndex === -2) { - destroy(stream, new Error('end() failed')) - return - } - - if (++spins === 10) { - destroy(stream, new Error('end() took too long (10s)')) - return - } - } - - process.nextTick(() => { - stream[kImpl].finished = true - stream.emit('finish') - }) - } catch (err) { - destroy(stream, err) - } - // process._rawDebug('end finished...') -} - -function writeSync (stream) { - const cb = () => { - if (stream[kImpl].ending) { - end(stream) - } else if (stream[kImpl].needDrain) { - process.nextTick(drain, stream) - } - } - stream[kImpl].flushing = false - - while (stream[kImpl].buf.length !== 0) { - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - let leftover = stream[kImpl].data.length - writeIndex - if (leftover === 0) { - flushSync(stream) - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - continue - } else if (leftover < 0) { - // stream should never happen - throw new Error('overwritten') - } - - let toWrite = stream[kImpl].buf.slice(0, leftover) - let toWriteBytes = Buffer.byteLength(toWrite) - if (toWriteBytes <= leftover) { - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - // process._rawDebug('writing ' + toWrite.length) - write(stream, toWrite, cb) - } else { - // multi-byte utf-8 - flushSync(stream) - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - - // Find a toWrite length that fits the buffer - // it must exists as the buffer is at least 4 bytes length - // and the max utf-8 length for a char is 4 bytes. - while (toWriteBytes > stream[kImpl].buf.length) { - leftover = leftover / 2 - toWrite = stream[kImpl].buf.slice(0, leftover) - toWriteBytes = Buffer.byteLength(toWrite) - } - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - write(stream, toWrite, cb) - } - } -} - -function flushSync (stream) { - if (stream[kImpl].flushing) { - throw new Error('unable to flush while flushing') - } - - // process._rawDebug('flushSync started') - - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - - let spins = 0 - - // TODO handle deadlock - while (true) { - const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - if (readIndex === -2) { - throw Error('_flushSync failed') - } - - // process._rawDebug(`(flushSync) readIndex (${readIndex}) writeIndex (${writeIndex})`) - if (readIndex !== writeIndex) { - // TODO stream timeouts for some reason. - Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) - } else { - break - } - - if (++spins === 10) { - throw new Error('_flushSync took too long (10s)') - } - } - // process._rawDebug('flushSync finished') -} - -module.exports = ThreadStream - - -/***/ }), - -/***/ 53033: -/***/ ((module) => { - -"use strict"; - - -const WRITE_INDEX = 4 -const READ_INDEX = 8 - -module.exports = { - WRITE_INDEX, - READ_INDEX -} - - -/***/ }), - -/***/ 16860: -/***/ ((module) => { - -"use strict"; - - -const MAX_TIMEOUT = 1000 - -function wait (state, index, expected, timeout, done) { - const max = Date.now() + timeout - let current = Atomics.load(state, index) - if (current === expected) { - done(null, 'ok') - return - } - let prior = current - const check = (backoff) => { - if (Date.now() > max) { - done(null, 'timed-out') - } else { - setTimeout(() => { - prior = current - current = Atomics.load(state, index) - if (current === prior) { - check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2) - } else { - if (current === expected) done(null, 'ok') - else done(null, 'not-equal') - } - }, backoff) - } - } - check(1) -} - -// let waitDiffCount = 0 -function waitDiff (state, index, expected, timeout, done) { - // const id = waitDiffCount++ - // process._rawDebug(`>>> waitDiff ${id}`) - const max = Date.now() + timeout - let current = Atomics.load(state, index) - if (current !== expected) { - done(null, 'ok') - return - } - const check = (backoff) => { - // process._rawDebug(`${id} ${index} current ${current} expected ${expected}`) - // process._rawDebug('' + backoff) - if (Date.now() > max) { - done(null, 'timed-out') - } else { - setTimeout(() => { - current = Atomics.load(state, index) - if (current !== expected) { - done(null, 'ok') - } else { - check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2) - } - }, backoff) - } - } - check(1) -} - -module.exports = { wait, waitDiff } - - -/***/ }), - -/***/ 77370: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { version } = __nccwpck_require__(57010) -const { EventEmitter } = __nccwpck_require__(24434) -const { Worker } = __nccwpck_require__(28167) -const { join } = __nccwpck_require__(16928) -const { pathToFileURL } = __nccwpck_require__(87016) -const { wait } = __nccwpck_require__(76713) -const { - WRITE_INDEX, - READ_INDEX -} = __nccwpck_require__(6450) -const buffer = __nccwpck_require__(20181) -const assert = __nccwpck_require__(42613) - -const kImpl = Symbol('kImpl') - -// V8 limit for string size -const MAX_STRING = buffer.constants.MAX_STRING_LENGTH - -class FakeWeakRef { - constructor (value) { - this._value = value - } - - deref () { - return this._value - } -} - -class FakeFinalizationRegistry { - register () {} - - unregister () {} -} - -// Currently using FinalizationRegistry with code coverage breaks the world -// Ref: https://github.com/nodejs/node/issues/49344 -const FinalizationRegistry = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry -const WeakRef = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef - -const registry = new FinalizationRegistry((worker) => { - if (worker.exited) { - return - } - worker.terminate() -}) - -function createWorker (stream, opts) { - const { filename, workerData } = opts - - const bundlerOverrides = '__bundlerPathsOverrides' in globalThis ? globalThis.__bundlerPathsOverrides : {} - const toExecute = bundlerOverrides['thread-stream-worker'] || __nccwpck_require__.ab + "worker2.js" - - const worker = new Worker(toExecute, { - ...opts.workerOpts, - trackUnmanagedFds: false, - workerData: { - filename: filename.indexOf('file://') === 0 - ? filename - : pathToFileURL(filename).href, - dataBuf: stream[kImpl].dataBuf, - stateBuf: stream[kImpl].stateBuf, - workerData: { - $context: { - threadStreamVersion: version - }, - ...workerData - } - } - }) - - // We keep a strong reference for now, - // we need to start writing first - worker.stream = new FakeWeakRef(stream) - - worker.on('message', onWorkerMessage) - worker.on('exit', onWorkerExit) - registry.register(stream, worker) - - return worker -} - -function drain (stream) { - assert(!stream[kImpl].sync) - if (stream[kImpl].needDrain) { - stream[kImpl].needDrain = false - stream.emit('drain') - } -} - -function nextFlush (stream) { - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - let leftover = stream[kImpl].data.length - writeIndex - - if (leftover > 0) { - if (stream[kImpl].buf.length === 0) { - stream[kImpl].flushing = false - - if (stream[kImpl].ending) { - end(stream) - } else if (stream[kImpl].needDrain) { - process.nextTick(drain, stream) - } - - return - } - - let toWrite = stream[kImpl].buf.slice(0, leftover) - let toWriteBytes = Buffer.byteLength(toWrite) - if (toWriteBytes <= leftover) { - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - // process._rawDebug('writing ' + toWrite.length) - write(stream, toWrite, nextFlush.bind(null, stream)) - } else { - // multi-byte utf-8 - stream.flush(() => { - // err is already handled in flush() - if (stream.destroyed) { - return - } - - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - - // Find a toWrite length that fits the buffer - // it must exists as the buffer is at least 4 bytes length - // and the max utf-8 length for a char is 4 bytes. - while (toWriteBytes > stream[kImpl].data.length) { - leftover = leftover / 2 - toWrite = stream[kImpl].buf.slice(0, leftover) - toWriteBytes = Buffer.byteLength(toWrite) - } - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - write(stream, toWrite, nextFlush.bind(null, stream)) - }) - } - } else if (leftover === 0) { - if (writeIndex === 0 && stream[kImpl].buf.length === 0) { - // we had a flushSync in the meanwhile - return - } - stream.flush(() => { - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - nextFlush(stream) - }) - } else { - // This should never happen - destroy(stream, new Error('overwritten')) - } -} - -function onWorkerMessage (msg) { - const stream = this.stream.deref() - if (stream === undefined) { - this.exited = true - // Terminate the worker. - this.terminate() - return - } - - switch (msg.code) { - case 'READY': - // Replace the FakeWeakRef with a - // proper one. - this.stream = new WeakRef(stream) - - stream.flush(() => { - stream[kImpl].ready = true - stream.emit('ready') - }) - break - case 'ERROR': - destroy(stream, msg.err) - break - case 'EVENT': - if (Array.isArray(msg.args)) { - stream.emit(msg.name, ...msg.args) - } else { - stream.emit(msg.name, msg.args) - } - break - case 'WARNING': - process.emitWarning(msg.err) - break - default: - destroy(stream, new Error('this should not happen: ' + msg.code)) - } -} - -function onWorkerExit (code) { - const stream = this.stream.deref() - if (stream === undefined) { - // Nothing to do, the worker already exit - return - } - registry.unregister(stream) - stream.worker.exited = true - stream.worker.off('exit', onWorkerExit) - destroy(stream, code !== 0 ? new Error('the worker thread exited') : null) -} - -class ThreadStream extends EventEmitter { - constructor (opts = {}) { - super() - - if (opts.bufferSize < 4) { - throw new Error('bufferSize must at least fit a 4-byte utf-8 char') - } - - this[kImpl] = {} - this[kImpl].stateBuf = new SharedArrayBuffer(128) - this[kImpl].state = new Int32Array(this[kImpl].stateBuf) - this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024) - this[kImpl].data = Buffer.from(this[kImpl].dataBuf) - this[kImpl].sync = opts.sync || false - this[kImpl].ending = false - this[kImpl].ended = false - this[kImpl].needDrain = false - this[kImpl].destroyed = false - this[kImpl].flushing = false - this[kImpl].ready = false - this[kImpl].finished = false - this[kImpl].errored = null - this[kImpl].closed = false - this[kImpl].buf = '' - - // TODO (fix): Make private? - this.worker = createWorker(this, opts) // TODO (fix): make private - this.on('message', (message, transferList) => { - this.worker.postMessage(message, transferList) - }) - } - - write (data) { - if (this[kImpl].destroyed) { - error(this, new Error('the worker has exited')) - return false - } - - if (this[kImpl].ending) { - error(this, new Error('the worker is ending')) - return false - } - - if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { - try { - writeSync(this) - this[kImpl].flushing = true - } catch (err) { - destroy(this, err) - return false - } - } - - this[kImpl].buf += data - - if (this[kImpl].sync) { - try { - writeSync(this) - return true - } catch (err) { - destroy(this, err) - return false - } - } - - if (!this[kImpl].flushing) { - this[kImpl].flushing = true - setImmediate(nextFlush, this) - } - - this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0 - return !this[kImpl].needDrain - } - - end () { - if (this[kImpl].destroyed) { - return - } - - this[kImpl].ending = true - end(this) - } - - flush (cb) { - if (this[kImpl].destroyed) { - if (typeof cb === 'function') { - process.nextTick(cb, new Error('the worker has exited')) - } - return - } - - // TODO write all .buf - const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX) - // process._rawDebug(`(flush) readIndex (${Atomics.load(this.state, READ_INDEX)}) writeIndex (${Atomics.load(this.state, WRITE_INDEX)})`) - wait(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { - if (err) { - destroy(this, err) - process.nextTick(cb, err) - return - } - if (res === 'not-equal') { - // TODO handle deadlock - this.flush(cb) - return - } - process.nextTick(cb) - }) - } - - flushSync () { - if (this[kImpl].destroyed) { - return - } - - writeSync(this) - flushSync(this) - } - - unref () { - this.worker.unref() - } - - ref () { - this.worker.ref() - } - - get ready () { - return this[kImpl].ready - } - - get destroyed () { - return this[kImpl].destroyed - } - - get closed () { - return this[kImpl].closed - } - - get writable () { - return !this[kImpl].destroyed && !this[kImpl].ending - } - - get writableEnded () { - return this[kImpl].ending - } - - get writableFinished () { - return this[kImpl].finished - } - - get writableNeedDrain () { - return this[kImpl].needDrain - } - - get writableObjectMode () { - return false - } - - get writableErrored () { - return this[kImpl].errored - } -} - -function error (stream, err) { - setImmediate(() => { - stream.emit('error', err) - }) -} - -function destroy (stream, err) { - if (stream[kImpl].destroyed) { - return - } - stream[kImpl].destroyed = true - - if (err) { - stream[kImpl].errored = err - error(stream, err) - } - - if (!stream.worker.exited) { - stream.worker.terminate() - .catch(() => {}) - .then(() => { - stream[kImpl].closed = true - stream.emit('close') - }) - } else { - setImmediate(() => { - stream[kImpl].closed = true - stream.emit('close') - }) - } -} - -function write (stream, data, cb) { - // data is smaller than the shared buffer length - const current = Atomics.load(stream[kImpl].state, WRITE_INDEX) - const length = Buffer.byteLength(data) - stream[kImpl].data.write(data, current) - Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length) - Atomics.notify(stream[kImpl].state, WRITE_INDEX) - cb() - return true -} - -function end (stream) { - if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { - return - } - stream[kImpl].ended = true - - try { - stream.flushSync() - - let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - // process._rawDebug('writing index') - Atomics.store(stream[kImpl].state, WRITE_INDEX, -1) - // process._rawDebug(`(end) readIndex (${Atomics.load(stream.state, READ_INDEX)}) writeIndex (${Atomics.load(stream.state, WRITE_INDEX)})`) - Atomics.notify(stream[kImpl].state, WRITE_INDEX) - - // Wait for the process to complete - let spins = 0 - while (readIndex !== -1) { - // process._rawDebug(`read = ${read}`) - Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) - readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - if (readIndex === -2) { - destroy(stream, new Error('end() failed')) - return - } - - if (++spins === 10) { - destroy(stream, new Error('end() took too long (10s)')) - return - } - } - - process.nextTick(() => { - stream[kImpl].finished = true - stream.emit('finish') - }) - } catch (err) { - destroy(stream, err) - } - // process._rawDebug('end finished...') -} - -function writeSync (stream) { - const cb = () => { - if (stream[kImpl].ending) { - end(stream) - } else if (stream[kImpl].needDrain) { - process.nextTick(drain, stream) - } - } - stream[kImpl].flushing = false - - while (stream[kImpl].buf.length !== 0) { - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - let leftover = stream[kImpl].data.length - writeIndex - if (leftover === 0) { - flushSync(stream) - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - continue - } else if (leftover < 0) { - // stream should never happen - throw new Error('overwritten') - } - - let toWrite = stream[kImpl].buf.slice(0, leftover) - let toWriteBytes = Buffer.byteLength(toWrite) - if (toWriteBytes <= leftover) { - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - // process._rawDebug('writing ' + toWrite.length) - write(stream, toWrite, cb) - } else { - // multi-byte utf-8 - flushSync(stream) - Atomics.store(stream[kImpl].state, READ_INDEX, 0) - Atomics.store(stream[kImpl].state, WRITE_INDEX, 0) - - // Find a toWrite length that fits the buffer - // it must exists as the buffer is at least 4 bytes length - // and the max utf-8 length for a char is 4 bytes. - while (toWriteBytes > stream[kImpl].buf.length) { - leftover = leftover / 2 - toWrite = stream[kImpl].buf.slice(0, leftover) - toWriteBytes = Buffer.byteLength(toWrite) - } - stream[kImpl].buf = stream[kImpl].buf.slice(leftover) - write(stream, toWrite, cb) - } - } -} - -function flushSync (stream) { - if (stream[kImpl].flushing) { - throw new Error('unable to flush while flushing') - } - - // process._rawDebug('flushSync started') - - const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX) - - let spins = 0 - - // TODO handle deadlock - while (true) { - const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX) - - if (readIndex === -2) { - throw Error('_flushSync failed') - } - - // process._rawDebug(`(flushSync) readIndex (${readIndex}) writeIndex (${writeIndex})`) - if (readIndex !== writeIndex) { - // TODO stream timeouts for some reason. - Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000) - } else { - break - } - - if (++spins === 10) { - throw new Error('_flushSync took too long (10s)') - } - } - // process._rawDebug('flushSync finished') -} - -module.exports = ThreadStream - - -/***/ }), - -/***/ 6450: -/***/ ((module) => { - -"use strict"; - - -const WRITE_INDEX = 4 -const READ_INDEX = 8 - -module.exports = { - WRITE_INDEX, - READ_INDEX -} - - -/***/ }), - -/***/ 76713: -/***/ ((module) => { - -"use strict"; - - -const MAX_TIMEOUT = 1000 - -function wait (state, index, expected, timeout, done) { - const max = Date.now() + timeout - let current = Atomics.load(state, index) - if (current === expected) { - done(null, 'ok') - return - } - let prior = current - const check = (backoff) => { - if (Date.now() > max) { - done(null, 'timed-out') - } else { - setTimeout(() => { - prior = current - current = Atomics.load(state, index) - if (current === prior) { - check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2) - } else { - if (current === expected) done(null, 'ok') - else done(null, 'not-equal') - } - }, backoff) - } - } - check(1) -} - -// let waitDiffCount = 0 -function waitDiff (state, index, expected, timeout, done) { - // const id = waitDiffCount++ - // process._rawDebug(`>>> waitDiff ${id}`) - const max = Date.now() + timeout - let current = Atomics.load(state, index) - if (current !== expected) { - done(null, 'ok') - return - } - const check = (backoff) => { - // process._rawDebug(`${id} ${index} current ${current} expected ${expected}`) - // process._rawDebug('' + backoff) - if (Date.now() > max) { - done(null, 'timed-out') - } else { - setTimeout(() => { - current = Atomics.load(state, index) - if (current !== expected) { - done(null, 'ok') - } else { - check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2) - } - }, backoff) - } - } - check(1) -} - -module.exports = { wait, waitDiff } - - -/***/ }), - -/***/ 31267: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { Transform } = __nccwpck_require__(81643) - -function inherits (fn, sup) { - fn.super_ = sup - fn.prototype = Object.create(sup.prototype, { - constructor: { value: fn, enumerable: false, writable: true, configurable: true } - }) -} - -// create a new export function, used by both the main export and -// the .ctor export, contains common logic for dealing with arguments -function through2 (construct) { - return (options, transform, flush) => { - if (typeof options === 'function') { - flush = transform - transform = options - options = {} - } - - if (typeof transform !== 'function') { - // noop - transform = (chunk, enc, cb) => cb(null, chunk) - } - - if (typeof flush !== 'function') { - flush = null - } - - return construct(options, transform, flush) - } -} - -// main export, just make me a transform stream! -const make = through2((options, transform, flush) => { - const t2 = new Transform(options) - - t2._transform = transform - - if (flush) { - t2._flush = flush - } - - return t2 -}) - -// make me a reusable prototype that I can `new`, or implicitly `new` -// with a constructor call -const ctor = through2((options, transform, flush) => { - function Through2 (override) { - if (!(this instanceof Through2)) { - return new Through2(override) - } - - this.options = Object.assign({}, options, override) - - Transform.call(this, this.options) - - this._transform = transform - if (flush) { - this._flush = flush - } - } - - inherits(Through2, Transform) - - return Through2 -}) - -const obj = through2(function (options, transform, flush) { - const t2 = new Transform(Object.assign({ objectMode: true, highWaterMark: 16 }, options)) - - t2._transform = transform - - if (flush) { - t2._flush = flush - } - - return t2 -}) - -module.exports = make -module.exports.ctor = ctor -module.exports.obj = obj - - -/***/ }), - -/***/ 79050: -/***/ ((module) => { - -"use strict"; -/*! - * toidentifier - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = toIdentifier - -/** - * Trasform the given string into a JavaScript identifier - * - * @param {string} str - * @returns {string} - * @public - */ - -function toIdentifier (str) { - return str - .split(' ') - .map(function (token) { - return token.slice(0, 1).toUpperCase() + token.slice(1) - }) - .join('') - .replace(/[^ _0-9a-z]/gi, '') -} - - -/***/ }), - -/***/ 16124: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(33660); - - -/***/ }), - -/***/ 33660: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(69278); -var tls = __nccwpck_require__(64756); -var http = __nccwpck_require__(58611); -var https = __nccwpck_require__(65692); -var events = __nccwpck_require__(24434); -var assert = __nccwpck_require__(42613); -var util = __nccwpck_require__(39023); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = 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); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, 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; - } - - // 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); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = 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'); - } - - 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) { - 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) { - 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; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - 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); - } -}; - -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 createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function 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; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - 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 { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 87568: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*! - * type-is - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var typer = __nccwpck_require__(4167) -var mime = __nccwpck_require__(56553) - -/** - * Module exports. - * @public - */ - -module.exports = typeofrequest -module.exports.is = typeis -module.exports.hasBody = hasbody -module.exports.normalize = normalize -module.exports.match = mimeMatch - -/** - * Compare a `value` content-type with `types`. - * Each `type` can be an extension like `html`, - * a special shortcut like `multipart` or `urlencoded`, - * or a mime type. - * - * If no types match, `false` is returned. - * Otherwise, the first `type` that matches is returned. - * - * @param {String} value - * @param {Array} types - * @public - */ - -function typeis (value, types_) { - var i - var types = types_ - - // remove parameters and normalize - var val = tryNormalizeType(value) - - // no type or invalid - if (!val) { - return false - } - - // support flattened arguments - if (types && !Array.isArray(types)) { - types = new Array(arguments.length - 1) - for (i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // no types, return the content type - if (!types || !types.length) { - return val - } - - var type - for (i = 0; i < types.length; i++) { - if (mimeMatch(normalize(type = types[i]), val)) { - return type[0] === '+' || type.indexOf('*') !== -1 - ? val - : type - } - } - - // no matches - return false -} - -/** - * Check if a request has a request body. - * A request with a body __must__ either have `transfer-encoding` - * or `content-length` headers set. - * http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3 - * - * @param {Object} request - * @return {Boolean} - * @public - */ - -function hasbody (req) { - return req.headers['transfer-encoding'] !== undefined || - !isNaN(req.headers['content-length']) -} - -/** - * Check if the incoming request contains the "Content-Type" - * header field, and it contains any of the give mime `type`s. - * If there is no request body, `null` is returned. - * If there is no content type, `false` is returned. - * Otherwise, it returns the first `type` that matches. - * - * Examples: - * - * // With Content-Type: text/html; charset=utf-8 - * this.is('html'); // => 'html' - * this.is('text/html'); // => 'text/html' - * this.is('text/*', 'application/json'); // => 'text/html' - * - * // When Content-Type is application/json - * this.is('json', 'urlencoded'); // => 'json' - * this.is('application/json'); // => 'application/json' - * this.is('html', 'application/*'); // => 'application/json' - * - * this.is('html'); // => false - * - * @param {String|Array} types... - * @return {String|false|null} - * @public - */ - -function typeofrequest (req, types_) { - var types = types_ - - // no body - if (!hasbody(req)) { - return null - } - - // support flattened arguments - if (arguments.length > 2) { - types = new Array(arguments.length - 1) - for (var i = 0; i < types.length; i++) { - types[i] = arguments[i + 1] - } - } - - // request content type - var value = req.headers['content-type'] - - return typeis(value, types) -} - -/** - * Normalize a mime type. - * If it's a shorthand, expand it to a valid mime type. - * - * In general, you probably want: - * - * var type = is(req, ['urlencoded', 'json', 'multipart']); - * - * Then use the appropriate body parsers. - * These three are the most common request body types - * and are thus ensured to work. - * - * @param {String} type - * @private - */ - -function normalize (type) { - if (typeof type !== 'string') { - // invalid type - return false - } - - switch (type) { - case 'urlencoded': - return 'application/x-www-form-urlencoded' - case 'multipart': - return 'multipart/*' - } - - if (type[0] === '+') { - // "+json" -> "*/*+json" expando - return '*/*' + type - } - - return type.indexOf('/') === -1 - ? mime.lookup(type) - : type -} - -/** - * Check if `expected` mime type - * matches `actual` mime type with - * wildcard and +suffix support. - * - * @param {String} expected - * @param {String} actual - * @return {Boolean} - * @private - */ - -function mimeMatch (expected, actual) { - // invalid type - if (expected === false) { - return false - } - - // split types - var actualParts = actual.split('/') - var expectedParts = expected.split('/') - - // invalid format - if (actualParts.length !== 2 || expectedParts.length !== 2) { - return false - } - - // validate type - if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) { - return false - } - - // validate suffix wildcard - if (expectedParts[1].substr(0, 2) === '*+') { - return expectedParts[1].length <= actualParts[1].length + 1 && - expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length) - } - - // validate subtype - if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) { - return false - } - - return true -} - -/** - * Normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function normalizeType (value) { - // parse the type - var type = typer.parse(value) - - // remove the parameters - type.parameters = undefined - - // reformat it - return typer.format(type) -} - -/** - * Try to normalize a type and remove parameters. - * - * @param {string} value - * @return {string} - * @private - */ - -function tryNormalizeType (value) { - if (!value) { - return null - } - - try { - return normalizeType(value) - } catch (err) { - return null - } -} - - -/***/ }), - -/***/ 71909: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Client = __nccwpck_require__(76646) -const Dispatcher = __nccwpck_require__(59724) -const errors = __nccwpck_require__(33862) -const Pool = __nccwpck_require__(17787) -const BalancedPool = __nccwpck_require__(7568) -const Agent = __nccwpck_require__(69072) -const util = __nccwpck_require__(33465) -const { InvalidArgumentError } = errors -const api = __nccwpck_require__(84598) -const buildConnector = __nccwpck_require__(2559) -const MockClient = __nccwpck_require__(70962) -const MockAgent = __nccwpck_require__(35332) -const MockPool = __nccwpck_require__(52975) -const mockErrors = __nccwpck_require__(14222) -const ProxyAgent = __nccwpck_require__(82145) -const RetryHandler = __nccwpck_require__(33966) -const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(17882) -const DecoratorHandler = __nccwpck_require__(28975) -const RedirectHandler = __nccwpck_require__(90238) -const createRedirectInterceptor = __nccwpck_require__(92130) - -let hasCrypto -try { - __nccwpck_require__(76982) - hasCrypto = true -} catch { - hasCrypto = false -} - -Object.assign(Dispatcher.prototype, api) - -module.exports.Dispatcher = Dispatcher -module.exports.Client = Client -module.exports.Pool = Pool -module.exports.BalancedPool = BalancedPool -module.exports.Agent = Agent -module.exports.ProxyAgent = ProxyAgent -module.exports.RetryHandler = RetryHandler - -module.exports.DecoratorHandler = DecoratorHandler -module.exports.RedirectHandler = RedirectHandler -module.exports.createRedirectInterceptor = createRedirectInterceptor - -module.exports.buildConnector = buildConnector -module.exports.errors = errors - -function 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 InvalidArgumentError('invalid url') - } - - if (opts != null && typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (opts && opts.path != null) { - if (typeof opts.path !== 'string') { - throw new InvalidArgumentError('invalid opts.path') - } - - let path = opts.path - if (!opts.path.startsWith('/')) { - path = `/${path}` - } - - url = new URL(util.parseOrigin(url).origin + path) - } else { - if (!opts) { - opts = typeof url === 'object' ? url : {} - } - - url = util.parseURL(url) - } - - const { agent, dispatcher = getGlobalDispatcher() } = opts - - if (agent) { - throw new 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) - } -} - -module.exports.setGlobalDispatcher = setGlobalDispatcher -module.exports.getGlobalDispatcher = getGlobalDispatcher - -if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { - let fetchImpl = null - module.exports.fetch = async function fetch (resource) { - if (!fetchImpl) { - fetchImpl = (__nccwpck_require__(58358).fetch) - } - - try { - return await fetchImpl(...arguments) - } catch (err) { - if (typeof err === 'object') { - Error.captureStackTrace(err, this) - } - - throw err - } - } - module.exports.Headers = __nccwpck_require__(72908).Headers - module.exports.Response = __nccwpck_require__(95683).Response - module.exports.Request = __nccwpck_require__(15767).Request - module.exports.FormData = __nccwpck_require__(12894).FormData - module.exports.File = __nccwpck_require__(60066).File - module.exports.FileReader = __nccwpck_require__(62171).FileReader - - const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(59963) - - module.exports.setGlobalOrigin = setGlobalOrigin - module.exports.getGlobalOrigin = getGlobalOrigin - - const { CacheStorage } = __nccwpck_require__(89605) - const { kConstruct } = __nccwpck_require__(51829) - - // 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. - module.exports.caches = new CacheStorage(kConstruct) -} - -if (util.nodeMajor >= 16) { - const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(88829) - - module.exports.deleteCookie = deleteCookie - module.exports.getCookies = getCookies - module.exports.getSetCookies = getSetCookies - module.exports.setCookie = setCookie - - const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(43911) - - module.exports.parseMIMEType = parseMIMEType - module.exports.serializeAMimeType = serializeAMimeType -} - -if (util.nodeMajor >= 18 && hasCrypto) { - const { WebSocket } = __nccwpck_require__(66102) - - module.exports.WebSocket = WebSocket -} - -module.exports.request = makeDispatcher(api.request) -module.exports.stream = makeDispatcher(api.stream) -module.exports.pipeline = makeDispatcher(api.pipeline) -module.exports.connect = makeDispatcher(api.connect) -module.exports.upgrade = makeDispatcher(api.upgrade) - -module.exports.MockClient = MockClient -module.exports.MockPool = MockPool -module.exports.MockAgent = MockAgent -module.exports.mockErrors = mockErrors - - -/***/ }), - -/***/ 69072: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError } = __nccwpck_require__(33862) -const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(34856) -const DispatcherBase = __nccwpck_require__(9368) -const Pool = __nccwpck_require__(17787) -const Client = __nccwpck_require__(76646) -const util = __nccwpck_require__(33465) -const createRedirectInterceptor = __nccwpck_require__(92130) -const { WeakRef, FinalizationRegistry } = __nccwpck_require__(60547)() - -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kMaxRedirections = Symbol('maxRedirections') -const kOnDrain = Symbol('onDrain') -const kFactory = Symbol('factory') -const kFinalizer = Symbol('finalizer') -const kOptions = Symbol('options') - -function defaultFactory (origin, opts) { - return opts && opts.connections === 1 - ? new Client(origin, opts) - : new Pool(origin, opts) -} - -class Agent extends DispatcherBase { - constructor ({ factory = defaultFactory, maxRedirections = 0, connect, ...options } = {}) { - super() - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (connect && typeof connect !== 'function') { - connect = { ...connect } - } - - this[kInterceptors] = options.interceptors && options.interceptors.Agent && Array.isArray(options.interceptors.Agent) - ? options.interceptors.Agent - : [createRedirectInterceptor({ maxRedirections })] - - this[kOptions] = { ...util.deepClone(options), connect } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kMaxRedirections] = maxRedirections - this[kFactory] = factory - this[kClients] = new Map() - this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { - const ref = this[kClients].get(key) - if (ref !== undefined && ref.deref() === undefined) { - this[kClients].delete(key) - } - }) - - const agent = this - - this[kOnDrain] = (origin, targets) => { - agent.emit('drain', origin, [agent, ...targets]) - } - - this[kOnConnect] = (origin, targets) => { - agent.emit('connect', origin, [agent, ...targets]) - } - - this[kOnDisconnect] = (origin, targets, err) => { - agent.emit('disconnect', origin, [agent, ...targets], err) - } - - this[kOnConnectionError] = (origin, targets, err) => { - agent.emit('connectionError', origin, [agent, ...targets], err) - } - } - - get [kRunning] () { - let ret = 0 - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore next: gc is undeterministic */ - if (client) { - ret += client[kRunning] - } - } - return ret - } - - [kDispatch] (opts, handler) { - let key - if (opts.origin && (typeof opts.origin === 'string' || opts.origin instanceof URL)) { - key = String(opts.origin) - } else { - throw new InvalidArgumentError('opts.origin must be a non-empty string or URL.') - } - - const ref = this[kClients].get(key) - - let dispatcher = ref ? ref.deref() : null - if (!dispatcher) { - dispatcher = this[kFactory](opts.origin, this[kOptions]) - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].set(key, new WeakRef(dispatcher)) - this[kFinalizer].register(dispatcher, key) - } - - return dispatcher.dispatch(opts, handler) - } - - async [kClose] () { - const closePromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - closePromises.push(client.close()) - } - } - - await Promise.all(closePromises) - } - - async [kDestroy] (err) { - const destroyPromises = [] - for (const ref of this[kClients].values()) { - const client = ref.deref() - /* istanbul ignore else: gc is undeterministic */ - if (client) { - destroyPromises.push(client.destroy(err)) - } - } - - await Promise.all(destroyPromises) - } -} - -module.exports = Agent - - -/***/ }), - -/***/ 24541: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { addAbortListener } = __nccwpck_require__(33465) -const { RequestAbortedError } = __nccwpck_require__(33862) - -const kListener = Symbol('kListener') -const kSignal = Symbol('kSignal') - -function abort (self) { - if (self.abort) { - self.abort() - } else { - self.onError(new RequestAbortedError()) - } -} - -function addSignal (self, signal) { - self[kSignal] = null - self[kListener] = null - - if (!signal) { - return - } - - if (signal.aborted) { - abort(self) - return - } - - self[kSignal] = signal - self[kListener] = () => { - abort(self) - } - - addAbortListener(self[kSignal], self[kListener]) -} - -function removeSignal (self) { - if (!self[kSignal]) { - return - } - - if ('removeEventListener' in self[kSignal]) { - self[kSignal].removeEventListener('abort', self[kListener]) - } else { - self[kSignal].removeListener('abort', self[kListener]) - } - - self[kSignal] = null - self[kListener] = null -} - -module.exports = { - addSignal, - removeSignal -} - - -/***/ }), - -/***/ 52657: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { AsyncResource } = __nccwpck_require__(90290) -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { addSignal, removeSignal } = __nccwpck_require__(24541) - -class ConnectHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new 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 - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = context - } - - onHeaders () { - throw new SocketError('bad connect', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - removeSignal(this) - - this.callback = null - - let headers = rawHeaders - // Indicates is an HTTP2Session - if (headers != null) { - headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - } - - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function connect (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const connectHandler = new 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 })) - } -} - -module.exports = connect - - -/***/ }), - -/***/ 10681: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - Readable, - Duplex, - PassThrough -} = __nccwpck_require__(2203) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(24541) -const assert = __nccwpck_require__(42613) - -const kResume = Symbol('resume') - -class PipelineRequest extends Readable { - constructor () { - super({ autoDestroy: true }) - - this[kResume] = null - } - - _read () { - const { [kResume]: resume } = this - - if (resume) { - this[kResume] = null - resume() - } - } - - _destroy (err, callback) { - this._read() - - callback(err) - } -} - -class PipelineResponse extends Readable { - constructor (resume) { - super({ autoDestroy: true }) - this[kResume] = resume - } - - _read () { - this[kResume]() - } - - _destroy (err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - callback(err) - } -} - -class PipelineHandler extends AsyncResource { - constructor (opts, handler) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof handler !== 'function') { - throw new InvalidArgumentError('invalid handler') - } - - const { signal, method, opaque, onInfo, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new 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 PipelineRequest().on('error', util.nop) - - this.ret = new Duplex({ - readableObjectMode: opts.objectMode, - autoDestroy: true, - read: () => { - const { body } = this - - if (body && body.resume) { - body.resume() - } - }, - write: (chunk, encoding, callback) => { - const { req } = this - - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback() - } else { - req[kResume] = callback - } - }, - destroy: (err, callback) => { - const { body, req, res, ret, abort } = this - - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (abort && err) { - abort() - } - - util.destroy(body, err) - util.destroy(req, err) - util.destroy(res, err) - - removeSignal(this) - - callback(err) - } - }).on('prefinish', () => { - const { req } = this - - // Node < 15 does not call _final in same tick. - req.push(null) - }) - - this.res = null - - addSignal(this, signal) - } - - onConnect (abort, context) { - const { ret, res } = this - - assert(!res, 'pipeline cannot be retried') - - if (ret.destroyed) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume) { - const { opaque, handler, context } = this - - if (statusCode < 200) { - if (this.onInfo) { - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.onInfo({ statusCode, headers }) - } - return - } - - this.res = new PipelineResponse(resume) - - let body - try { - this.handler = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - body = this.runInAsyncScope(handler, null, { - statusCode, - headers, - opaque, - body: this.res, - context - }) - } catch (err) { - this.res.on('error', util.nop) - throw err - } - - if (!body || typeof body.on !== 'function') { - throw new InvalidReturnValueError('expected Readable') - } - - body - .on('data', (chunk) => { - const { ret, body } = this - - if (!ret.push(chunk) && body.pause) { - body.pause() - } - }) - .on('error', (err) => { - const { ret } = this - - util.destroy(ret, err) - }) - .on('end', () => { - const { ret } = this - - ret.push(null) - }) - .on('close', () => { - const { ret } = this - - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()) - } - }) - - this.body = body - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - res.push(null) - } - - onError (err) { - const { ret } = this - this.handler = null - util.destroy(ret, err) - } -} - -function pipeline (opts, handler) { - try { - const pipelineHandler = new PipelineHandler(opts, handler) - this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler) - return pipelineHandler.ret - } catch (err) { - return new PassThrough().destroy(err) - } -} - -module.exports = pipeline - - -/***/ }), - -/***/ 72834: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Readable = __nccwpck_require__(35964) -const { - InvalidArgumentError, - RequestAbortedError -} = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { getResolveErrorBodyCallback } = __nccwpck_require__(74920) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(24541) - -class RequestHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (highWaterMark && (typeof highWaterMark !== 'number' || highWaterMark < 0)) { - throw new InvalidArgumentError('invalid highWaterMark') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_REQUEST') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.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 (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - const body = new Readable({ resume, abort, contentType, highWaterMark }) - - this.callback = null - this.res = body - if (callback !== null) { - if (this.throwOnError && statusCode >= 400) { - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body, contentType, statusCode, statusMessage, headers } - ) - } else { - this.runInAsyncScope(callback, null, null, { - statusCode, - headers, - trailers: this.trailers, - opaque, - body, - context - }) - } - } - } - - onData (chunk) { - const { res } = this - return res.push(chunk) - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - util.parseHeaders(trailers, this.trailers) - - res.push(null) - } - - onError (err) { - const { res, callback, body, opaque } = this - - removeSignal(this) - - if (callback) { - // TODO: Does this need queueMicrotask? - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (res) { - this.res = null - // Ensure all queued handlers are invoked before destroying res. - queueMicrotask(() => { - util.destroy(res, err) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function request (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new RequestHandler(opts, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = request -module.exports.RequestHandler = RequestHandler - - -/***/ }), - -/***/ 6759: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { finished, PassThrough } = __nccwpck_require__(2203) -const { - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError -} = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { getResolveErrorBodyCallback } = __nccwpck_require__(74920) -const { AsyncResource } = __nccwpck_require__(90290) -const { addSignal, removeSignal } = __nccwpck_require__(24541) - -class StreamHandler extends AsyncResource { - constructor (opts, factory, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts - - try { - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('invalid factory') - } - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new InvalidArgumentError('signal must be an EventEmitter or EventTarget') - } - - if (method === 'CONNECT') { - throw new InvalidArgumentError('invalid method') - } - - if (onInfo && typeof onInfo !== 'function') { - throw new InvalidArgumentError('invalid onInfo callback') - } - - super('UNDICI_STREAM') - } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on('error', util.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 (util.isStream(body)) { - body.on('error', (err) => { - this.onError(err) - }) - } - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = context - } - - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const { factory, opaque, context, callback, responseHeaders } = this - - const headers = responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - - if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ statusCode, headers }) - } - return - } - - this.factory = null - - let res - - if (this.throwOnError && statusCode >= 400) { - const parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers - const contentType = parsedHeaders['content-type'] - res = new PassThrough() - - this.callback = null - this.runInAsyncScope(getResolveErrorBodyCallback, null, - { callback, body: res, contentType, statusCode, statusMessage, headers } - ) - } else { - if (factory === null) { - return - } - - res = this.runInAsyncScope(factory, null, { - statusCode, - headers, - opaque, - context - }) - - if ( - !res || - typeof res.write !== 'function' || - typeof res.end !== 'function' || - typeof res.on !== 'function' - ) { - throw new InvalidReturnValueError('expected Writable') - } - - // TODO: Avoid finished. It registers an unnecessary amount of listeners. - finished(res, { readable: false }, (err) => { - const { callback, res, opaque, trailers, abort } = this - - this.res = null - if (err || !res.readable) { - util.destroy(res, err) - } - - this.callback = null - this.runInAsyncScope(callback, null, err || null, { opaque, 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 } = this - - return res ? res.write(chunk) : true - } - - onComplete (trailers) { - const { res } = this - - removeSignal(this) - - if (!res) { - return - } - - this.trailers = util.parseHeaders(trailers) - - res.end() - } - - onError (err) { - const { res, callback, opaque, body } = this - - removeSignal(this) - - this.factory = null - - if (res) { - this.res = null - util.destroy(res, err) - } else if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - - if (body) { - this.body = null - util.destroy(body, err) - } - } -} - -function stream (opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - this.dispatch(opts, new StreamHandler(opts, factory, callback)) - } catch (err) { - if (typeof callback !== 'function') { - throw err - } - const opaque = opts && opts.opaque - queueMicrotask(() => callback(err, { opaque })) - } -} - -module.exports = stream - - -/***/ }), - -/***/ 19387: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(33862) -const { AsyncResource } = __nccwpck_require__(90290) -const util = __nccwpck_require__(33465) -const { addSignal, removeSignal } = __nccwpck_require__(24541) -const assert = __nccwpck_require__(42613) - -class UpgradeHandler extends AsyncResource { - constructor (opts, callback) { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('invalid opts') - } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') - } - - const { signal, opaque, responseHeaders } = opts - - if (signal && typeof signal.on !== 'function' && typeof signal.addEventListener !== 'function') { - throw new 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 - - addSignal(this, signal) - } - - onConnect (abort, context) { - if (!this.callback) { - throw new RequestAbortedError() - } - - this.abort = abort - this.context = null - } - - onHeaders () { - throw new SocketError('bad upgrade', null) - } - - onUpgrade (statusCode, rawHeaders, socket) { - const { callback, opaque, context } = this - - assert.strictEqual(statusCode, 101) - - removeSignal(this) - - this.callback = null - const headers = this.responseHeaders === 'raw' ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders) - this.runInAsyncScope(callback, null, null, { - headers, - socket, - opaque, - context - }) - } - - onError (err) { - const { callback, opaque } = this - - removeSignal(this) - - if (callback) { - this.callback = null - queueMicrotask(() => { - this.runInAsyncScope(callback, null, err, { opaque }) - }) - } - } -} - -function upgrade (opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data) - }) - }) - } - - try { - const upgradeHandler = new 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 })) - } -} - -module.exports = upgrade - - -/***/ }), - -/***/ 84598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports.request = __nccwpck_require__(72834) -module.exports.stream = __nccwpck_require__(6759) -module.exports.pipeline = __nccwpck_require__(10681) -module.exports.upgrade = __nccwpck_require__(19387) -module.exports.connect = __nccwpck_require__(52657) - - -/***/ }), - -/***/ 35964: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// Ported from https://github.com/nodejs/undici/pull/907 - - - -const assert = __nccwpck_require__(42613) -const { Readable } = __nccwpck_require__(2203) -const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(33465) - -let Blob - -const kConsume = Symbol('kConsume') -const kReading = Symbol('kReading') -const kBody = Symbol('kBody') -const kAbort = Symbol('abort') -const kContentType = Symbol('kContentType') - -const noop = () => {} - -module.exports = class BodyReadable extends Readable { - constructor ({ - resume, - abort, - contentType = '', - highWaterMark = 64 * 1024 // Same as nodejs fs streams. - }) { - super({ - autoDestroy: true, - read: resume, - highWaterMark - }) - - this._readableState.dataEmitted = false - - this[kAbort] = abort - this[kConsume] = null - this[kBody] = null - this[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[kReading] = false - } - - destroy (err) { - if (this.destroyed) { - // Node < 16 - return this - } - - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError() - } - - if (err) { - this[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[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[kReading] = ( - this.listenerCount('data') > 0 || - this.listenerCount('readable') > 0 - ) - } - return ret - } - - removeListener (ev, ...args) { - return this.off(ev, ...args) - } - - push (chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { - consumePush(this[kConsume], chunk) - return this[kReading] ? super.push(chunk) : true - } - return super.push(chunk) - } - - // https://fetch.spec.whatwg.org/#dom-body-text - async text () { - return consume(this, 'text') - } - - // https://fetch.spec.whatwg.org/#dom-body-json - async json () { - return consume(this, 'json') - } - - // https://fetch.spec.whatwg.org/#dom-body-blob - async blob () { - return consume(this, 'blob') - } - - // https://fetch.spec.whatwg.org/#dom-body-arraybuffer - async arrayBuffer () { - return consume(this, 'arrayBuffer') - } - - // https://fetch.spec.whatwg.org/#dom-body-formdata - async formData () { - // TODO: Implement. - throw new NotSupportedError() - } - - // https://fetch.spec.whatwg.org/#dom-body-bodyused - get bodyUsed () { - return util.isDisturbed(this) - } - - // https://fetch.spec.whatwg.org/#dom-body-body - get body () { - if (!this[kBody]) { - this[kBody] = ReadableStreamFrom(this) - if (this[kConsume]) { - // TODO: Is this the best way to force a lock? - this[kBody].getReader() // Ensure stream is locked. - assert(this[kBody].locked) - } - } - return this[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 InvalidArgumentError('signal must be an AbortSignal') - } - util.throwIfAborted(signal) - } catch (err) { - return Promise.reject(err) - } - } - - if (this.closed) { - return Promise.resolve(null) - } - - return new Promise((resolve, reject) => { - const signalListenerCleanup = signal - ? util.addAbortListener(signal, () => { - this.destroy() - }) - : 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', noop) - .on('data', function (chunk) { - limit -= chunk.length - if (limit <= 0) { - this.destroy() - } - }) - .resume() - }) - } -} - -// https://streams.spec.whatwg.org/#readablestream-locked -function isLocked (self) { - // Consume is an implicit lock. - return (self[kBody] && self[kBody].locked === true) || self[kConsume] -} - -// https://fetch.spec.whatwg.org/#body-unusable -function isUnusable (self) { - return util.isDisturbed(self) || isLocked(self) -} - -async function consume (stream, type) { - if (isUnusable(stream)) { - throw new TypeError('unusable') - } - - assert(!stream[kConsume]) - - return new Promise((resolve, reject) => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - } - - stream - .on('error', function (err) { - consumeFinish(this[kConsume], err) - }) - .on('close', function () { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()) - } - }) - - process.nextTick(consumeStart, stream[kConsume]) - }) -} - -function consumeStart (consume) { - if (consume.body === null) { - return - } - - const { _readableState: state } = consume.stream - - for (const chunk of state.buffer) { - consumePush(consume, chunk) - } - - if (state.endEmitted) { - consumeEnd(this[kConsume]) - } else { - consume.stream.on('end', function () { - consumeEnd(this[kConsume]) - }) - } - - consume.stream.resume() - - while (consume.stream.read() != null) { - // Loop - } -} - -function consumeEnd (consume) { - const { type, body, resolve, stream, length } = consume - - try { - if (type === 'text') { - resolve(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 (!Blob) { - Blob = (__nccwpck_require__(20181).Blob) - } - resolve(new Blob(body, { type: stream[kContentType] })) - } - - consumeFinish(consume) - } catch (err) { - stream.destroy(err) - } -} - -function consumePush (consume, chunk) { - consume.length += chunk.length - consume.body.push(chunk) -} - -function 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 -} - - -/***/ }), - -/***/ 74920: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(42613) -const { - ResponseStatusCodeError -} = __nccwpck_require__(33862) -const { toUSVString } = __nccwpck_require__(33465) - -async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { - assert(body) - - let chunks = [] - let limit = 0 - - for await (const chunk of body) { - chunks.push(chunk) - limit += chunk.length - if (limit > 128 * 1024) { - chunks = null - break - } - } - - if (statusCode === 204 || !contentType || !chunks) { - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) - return - } - - try { - if (contentType.startsWith('application/json')) { - const payload = JSON.parse(toUSVString(Buffer.concat(chunks))) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - - if (contentType.startsWith('text/')) { - const payload = toUSVString(Buffer.concat(chunks)) - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers, payload)) - return - } - } catch (err) { - // Process in a fallback if error - } - - process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) -} - -module.exports = { getResolveErrorBodyCallback } - - -/***/ }), - -/***/ 7568: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - BalancedPoolMissingUpstreamError, - InvalidArgumentError -} = __nccwpck_require__(33862) -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} = __nccwpck_require__(89769) -const Pool = __nccwpck_require__(17787) -const { kUrl, kInterceptors } = __nccwpck_require__(34856) -const { parseOrigin } = __nccwpck_require__(33465) -const kFactory = Symbol('factory') - -const kOptions = Symbol('options') -const kGreatestCommonDivisor = Symbol('kGreatestCommonDivisor') -const kCurrentWeight = Symbol('kCurrentWeight') -const kIndex = Symbol('kIndex') -const kWeight = Symbol('kWeight') -const kMaxWeightPerServer = Symbol('kMaxWeightPerServer') -const kErrorPenalty = Symbol('kErrorPenalty') - -function getGreatestCommonDivisor (a, b) { - if (b === 0) return a - return getGreatestCommonDivisor(b, a % b) -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class BalancedPool extends PoolBase { - constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) { - super() - - this[kOptions] = opts - this[kIndex] = -1 - this[kCurrentWeight] = 0 - - this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100 - this[kErrorPenalty] = this[kOptions].errorPenalty || 15 - - if (!Array.isArray(upstreams)) { - upstreams = [upstreams] - } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') - } - - this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) - ? opts.interceptors.BalancedPool - : [] - this[kFactory] = factory - - for (const upstream of upstreams) { - this.addUpstream(upstream) - } - this._updateBalancedPoolStats() - } - - addUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - if (this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - ))) { - return this - } - const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])) - - this[kAddClient](pool) - pool.on('connect', () => { - pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]) - }) - - pool.on('connectionError', () => { - pool[kWeight] = Math.max(1, pool[kWeight] - this[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[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]) - this._updateBalancedPoolStats() - } - }) - - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer] - } - - this._updateBalancedPoolStats() - - return this - } - - _updateBalancedPoolStats () { - this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) - } - - removeUpstream (upstream) { - const upstreamOrigin = parseOrigin(upstream).origin - - const pool = this[kClients].find((pool) => ( - pool[kUrl].origin === upstreamOrigin && - pool.closed !== true && - pool.destroyed !== true - )) - - if (pool) { - this[kRemoveClient](pool) - } - - return this - } - - get upstreams () { - return this[kClients] - .filter(dispatcher => dispatcher.closed !== true && dispatcher.destroyed !== true) - .map((p) => p[kUrl].origin) - } - - [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[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError() - } - - const dispatcher = this[kClients].find(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - - if (!dispatcher) { - return - } - - const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) - - if (allClientsBusy) { - return - } - - let counter = 0 - - let maxWeightIndex = this[kClients].findIndex(pool => !pool[kNeedDrain]) - - while (counter++ < this[kClients].length) { - this[kIndex] = (this[kIndex] + 1) % this[kClients].length - const pool = this[kClients][this[kIndex]] - - // find pool index with the largest weight - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex] - } - - // decrease the current weight every `this[kClients].length`. - if (this[kIndex] === 0) { - // Set the current weight to the next lower weight. - this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor] - - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer] - } - } - if (pool[kWeight] >= this[kCurrentWeight] && (!pool[kNeedDrain])) { - return pool - } - } - - this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight] - this[kIndex] = maxWeightIndex - return this[kClients][maxWeightIndex] - } -} - -module.exports = BalancedPool - - -/***/ }), - -/***/ 64890: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kConstruct } = __nccwpck_require__(51829) -const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(20726) -const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(33465) -const { kHeadersList } = __nccwpck_require__(34856) -const { webidl } = __nccwpck_require__(29) -const { Response, cloneResponse } = __nccwpck_require__(95683) -const { Request } = __nccwpck_require__(15767) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(68323) -const { fetching } = __nccwpck_require__(58358) -const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(42696) -const assert = __nccwpck_require__(42613) -const { getGlobalDispatcher } = __nccwpck_require__(17882) - -/** - * @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 Cache { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list - * @type {requestResponseList} - */ - #relevantRequestResponseList - - constructor () { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor() - } - - this.#relevantRequestResponseList = arguments[1] - } - - async match (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) - - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - - const p = await this.matchAll(request, options) - - if (p.length === 0) { - return - } - - return p[0] - } - - async matchAll (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - - // 1. - let r = null - - // 2. - if (request !== undefined) { - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { - // 2.2.1 - r = new Request(request)[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 - // 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 Response(response.body?.source ?? null) - const body = responseObject[kState].body - responseObject[kState] = response - responseObject[kState].body = body - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' - - responseList.push(responseObject) - } - - // 6. - return Object.freeze(responseList) - } - - async add (request) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) - - request = webidl.converters.RequestInfo(request) - - // 1. - const requests = [request] - - // 2. - const responseArrayPromise = this.addAll(requests) - - // 3. - return await responseArrayPromise - } - - async addAll (requests) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) - - requests = 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[kState] - - // 3.2 - if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { - throw 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 Request(request)[kState] - - // 5.2 - if (!urlIsHttpHttpsScheme(r.url)) { - throw 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 = createDeferredPromise() - - // 5.7 - fetchControllers.push(fetching({ - request: r, - dispatcher: getGlobalDispatcher(), - processResponse (response) { - // 1. - if (response.type === 'error' || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: 'Cache.addAll', - message: 'Received an invalid status code or the request failed.' - })) - } else if (response.headersList.contains('vary')) { // 2. - // 2.1 - const fieldValues = getFieldValues(response.headersList.get('vary')) - - // 2.2 - for (const fieldValue of fieldValues) { - // 2.2.1 - if (fieldValue === '*') { - responsePromise.reject(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', // 7.3.2 - request: requestList[index], // 7.3.3 - response // 7.3.4 - } - - operations.push(operation) // 7.3.5 - - index++ // 7.3.6 - } - - // 7.5 - const cacheJobPromise = 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 - } - - async put (request, response) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) - - request = webidl.converters.RequestInfo(request) - response = webidl.converters.Response(response) - - // 1. - let innerRequest = null - - // 2. - if (request instanceof Request) { - innerRequest = request[kState] - } else { // 3. - innerRequest = new Request(request)[kState] - } - - // 4. - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Expected an http/s scheme when method is not GET' - }) - } - - // 5. - const innerResponse = response[kState] - - // 6. - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got 206 status' - }) - } - - // 7. - if (innerResponse.headersList.contains('vary')) { - // 7.1. - const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) - - // 7.2. - for (const fieldValue of fieldValues) { - // 7.2.1 - if (fieldValue === '*') { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Got * vary field value' - }) - } - } - } - - // 8. - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ - header: 'Cache.put', - message: 'Response body is locked or disturbed' - }) - } - - // 9. - const clonedResponse = cloneResponse(innerResponse) - - // 10. - const bodyReadPromise = createDeferredPromise() - - // 11. - if (innerResponse.body != null) { - // 11.1 - const stream = innerResponse.body.stream - - // 11.2 - const reader = stream.getReader() - - // 11.3 - readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) - } else { - bodyReadPromise.resolve(undefined) - } - - // 12. - /** @type {CacheBatchOperation[]} */ - const operations = [] - - // 13. - /** @type {CacheBatchOperation} */ - const operation = { - type: 'put', // 14. - request: innerRequest, // 15. - 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 = 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 { // 19.2.3.2 - cacheJobPromise.reject(errorData) - } - }) - - return cacheJobPromise.promise - } - - async delete (request, options = {}) { - webidl.brandCheck(this, Cache) - webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) - - request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - - /** - * @type {Request} - */ - let r = null - - if (request instanceof Request) { - r = request[kState] - - if (r.method !== 'GET' && !options.ignoreMethod) { - return false - } - } else { - assert(typeof request === 'string') - - r = new Request(request)[kState] - } - - /** @type {CacheBatchOperation[]} */ - const operations = [] - - /** @type {CacheBatchOperation} */ - const operation = { - type: 'delete', - request: r, - options - } - - operations.push(operation) - - const cacheJobPromise = 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 - } - - /** - * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys - * @param {any} request - * @param {import('../../types/cache').CacheQueryOptions} options - * @returns {readonly Request[]} - */ - async keys (request = undefined, options = {}) { - webidl.brandCheck(this, Cache) - - if (request !== undefined) request = webidl.converters.RequestInfo(request) - options = webidl.converters.CacheQueryOptions(options) - - // 1. - let r = null - - // 2. - if (request !== undefined) { - // 2.1 - if (request instanceof Request) { - // 2.1.1 - r = request[kState] - - // 2.1.2 - if (r.method !== 'GET' && !options.ignoreMethod) { - return [] - } - } else if (typeof request === 'string') { // 2.2 - r = new Request(request)[kState] - } - } - - // 4. - const promise = 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 - // 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 = new Request('https://a') - requestObject[kState] = request - requestObject[kHeaders][kHeadersList] = request.headersList - requestObject[kHeaders][kGuard] = 'immutable' - requestObject[kRealm] = request.client - - // 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 { - // 4.2 - for (const operation of operations) { - // 4.2.1 - if (operation.type !== 'delete' && operation.type !== 'put') { - throw 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 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) - assert(idx !== -1) - - // 4.2.5.2.1 - cache.splice(idx, 1) - } - } else if (operation.type === 'put') { // 4.2.6 - // 4.2.6.1 - if (operation.response == null) { - throw 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 (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'expected http or https scheme' - }) - } - - // 4.2.6.4 - if (r.method !== 'GET') { - throw webidl.errors.exception({ - header: 'Cache.#batchCacheOperations', - message: 'not get method' - }) - } - - // 4.2.6.5 - if (operation.options != null) { - throw 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) - 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]) - } - - // 4.3 - return resultList - } catch (e) { // 5. - // 5.1 - this.#relevantRequestResponseList.length = 0 - - // 5.2 - this.#relevantRequestResponseList = backupCache - - // 5.3 - throw e - } - } - - /** - * @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) - } - } - - return resultList - } - - /** - * @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 (!urlEquals(queryURL, cachedURL, true)) { - return false - } - - if ( - response == null || - options?.ignoreVary || - !response.headersList.contains('vary') - ) { - return true - } - - const fieldValues = 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 - } -} - -Object.defineProperties(Cache.prototype, { - [Symbol.toStringTag]: { - value: 'Cache', - configurable: true - }, - match: kEnumerableProperty, - matchAll: kEnumerableProperty, - add: kEnumerableProperty, - addAll: kEnumerableProperty, - put: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -const cacheQueryOptionConverters = [ - { - key: 'ignoreSearch', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreMethod', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'ignoreVary', - converter: webidl.converters.boolean, - defaultValue: false - } -] - -webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters) - -webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ - ...cacheQueryOptionConverters, - { - key: 'cacheName', - converter: webidl.converters.DOMString - } -]) - -webidl.converters.Response = webidl.interfaceConverter(Response) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.RequestInfo -) - -module.exports = { - Cache -} - - -/***/ }), - -/***/ 89605: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kConstruct } = __nccwpck_require__(51829) -const { Cache } = __nccwpck_require__(64890) -const { webidl } = __nccwpck_require__(29) -const { kEnumerableProperty } = __nccwpck_require__(33465) - -class CacheStorage { - /** - * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map - * @type {Map} - */ - async has (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) - - cacheName = webidl.converters.DOMString(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) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) - - cacheName = 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 Cache(kConstruct, cache) - } - - // 2.2 - const cache = [] - - // 2.3 - this.#caches.set(cacheName, cache) - - // 2.4 - return new Cache(kConstruct, cache) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete - * @param {string} cacheName - * @returns {Promise} - */ - async delete (cacheName) { - webidl.brandCheck(this, CacheStorage) - webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) - - cacheName = webidl.converters.DOMString(cacheName) - - return this.#caches.delete(cacheName) - } - - /** - * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys - * @returns {string[]} - */ - async keys () { - webidl.brandCheck(this, CacheStorage) - - // 2.1 - const keys = this.#caches.keys() - - // 2.2 - return [...keys] - } -} - -Object.defineProperties(CacheStorage.prototype, { - [Symbol.toStringTag]: { - value: 'CacheStorage', - configurable: true - }, - match: kEnumerableProperty, - has: kEnumerableProperty, - open: kEnumerableProperty, - delete: kEnumerableProperty, - keys: kEnumerableProperty -}) - -module.exports = { - CacheStorage -} - - -/***/ }), - -/***/ 51829: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = { - kConstruct: (__nccwpck_require__(34856).kConstruct) -} - - -/***/ }), - -/***/ 20726: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(42613) -const { URLSerializer } = __nccwpck_require__(43911) -const { isValidHeaderName } = __nccwpck_require__(42696) - -/** - * @see https://url.spec.whatwg.org/#concept-url-equals - * @param {URL} A - * @param {URL} B - * @param {boolean | undefined} excludeFragment - * @returns {boolean} - */ -function urlEquals (A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment) - - const serializedB = 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 fieldValues (header) { - assert(header !== null) - - const values = [] - - for (let value of header.split(',')) { - value = value.trim() - - if (!value.length) { - continue - } else if (!isValidHeaderName(value)) { - continue - } - - values.push(value) - } - - return values -} - -module.exports = { - urlEquals, - fieldValues -} - - -/***/ }), - -/***/ 76646: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// @ts-check - - - -/* global WebAssembly */ - -const assert = __nccwpck_require__(42613) -const net = __nccwpck_require__(69278) -const http = __nccwpck_require__(58611) -const { pipeline } = __nccwpck_require__(2203) -const util = __nccwpck_require__(33465) -const timers = __nccwpck_require__(82907) -const Request = __nccwpck_require__(4916) -const DispatcherBase = __nccwpck_require__(9368) -const { - RequestContentLengthMismatchError, - ResponseContentLengthMismatchError, - InvalidArgumentError, - RequestAbortedError, - HeadersTimeoutError, - HeadersOverflowError, - SocketError, - InformationalError, - BodyTimeoutError, - HTTPParserError, - ResponseExceededMaxSizeError, - ClientDestroyedError -} = __nccwpck_require__(33862) -const buildConnector = __nccwpck_require__(2559) -const { - kUrl, - kReset, - kServerName, - kClient, - kBusy, - kParser, - kConnect, - kBlocking, - kResuming, - kRunning, - kPending, - kSize, - kWriting, - kQueue, - kConnected, - kConnecting, - kNeedDrain, - kNoRef, - kKeepAliveDefaultTimeout, - kHostHeader, - kPendingIdx, - kRunningIdx, - kError, - kPipelining, - kSocket, - kKeepAliveTimeoutValue, - kMaxHeadersSize, - kKeepAliveMaxTimeout, - kKeepAliveTimeoutThreshold, - kHeadersTimeout, - kBodyTimeout, - kStrictContentLength, - kConnector, - kMaxRedirections, - kMaxRequests, - kCounter, - kClose, - kDestroy, - kDispatch, - kInterceptors, - kLocalAddress, - kMaxResponseSize, - kHTTPConnVersion, - // HTTP2 - kHost, - kHTTP2Session, - kHTTP2SessionState, - kHTTP2BuildRequest, - kHTTP2CopyHeaders, - kHTTP1BuildRequest -} = __nccwpck_require__(34856) - -/** @type {import('http2')} */ -let http2 -try { - http2 = __nccwpck_require__(85675) -} catch { - // @ts-ignore - http2 = { constants: {} } -} - -const { - constants: { - HTTP2_HEADER_AUTHORITY, - HTTP2_HEADER_METHOD, - HTTP2_HEADER_PATH, - HTTP2_HEADER_SCHEME, - HTTP2_HEADER_CONTENT_LENGTH, - HTTP2_HEADER_EXPECT, - HTTP2_HEADER_STATUS - } -} = http2 - -// Experimental -let h2ExperimentalWarned = false - -const FastBuffer = Buffer[Symbol.species] - -const kClosedResolve = Symbol('kClosedResolve') - -const channels = {} - -try { - const diagnosticsChannel = __nccwpck_require__(31637) - channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') - channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') - channels.connectError = diagnosticsChannel.channel('undici:client:connectError') - channels.connected = diagnosticsChannel.channel('undici:client:connected') -} catch { - channels.sendHeaders = { hasSubscribers: false } - channels.beforeConnect = { hasSubscribers: false } - channels.connectError = { hasSubscribers: false } - channels.connected = { hasSubscribers: false } -} - -/** - * @type {import('../types/client').default} - */ -class Client extends DispatcherBase { - /** - * - * @param {string|URL} url - * @param {import('../types/client').Client.Options} options - */ - constructor (url, { - interceptors, - maxHeaderSize, - headersTimeout, - socketTimeout, - requestTimeout, - connectTimeout, - bodyTimeout, - idleTimeout, - keepAlive, - keepAliveTimeout, - maxKeepAliveTimeout, - keepAliveMaxTimeout, - keepAliveTimeoutThreshold, - socketPath, - pipelining, - tls, - strictContentLength, - maxCachedSessions, - maxRedirections, - connect, - maxRequestsPerClient, - localAddress, - maxResponseSize, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - // h2 - allowH2, - maxConcurrentStreams - } = {}) { - super() - - if (keepAlive !== undefined) { - throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') - } - - if (socketTimeout !== undefined) { - throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') - } - - if (requestTimeout !== undefined) { - throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') - } - - if (idleTimeout !== undefined) { - throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') - } - - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError('unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead') - } - - if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { - throw new InvalidArgumentError('invalid maxHeaderSize') - } - - if (socketPath != null && typeof socketPath !== 'string') { - throw new InvalidArgumentError('invalid socketPath') - } - - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError('invalid connectTimeout') - } - - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveTimeout') - } - - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError('invalid keepAliveMaxTimeout') - } - - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError('invalid keepAliveTimeoutThreshold') - } - - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('headersTimeout must be a positive integer or zero') - } - - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('bodyTimeout must be a positive integer or zero') - } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') - } - - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') - } - - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError('maxRequestsPerClient must be a positive number') - } - - if (localAddress != null && (typeof localAddress !== 'string' || net.isIP(localAddress) === 0)) { - throw new InvalidArgumentError('localAddress must be valid string IP address') - } - - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError('maxResponseSize must be a positive number') - } - - if ( - autoSelectFamilyAttemptTimeout != null && - (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1) - ) { - throw new InvalidArgumentError('autoSelectFamilyAttemptTimeout must be a positive number') - } - - // h2 - if (allowH2 != null && typeof allowH2 !== 'boolean') { - throw new InvalidArgumentError('allowH2 must be a valid boolean value') - } - - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== 'number' || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError('maxConcurrentStreams must be a possitive integer, greater than 0') - } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) - } - - this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) - ? interceptors.Client - : [createRedirectInterceptor({ maxRedirections })] - this[kUrl] = util.parseOrigin(url) - this[kConnector] = connect - this[kSocket] = null - this[kPipelining] = pipelining != null ? pipelining : 1 - this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize - this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout - this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout - this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold - this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] - this[kServerName] = null - this[kLocalAddress] = localAddress != null ? localAddress : null - this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming - this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` - this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 - this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 - this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength - this[kMaxRedirections] = maxRedirections - this[kMaxRequests] = maxRequestsPerClient - this[kClosedResolve] = null - this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 - this[kHTTPConnVersion] = 'h1' - - // HTTP/2 - this[kHTTP2Session] = null - this[kHTTP2SessionState] = !allowH2 - ? null - : { - // streams: null, // Fixed queue of streams - For future support of `push` - openStreams: 0, // Keep track of them to decide wether or not unref the session - maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server - } - this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[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[kQueue] = [] - this[kRunningIdx] = 0 - this[kPendingIdx] = 0 - } - - get pipelining () { - return this[kPipelining] - } - - set pipelining (value) { - this[kPipelining] = value - resume(this, true) - } - - get [kPending] () { - return this[kQueue].length - this[kPendingIdx] - } - - get [kRunning] () { - return this[kPendingIdx] - this[kRunningIdx] - } - - get [kSize] () { - return this[kQueue].length - this[kRunningIdx] - } - - get [kConnected] () { - return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed - } - - get [kBusy] () { - const socket = this[kSocket] - return ( - (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || - (this[kSize] >= (this[kPipelining] || 1)) || - this[kPending] > 0 - ) - } - - /* istanbul ignore: only used for test */ - [kConnect] (cb) { - connect(this) - this.once('connect', cb) - } - - [kDispatch] (opts, handler) { - const origin = opts.origin || this[kUrl].origin - - const request = this[kHTTPConnVersion] === 'h2' - ? Request[kHTTP2BuildRequest](origin, opts, handler) - : Request[kHTTP1BuildRequest](origin, opts, handler) - - this[kQueue].push(request) - if (this[kResuming]) { - // Do nothing. - } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { - // Wait a tick in case stream/iterator is ended in the same tick. - this[kResuming] = 1 - process.nextTick(resume, this) - } else { - resume(this, true) - } - - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2 - } - - return this[kNeedDrain] < 2 - } - - async [kClose] () { - // TODO: for H2 we need to gracefully flush the remaining enqueued - // request and close each stream. - return new Promise((resolve) => { - if (!this[kSize]) { - resolve(null) - } else { - this[kClosedResolve] = resolve +// node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json +var require_db = __commonJS({ + "node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/db.json"(exports2, module2) { + module2.exports = { + "application/1d-interleaved-parityfec": { + source: "iana" + }, + "application/3gpdash-qoe-report+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/3gpp-ims+xml": { + source: "iana", + compressible: true + }, + "application/3gpphal+json": { + source: "iana", + compressible: true + }, + "application/3gpphalforms+json": { + source: "iana", + compressible: true + }, + "application/a2l": { + source: "iana" + }, + "application/ace+cbor": { + source: "iana" + }, + "application/activemessage": { + source: "iana" + }, + "application/activity+json": { + source: "iana", + compressible: true + }, + "application/alto-costmap+json": { + source: "iana", + compressible: true + }, + "application/alto-costmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-directory+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcost+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointcostparams+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointprop+json": { + source: "iana", + compressible: true + }, + "application/alto-endpointpropparams+json": { + source: "iana", + compressible: true + }, + "application/alto-error+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmap+json": { + source: "iana", + compressible: true + }, + "application/alto-networkmapfilter+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamcontrol+json": { + source: "iana", + compressible: true + }, + "application/alto-updatestreamparams+json": { + source: "iana", + compressible: true + }, + "application/aml": { + source: "iana" + }, + "application/andrew-inset": { + source: "iana", + extensions: ["ez"] + }, + "application/applefile": { + source: "iana" + }, + "application/applixware": { + source: "apache", + extensions: ["aw"] + }, + "application/at+jwt": { + source: "iana" + }, + "application/atf": { + source: "iana" + }, + "application/atfx": { + source: "iana" + }, + "application/atom+xml": { + source: "iana", + compressible: true, + extensions: ["atom"] + }, + "application/atomcat+xml": { + source: "iana", + compressible: true, + extensions: ["atomcat"] + }, + "application/atomdeleted+xml": { + source: "iana", + compressible: true, + extensions: ["atomdeleted"] + }, + "application/atomicmail": { + source: "iana" + }, + "application/atomsvc+xml": { + source: "iana", + compressible: true, + extensions: ["atomsvc"] + }, + "application/atsc-dwd+xml": { + source: "iana", + compressible: true, + extensions: ["dwd"] + }, + "application/atsc-dynamic-event-message": { + source: "iana" + }, + "application/atsc-held+xml": { + source: "iana", + compressible: true, + extensions: ["held"] + }, + "application/atsc-rdt+json": { + source: "iana", + compressible: true + }, + "application/atsc-rsat+xml": { + source: "iana", + compressible: true, + extensions: ["rsat"] + }, + "application/atxml": { + source: "iana" + }, + "application/auth-policy+xml": { + source: "iana", + compressible: true + }, + "application/bacnet-xdd+zip": { + source: "iana", + compressible: false + }, + "application/batch-smtp": { + source: "iana" + }, + "application/bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/beep+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/calendar+json": { + source: "iana", + compressible: true + }, + "application/calendar+xml": { + source: "iana", + compressible: true, + extensions: ["xcs"] + }, + "application/call-completion": { + source: "iana" + }, + "application/cals-1840": { + source: "iana" + }, + "application/captive+json": { + source: "iana", + compressible: true + }, + "application/cbor": { + source: "iana" + }, + "application/cbor-seq": { + source: "iana" + }, + "application/cccex": { + source: "iana" + }, + "application/ccmp+xml": { + source: "iana", + compressible: true + }, + "application/ccxml+xml": { + source: "iana", + compressible: true, + extensions: ["ccxml"] + }, + "application/cdfx+xml": { + source: "iana", + compressible: true, + extensions: ["cdfx"] + }, + "application/cdmi-capability": { + source: "iana", + extensions: ["cdmia"] + }, + "application/cdmi-container": { + source: "iana", + extensions: ["cdmic"] + }, + "application/cdmi-domain": { + source: "iana", + extensions: ["cdmid"] + }, + "application/cdmi-object": { + source: "iana", + extensions: ["cdmio"] + }, + "application/cdmi-queue": { + source: "iana", + extensions: ["cdmiq"] + }, + "application/cdni": { + source: "iana" + }, + "application/cea": { + source: "iana" + }, + "application/cea-2018+xml": { + source: "iana", + compressible: true + }, + "application/cellml+xml": { + source: "iana", + compressible: true + }, + "application/cfw": { + source: "iana" + }, + "application/city+json": { + source: "iana", + compressible: true + }, + "application/clr": { + source: "iana" + }, + "application/clue+xml": { + source: "iana", + compressible: true + }, + "application/clue_info+xml": { + source: "iana", + compressible: true + }, + "application/cms": { + source: "iana" + }, + "application/cnrp+xml": { + source: "iana", + compressible: true + }, + "application/coap-group+json": { + source: "iana", + compressible: true + }, + "application/coap-payload": { + source: "iana" + }, + "application/commonground": { + source: "iana" + }, + "application/conference-info+xml": { + source: "iana", + compressible: true + }, + "application/cose": { + source: "iana" + }, + "application/cose-key": { + source: "iana" + }, + "application/cose-key-set": { + source: "iana" + }, + "application/cpl+xml": { + source: "iana", + compressible: true, + extensions: ["cpl"] + }, + "application/csrattrs": { + source: "iana" + }, + "application/csta+xml": { + source: "iana", + compressible: true + }, + "application/cstadata+xml": { + source: "iana", + compressible: true + }, + "application/csvm+json": { + source: "iana", + compressible: true + }, + "application/cu-seeme": { + source: "apache", + extensions: ["cu"] + }, + "application/cwt": { + source: "iana" + }, + "application/cybercash": { + source: "iana" + }, + "application/dart": { + compressible: true + }, + "application/dash+xml": { + source: "iana", + compressible: true, + extensions: ["mpd"] + }, + "application/dash-patch+xml": { + source: "iana", + compressible: true, + extensions: ["mpp"] + }, + "application/dashdelta": { + source: "iana" + }, + "application/davmount+xml": { + source: "iana", + compressible: true, + extensions: ["davmount"] + }, + "application/dca-rft": { + source: "iana" + }, + "application/dcd": { + source: "iana" + }, + "application/dec-dx": { + source: "iana" + }, + "application/dialog-info+xml": { + source: "iana", + compressible: true + }, + "application/dicom": { + source: "iana" + }, + "application/dicom+json": { + source: "iana", + compressible: true + }, + "application/dicom+xml": { + source: "iana", + compressible: true + }, + "application/dii": { + source: "iana" + }, + "application/dit": { + source: "iana" + }, + "application/dns": { + source: "iana" + }, + "application/dns+json": { + source: "iana", + compressible: true + }, + "application/dns-message": { + source: "iana" + }, + "application/docbook+xml": { + source: "apache", + compressible: true, + extensions: ["dbk"] + }, + "application/dots+cbor": { + source: "iana" + }, + "application/dskpp+xml": { + source: "iana", + compressible: true + }, + "application/dssc+der": { + source: "iana", + extensions: ["dssc"] + }, + "application/dssc+xml": { + source: "iana", + compressible: true, + extensions: ["xdssc"] + }, + "application/dvcs": { + source: "iana" + }, + "application/ecmascript": { + source: "iana", + compressible: true, + extensions: ["es", "ecma"] + }, + "application/edi-consent": { + source: "iana" + }, + "application/edi-x12": { + source: "iana", + compressible: false + }, + "application/edifact": { + source: "iana", + compressible: false + }, + "application/efi": { + source: "iana" + }, + "application/elm+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/elm+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.cap+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/emergencycalldata.comment+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.control+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.deviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.ecall.msd": { + source: "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.serviceinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.subscriberinfo+xml": { + source: "iana", + compressible: true + }, + "application/emergencycalldata.veds+xml": { + source: "iana", + compressible: true + }, + "application/emma+xml": { + source: "iana", + compressible: true, + extensions: ["emma"] + }, + "application/emotionml+xml": { + source: "iana", + compressible: true, + extensions: ["emotionml"] + }, + "application/encaprtp": { + source: "iana" + }, + "application/epp+xml": { + source: "iana", + compressible: true + }, + "application/epub+zip": { + source: "iana", + compressible: false, + extensions: ["epub"] + }, + "application/eshop": { + source: "iana" + }, + "application/exi": { + source: "iana", + extensions: ["exi"] + }, + "application/expect-ct-report+json": { + source: "iana", + compressible: true + }, + "application/express": { + source: "iana", + extensions: ["exp"] + }, + "application/fastinfoset": { + source: "iana" + }, + "application/fastsoap": { + source: "iana" + }, + "application/fdt+xml": { + source: "iana", + compressible: true, + extensions: ["fdt"] + }, + "application/fhir+json": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fhir+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/fido.trusted-apps+json": { + compressible: true + }, + "application/fits": { + source: "iana" + }, + "application/flexfec": { + source: "iana" + }, + "application/font-sfnt": { + source: "iana" + }, + "application/font-tdpfr": { + source: "iana", + extensions: ["pfr"] + }, + "application/font-woff": { + source: "iana", + compressible: false + }, + "application/framework-attributes+xml": { + source: "iana", + compressible: true + }, + "application/geo+json": { + source: "iana", + compressible: true, + extensions: ["geojson"] + }, + "application/geo+json-seq": { + source: "iana" + }, + "application/geopackage+sqlite3": { + source: "iana" + }, + "application/geoxacml+xml": { + source: "iana", + compressible: true + }, + "application/gltf-buffer": { + source: "iana" + }, + "application/gml+xml": { + source: "iana", + compressible: true, + extensions: ["gml"] + }, + "application/gpx+xml": { + source: "apache", + compressible: true, + extensions: ["gpx"] + }, + "application/gxf": { + source: "apache", + extensions: ["gxf"] + }, + "application/gzip": { + source: "iana", + compressible: false, + extensions: ["gz"] + }, + "application/h224": { + source: "iana" + }, + "application/held+xml": { + source: "iana", + compressible: true + }, + "application/hjson": { + extensions: ["hjson"] + }, + "application/http": { + source: "iana" + }, + "application/hyperstudio": { + source: "iana", + extensions: ["stk"] + }, + "application/ibe-key-request+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pkg-reply+xml": { + source: "iana", + compressible: true + }, + "application/ibe-pp-data": { + source: "iana" + }, + "application/iges": { + source: "iana" + }, + "application/im-iscomposing+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/index": { + source: "iana" + }, + "application/index.cmd": { + source: "iana" + }, + "application/index.obj": { + source: "iana" + }, + "application/index.response": { + source: "iana" + }, + "application/index.vnd": { + source: "iana" + }, + "application/inkml+xml": { + source: "iana", + compressible: true, + extensions: ["ink", "inkml"] + }, + "application/iotp": { + source: "iana" + }, + "application/ipfix": { + source: "iana", + extensions: ["ipfix"] + }, + "application/ipp": { + source: "iana" + }, + "application/isup": { + source: "iana" + }, + "application/its+xml": { + source: "iana", + compressible: true, + extensions: ["its"] + }, + "application/java-archive": { + source: "apache", + compressible: false, + extensions: ["jar", "war", "ear"] + }, + "application/java-serialized-object": { + source: "apache", + compressible: false, + extensions: ["ser"] + }, + "application/java-vm": { + source: "apache", + compressible: false, + extensions: ["class"] + }, + "application/javascript": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["js", "mjs"] + }, + "application/jf2feed+json": { + source: "iana", + compressible: true + }, + "application/jose": { + source: "iana" + }, + "application/jose+json": { + source: "iana", + compressible: true + }, + "application/jrd+json": { + source: "iana", + compressible: true + }, + "application/jscalendar+json": { + source: "iana", + compressible: true + }, + "application/json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["json", "map"] + }, + "application/json-patch+json": { + source: "iana", + compressible: true + }, + "application/json-seq": { + source: "iana" + }, + "application/json5": { + extensions: ["json5"] + }, + "application/jsonml+json": { + source: "apache", + compressible: true, + extensions: ["jsonml"] + }, + "application/jwk+json": { + source: "iana", + compressible: true + }, + "application/jwk-set+json": { + source: "iana", + compressible: true + }, + "application/jwt": { + source: "iana" + }, + "application/kpml-request+xml": { + source: "iana", + compressible: true + }, + "application/kpml-response+xml": { + source: "iana", + compressible: true + }, + "application/ld+json": { + source: "iana", + compressible: true, + extensions: ["jsonld"] + }, + "application/lgr+xml": { + source: "iana", + compressible: true, + extensions: ["lgr"] + }, + "application/link-format": { + source: "iana" + }, + "application/load-control+xml": { + source: "iana", + compressible: true + }, + "application/lost+xml": { + source: "iana", + compressible: true, + extensions: ["lostxml"] + }, + "application/lostsync+xml": { + source: "iana", + compressible: true + }, + "application/lpf+zip": { + source: "iana", + compressible: false + }, + "application/lxf": { + source: "iana" + }, + "application/mac-binhex40": { + source: "iana", + extensions: ["hqx"] + }, + "application/mac-compactpro": { + source: "apache", + extensions: ["cpt"] + }, + "application/macwriteii": { + source: "iana" + }, + "application/mads+xml": { + source: "iana", + compressible: true, + extensions: ["mads"] + }, + "application/manifest+json": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["webmanifest"] + }, + "application/marc": { + source: "iana", + extensions: ["mrc"] + }, + "application/marcxml+xml": { + source: "iana", + compressible: true, + extensions: ["mrcx"] + }, + "application/mathematica": { + source: "iana", + extensions: ["ma", "nb", "mb"] + }, + "application/mathml+xml": { + source: "iana", + compressible: true, + extensions: ["mathml"] + }, + "application/mathml-content+xml": { + source: "iana", + compressible: true + }, + "application/mathml-presentation+xml": { + source: "iana", + compressible: true + }, + "application/mbms-associated-procedure-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-deregister+xml": { + source: "iana", + compressible: true + }, + "application/mbms-envelope+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk+xml": { + source: "iana", + compressible: true + }, + "application/mbms-msk-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-protection-description+xml": { + source: "iana", + compressible: true + }, + "application/mbms-reception-report+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register+xml": { + source: "iana", + compressible: true + }, + "application/mbms-register-response+xml": { + source: "iana", + compressible: true + }, + "application/mbms-schedule+xml": { + source: "iana", + compressible: true + }, + "application/mbms-user-service-description+xml": { + source: "iana", + compressible: true + }, + "application/mbox": { + source: "iana", + extensions: ["mbox"] + }, + "application/media-policy-dataset+xml": { + source: "iana", + compressible: true, + extensions: ["mpf"] + }, + "application/media_control+xml": { + source: "iana", + compressible: true + }, + "application/mediaservercontrol+xml": { + source: "iana", + compressible: true, + extensions: ["mscml"] + }, + "application/merge-patch+json": { + source: "iana", + compressible: true + }, + "application/metalink+xml": { + source: "apache", + compressible: true, + extensions: ["metalink"] + }, + "application/metalink4+xml": { + source: "iana", + compressible: true, + extensions: ["meta4"] + }, + "application/mets+xml": { + source: "iana", + compressible: true, + extensions: ["mets"] + }, + "application/mf4": { + source: "iana" + }, + "application/mikey": { + source: "iana" + }, + "application/mipc": { + source: "iana" + }, + "application/missing-blocks+cbor-seq": { + source: "iana" + }, + "application/mmt-aei+xml": { + source: "iana", + compressible: true, + extensions: ["maei"] + }, + "application/mmt-usd+xml": { + source: "iana", + compressible: true, + extensions: ["musd"] + }, + "application/mods+xml": { + source: "iana", + compressible: true, + extensions: ["mods"] + }, + "application/moss-keys": { + source: "iana" + }, + "application/moss-signature": { + source: "iana" + }, + "application/mosskey-data": { + source: "iana" + }, + "application/mosskey-request": { + source: "iana" + }, + "application/mp21": { + source: "iana", + extensions: ["m21", "mp21"] + }, + "application/mp4": { + source: "iana", + extensions: ["mp4s", "m4p"] + }, + "application/mpeg4-generic": { + source: "iana" + }, + "application/mpeg4-iod": { + source: "iana" + }, + "application/mpeg4-iod-xmt": { + source: "iana" + }, + "application/mrb-consumer+xml": { + source: "iana", + compressible: true + }, + "application/mrb-publish+xml": { + source: "iana", + compressible: true + }, + "application/msc-ivr+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msc-mixer+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/msword": { + source: "iana", + compressible: false, + extensions: ["doc", "dot"] + }, + "application/mud+json": { + source: "iana", + compressible: true + }, + "application/multipart-core": { + source: "iana" + }, + "application/mxf": { + source: "iana", + extensions: ["mxf"] + }, + "application/n-quads": { + source: "iana", + extensions: ["nq"] + }, + "application/n-triples": { + source: "iana", + extensions: ["nt"] + }, + "application/nasdata": { + source: "iana" + }, + "application/news-checkgroups": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-groupinfo": { + source: "iana", + charset: "US-ASCII" + }, + "application/news-transmission": { + source: "iana" + }, + "application/nlsml+xml": { + source: "iana", + compressible: true + }, + "application/node": { + source: "iana", + extensions: ["cjs"] + }, + "application/nss": { + source: "iana" + }, + "application/oauth-authz-req+jwt": { + source: "iana" + }, + "application/oblivious-dns-message": { + source: "iana" + }, + "application/ocsp-request": { + source: "iana" + }, + "application/ocsp-response": { + source: "iana" + }, + "application/octet-stream": { + source: "iana", + compressible: false, + extensions: ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] + }, + "application/oda": { + source: "iana", + extensions: ["oda"] + }, + "application/odm+xml": { + source: "iana", + compressible: true + }, + "application/odx": { + source: "iana" + }, + "application/oebps-package+xml": { + source: "iana", + compressible: true, + extensions: ["opf"] + }, + "application/ogg": { + source: "iana", + compressible: false, + extensions: ["ogx"] + }, + "application/omdoc+xml": { + source: "apache", + compressible: true, + extensions: ["omdoc"] + }, + "application/onenote": { + source: "apache", + extensions: ["onetoc", "onetoc2", "onetmp", "onepkg"] + }, + "application/opc-nodeset+xml": { + source: "iana", + compressible: true + }, + "application/oscore": { + source: "iana" + }, + "application/oxps": { + source: "iana", + extensions: ["oxps"] + }, + "application/p21": { + source: "iana" + }, + "application/p21+zip": { + source: "iana", + compressible: false + }, + "application/p2p-overlay+xml": { + source: "iana", + compressible: true, + extensions: ["relo"] + }, + "application/parityfec": { + source: "iana" + }, + "application/passport": { + source: "iana" + }, + "application/patch-ops-error+xml": { + source: "iana", + compressible: true, + extensions: ["xer"] + }, + "application/pdf": { + source: "iana", + compressible: false, + extensions: ["pdf"] + }, + "application/pdx": { + source: "iana" + }, + "application/pem-certificate-chain": { + source: "iana" + }, + "application/pgp-encrypted": { + source: "iana", + compressible: false, + extensions: ["pgp"] + }, + "application/pgp-keys": { + source: "iana", + extensions: ["asc"] + }, + "application/pgp-signature": { + source: "iana", + extensions: ["asc", "sig"] + }, + "application/pics-rules": { + source: "apache", + extensions: ["prf"] + }, + "application/pidf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pidf-diff+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/pkcs10": { + source: "iana", + extensions: ["p10"] + }, + "application/pkcs12": { + source: "iana" + }, + "application/pkcs7-mime": { + source: "iana", + extensions: ["p7m", "p7c"] + }, + "application/pkcs7-signature": { + source: "iana", + extensions: ["p7s"] + }, + "application/pkcs8": { + source: "iana", + extensions: ["p8"] + }, + "application/pkcs8-encrypted": { + source: "iana" + }, + "application/pkix-attr-cert": { + source: "iana", + extensions: ["ac"] + }, + "application/pkix-cert": { + source: "iana", + extensions: ["cer"] + }, + "application/pkix-crl": { + source: "iana", + extensions: ["crl"] + }, + "application/pkix-pkipath": { + source: "iana", + extensions: ["pkipath"] + }, + "application/pkixcmp": { + source: "iana", + extensions: ["pki"] + }, + "application/pls+xml": { + source: "iana", + compressible: true, + extensions: ["pls"] + }, + "application/poc-settings+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/postscript": { + source: "iana", + compressible: true, + extensions: ["ai", "eps", "ps"] + }, + "application/ppsp-tracker+json": { + source: "iana", + compressible: true + }, + "application/problem+json": { + source: "iana", + compressible: true + }, + "application/problem+xml": { + source: "iana", + compressible: true + }, + "application/provenance+xml": { + source: "iana", + compressible: true, + extensions: ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + source: "iana" + }, + "application/prs.cww": { + source: "iana", + extensions: ["cww"] + }, + "application/prs.cyn": { + source: "iana", + charset: "7-BIT" + }, + "application/prs.hpub+zip": { + source: "iana", + compressible: false + }, + "application/prs.nprend": { + source: "iana" + }, + "application/prs.plucker": { + source: "iana" + }, + "application/prs.rdf-xml-crypt": { + source: "iana" + }, + "application/prs.xsf+xml": { + source: "iana", + compressible: true + }, + "application/pskc+xml": { + source: "iana", + compressible: true, + extensions: ["pskcxml"] + }, + "application/pvd+json": { + source: "iana", + compressible: true + }, + "application/qsig": { + source: "iana" + }, + "application/raml+yaml": { + compressible: true, + extensions: ["raml"] + }, + "application/raptorfec": { + source: "iana" + }, + "application/rdap+json": { + source: "iana", + compressible: true + }, + "application/rdf+xml": { + source: "iana", + compressible: true, + extensions: ["rdf", "owl"] + }, + "application/reginfo+xml": { + source: "iana", + compressible: true, + extensions: ["rif"] + }, + "application/relax-ng-compact-syntax": { + source: "iana", + extensions: ["rnc"] + }, + "application/remote-printing": { + source: "iana" + }, + "application/reputon+json": { + source: "iana", + compressible: true + }, + "application/resource-lists+xml": { + source: "iana", + compressible: true, + extensions: ["rl"] + }, + "application/resource-lists-diff+xml": { + source: "iana", + compressible: true, + extensions: ["rld"] + }, + "application/rfc+xml": { + source: "iana", + compressible: true + }, + "application/riscos": { + source: "iana" + }, + "application/rlmi+xml": { + source: "iana", + compressible: true + }, + "application/rls-services+xml": { + source: "iana", + compressible: true, + extensions: ["rs"] + }, + "application/route-apd+xml": { + source: "iana", + compressible: true, + extensions: ["rapd"] + }, + "application/route-s-tsid+xml": { + source: "iana", + compressible: true, + extensions: ["sls"] + }, + "application/route-usd+xml": { + source: "iana", + compressible: true, + extensions: ["rusd"] + }, + "application/rpki-ghostbusters": { + source: "iana", + extensions: ["gbr"] + }, + "application/rpki-manifest": { + source: "iana", + extensions: ["mft"] + }, + "application/rpki-publication": { + source: "iana" + }, + "application/rpki-roa": { + source: "iana", + extensions: ["roa"] + }, + "application/rpki-updown": { + source: "iana" + }, + "application/rsd+xml": { + source: "apache", + compressible: true, + extensions: ["rsd"] + }, + "application/rss+xml": { + source: "apache", + compressible: true, + extensions: ["rss"] + }, + "application/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "application/rtploopback": { + source: "iana" + }, + "application/rtx": { + source: "iana" + }, + "application/samlassertion+xml": { + source: "iana", + compressible: true + }, + "application/samlmetadata+xml": { + source: "iana", + compressible: true + }, + "application/sarif+json": { + source: "iana", + compressible: true + }, + "application/sarif-external-properties+json": { + source: "iana", + compressible: true + }, + "application/sbe": { + source: "iana" + }, + "application/sbml+xml": { + source: "iana", + compressible: true, + extensions: ["sbml"] + }, + "application/scaip+xml": { + source: "iana", + compressible: true + }, + "application/scim+json": { + source: "iana", + compressible: true + }, + "application/scvp-cv-request": { + source: "iana", + extensions: ["scq"] + }, + "application/scvp-cv-response": { + source: "iana", + extensions: ["scs"] + }, + "application/scvp-vp-request": { + source: "iana", + extensions: ["spq"] + }, + "application/scvp-vp-response": { + source: "iana", + extensions: ["spp"] + }, + "application/sdp": { + source: "iana", + extensions: ["sdp"] + }, + "application/secevent+jwt": { + source: "iana" + }, + "application/senml+cbor": { + source: "iana" + }, + "application/senml+json": { + source: "iana", + compressible: true + }, + "application/senml+xml": { + source: "iana", + compressible: true, + extensions: ["senmlx"] + }, + "application/senml-etch+cbor": { + source: "iana" + }, + "application/senml-etch+json": { + source: "iana", + compressible: true + }, + "application/senml-exi": { + source: "iana" + }, + "application/sensml+cbor": { + source: "iana" + }, + "application/sensml+json": { + source: "iana", + compressible: true + }, + "application/sensml+xml": { + source: "iana", + compressible: true, + extensions: ["sensmlx"] + }, + "application/sensml-exi": { + source: "iana" + }, + "application/sep+xml": { + source: "iana", + compressible: true + }, + "application/sep-exi": { + source: "iana" + }, + "application/session-info": { + source: "iana" + }, + "application/set-payment": { + source: "iana" + }, + "application/set-payment-initiation": { + source: "iana", + extensions: ["setpay"] + }, + "application/set-registration": { + source: "iana" + }, + "application/set-registration-initiation": { + source: "iana", + extensions: ["setreg"] + }, + "application/sgml": { + source: "iana" + }, + "application/sgml-open-catalog": { + source: "iana" + }, + "application/shf+xml": { + source: "iana", + compressible: true, + extensions: ["shf"] + }, + "application/sieve": { + source: "iana", + extensions: ["siv", "sieve"] + }, + "application/simple-filter+xml": { + source: "iana", + compressible: true + }, + "application/simple-message-summary": { + source: "iana" + }, + "application/simplesymbolcontainer": { + source: "iana" + }, + "application/sipc": { + source: "iana" + }, + "application/slate": { + source: "iana" + }, + "application/smil": { + source: "iana" + }, + "application/smil+xml": { + source: "iana", + compressible: true, + extensions: ["smi", "smil"] + }, + "application/smpte336m": { + source: "iana" + }, + "application/soap+fastinfoset": { + source: "iana" + }, + "application/soap+xml": { + source: "iana", + compressible: true + }, + "application/sparql-query": { + source: "iana", + extensions: ["rq"] + }, + "application/sparql-results+xml": { + source: "iana", + compressible: true, + extensions: ["srx"] + }, + "application/spdx+json": { + source: "iana", + compressible: true + }, + "application/spirits-event+xml": { + source: "iana", + compressible: true + }, + "application/sql": { + source: "iana" + }, + "application/srgs": { + source: "iana", + extensions: ["gram"] + }, + "application/srgs+xml": { + source: "iana", + compressible: true, + extensions: ["grxml"] + }, + "application/sru+xml": { + source: "iana", + compressible: true, + extensions: ["sru"] + }, + "application/ssdl+xml": { + source: "apache", + compressible: true, + extensions: ["ssdl"] + }, + "application/ssml+xml": { + source: "iana", + compressible: true, + extensions: ["ssml"] + }, + "application/stix+json": { + source: "iana", + compressible: true + }, + "application/swid+xml": { + source: "iana", + compressible: true, + extensions: ["swidtag"] + }, + "application/tamp-apex-update": { + source: "iana" + }, + "application/tamp-apex-update-confirm": { + source: "iana" + }, + "application/tamp-community-update": { + source: "iana" + }, + "application/tamp-community-update-confirm": { + source: "iana" + }, + "application/tamp-error": { + source: "iana" + }, + "application/tamp-sequence-adjust": { + source: "iana" + }, + "application/tamp-sequence-adjust-confirm": { + source: "iana" + }, + "application/tamp-status-query": { + source: "iana" + }, + "application/tamp-status-response": { + source: "iana" + }, + "application/tamp-update": { + source: "iana" + }, + "application/tamp-update-confirm": { + source: "iana" + }, + "application/tar": { + compressible: true + }, + "application/taxii+json": { + source: "iana", + compressible: true + }, + "application/td+json": { + source: "iana", + compressible: true + }, + "application/tei+xml": { + source: "iana", + compressible: true, + extensions: ["tei", "teicorpus"] + }, + "application/tetra_isi": { + source: "iana" + }, + "application/thraud+xml": { + source: "iana", + compressible: true, + extensions: ["tfi"] + }, + "application/timestamp-query": { + source: "iana" + }, + "application/timestamp-reply": { + source: "iana" + }, + "application/timestamped-data": { + source: "iana", + extensions: ["tsd"] + }, + "application/tlsrpt+gzip": { + source: "iana" + }, + "application/tlsrpt+json": { + source: "iana", + compressible: true + }, + "application/tnauthlist": { + source: "iana" + }, + "application/token-introspection+jwt": { + source: "iana" + }, + "application/toml": { + compressible: true, + extensions: ["toml"] + }, + "application/trickle-ice-sdpfrag": { + source: "iana" + }, + "application/trig": { + source: "iana", + extensions: ["trig"] + }, + "application/ttml+xml": { + source: "iana", + compressible: true, + extensions: ["ttml"] + }, + "application/tve-trigger": { + source: "iana" + }, + "application/tzif": { + source: "iana" + }, + "application/tzif-leap": { + source: "iana" + }, + "application/ubjson": { + compressible: false, + extensions: ["ubj"] + }, + "application/ulpfec": { + source: "iana" + }, + "application/urc-grpsheet+xml": { + source: "iana", + compressible: true + }, + "application/urc-ressheet+xml": { + source: "iana", + compressible: true, + extensions: ["rsheet"] + }, + "application/urc-targetdesc+xml": { + source: "iana", + compressible: true, + extensions: ["td"] + }, + "application/urc-uisocketdesc+xml": { + source: "iana", + compressible: true + }, + "application/vcard+json": { + source: "iana", + compressible: true + }, + "application/vcard+xml": { + source: "iana", + compressible: true + }, + "application/vemmi": { + source: "iana" + }, + "application/vividence.scriptfile": { + source: "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + source: "iana", + compressible: true, + extensions: ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp-v2x-local-service-information": { + source: "iana" + }, + "application/vnd.3gpp.5gnas": { + source: "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.bsf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gmop+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.gtpc": { + source: "iana" + }, + "application/vnd.3gpp.interworking-data": { + source: "iana" + }, + "application/vnd.3gpp.lpp": { + source: "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-payload": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-signalling": { + source: "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.mid-call+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ngap": { + source: "iana" + }, + "application/vnd.3gpp.pfcp": { + source: "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + source: "iana", + extensions: ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + source: "iana", + extensions: ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + source: "iana", + extensions: ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + source: "iana" + }, + "application/vnd.3gpp.sms": { + source: "iana" + }, + "application/vnd.3gpp.sms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.srvcc-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp.ussd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.3gpp2.sms": { + source: "iana" + }, + "application/vnd.3gpp2.tcap": { + source: "iana", + extensions: ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + source: "iana" + }, + "application/vnd.3m.post-it-notes": { + source: "iana", + extensions: ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + source: "iana", + extensions: ["aso"] + }, + "application/vnd.accpac.simply.imp": { + source: "iana", + extensions: ["imp"] + }, + "application/vnd.acucobol": { + source: "iana", + extensions: ["acu"] + }, + "application/vnd.acucorp": { + source: "iana", + extensions: ["atc", "acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + source: "apache", + compressible: false, + extensions: ["air"] + }, + "application/vnd.adobe.flash.movie": { + source: "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + source: "iana", + extensions: ["fcdt"] + }, + "application/vnd.adobe.fxp": { + source: "iana", + extensions: ["fxp", "fxpl"] + }, + "application/vnd.adobe.partial-upload": { + source: "iana" + }, + "application/vnd.adobe.xdp+xml": { + source: "iana", + compressible: true, + extensions: ["xdp"] + }, + "application/vnd.adobe.xfdf": { + source: "iana", + extensions: ["xfdf"] + }, + "application/vnd.aether.imp": { + source: "iana" + }, + "application/vnd.afpc.afplinedata": { + source: "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + source: "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + source: "iana" + }, + "application/vnd.afpc.foca-charset": { + source: "iana" + }, + "application/vnd.afpc.foca-codedfont": { + source: "iana" + }, + "application/vnd.afpc.foca-codepage": { + source: "iana" + }, + "application/vnd.afpc.modca": { + source: "iana" + }, + "application/vnd.afpc.modca-cmtable": { + source: "iana" + }, + "application/vnd.afpc.modca-formdef": { + source: "iana" + }, + "application/vnd.afpc.modca-mediummap": { + source: "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + source: "iana" + }, + "application/vnd.afpc.modca-overlay": { + source: "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + source: "iana" + }, + "application/vnd.age": { + source: "iana", + extensions: ["age"] + }, + "application/vnd.ah-barcode": { + source: "iana" + }, + "application/vnd.ahead.space": { + source: "iana", + extensions: ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + source: "iana", + extensions: ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + source: "iana", + extensions: ["azs"] + }, + "application/vnd.amadeus+json": { + source: "iana", + compressible: true + }, + "application/vnd.amazon.ebook": { + source: "apache", + extensions: ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + source: "iana" + }, + "application/vnd.americandynamics.acc": { + source: "iana", + extensions: ["acc"] + }, + "application/vnd.amiga.ami": { + source: "iana", + extensions: ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + source: "iana", + compressible: true + }, + "application/vnd.android.ota": { + source: "iana" + }, + "application/vnd.android.package-archive": { + source: "apache", + compressible: false, + extensions: ["apk"] + }, + "application/vnd.anki": { + source: "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + source: "iana", + extensions: ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + source: "apache", + extensions: ["fti"] + }, + "application/vnd.antix.game-component": { + source: "iana", + extensions: ["atx"] + }, + "application/vnd.apache.arrow.file": { + source: "iana" + }, + "application/vnd.apache.arrow.stream": { + source: "iana" + }, + "application/vnd.apache.thrift.binary": { + source: "iana" + }, + "application/vnd.apache.thrift.compact": { + source: "iana" + }, + "application/vnd.apache.thrift.json": { + source: "iana" + }, + "application/vnd.api+json": { + source: "iana", + compressible: true + }, + "application/vnd.aplextor.warrp+json": { + source: "iana", + compressible: true + }, + "application/vnd.apothekende.reservation+json": { + source: "iana", + compressible: true + }, + "application/vnd.apple.installer+xml": { + source: "iana", + compressible: true, + extensions: ["mpkg"] + }, + "application/vnd.apple.keynote": { + source: "iana", + extensions: ["key"] + }, + "application/vnd.apple.mpegurl": { + source: "iana", + extensions: ["m3u8"] + }, + "application/vnd.apple.numbers": { + source: "iana", + extensions: ["numbers"] + }, + "application/vnd.apple.pages": { + source: "iana", + extensions: ["pages"] + }, + "application/vnd.apple.pkpass": { + compressible: false, + extensions: ["pkpass"] + }, + "application/vnd.arastra.swi": { + source: "iana" + }, + "application/vnd.aristanetworks.swi": { + source: "iana", + extensions: ["swi"] + }, + "application/vnd.artisan+json": { + source: "iana", + compressible: true + }, + "application/vnd.artsquare": { + source: "iana" + }, + "application/vnd.astraea-software.iota": { + source: "iana", + extensions: ["iota"] + }, + "application/vnd.audiograph": { + source: "iana", + extensions: ["aep"] + }, + "application/vnd.autopackage": { + source: "iana" + }, + "application/vnd.avalon+json": { + source: "iana", + compressible: true + }, + "application/vnd.avistar+xml": { + source: "iana", + compressible: true + }, + "application/vnd.balsamiq.bmml+xml": { + source: "iana", + compressible: true, + extensions: ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + source: "iana" + }, + "application/vnd.banana-accounting": { + source: "iana" + }, + "application/vnd.bbf.usp.error": { + source: "iana" + }, + "application/vnd.bbf.usp.msg": { + source: "iana" + }, + "application/vnd.bbf.usp.msg+json": { + source: "iana", + compressible: true + }, + "application/vnd.bekitzur-stech+json": { + source: "iana", + compressible: true + }, + "application/vnd.bint.med-content": { + source: "iana" + }, + "application/vnd.biopax.rdf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.blink-idb-value-wrapper": { + source: "iana" + }, + "application/vnd.blueice.multipass": { + source: "iana", + extensions: ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + source: "iana" + }, + "application/vnd.bluetooth.le.oob": { + source: "iana" + }, + "application/vnd.bmi": { + source: "iana", + extensions: ["bmi"] + }, + "application/vnd.bpf": { + source: "iana" + }, + "application/vnd.bpf3": { + source: "iana" + }, + "application/vnd.businessobjects": { + source: "iana", + extensions: ["rep"] + }, + "application/vnd.byu.uapi+json": { + source: "iana", + compressible: true + }, + "application/vnd.cab-jscript": { + source: "iana" + }, + "application/vnd.canon-cpdl": { + source: "iana" + }, + "application/vnd.canon-lips": { + source: "iana" + }, + "application/vnd.capasystems-pg+json": { + source: "iana", + compressible: true + }, + "application/vnd.cendio.thinlinc.clientconf": { + source: "iana" + }, + "application/vnd.century-systems.tcp_stream": { + source: "iana" + }, + "application/vnd.chemdraw+xml": { + source: "iana", + compressible: true, + extensions: ["cdxml"] + }, + "application/vnd.chess-pgn": { + source: "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + source: "iana", + extensions: ["mmd"] + }, + "application/vnd.ciedi": { + source: "iana" + }, + "application/vnd.cinderella": { + source: "iana", + extensions: ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + source: "iana" + }, + "application/vnd.citationstyles.style+xml": { + source: "iana", + compressible: true, + extensions: ["csl"] + }, + "application/vnd.claymore": { + source: "iana", + extensions: ["cla"] + }, + "application/vnd.cloanto.rp9": { + source: "iana", + extensions: ["rp9"] + }, + "application/vnd.clonk.c4group": { + source: "iana", + extensions: ["c4g", "c4d", "c4f", "c4p", "c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + source: "iana", + extensions: ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + source: "iana", + extensions: ["c11amz"] + }, + "application/vnd.coffeescript": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + source: "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + source: "iana" + }, + "application/vnd.collection+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.doc+json": { + source: "iana", + compressible: true + }, + "application/vnd.collection.next+json": { + source: "iana", + compressible: true + }, + "application/vnd.comicbook+zip": { + source: "iana", + compressible: false + }, + "application/vnd.comicbook-rar": { + source: "iana" + }, + "application/vnd.commerce-battelle": { + source: "iana" + }, + "application/vnd.commonspace": { + source: "iana", + extensions: ["csp"] + }, + "application/vnd.contact.cmsg": { + source: "iana", + extensions: ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + source: "iana", + compressible: true + }, + "application/vnd.cosmocaller": { + source: "iana", + extensions: ["cmc"] + }, + "application/vnd.crick.clicker": { + source: "iana", + extensions: ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + source: "iana", + extensions: ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + source: "iana", + extensions: ["clkp"] + }, + "application/vnd.crick.clicker.template": { + source: "iana", + extensions: ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + source: "iana", + extensions: ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + source: "iana", + compressible: true, + extensions: ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + source: "iana", + compressible: true + }, + "application/vnd.crypto-shade-file": { + source: "iana" + }, + "application/vnd.cryptomator.encrypted": { + source: "iana" + }, + "application/vnd.cryptomator.vault": { + source: "iana" + }, + "application/vnd.ctc-posml": { + source: "iana", + extensions: ["pml"] + }, + "application/vnd.ctct.ws+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cups-pdf": { + source: "iana" + }, + "application/vnd.cups-postscript": { + source: "iana" + }, + "application/vnd.cups-ppd": { + source: "iana", + extensions: ["ppd"] + }, + "application/vnd.cups-raster": { + source: "iana" + }, + "application/vnd.cups-raw": { + source: "iana" + }, + "application/vnd.curl": { + source: "iana" + }, + "application/vnd.curl.car": { + source: "apache", + extensions: ["car"] + }, + "application/vnd.curl.pcurl": { + source: "apache", + extensions: ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.cybank": { + source: "iana" + }, + "application/vnd.cyclonedx+json": { + source: "iana", + compressible: true + }, + "application/vnd.cyclonedx+xml": { + source: "iana", + compressible: true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + source: "iana", + compressible: false + }, + "application/vnd.d3m-dataset": { + source: "iana" + }, + "application/vnd.d3m-problem": { + source: "iana" + }, + "application/vnd.dart": { + source: "iana", + compressible: true, + extensions: ["dart"] + }, + "application/vnd.data-vision.rdz": { + source: "iana", + extensions: ["rdz"] + }, + "application/vnd.datapackage+json": { + source: "iana", + compressible: true + }, + "application/vnd.dataresource+json": { + source: "iana", + compressible: true + }, + "application/vnd.dbf": { + source: "iana", + extensions: ["dbf"] + }, + "application/vnd.debian.binary-package": { + source: "iana" + }, + "application/vnd.dece.data": { + source: "iana", + extensions: ["uvf", "uvvf", "uvd", "uvvd"] + }, + "application/vnd.dece.ttml+xml": { + source: "iana", + compressible: true, + extensions: ["uvt", "uvvt"] + }, + "application/vnd.dece.unspecified": { + source: "iana", + extensions: ["uvx", "uvvx"] + }, + "application/vnd.dece.zip": { + source: "iana", + extensions: ["uvz", "uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + source: "iana", + extensions: ["fe_launch"] + }, + "application/vnd.desmume.movie": { + source: "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + source: "iana" + }, + "application/vnd.dm.delegation+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dna": { + source: "iana", + extensions: ["dna"] + }, + "application/vnd.document+json": { + source: "iana", + compressible: true + }, + "application/vnd.dolby.mlp": { + source: "apache", + extensions: ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + source: "iana" + }, + "application/vnd.dolby.mobile.2": { + source: "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + source: "iana" + }, + "application/vnd.dpgraph": { + source: "iana", + extensions: ["dpg"] + }, + "application/vnd.dreamfactory": { + source: "iana", + extensions: ["dfac"] + }, + "application/vnd.drive+json": { + source: "iana", + compressible: true + }, + "application/vnd.ds-keypoint": { + source: "apache", + extensions: ["kpxx"] + }, + "application/vnd.dtg.local": { + source: "iana" + }, + "application/vnd.dtg.local.flash": { + source: "iana" + }, + "application/vnd.dtg.local.html": { + source: "iana" + }, + "application/vnd.dvb.ait": { + source: "iana", + extensions: ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.dvbj": { + source: "iana" + }, + "application/vnd.dvb.esgcontainer": { + source: "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + source: "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + source: "iana" + }, + "application/vnd.dvb.ipdcroaming": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + source: "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + source: "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-container+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-generic+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.notif-init+xml": { + source: "iana", + compressible: true + }, + "application/vnd.dvb.pfr": { + source: "iana" + }, + "application/vnd.dvb.service": { + source: "iana", + extensions: ["svc"] + }, + "application/vnd.dxr": { + source: "iana" + }, + "application/vnd.dynageo": { + source: "iana", + extensions: ["geo"] + }, + "application/vnd.dzr": { + source: "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + source: "iana" + }, + "application/vnd.ecdis-update": { + source: "iana" + }, + "application/vnd.ecip.rlp": { + source: "iana" + }, + "application/vnd.eclipse.ditto+json": { + source: "iana", + compressible: true + }, + "application/vnd.ecowin.chart": { + source: "iana", + extensions: ["mag"] + }, + "application/vnd.ecowin.filerequest": { + source: "iana" + }, + "application/vnd.ecowin.fileupdate": { + source: "iana" + }, + "application/vnd.ecowin.series": { + source: "iana" + }, + "application/vnd.ecowin.seriesrequest": { + source: "iana" + }, + "application/vnd.ecowin.seriesupdate": { + source: "iana" + }, + "application/vnd.efi.img": { + source: "iana" + }, + "application/vnd.efi.iso": { + source: "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + source: "iana", + compressible: true + }, + "application/vnd.enliven": { + source: "iana", + extensions: ["nml"] + }, + "application/vnd.enphase.envoy": { + source: "iana" + }, + "application/vnd.eprints.data+xml": { + source: "iana", + compressible: true + }, + "application/vnd.epson.esf": { + source: "iana", + extensions: ["esf"] + }, + "application/vnd.epson.msf": { + source: "iana", + extensions: ["msf"] + }, + "application/vnd.epson.quickanime": { + source: "iana", + extensions: ["qam"] + }, + "application/vnd.epson.salt": { + source: "iana", + extensions: ["slt"] + }, + "application/vnd.epson.ssf": { + source: "iana", + extensions: ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + source: "iana" + }, + "application/vnd.espass-espass+zip": { + source: "iana", + compressible: false + }, + "application/vnd.eszigno3+xml": { + source: "iana", + compressible: true, + extensions: ["es3", "et3"] + }, + "application/vnd.etsi.aoc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.asic-e+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.asic-s+zip": { + source: "iana", + compressible: false + }, + "application/vnd.etsi.cug+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvcommand+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvservice+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvsync+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.iptvueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mcid+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.mheg5": { + source: "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.pstn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.sci+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.simservs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.timestamp-token": { + source: "iana" + }, + "application/vnd.etsi.tsl+xml": { + source: "iana", + compressible: true + }, + "application/vnd.etsi.tsl.der": { + source: "iana" + }, + "application/vnd.eu.kasparian.car+json": { + source: "iana", + compressible: true + }, + "application/vnd.eudora.data": { + source: "iana" + }, + "application/vnd.evolv.ecig.profile": { + source: "iana" + }, + "application/vnd.evolv.ecig.settings": { + source: "iana" + }, + "application/vnd.evolv.ecig.theme": { + source: "iana" + }, + "application/vnd.exstream-empower+zip": { + source: "iana", + compressible: false + }, + "application/vnd.exstream-package": { + source: "iana" + }, + "application/vnd.ezpix-album": { + source: "iana", + extensions: ["ez2"] + }, + "application/vnd.ezpix-package": { + source: "iana", + extensions: ["ez3"] + }, + "application/vnd.f-secure.mobile": { + source: "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + source: "iana", + compressible: false + }, + "application/vnd.fastcopy-disk-image": { + source: "iana" + }, + "application/vnd.fdf": { + source: "iana", + extensions: ["fdf"] + }, + "application/vnd.fdsn.mseed": { + source: "iana", + extensions: ["mseed"] + }, + "application/vnd.fdsn.seed": { + source: "iana", + extensions: ["seed", "dataless"] + }, + "application/vnd.ffsns": { + source: "iana" + }, + "application/vnd.ficlab.flb+zip": { + source: "iana", + compressible: false + }, + "application/vnd.filmit.zfc": { + source: "iana" + }, + "application/vnd.fints": { + source: "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + source: "iana" + }, + "application/vnd.flographit": { + source: "iana", + extensions: ["gph"] + }, + "application/vnd.fluxtime.clip": { + source: "iana", + extensions: ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + source: "iana" + }, + "application/vnd.framemaker": { + source: "iana", + extensions: ["fm", "frame", "maker", "book"] + }, + "application/vnd.frogans.fnc": { + source: "iana", + extensions: ["fnc"] + }, + "application/vnd.frogans.ltf": { + source: "iana", + extensions: ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + source: "iana", + extensions: ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + source: "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + source: "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.fujitsu.oasys": { + source: "iana", + extensions: ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + source: "iana", + extensions: ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + source: "iana", + extensions: ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + source: "iana", + extensions: ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + source: "iana", + extensions: ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + source: "iana" + }, + "application/vnd.fujixerox.art4": { + source: "iana" + }, + "application/vnd.fujixerox.ddd": { + source: "iana", + extensions: ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + source: "iana", + extensions: ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + source: "iana", + extensions: ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + source: "iana" + }, + "application/vnd.fujixerox.hbpl": { + source: "iana" + }, + "application/vnd.fut-misnet": { + source: "iana" + }, + "application/vnd.futoin+cbor": { + source: "iana" + }, + "application/vnd.futoin+json": { + source: "iana", + compressible: true + }, + "application/vnd.fuzzysheet": { + source: "iana", + extensions: ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + source: "iana", + extensions: ["txd"] + }, + "application/vnd.gentics.grd+json": { + source: "iana", + compressible: true + }, + "application/vnd.geo+json": { + source: "iana", + compressible: true + }, + "application/vnd.geocube+xml": { + source: "iana", + compressible: true + }, + "application/vnd.geogebra.file": { + source: "iana", + extensions: ["ggb"] + }, + "application/vnd.geogebra.slides": { + source: "iana" + }, + "application/vnd.geogebra.tool": { + source: "iana", + extensions: ["ggt"] + }, + "application/vnd.geometry-explorer": { + source: "iana", + extensions: ["gex", "gre"] + }, + "application/vnd.geonext": { + source: "iana", + extensions: ["gxt"] + }, + "application/vnd.geoplan": { + source: "iana", + extensions: ["g2w"] + }, + "application/vnd.geospace": { + source: "iana", + extensions: ["g3w"] + }, + "application/vnd.gerber": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + source: "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + source: "iana" + }, + "application/vnd.gmx": { + source: "iana", + extensions: ["gmx"] + }, + "application/vnd.google-apps.document": { + compressible: false, + extensions: ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + compressible: false, + extensions: ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + compressible: false, + extensions: ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + source: "iana", + compressible: true, + extensions: ["kml"] + }, + "application/vnd.google-earth.kmz": { + source: "iana", + compressible: false, + extensions: ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + source: "iana", + compressible: true + }, + "application/vnd.gov.sk.e-form+zip": { + source: "iana", + compressible: false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.grafeq": { + source: "iana", + extensions: ["gqf", "gqs"] + }, + "application/vnd.gridmp": { + source: "iana" + }, + "application/vnd.groove-account": { + source: "iana", + extensions: ["gac"] + }, + "application/vnd.groove-help": { + source: "iana", + extensions: ["ghf"] + }, + "application/vnd.groove-identity-message": { + source: "iana", + extensions: ["gim"] + }, + "application/vnd.groove-injector": { + source: "iana", + extensions: ["grv"] + }, + "application/vnd.groove-tool-message": { + source: "iana", + extensions: ["gtm"] + }, + "application/vnd.groove-tool-template": { + source: "iana", + extensions: ["tpl"] + }, + "application/vnd.groove-vcard": { + source: "iana", + extensions: ["vcg"] + }, + "application/vnd.hal+json": { + source: "iana", + compressible: true + }, + "application/vnd.hal+xml": { + source: "iana", + compressible: true, + extensions: ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + source: "iana", + compressible: true, + extensions: ["zmm"] + }, + "application/vnd.hbci": { + source: "iana", + extensions: ["hbci"] + }, + "application/vnd.hc+json": { + source: "iana", + compressible: true + }, + "application/vnd.hcl-bireports": { + source: "iana" + }, + "application/vnd.hdt": { + source: "iana" + }, + "application/vnd.heroku+json": { + source: "iana", + compressible: true + }, + "application/vnd.hhe.lesson-player": { + source: "iana", + extensions: ["les"] + }, + "application/vnd.hl7cda+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hl7v2+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.hp-hpgl": { + source: "iana", + extensions: ["hpgl"] + }, + "application/vnd.hp-hpid": { + source: "iana", + extensions: ["hpid"] + }, + "application/vnd.hp-hps": { + source: "iana", + extensions: ["hps"] + }, + "application/vnd.hp-jlyt": { + source: "iana", + extensions: ["jlt"] + }, + "application/vnd.hp-pcl": { + source: "iana", + extensions: ["pcl"] + }, + "application/vnd.hp-pclxl": { + source: "iana", + extensions: ["pclxl"] + }, + "application/vnd.httphone": { + source: "iana" + }, + "application/vnd.hydrostatix.sof-data": { + source: "iana", + extensions: ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyper-item+json": { + source: "iana", + compressible: true + }, + "application/vnd.hyperdrive+json": { + source: "iana", + compressible: true + }, + "application/vnd.hzn-3d-crossword": { + source: "iana" + }, + "application/vnd.ibm.afplinedata": { + source: "iana" + }, + "application/vnd.ibm.electronic-media": { + source: "iana" + }, + "application/vnd.ibm.minipay": { + source: "iana", + extensions: ["mpy"] + }, + "application/vnd.ibm.modcap": { + source: "iana", + extensions: ["afp", "listafp", "list3820"] + }, + "application/vnd.ibm.rights-management": { + source: "iana", + extensions: ["irm"] + }, + "application/vnd.ibm.secure-container": { + source: "iana", + extensions: ["sc"] + }, + "application/vnd.iccprofile": { + source: "iana", + extensions: ["icc", "icm"] + }, + "application/vnd.ieee.1905": { + source: "iana" + }, + "application/vnd.igloader": { + source: "iana", + extensions: ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + source: "iana", + compressible: false + }, + "application/vnd.imagemeter.image+zip": { + source: "iana", + compressible: false + }, + "application/vnd.immervision-ivp": { + source: "iana", + extensions: ["ivp"] + }, + "application/vnd.immervision-ivu": { + source: "iana", + extensions: ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + source: "iana" + }, + "application/vnd.ims.imsccv1p2": { + source: "iana" + }, + "application/vnd.ims.imsccv1p3": { + source: "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + source: "iana", + compressible: true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + source: "iana", + compressible: true + }, + "application/vnd.informedcontrol.rms+xml": { + source: "iana", + compressible: true + }, + "application/vnd.informix-visionary": { + source: "iana" + }, + "application/vnd.infotech.project": { + source: "iana" + }, + "application/vnd.infotech.project+xml": { + source: "iana", + compressible: true + }, + "application/vnd.innopath.wamp.notification": { + source: "iana" + }, + "application/vnd.insors.igm": { + source: "iana", + extensions: ["igm"] + }, + "application/vnd.intercon.formnet": { + source: "iana", + extensions: ["xpw", "xpx"] + }, + "application/vnd.intergeo": { + source: "iana", + extensions: ["i2g"] + }, + "application/vnd.intertrust.digibox": { + source: "iana" + }, + "application/vnd.intertrust.nncp": { + source: "iana" + }, + "application/vnd.intu.qbo": { + source: "iana", + extensions: ["qbo"] + }, + "application/vnd.intu.qfx": { + source: "iana", + extensions: ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.packageitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.iptc.g2.planningitem+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ipunplugged.rcprofile": { + source: "iana", + extensions: ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + source: "iana", + compressible: true, + extensions: ["irp"] + }, + "application/vnd.is-xpr": { + source: "iana", + extensions: ["xpr"] + }, + "application/vnd.isac.fcs": { + source: "iana", + extensions: ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + source: "iana", + compressible: false + }, + "application/vnd.jam": { + source: "iana", + extensions: ["jam"] + }, + "application/vnd.japannet-directory-service": { + source: "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-payment-wakeup": { + source: "iana" + }, + "application/vnd.japannet-registration": { + source: "iana" + }, + "application/vnd.japannet-registration-wakeup": { + source: "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + source: "iana" + }, + "application/vnd.japannet-verification": { + source: "iana" + }, + "application/vnd.japannet-verification-wakeup": { + source: "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + source: "iana", + extensions: ["rms"] + }, + "application/vnd.jisp": { + source: "iana", + extensions: ["jisp"] + }, + "application/vnd.joost.joda-archive": { + source: "iana", + extensions: ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + source: "iana" + }, + "application/vnd.kahootz": { + source: "iana", + extensions: ["ktz", "ktr"] + }, + "application/vnd.kde.karbon": { + source: "iana", + extensions: ["karbon"] + }, + "application/vnd.kde.kchart": { + source: "iana", + extensions: ["chrt"] + }, + "application/vnd.kde.kformula": { + source: "iana", + extensions: ["kfo"] + }, + "application/vnd.kde.kivio": { + source: "iana", + extensions: ["flw"] + }, + "application/vnd.kde.kontour": { + source: "iana", + extensions: ["kon"] + }, + "application/vnd.kde.kpresenter": { + source: "iana", + extensions: ["kpr", "kpt"] + }, + "application/vnd.kde.kspread": { + source: "iana", + extensions: ["ksp"] + }, + "application/vnd.kde.kword": { + source: "iana", + extensions: ["kwd", "kwt"] + }, + "application/vnd.kenameaapp": { + source: "iana", + extensions: ["htke"] + }, + "application/vnd.kidspiration": { + source: "iana", + extensions: ["kia"] + }, + "application/vnd.kinar": { + source: "iana", + extensions: ["kne", "knp"] + }, + "application/vnd.koan": { + source: "iana", + extensions: ["skp", "skd", "skt", "skm"] + }, + "application/vnd.kodak-descriptor": { + source: "iana", + extensions: ["sse"] + }, + "application/vnd.las": { + source: "iana" + }, + "application/vnd.las.las+json": { + source: "iana", + compressible: true + }, + "application/vnd.las.las+xml": { + source: "iana", + compressible: true, + extensions: ["lasxml"] + }, + "application/vnd.laszip": { + source: "iana" + }, + "application/vnd.leap+json": { + source: "iana", + compressible: true + }, + "application/vnd.liberty-request+xml": { + source: "iana", + compressible: true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + source: "iana", + extensions: ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + source: "iana", + compressible: true, + extensions: ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + source: "iana", + compressible: false + }, + "application/vnd.loom": { + source: "iana" + }, + "application/vnd.lotus-1-2-3": { + source: "iana", + extensions: ["123"] + }, + "application/vnd.lotus-approach": { + source: "iana", + extensions: ["apr"] + }, + "application/vnd.lotus-freelance": { + source: "iana", + extensions: ["pre"] + }, + "application/vnd.lotus-notes": { + source: "iana", + extensions: ["nsf"] + }, + "application/vnd.lotus-organizer": { + source: "iana", + extensions: ["org"] + }, + "application/vnd.lotus-screencam": { + source: "iana", + extensions: ["scm"] + }, + "application/vnd.lotus-wordpro": { + source: "iana", + extensions: ["lwp"] + }, + "application/vnd.macports.portpkg": { + source: "iana", + extensions: ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + source: "iana", + extensions: ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.conftoken+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.license+xml": { + source: "iana", + compressible: true + }, + "application/vnd.marlin.drm.mdcf": { + source: "iana" + }, + "application/vnd.mason+json": { + source: "iana", + compressible: true + }, + "application/vnd.maxar.archive.3tz+zip": { + source: "iana", + compressible: false + }, + "application/vnd.maxmind.maxmind-db": { + source: "iana" + }, + "application/vnd.mcd": { + source: "iana", + extensions: ["mcd"] + }, + "application/vnd.medcalcdata": { + source: "iana", + extensions: ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + source: "iana", + extensions: ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + source: "iana" + }, + "application/vnd.mfer": { + source: "iana", + extensions: ["mwf"] + }, + "application/vnd.mfmp": { + source: "iana", + extensions: ["mfm"] + }, + "application/vnd.micro+json": { + source: "iana", + compressible: true + }, + "application/vnd.micrografx.flo": { + source: "iana", + extensions: ["flo"] + }, + "application/vnd.micrografx.igx": { + source: "iana", + extensions: ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + source: "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + source: "iana" + }, + "application/vnd.miele+json": { + source: "iana", + compressible: true + }, + "application/vnd.mif": { + source: "iana", + extensions: ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + source: "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + source: "iana" + }, + "application/vnd.mobius.daf": { + source: "iana", + extensions: ["daf"] + }, + "application/vnd.mobius.dis": { + source: "iana", + extensions: ["dis"] + }, + "application/vnd.mobius.mbk": { + source: "iana", + extensions: ["mbk"] + }, + "application/vnd.mobius.mqy": { + source: "iana", + extensions: ["mqy"] + }, + "application/vnd.mobius.msl": { + source: "iana", + extensions: ["msl"] + }, + "application/vnd.mobius.plc": { + source: "iana", + extensions: ["plc"] + }, + "application/vnd.mobius.txf": { + source: "iana", + extensions: ["txf"] + }, + "application/vnd.mophun.application": { + source: "iana", + extensions: ["mpn"] + }, + "application/vnd.mophun.certificate": { + source: "iana", + extensions: ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + source: "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + source: "iana" + }, + "application/vnd.motorola.iprm": { + source: "iana" + }, + "application/vnd.mozilla.xul+xml": { + source: "iana", + compressible: true, + extensions: ["xul"] + }, + "application/vnd.ms-3mfdocument": { + source: "iana" + }, + "application/vnd.ms-artgalry": { + source: "iana", + extensions: ["cil"] + }, + "application/vnd.ms-asf": { + source: "iana" + }, + "application/vnd.ms-cab-compressed": { + source: "iana", + extensions: ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + source: "apache" + }, + "application/vnd.ms-excel": { + source: "iana", + compressible: false, + extensions: ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + source: "iana", + extensions: ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + source: "iana", + extensions: ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + source: "iana", + extensions: ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + source: "iana", + extensions: ["xltm"] + }, + "application/vnd.ms-fontobject": { + source: "iana", + compressible: true, + extensions: ["eot"] + }, + "application/vnd.ms-htmlhelp": { + source: "iana", + extensions: ["chm"] + }, + "application/vnd.ms-ims": { + source: "iana", + extensions: ["ims"] + }, + "application/vnd.ms-lrm": { + source: "iana", + extensions: ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-officetheme": { + source: "iana", + extensions: ["thmx"] + }, + "application/vnd.ms-opentype": { + source: "apache", + compressible: true + }, + "application/vnd.ms-outlook": { + compressible: false, + extensions: ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + source: "apache" + }, + "application/vnd.ms-pki.seccat": { + source: "apache", + extensions: ["cat"] + }, + "application/vnd.ms-pki.stl": { + source: "apache", + extensions: ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-powerpoint": { + source: "iana", + compressible: false, + extensions: ["ppt", "pps", "pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + source: "iana", + extensions: ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + source: "iana", + extensions: ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + source: "iana", + extensions: ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + source: "iana", + extensions: ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + source: "iana", + extensions: ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-printing.printticket+xml": { + source: "apache", + compressible: true + }, + "application/vnd.ms-printschematicket+xml": { + source: "iana", + compressible: true + }, + "application/vnd.ms-project": { + source: "iana", + extensions: ["mpp", "mpt"] + }, + "application/vnd.ms-tnef": { + source: "iana" + }, + "application/vnd.ms-windows.devicepairing": { + source: "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + source: "iana" + }, + "application/vnd.ms-windows.printerpairing": { + source: "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + source: "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + source: "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + source: "iana", + extensions: ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + source: "iana", + extensions: ["dotm"] + }, + "application/vnd.ms-works": { + source: "iana", + extensions: ["wps", "wks", "wcm", "wdb"] + }, + "application/vnd.ms-wpl": { + source: "iana", + extensions: ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + source: "iana", + compressible: false, + extensions: ["xps"] + }, + "application/vnd.msa-disk-image": { + source: "iana" + }, + "application/vnd.mseq": { + source: "iana", + extensions: ["mseq"] + }, + "application/vnd.msign": { + source: "iana" + }, + "application/vnd.multiad.creator": { + source: "iana" + }, + "application/vnd.multiad.creator.cif": { + source: "iana" + }, + "application/vnd.music-niff": { + source: "iana" + }, + "application/vnd.musician": { + source: "iana", + extensions: ["mus"] + }, + "application/vnd.muvee.style": { + source: "iana", + extensions: ["msty"] + }, + "application/vnd.mynfc": { + source: "iana", + extensions: ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + source: "iana", + compressible: true + }, + "application/vnd.ncd.control": { + source: "iana" + }, + "application/vnd.ncd.reference": { + source: "iana" + }, + "application/vnd.nearst.inv+json": { + source: "iana", + compressible: true + }, + "application/vnd.nebumind.line": { + source: "iana" + }, + "application/vnd.nervana": { + source: "iana" + }, + "application/vnd.netfpx": { + source: "iana" + }, + "application/vnd.neurolanguage.nlu": { + source: "iana", + extensions: ["nlu"] + }, + "application/vnd.nimn": { + source: "iana" + }, + "application/vnd.nintendo.nitro.rom": { + source: "iana" + }, + "application/vnd.nintendo.snes.rom": { + source: "iana" + }, + "application/vnd.nitf": { + source: "iana", + extensions: ["ntf", "nitf"] + }, + "application/vnd.noblenet-directory": { + source: "iana", + extensions: ["nnd"] + }, + "application/vnd.noblenet-sealer": { + source: "iana", + extensions: ["nns"] + }, + "application/vnd.noblenet-web": { + source: "iana", + extensions: ["nnw"] + }, + "application/vnd.nokia.catalogs": { + source: "iana" + }, + "application/vnd.nokia.conml+wbxml": { + source: "iana" + }, + "application/vnd.nokia.conml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.iptv.config+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.isds-radio-presets": { + source: "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + source: "iana" + }, + "application/vnd.nokia.landmark+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.landmarkcollection+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.n-gage.ac+xml": { + source: "iana", + compressible: true, + extensions: ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + source: "iana", + extensions: ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + source: "iana", + extensions: ["n-gage"] + }, + "application/vnd.nokia.ncd": { + source: "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + source: "iana" + }, + "application/vnd.nokia.pcd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.nokia.radio-preset": { + source: "iana", + extensions: ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + source: "iana", + extensions: ["rpss"] + }, + "application/vnd.novadigm.edm": { + source: "iana", + extensions: ["edm"] + }, + "application/vnd.novadigm.edx": { + source: "iana", + extensions: ["edx"] + }, + "application/vnd.novadigm.ext": { + source: "iana", + extensions: ["ext"] + }, + "application/vnd.ntt-local.content-share": { + source: "iana" + }, + "application/vnd.ntt-local.file-transfer": { + source: "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + source: "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + source: "iana" + }, + "application/vnd.oasis.opendocument.chart": { + source: "iana", + extensions: ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + source: "iana", + extensions: ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + source: "iana", + extensions: ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + source: "iana", + extensions: ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + source: "iana", + extensions: ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + source: "iana", + compressible: false, + extensions: ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + source: "iana", + extensions: ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + source: "iana", + extensions: ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + source: "iana", + extensions: ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + source: "iana", + compressible: false, + extensions: ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + source: "iana", + extensions: ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + source: "iana", + compressible: false, + extensions: ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + source: "iana", + extensions: ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + source: "iana", + compressible: false, + extensions: ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + source: "iana", + extensions: ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + source: "iana", + extensions: ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + source: "iana", + extensions: ["oth"] + }, + "application/vnd.obn": { + source: "iana" + }, + "application/vnd.ocf+cbor": { + source: "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + source: "iana", + compressible: true + }, + "application/vnd.oftn.l10n+json": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.cspg-hexbinary": { + source: "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.dae.xhtml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.pae.gem": { + source: "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.spdlist+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.ueprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oipf.userprofile+xml": { + source: "iana", + compressible: true + }, + "application/vnd.olpc-sugar": { + source: "iana", + extensions: ["xo"] + }, + "application/vnd.oma-scws-config": { + source: "iana" + }, + "application/vnd.oma-scws-http-request": { + source: "iana" + }, + "application/vnd.oma-scws-http-response": { + source: "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.imd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.ltkm": { + source: "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + source: "iana" + }, + "application/vnd.oma.bcast.sgboot": { + source: "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sgdu": { + source: "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + source: "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.sprov+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.bcast.stkm": { + source: "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-feature-handler+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-pcc+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-subs-invite+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.cab-user-prefs+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.dcd": { + source: "iana" + }, + "application/vnd.oma.dcdc": { + source: "iana" + }, + "application/vnd.oma.dd2+xml": { + source: "iana", + compressible: true, + extensions: ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.group-usage-list+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+cbor": { + source: "iana" + }, + "application/vnd.oma.lwm2m+json": { + source: "iana", + compressible: true + }, + "application/vnd.oma.lwm2m+tlv": { + source: "iana" + }, + "application/vnd.oma.pal+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.final-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.groups+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.push": { + source: "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oma.xcap-directory+xml": { + source: "iana", + compressible: true + }, + "application/vnd.omads-email+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-file+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omads-folder+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.omaloc-supl-init": { + source: "iana" + }, + "application/vnd.onepager": { + source: "iana" + }, + "application/vnd.onepagertamp": { + source: "iana" + }, + "application/vnd.onepagertamx": { + source: "iana" + }, + "application/vnd.onepagertat": { + source: "iana" + }, + "application/vnd.onepagertatp": { + source: "iana" + }, + "application/vnd.onepagertatx": { + source: "iana" + }, + "application/vnd.openblox.game+xml": { + source: "iana", + compressible: true, + extensions: ["obgx"] + }, + "application/vnd.openblox.game-binary": { + source: "iana" + }, + "application/vnd.openeye.oeb": { + source: "iana" + }, + "application/vnd.openofficeorg.extension": { + source: "apache", + extensions: ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + source: "iana", + compressible: true, + extensions: ["osm"] + }, + "application/vnd.opentimestamps.ots": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + source: "iana", + compressible: false, + extensions: ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + source: "iana", + extensions: ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + source: "iana", + extensions: ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + source: "iana", + extensions: ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + source: "iana", + compressible: false, + extensions: ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + source: "iana", + extensions: ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + source: "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + source: "iana", + compressible: false, + extensions: ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + source: "iana", + extensions: ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + source: "iana", + compressible: true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oracle.resource+json": { + source: "iana", + compressible: true + }, + "application/vnd.orange.indata": { + source: "iana" + }, + "application/vnd.osa.netdeploy": { + source: "iana" + }, + "application/vnd.osgeo.mapguide.package": { + source: "iana", + extensions: ["mgp"] + }, + "application/vnd.osgi.bundle": { + source: "iana" + }, + "application/vnd.osgi.dp": { + source: "iana", + extensions: ["dp"] + }, + "application/vnd.osgi.subsystem": { + source: "iana", + extensions: ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + source: "iana", + compressible: true + }, + "application/vnd.oxli.countgraph": { + source: "iana" + }, + "application/vnd.pagerduty+json": { + source: "iana", + compressible: true + }, + "application/vnd.palm": { + source: "iana", + extensions: ["pdb", "pqa", "oprc"] + }, + "application/vnd.panoply": { + source: "iana" + }, + "application/vnd.paos.xml": { + source: "iana" + }, + "application/vnd.patentdive": { + source: "iana" + }, + "application/vnd.patientecommsdoc": { + source: "iana" + }, + "application/vnd.pawaafile": { + source: "iana", + extensions: ["paw"] + }, + "application/vnd.pcos": { + source: "iana" + }, + "application/vnd.pg.format": { + source: "iana", + extensions: ["str"] + }, + "application/vnd.pg.osasli": { + source: "iana", + extensions: ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + source: "iana" + }, + "application/vnd.picsel": { + source: "iana", + extensions: ["efif"] + }, + "application/vnd.pmi.widget": { + source: "iana", + extensions: ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + source: "iana", + compressible: true + }, + "application/vnd.pocketlearn": { + source: "iana", + extensions: ["plf"] + }, + "application/vnd.powerbuilder6": { + source: "iana", + extensions: ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + source: "iana" + }, + "application/vnd.powerbuilder7": { + source: "iana" + }, + "application/vnd.powerbuilder7-s": { + source: "iana" + }, + "application/vnd.powerbuilder75": { + source: "iana" + }, + "application/vnd.powerbuilder75-s": { + source: "iana" + }, + "application/vnd.preminet": { + source: "iana" + }, + "application/vnd.previewsystems.box": { + source: "iana", + extensions: ["box"] + }, + "application/vnd.proteus.magazine": { + source: "iana", + extensions: ["mgz"] + }, + "application/vnd.psfs": { + source: "iana" + }, + "application/vnd.publishare-delta-tree": { + source: "iana", + extensions: ["qps"] + }, + "application/vnd.pvi.ptid1": { + source: "iana", + extensions: ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + source: "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + source: "iana", + compressible: true + }, + "application/vnd.qualcomm.brew-app-res": { + source: "iana" + }, + "application/vnd.quarantainenet": { + source: "iana" + }, + "application/vnd.quark.quarkxpress": { + source: "iana", + extensions: ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] + }, + "application/vnd.quobject-quoxdocument": { + source: "iana" + }, + "application/vnd.radisys.moml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-conf+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + source: "iana", + compressible: true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + source: "iana", + compressible: true + }, + "application/vnd.rainstor.data": { + source: "iana" + }, + "application/vnd.rapid": { + source: "iana" + }, + "application/vnd.rar": { + source: "iana", + extensions: ["rar"] + }, + "application/vnd.realvnc.bed": { + source: "iana", + extensions: ["bed"] + }, + "application/vnd.recordare.musicxml": { + source: "iana", + extensions: ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + source: "iana", + compressible: true, + extensions: ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + source: "iana" + }, + "application/vnd.resilient.logic": { + source: "iana" + }, + "application/vnd.restful+json": { + source: "iana", + compressible: true + }, + "application/vnd.rig.cryptonote": { + source: "iana", + extensions: ["cryptonote"] + }, + "application/vnd.rim.cod": { + source: "apache", + extensions: ["cod"] + }, + "application/vnd.rn-realmedia": { + source: "apache", + extensions: ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + source: "apache", + extensions: ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + source: "iana", + compressible: true, + extensions: ["link66"] + }, + "application/vnd.rs-274x": { + source: "iana" + }, + "application/vnd.ruckus.download": { + source: "iana" + }, + "application/vnd.s3sms": { + source: "iana" + }, + "application/vnd.sailingtracker.track": { + source: "iana", + extensions: ["st"] + }, + "application/vnd.sar": { + source: "iana" + }, + "application/vnd.sbm.cid": { + source: "iana" + }, + "application/vnd.sbm.mid2": { + source: "iana" + }, + "application/vnd.scribus": { + source: "iana" + }, + "application/vnd.sealed.3df": { + source: "iana" + }, + "application/vnd.sealed.csf": { + source: "iana" + }, + "application/vnd.sealed.doc": { + source: "iana" + }, + "application/vnd.sealed.eml": { + source: "iana" + }, + "application/vnd.sealed.mht": { + source: "iana" + }, + "application/vnd.sealed.net": { + source: "iana" + }, + "application/vnd.sealed.ppt": { + source: "iana" + }, + "application/vnd.sealed.tiff": { + source: "iana" + }, + "application/vnd.sealed.xls": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + source: "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + source: "iana" + }, + "application/vnd.seemail": { + source: "iana", + extensions: ["see"] + }, + "application/vnd.seis+json": { + source: "iana", + compressible: true + }, + "application/vnd.sema": { + source: "iana", + extensions: ["sema"] + }, + "application/vnd.semd": { + source: "iana", + extensions: ["semd"] + }, + "application/vnd.semf": { + source: "iana", + extensions: ["semf"] + }, + "application/vnd.shade-save-file": { + source: "iana" + }, + "application/vnd.shana.informed.formdata": { + source: "iana", + extensions: ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + source: "iana", + extensions: ["itp"] + }, + "application/vnd.shana.informed.interchange": { + source: "iana", + extensions: ["iif"] + }, + "application/vnd.shana.informed.package": { + source: "iana", + extensions: ["ipk"] + }, + "application/vnd.shootproof+json": { + source: "iana", + compressible: true + }, + "application/vnd.shopkick+json": { + source: "iana", + compressible: true + }, + "application/vnd.shp": { + source: "iana" + }, + "application/vnd.shx": { + source: "iana" + }, + "application/vnd.sigrok.session": { + source: "iana" + }, + "application/vnd.simtech-mindmapper": { + source: "iana", + extensions: ["twd", "twds"] + }, + "application/vnd.siren+json": { + source: "iana", + compressible: true + }, + "application/vnd.smaf": { + source: "iana", + extensions: ["mmf"] + }, + "application/vnd.smart.notebook": { + source: "iana" + }, + "application/vnd.smart.teacher": { + source: "iana", + extensions: ["teacher"] + }, + "application/vnd.snesdev-page-table": { + source: "iana" + }, + "application/vnd.software602.filler.form+xml": { + source: "iana", + compressible: true, + extensions: ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + source: "iana" + }, + "application/vnd.solent.sdkm+xml": { + source: "iana", + compressible: true, + extensions: ["sdkm", "sdkd"] + }, + "application/vnd.spotfire.dxp": { + source: "iana", + extensions: ["dxp"] + }, + "application/vnd.spotfire.sfs": { + source: "iana", + extensions: ["sfs"] + }, + "application/vnd.sqlite3": { + source: "iana" + }, + "application/vnd.sss-cod": { + source: "iana" + }, + "application/vnd.sss-dtf": { + source: "iana" + }, + "application/vnd.sss-ntf": { + source: "iana" + }, + "application/vnd.stardivision.calc": { + source: "apache", + extensions: ["sdc"] + }, + "application/vnd.stardivision.draw": { + source: "apache", + extensions: ["sda"] + }, + "application/vnd.stardivision.impress": { + source: "apache", + extensions: ["sdd"] + }, + "application/vnd.stardivision.math": { + source: "apache", + extensions: ["smf"] + }, + "application/vnd.stardivision.writer": { + source: "apache", + extensions: ["sdw", "vor"] + }, + "application/vnd.stardivision.writer-global": { + source: "apache", + extensions: ["sgl"] + }, + "application/vnd.stepmania.package": { + source: "iana", + extensions: ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + source: "iana", + extensions: ["sm"] + }, + "application/vnd.street-stream": { + source: "iana" + }, + "application/vnd.sun.wadl+xml": { + source: "iana", + compressible: true, + extensions: ["wadl"] + }, + "application/vnd.sun.xml.calc": { + source: "apache", + extensions: ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + source: "apache", + extensions: ["stc"] + }, + "application/vnd.sun.xml.draw": { + source: "apache", + extensions: ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + source: "apache", + extensions: ["std"] + }, + "application/vnd.sun.xml.impress": { + source: "apache", + extensions: ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + source: "apache", + extensions: ["sti"] + }, + "application/vnd.sun.xml.math": { + source: "apache", + extensions: ["sxm"] + }, + "application/vnd.sun.xml.writer": { + source: "apache", + extensions: ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + source: "apache", + extensions: ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + source: "apache", + extensions: ["stw"] + }, + "application/vnd.sus-calendar": { + source: "iana", + extensions: ["sus", "susp"] + }, + "application/vnd.svd": { + source: "iana", + extensions: ["svd"] + }, + "application/vnd.swiftview-ics": { + source: "iana" + }, + "application/vnd.sycle+xml": { + source: "iana", + compressible: true + }, + "application/vnd.syft+json": { + source: "iana", + compressible: true + }, + "application/vnd.symbian.install": { + source: "apache", + extensions: ["sis", "sisx"] + }, + "application/vnd.syncml+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + source: "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmddf+xml": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + source: "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + source: "iana", + charset: "UTF-8", + compressible: true + }, + "application/vnd.syncml.ds.notification": { + source: "iana" + }, + "application/vnd.tableschema+json": { + source: "iana", + compressible: true + }, + "application/vnd.tao.intent-module-archive": { + source: "iana", + extensions: ["tao"] + }, + "application/vnd.tcpdump.pcap": { + source: "iana", + extensions: ["pcap", "cap", "dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + source: "iana", + compressible: true + }, + "application/vnd.tmd.mediaflex.api+xml": { + source: "iana", + compressible: true + }, + "application/vnd.tml": { + source: "iana" + }, + "application/vnd.tmobile-livetv": { + source: "iana", + extensions: ["tmo"] + }, + "application/vnd.tri.onesource": { + source: "iana" + }, + "application/vnd.trid.tpt": { + source: "iana", + extensions: ["tpt"] + }, + "application/vnd.triscape.mxs": { + source: "iana", + extensions: ["mxs"] + }, + "application/vnd.trueapp": { + source: "iana", + extensions: ["tra"] + }, + "application/vnd.truedoc": { + source: "iana" + }, + "application/vnd.ubisoft.webplayer": { + source: "iana" + }, + "application/vnd.ufdl": { + source: "iana", + extensions: ["ufd", "ufdl"] + }, + "application/vnd.uiq.theme": { + source: "iana", + extensions: ["utz"] + }, + "application/vnd.umajin": { + source: "iana", + extensions: ["umj"] + }, + "application/vnd.unity": { + source: "iana", + extensions: ["unityweb"] + }, + "application/vnd.uoml+xml": { + source: "iana", + compressible: true, + extensions: ["uoml"] + }, + "application/vnd.uplanet.alert": { + source: "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice": { + source: "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.cacheop": { + source: "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.channel": { + source: "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.list": { + source: "iana" + }, + "application/vnd.uplanet.list-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.listcmd": { + source: "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + source: "iana" + }, + "application/vnd.uplanet.signal": { + source: "iana" + }, + "application/vnd.uri-map": { + source: "iana" + }, + "application/vnd.valve.source.material": { + source: "iana" + }, + "application/vnd.vcx": { + source: "iana", + extensions: ["vcx"] + }, + "application/vnd.vd-study": { + source: "iana" + }, + "application/vnd.vectorworks": { + source: "iana" + }, + "application/vnd.vel+json": { + source: "iana", + compressible: true + }, + "application/vnd.verimatrix.vcas": { + source: "iana" + }, + "application/vnd.veritone.aion+json": { + source: "iana", + compressible: true + }, + "application/vnd.veryant.thin": { + source: "iana" + }, + "application/vnd.ves.encrypted": { + source: "iana" + }, + "application/vnd.vidsoft.vidconference": { + source: "iana" + }, + "application/vnd.visio": { + source: "iana", + extensions: ["vsd", "vst", "vss", "vsw"] + }, + "application/vnd.visionary": { + source: "iana", + extensions: ["vis"] + }, + "application/vnd.vividence.scriptfile": { + source: "iana" + }, + "application/vnd.vsf": { + source: "iana", + extensions: ["vsf"] + }, + "application/vnd.wap.sic": { + source: "iana" + }, + "application/vnd.wap.slc": { + source: "iana" + }, + "application/vnd.wap.wbxml": { + source: "iana", + charset: "UTF-8", + extensions: ["wbxml"] + }, + "application/vnd.wap.wmlc": { + source: "iana", + extensions: ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + source: "iana", + extensions: ["wmlsc"] + }, + "application/vnd.webturbo": { + source: "iana", + extensions: ["wtb"] + }, + "application/vnd.wfa.dpp": { + source: "iana" + }, + "application/vnd.wfa.p2p": { + source: "iana" + }, + "application/vnd.wfa.wsc": { + source: "iana" + }, + "application/vnd.windows.devicepairing": { + source: "iana" + }, + "application/vnd.wmc": { + source: "iana" + }, + "application/vnd.wmf.bootstrap": { + source: "iana" + }, + "application/vnd.wolfram.mathematica": { + source: "iana" + }, + "application/vnd.wolfram.mathematica.package": { + source: "iana" + }, + "application/vnd.wolfram.player": { + source: "iana", + extensions: ["nbp"] + }, + "application/vnd.wordperfect": { + source: "iana", + extensions: ["wpd"] + }, + "application/vnd.wqd": { + source: "iana", + extensions: ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + source: "iana" + }, + "application/vnd.wt.stf": { + source: "iana", + extensions: ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + source: "iana" + }, + "application/vnd.wv.csp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.wv.ssp+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xacml+json": { + source: "iana", + compressible: true + }, + "application/vnd.xara": { + source: "iana", + extensions: ["xar"] + }, + "application/vnd.xfdl": { + source: "iana", + extensions: ["xfdl"] + }, + "application/vnd.xfdl.webform": { + source: "iana" + }, + "application/vnd.xmi+xml": { + source: "iana", + compressible: true + }, + "application/vnd.xmpie.cpkg": { + source: "iana" + }, + "application/vnd.xmpie.dpkg": { + source: "iana" + }, + "application/vnd.xmpie.plan": { + source: "iana" + }, + "application/vnd.xmpie.ppkg": { + source: "iana" + }, + "application/vnd.xmpie.xlim": { + source: "iana" + }, + "application/vnd.yamaha.hv-dic": { + source: "iana", + extensions: ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + source: "iana", + extensions: ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + source: "iana", + extensions: ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + source: "iana", + extensions: ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + source: "iana", + compressible: true, + extensions: ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + source: "iana" + }, + "application/vnd.yamaha.smaf-audio": { + source: "iana", + extensions: ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + source: "iana", + extensions: ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + source: "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + source: "iana" + }, + "application/vnd.yaoweme": { + source: "iana" + }, + "application/vnd.yellowriver-custom-menu": { + source: "iana", + extensions: ["cmp"] + }, + "application/vnd.youtube.yt": { + source: "iana" + }, + "application/vnd.zul": { + source: "iana", + extensions: ["zir", "zirz"] + }, + "application/vnd.zzazz.deck+xml": { + source: "iana", + compressible: true, + extensions: ["zaz"] + }, + "application/voicexml+xml": { + source: "iana", + compressible: true, + extensions: ["vxml"] + }, + "application/voucher-cms+json": { + source: "iana", + compressible: true + }, + "application/vq-rtcpxr": { + source: "iana" + }, + "application/wasm": { + source: "iana", + compressible: true, + extensions: ["wasm"] + }, + "application/watcherinfo+xml": { + source: "iana", + compressible: true, + extensions: ["wif"] + }, + "application/webpush-options+json": { + source: "iana", + compressible: true + }, + "application/whoispp-query": { + source: "iana" + }, + "application/whoispp-response": { + source: "iana" + }, + "application/widget": { + source: "iana", + extensions: ["wgt"] + }, + "application/winhlp": { + source: "apache", + extensions: ["hlp"] + }, + "application/wita": { + source: "iana" + }, + "application/wordperfect5.1": { + source: "iana" + }, + "application/wsdl+xml": { + source: "iana", + compressible: true, + extensions: ["wsdl"] + }, + "application/wspolicy+xml": { + source: "iana", + compressible: true, + extensions: ["wspolicy"] + }, + "application/x-7z-compressed": { + source: "apache", + compressible: false, + extensions: ["7z"] + }, + "application/x-abiword": { + source: "apache", + extensions: ["abw"] + }, + "application/x-ace-compressed": { + source: "apache", + extensions: ["ace"] + }, + "application/x-amf": { + source: "apache" + }, + "application/x-apple-diskimage": { + source: "apache", + extensions: ["dmg"] + }, + "application/x-arj": { + compressible: false, + extensions: ["arj"] + }, + "application/x-authorware-bin": { + source: "apache", + extensions: ["aab", "x32", "u32", "vox"] + }, + "application/x-authorware-map": { + source: "apache", + extensions: ["aam"] + }, + "application/x-authorware-seg": { + source: "apache", + extensions: ["aas"] + }, + "application/x-bcpio": { + source: "apache", + extensions: ["bcpio"] + }, + "application/x-bdoc": { + compressible: false, + extensions: ["bdoc"] + }, + "application/x-bittorrent": { + source: "apache", + extensions: ["torrent"] + }, + "application/x-blorb": { + source: "apache", + extensions: ["blb", "blorb"] + }, + "application/x-bzip": { + source: "apache", + compressible: false, + extensions: ["bz"] + }, + "application/x-bzip2": { + source: "apache", + compressible: false, + extensions: ["bz2", "boz"] + }, + "application/x-cbr": { + source: "apache", + extensions: ["cbr", "cba", "cbt", "cbz", "cb7"] + }, + "application/x-cdlink": { + source: "apache", + extensions: ["vcd"] + }, + "application/x-cfs-compressed": { + source: "apache", + extensions: ["cfs"] + }, + "application/x-chat": { + source: "apache", + extensions: ["chat"] + }, + "application/x-chess-pgn": { + source: "apache", + extensions: ["pgn"] + }, + "application/x-chrome-extension": { + extensions: ["crx"] + }, + "application/x-cocoa": { + source: "nginx", + extensions: ["cco"] + }, + "application/x-compress": { + source: "apache" + }, + "application/x-conference": { + source: "apache", + extensions: ["nsc"] + }, + "application/x-cpio": { + source: "apache", + extensions: ["cpio"] + }, + "application/x-csh": { + source: "apache", + extensions: ["csh"] + }, + "application/x-deb": { + compressible: false + }, + "application/x-debian-package": { + source: "apache", + extensions: ["deb", "udeb"] + }, + "application/x-dgc-compressed": { + source: "apache", + extensions: ["dgc"] + }, + "application/x-director": { + source: "apache", + extensions: ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] + }, + "application/x-doom": { + source: "apache", + extensions: ["wad"] + }, + "application/x-dtbncx+xml": { + source: "apache", + compressible: true, + extensions: ["ncx"] + }, + "application/x-dtbook+xml": { + source: "apache", + compressible: true, + extensions: ["dtb"] + }, + "application/x-dtbresource+xml": { + source: "apache", + compressible: true, + extensions: ["res"] + }, + "application/x-dvi": { + source: "apache", + compressible: false, + extensions: ["dvi"] + }, + "application/x-envoy": { + source: "apache", + extensions: ["evy"] + }, + "application/x-eva": { + source: "apache", + extensions: ["eva"] + }, + "application/x-font-bdf": { + source: "apache", + extensions: ["bdf"] + }, + "application/x-font-dos": { + source: "apache" + }, + "application/x-font-framemaker": { + source: "apache" + }, + "application/x-font-ghostscript": { + source: "apache", + extensions: ["gsf"] + }, + "application/x-font-libgrx": { + source: "apache" + }, + "application/x-font-linux-psf": { + source: "apache", + extensions: ["psf"] + }, + "application/x-font-pcf": { + source: "apache", + extensions: ["pcf"] + }, + "application/x-font-snf": { + source: "apache", + extensions: ["snf"] + }, + "application/x-font-speedo": { + source: "apache" + }, + "application/x-font-sunos-news": { + source: "apache" + }, + "application/x-font-type1": { + source: "apache", + extensions: ["pfa", "pfb", "pfm", "afm"] + }, + "application/x-font-vfont": { + source: "apache" + }, + "application/x-freearc": { + source: "apache", + extensions: ["arc"] + }, + "application/x-futuresplash": { + source: "apache", + extensions: ["spl"] + }, + "application/x-gca-compressed": { + source: "apache", + extensions: ["gca"] + }, + "application/x-glulx": { + source: "apache", + extensions: ["ulx"] + }, + "application/x-gnumeric": { + source: "apache", + extensions: ["gnumeric"] + }, + "application/x-gramps-xml": { + source: "apache", + extensions: ["gramps"] + }, + "application/x-gtar": { + source: "apache", + extensions: ["gtar"] + }, + "application/x-gzip": { + source: "apache" + }, + "application/x-hdf": { + source: "apache", + extensions: ["hdf"] + }, + "application/x-httpd-php": { + compressible: true, + extensions: ["php"] + }, + "application/x-install-instructions": { + source: "apache", + extensions: ["install"] + }, + "application/x-iso9660-image": { + source: "apache", + extensions: ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + extensions: ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + extensions: ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + extensions: ["pages"] + }, + "application/x-java-archive-diff": { + source: "nginx", + extensions: ["jardiff"] + }, + "application/x-java-jnlp-file": { + source: "apache", + compressible: false, + extensions: ["jnlp"] + }, + "application/x-javascript": { + compressible: true + }, + "application/x-keepass2": { + extensions: ["kdbx"] + }, + "application/x-latex": { + source: "apache", + compressible: false, + extensions: ["latex"] + }, + "application/x-lua-bytecode": { + extensions: ["luac"] + }, + "application/x-lzh-compressed": { + source: "apache", + extensions: ["lzh", "lha"] + }, + "application/x-makeself": { + source: "nginx", + extensions: ["run"] + }, + "application/x-mie": { + source: "apache", + extensions: ["mie"] + }, + "application/x-mobipocket-ebook": { + source: "apache", + extensions: ["prc", "mobi"] + }, + "application/x-mpegurl": { + compressible: false + }, + "application/x-ms-application": { + source: "apache", + extensions: ["application"] + }, + "application/x-ms-shortcut": { + source: "apache", + extensions: ["lnk"] + }, + "application/x-ms-wmd": { + source: "apache", + extensions: ["wmd"] + }, + "application/x-ms-wmz": { + source: "apache", + extensions: ["wmz"] + }, + "application/x-ms-xbap": { + source: "apache", + extensions: ["xbap"] + }, + "application/x-msaccess": { + source: "apache", + extensions: ["mdb"] + }, + "application/x-msbinder": { + source: "apache", + extensions: ["obd"] + }, + "application/x-mscardfile": { + source: "apache", + extensions: ["crd"] + }, + "application/x-msclip": { + source: "apache", + extensions: ["clp"] + }, + "application/x-msdos-program": { + extensions: ["exe"] + }, + "application/x-msdownload": { + source: "apache", + extensions: ["exe", "dll", "com", "bat", "msi"] + }, + "application/x-msmediaview": { + source: "apache", + extensions: ["mvb", "m13", "m14"] + }, + "application/x-msmetafile": { + source: "apache", + extensions: ["wmf", "wmz", "emf", "emz"] + }, + "application/x-msmoney": { + source: "apache", + extensions: ["mny"] + }, + "application/x-mspublisher": { + source: "apache", + extensions: ["pub"] + }, + "application/x-msschedule": { + source: "apache", + extensions: ["scd"] + }, + "application/x-msterminal": { + source: "apache", + extensions: ["trm"] + }, + "application/x-mswrite": { + source: "apache", + extensions: ["wri"] + }, + "application/x-netcdf": { + source: "apache", + extensions: ["nc", "cdf"] + }, + "application/x-ns-proxy-autoconfig": { + compressible: true, + extensions: ["pac"] + }, + "application/x-nzb": { + source: "apache", + extensions: ["nzb"] + }, + "application/x-perl": { + source: "nginx", + extensions: ["pl", "pm"] + }, + "application/x-pilot": { + source: "nginx", + extensions: ["prc", "pdb"] + }, + "application/x-pkcs12": { + source: "apache", + compressible: false, + extensions: ["p12", "pfx"] + }, + "application/x-pkcs7-certificates": { + source: "apache", + extensions: ["p7b", "spc"] + }, + "application/x-pkcs7-certreqresp": { + source: "apache", + extensions: ["p7r"] + }, + "application/x-pki-message": { + source: "iana" + }, + "application/x-rar-compressed": { + source: "apache", + compressible: false, + extensions: ["rar"] + }, + "application/x-redhat-package-manager": { + source: "nginx", + extensions: ["rpm"] + }, + "application/x-research-info-systems": { + source: "apache", + extensions: ["ris"] + }, + "application/x-sea": { + source: "nginx", + extensions: ["sea"] + }, + "application/x-sh": { + source: "apache", + compressible: true, + extensions: ["sh"] + }, + "application/x-shar": { + source: "apache", + extensions: ["shar"] + }, + "application/x-shockwave-flash": { + source: "apache", + compressible: false, + extensions: ["swf"] + }, + "application/x-silverlight-app": { + source: "apache", + extensions: ["xap"] + }, + "application/x-sql": { + source: "apache", + extensions: ["sql"] + }, + "application/x-stuffit": { + source: "apache", + compressible: false, + extensions: ["sit"] + }, + "application/x-stuffitx": { + source: "apache", + extensions: ["sitx"] + }, + "application/x-subrip": { + source: "apache", + extensions: ["srt"] + }, + "application/x-sv4cpio": { + source: "apache", + extensions: ["sv4cpio"] + }, + "application/x-sv4crc": { + source: "apache", + extensions: ["sv4crc"] + }, + "application/x-t3vm-image": { + source: "apache", + extensions: ["t3"] + }, + "application/x-tads": { + source: "apache", + extensions: ["gam"] + }, + "application/x-tar": { + source: "apache", + compressible: true, + extensions: ["tar"] + }, + "application/x-tcl": { + source: "apache", + extensions: ["tcl", "tk"] + }, + "application/x-tex": { + source: "apache", + extensions: ["tex"] + }, + "application/x-tex-tfm": { + source: "apache", + extensions: ["tfm"] + }, + "application/x-texinfo": { + source: "apache", + extensions: ["texinfo", "texi"] + }, + "application/x-tgif": { + source: "apache", + extensions: ["obj"] + }, + "application/x-ustar": { + source: "apache", + extensions: ["ustar"] + }, + "application/x-virtualbox-hdd": { + compressible: true, + extensions: ["hdd"] + }, + "application/x-virtualbox-ova": { + compressible: true, + extensions: ["ova"] + }, + "application/x-virtualbox-ovf": { + compressible: true, + extensions: ["ovf"] + }, + "application/x-virtualbox-vbox": { + compressible: true, + extensions: ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + compressible: false, + extensions: ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + compressible: true, + extensions: ["vdi"] + }, + "application/x-virtualbox-vhd": { + compressible: true, + extensions: ["vhd"] + }, + "application/x-virtualbox-vmdk": { + compressible: true, + extensions: ["vmdk"] + }, + "application/x-wais-source": { + source: "apache", + extensions: ["src"] + }, + "application/x-web-app-manifest+json": { + compressible: true, + extensions: ["webapp"] + }, + "application/x-www-form-urlencoded": { + source: "iana", + compressible: true + }, + "application/x-x509-ca-cert": { + source: "iana", + extensions: ["der", "crt", "pem"] + }, + "application/x-x509-ca-ra-cert": { + source: "iana" + }, + "application/x-x509-next-ca-cert": { + source: "iana" + }, + "application/x-xfig": { + source: "apache", + extensions: ["fig"] + }, + "application/x-xliff+xml": { + source: "apache", + compressible: true, + extensions: ["xlf"] + }, + "application/x-xpinstall": { + source: "apache", + compressible: false, + extensions: ["xpi"] + }, + "application/x-xz": { + source: "apache", + extensions: ["xz"] + }, + "application/x-zmachine": { + source: "apache", + extensions: ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] + }, + "application/x400-bp": { + source: "iana" + }, + "application/xacml+xml": { + source: "iana", + compressible: true + }, + "application/xaml+xml": { + source: "apache", + compressible: true, + extensions: ["xaml"] + }, + "application/xcap-att+xml": { + source: "iana", + compressible: true, + extensions: ["xav"] + }, + "application/xcap-caps+xml": { + source: "iana", + compressible: true, + extensions: ["xca"] + }, + "application/xcap-diff+xml": { + source: "iana", + compressible: true, + extensions: ["xdf"] + }, + "application/xcap-el+xml": { + source: "iana", + compressible: true, + extensions: ["xel"] + }, + "application/xcap-error+xml": { + source: "iana", + compressible: true + }, + "application/xcap-ns+xml": { + source: "iana", + compressible: true, + extensions: ["xns"] + }, + "application/xcon-conference-info+xml": { + source: "iana", + compressible: true + }, + "application/xcon-conference-info-diff+xml": { + source: "iana", + compressible: true + }, + "application/xenc+xml": { + source: "iana", + compressible: true, + extensions: ["xenc"] + }, + "application/xhtml+xml": { + source: "iana", + compressible: true, + extensions: ["xhtml", "xht"] + }, + "application/xhtml-voice+xml": { + source: "apache", + compressible: true + }, + "application/xliff+xml": { + source: "iana", + compressible: true, + extensions: ["xlf"] + }, + "application/xml": { + source: "iana", + compressible: true, + extensions: ["xml", "xsl", "xsd", "rng"] + }, + "application/xml-dtd": { + source: "iana", + compressible: true, + extensions: ["dtd"] + }, + "application/xml-external-parsed-entity": { + source: "iana" + }, + "application/xml-patch+xml": { + source: "iana", + compressible: true + }, + "application/xmpp+xml": { + source: "iana", + compressible: true + }, + "application/xop+xml": { + source: "iana", + compressible: true, + extensions: ["xop"] + }, + "application/xproc+xml": { + source: "apache", + compressible: true, + extensions: ["xpl"] + }, + "application/xslt+xml": { + source: "iana", + compressible: true, + extensions: ["xsl", "xslt"] + }, + "application/xspf+xml": { + source: "apache", + compressible: true, + extensions: ["xspf"] + }, + "application/xv+xml": { + source: "iana", + compressible: true, + extensions: ["mxml", "xhvml", "xvml", "xvm"] + }, + "application/yang": { + source: "iana", + extensions: ["yang"] + }, + "application/yang-data+json": { + source: "iana", + compressible: true + }, + "application/yang-data+xml": { + source: "iana", + compressible: true + }, + "application/yang-patch+json": { + source: "iana", + compressible: true + }, + "application/yang-patch+xml": { + source: "iana", + compressible: true + }, + "application/yin+xml": { + source: "iana", + compressible: true, + extensions: ["yin"] + }, + "application/zip": { + source: "iana", + compressible: false, + extensions: ["zip"] + }, + "application/zlib": { + source: "iana" + }, + "application/zstd": { + source: "iana" + }, + "audio/1d-interleaved-parityfec": { + source: "iana" + }, + "audio/32kadpcm": { + source: "iana" + }, + "audio/3gpp": { + source: "iana", + compressible: false, + extensions: ["3gpp"] + }, + "audio/3gpp2": { + source: "iana" + }, + "audio/aac": { + source: "iana" + }, + "audio/ac3": { + source: "iana" + }, + "audio/adpcm": { + source: "apache", + extensions: ["adp"] + }, + "audio/amr": { + source: "iana", + extensions: ["amr"] + }, + "audio/amr-wb": { + source: "iana" + }, + "audio/amr-wb+": { + source: "iana" + }, + "audio/aptx": { + source: "iana" + }, + "audio/asc": { + source: "iana" + }, + "audio/atrac-advanced-lossless": { + source: "iana" + }, + "audio/atrac-x": { + source: "iana" + }, + "audio/atrac3": { + source: "iana" + }, + "audio/basic": { + source: "iana", + compressible: false, + extensions: ["au", "snd"] + }, + "audio/bv16": { + source: "iana" + }, + "audio/bv32": { + source: "iana" + }, + "audio/clearmode": { + source: "iana" + }, + "audio/cn": { + source: "iana" + }, + "audio/dat12": { + source: "iana" + }, + "audio/dls": { + source: "iana" + }, + "audio/dsr-es201108": { + source: "iana" + }, + "audio/dsr-es202050": { + source: "iana" + }, + "audio/dsr-es202211": { + source: "iana" + }, + "audio/dsr-es202212": { + source: "iana" + }, + "audio/dv": { + source: "iana" + }, + "audio/dvi4": { + source: "iana" + }, + "audio/eac3": { + source: "iana" + }, + "audio/encaprtp": { + source: "iana" + }, + "audio/evrc": { + source: "iana" + }, + "audio/evrc-qcp": { + source: "iana" + }, + "audio/evrc0": { + source: "iana" + }, + "audio/evrc1": { + source: "iana" + }, + "audio/evrcb": { + source: "iana" + }, + "audio/evrcb0": { + source: "iana" + }, + "audio/evrcb1": { + source: "iana" + }, + "audio/evrcnw": { + source: "iana" + }, + "audio/evrcnw0": { + source: "iana" + }, + "audio/evrcnw1": { + source: "iana" + }, + "audio/evrcwb": { + source: "iana" + }, + "audio/evrcwb0": { + source: "iana" + }, + "audio/evrcwb1": { + source: "iana" + }, + "audio/evs": { + source: "iana" + }, + "audio/flexfec": { + source: "iana" + }, + "audio/fwdred": { + source: "iana" + }, + "audio/g711-0": { + source: "iana" + }, + "audio/g719": { + source: "iana" + }, + "audio/g722": { + source: "iana" + }, + "audio/g7221": { + source: "iana" + }, + "audio/g723": { + source: "iana" + }, + "audio/g726-16": { + source: "iana" + }, + "audio/g726-24": { + source: "iana" + }, + "audio/g726-32": { + source: "iana" + }, + "audio/g726-40": { + source: "iana" + }, + "audio/g728": { + source: "iana" + }, + "audio/g729": { + source: "iana" + }, + "audio/g7291": { + source: "iana" + }, + "audio/g729d": { + source: "iana" + }, + "audio/g729e": { + source: "iana" + }, + "audio/gsm": { + source: "iana" + }, + "audio/gsm-efr": { + source: "iana" + }, + "audio/gsm-hr-08": { + source: "iana" + }, + "audio/ilbc": { + source: "iana" + }, + "audio/ip-mr_v2.5": { + source: "iana" + }, + "audio/isac": { + source: "apache" + }, + "audio/l16": { + source: "iana" + }, + "audio/l20": { + source: "iana" + }, + "audio/l24": { + source: "iana", + compressible: false + }, + "audio/l8": { + source: "iana" + }, + "audio/lpc": { + source: "iana" + }, + "audio/melp": { + source: "iana" + }, + "audio/melp1200": { + source: "iana" + }, + "audio/melp2400": { + source: "iana" + }, + "audio/melp600": { + source: "iana" + }, + "audio/mhas": { + source: "iana" + }, + "audio/midi": { + source: "apache", + extensions: ["mid", "midi", "kar", "rmi"] + }, + "audio/mobile-xmf": { + source: "iana", + extensions: ["mxmf"] + }, + "audio/mp3": { + compressible: false, + extensions: ["mp3"] + }, + "audio/mp4": { + source: "iana", + compressible: false, + extensions: ["m4a", "mp4a"] + }, + "audio/mp4a-latm": { + source: "iana" + }, + "audio/mpa": { + source: "iana" + }, + "audio/mpa-robust": { + source: "iana" + }, + "audio/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] + }, + "audio/mpeg4-generic": { + source: "iana" + }, + "audio/musepack": { + source: "apache" + }, + "audio/ogg": { + source: "iana", + compressible: false, + extensions: ["oga", "ogg", "spx", "opus"] + }, + "audio/opus": { + source: "iana" + }, + "audio/parityfec": { + source: "iana" + }, + "audio/pcma": { + source: "iana" + }, + "audio/pcma-wb": { + source: "iana" + }, + "audio/pcmu": { + source: "iana" + }, + "audio/pcmu-wb": { + source: "iana" + }, + "audio/prs.sid": { + source: "iana" + }, + "audio/qcelp": { + source: "iana" + }, + "audio/raptorfec": { + source: "iana" + }, + "audio/red": { + source: "iana" + }, + "audio/rtp-enc-aescm128": { + source: "iana" + }, + "audio/rtp-midi": { + source: "iana" + }, + "audio/rtploopback": { + source: "iana" + }, + "audio/rtx": { + source: "iana" + }, + "audio/s3m": { + source: "apache", + extensions: ["s3m"] + }, + "audio/scip": { + source: "iana" + }, + "audio/silk": { + source: "apache", + extensions: ["sil"] + }, + "audio/smv": { + source: "iana" + }, + "audio/smv-qcp": { + source: "iana" + }, + "audio/smv0": { + source: "iana" + }, + "audio/sofa": { + source: "iana" + }, + "audio/sp-midi": { + source: "iana" + }, + "audio/speex": { + source: "iana" + }, + "audio/t140c": { + source: "iana" + }, + "audio/t38": { + source: "iana" + }, + "audio/telephone-event": { + source: "iana" + }, + "audio/tetra_acelp": { + source: "iana" + }, + "audio/tetra_acelp_bb": { + source: "iana" + }, + "audio/tone": { + source: "iana" + }, + "audio/tsvcis": { + source: "iana" + }, + "audio/uemclip": { + source: "iana" + }, + "audio/ulpfec": { + source: "iana" + }, + "audio/usac": { + source: "iana" + }, + "audio/vdvi": { + source: "iana" + }, + "audio/vmr-wb": { + source: "iana" + }, + "audio/vnd.3gpp.iufp": { + source: "iana" + }, + "audio/vnd.4sb": { + source: "iana" + }, + "audio/vnd.audiokoz": { + source: "iana" + }, + "audio/vnd.celp": { + source: "iana" + }, + "audio/vnd.cisco.nse": { + source: "iana" + }, + "audio/vnd.cmles.radio-events": { + source: "iana" + }, + "audio/vnd.cns.anp1": { + source: "iana" + }, + "audio/vnd.cns.inf1": { + source: "iana" + }, + "audio/vnd.dece.audio": { + source: "iana", + extensions: ["uva", "uvva"] + }, + "audio/vnd.digital-winds": { + source: "iana", + extensions: ["eol"] + }, + "audio/vnd.dlna.adts": { + source: "iana" + }, + "audio/vnd.dolby.heaac.1": { + source: "iana" + }, + "audio/vnd.dolby.heaac.2": { + source: "iana" + }, + "audio/vnd.dolby.mlp": { + source: "iana" + }, + "audio/vnd.dolby.mps": { + source: "iana" + }, + "audio/vnd.dolby.pl2": { + source: "iana" + }, + "audio/vnd.dolby.pl2x": { + source: "iana" + }, + "audio/vnd.dolby.pl2z": { + source: "iana" + }, + "audio/vnd.dolby.pulse.1": { + source: "iana" + }, + "audio/vnd.dra": { + source: "iana", + extensions: ["dra"] + }, + "audio/vnd.dts": { + source: "iana", + extensions: ["dts"] + }, + "audio/vnd.dts.hd": { + source: "iana", + extensions: ["dtshd"] + }, + "audio/vnd.dts.uhd": { + source: "iana" + }, + "audio/vnd.dvb.file": { + source: "iana" + }, + "audio/vnd.everad.plj": { + source: "iana" + }, + "audio/vnd.hns.audio": { + source: "iana" + }, + "audio/vnd.lucent.voice": { + source: "iana", + extensions: ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + source: "iana", + extensions: ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + source: "iana" + }, + "audio/vnd.nortel.vbk": { + source: "iana" + }, + "audio/vnd.nuera.ecelp4800": { + source: "iana", + extensions: ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + source: "iana", + extensions: ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + source: "iana", + extensions: ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + source: "iana" + }, + "audio/vnd.presonus.multitrack": { + source: "iana" + }, + "audio/vnd.qcelp": { + source: "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + source: "iana" + }, + "audio/vnd.rip": { + source: "iana", + extensions: ["rip"] + }, + "audio/vnd.rn-realaudio": { + compressible: false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + source: "iana" + }, + "audio/vnd.vmx.cvsd": { + source: "iana" + }, + "audio/vnd.wave": { + compressible: false + }, + "audio/vorbis": { + source: "iana", + compressible: false + }, + "audio/vorbis-config": { + source: "iana" + }, + "audio/wav": { + compressible: false, + extensions: ["wav"] + }, + "audio/wave": { + compressible: false, + extensions: ["wav"] + }, + "audio/webm": { + source: "apache", + compressible: false, + extensions: ["weba"] + }, + "audio/x-aac": { + source: "apache", + compressible: false, + extensions: ["aac"] + }, + "audio/x-aiff": { + source: "apache", + extensions: ["aif", "aiff", "aifc"] + }, + "audio/x-caf": { + source: "apache", + compressible: false, + extensions: ["caf"] + }, + "audio/x-flac": { + source: "apache", + extensions: ["flac"] + }, + "audio/x-m4a": { + source: "nginx", + extensions: ["m4a"] + }, + "audio/x-matroska": { + source: "apache", + extensions: ["mka"] + }, + "audio/x-mpegurl": { + source: "apache", + extensions: ["m3u"] + }, + "audio/x-ms-wax": { + source: "apache", + extensions: ["wax"] + }, + "audio/x-ms-wma": { + source: "apache", + extensions: ["wma"] + }, + "audio/x-pn-realaudio": { + source: "apache", + extensions: ["ram", "ra"] + }, + "audio/x-pn-realaudio-plugin": { + source: "apache", + extensions: ["rmp"] + }, + "audio/x-realaudio": { + source: "nginx", + extensions: ["ra"] + }, + "audio/x-tta": { + source: "apache" + }, + "audio/x-wav": { + source: "apache", + extensions: ["wav"] + }, + "audio/xm": { + source: "apache", + extensions: ["xm"] + }, + "chemical/x-cdx": { + source: "apache", + extensions: ["cdx"] + }, + "chemical/x-cif": { + source: "apache", + extensions: ["cif"] + }, + "chemical/x-cmdf": { + source: "apache", + extensions: ["cmdf"] + }, + "chemical/x-cml": { + source: "apache", + extensions: ["cml"] + }, + "chemical/x-csml": { + source: "apache", + extensions: ["csml"] + }, + "chemical/x-pdb": { + source: "apache" + }, + "chemical/x-xyz": { + source: "apache", + extensions: ["xyz"] + }, + "font/collection": { + source: "iana", + extensions: ["ttc"] + }, + "font/otf": { + source: "iana", + compressible: true, + extensions: ["otf"] + }, + "font/sfnt": { + source: "iana" + }, + "font/ttf": { + source: "iana", + compressible: true, + extensions: ["ttf"] + }, + "font/woff": { + source: "iana", + extensions: ["woff"] + }, + "font/woff2": { + source: "iana", + extensions: ["woff2"] + }, + "image/aces": { + source: "iana", + extensions: ["exr"] + }, + "image/apng": { + compressible: false, + extensions: ["apng"] + }, + "image/avci": { + source: "iana", + extensions: ["avci"] + }, + "image/avcs": { + source: "iana", + extensions: ["avcs"] + }, + "image/avif": { + source: "iana", + compressible: false, + extensions: ["avif"] + }, + "image/bmp": { + source: "iana", + compressible: true, + extensions: ["bmp"] + }, + "image/cgm": { + source: "iana", + extensions: ["cgm"] + }, + "image/dicom-rle": { + source: "iana", + extensions: ["drle"] + }, + "image/emf": { + source: "iana", + extensions: ["emf"] + }, + "image/fits": { + source: "iana", + extensions: ["fits"] + }, + "image/g3fax": { + source: "iana", + extensions: ["g3"] + }, + "image/gif": { + source: "iana", + compressible: false, + extensions: ["gif"] + }, + "image/heic": { + source: "iana", + extensions: ["heic"] + }, + "image/heic-sequence": { + source: "iana", + extensions: ["heics"] + }, + "image/heif": { + source: "iana", + extensions: ["heif"] + }, + "image/heif-sequence": { + source: "iana", + extensions: ["heifs"] + }, + "image/hej2k": { + source: "iana", + extensions: ["hej2"] + }, + "image/hsj2": { + source: "iana", + extensions: ["hsj2"] + }, + "image/ief": { + source: "iana", + extensions: ["ief"] + }, + "image/jls": { + source: "iana", + extensions: ["jls"] + }, + "image/jp2": { + source: "iana", + compressible: false, + extensions: ["jp2", "jpg2"] + }, + "image/jpeg": { + source: "iana", + compressible: false, + extensions: ["jpeg", "jpg", "jpe"] + }, + "image/jph": { + source: "iana", + extensions: ["jph"] + }, + "image/jphc": { + source: "iana", + extensions: ["jhc"] + }, + "image/jpm": { + source: "iana", + compressible: false, + extensions: ["jpm"] + }, + "image/jpx": { + source: "iana", + compressible: false, + extensions: ["jpx", "jpf"] + }, + "image/jxr": { + source: "iana", + extensions: ["jxr"] + }, + "image/jxra": { + source: "iana", + extensions: ["jxra"] + }, + "image/jxrs": { + source: "iana", + extensions: ["jxrs"] + }, + "image/jxs": { + source: "iana", + extensions: ["jxs"] + }, + "image/jxsc": { + source: "iana", + extensions: ["jxsc"] + }, + "image/jxsi": { + source: "iana", + extensions: ["jxsi"] + }, + "image/jxss": { + source: "iana", + extensions: ["jxss"] + }, + "image/ktx": { + source: "iana", + extensions: ["ktx"] + }, + "image/ktx2": { + source: "iana", + extensions: ["ktx2"] + }, + "image/naplps": { + source: "iana" + }, + "image/pjpeg": { + compressible: false + }, + "image/png": { + source: "iana", + compressible: false, + extensions: ["png"] + }, + "image/prs.btif": { + source: "iana", + extensions: ["btif"] + }, + "image/prs.pti": { + source: "iana", + extensions: ["pti"] + }, + "image/pwg-raster": { + source: "iana" + }, + "image/sgi": { + source: "apache", + extensions: ["sgi"] + }, + "image/svg+xml": { + source: "iana", + compressible: true, + extensions: ["svg", "svgz"] + }, + "image/t38": { + source: "iana", + extensions: ["t38"] + }, + "image/tiff": { + source: "iana", + compressible: false, + extensions: ["tif", "tiff"] + }, + "image/tiff-fx": { + source: "iana", + extensions: ["tfx"] + }, + "image/vnd.adobe.photoshop": { + source: "iana", + compressible: true, + extensions: ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + source: "iana", + extensions: ["azv"] + }, + "image/vnd.cns.inf2": { + source: "iana" + }, + "image/vnd.dece.graphic": { + source: "iana", + extensions: ["uvi", "uvvi", "uvg", "uvvg"] + }, + "image/vnd.djvu": { + source: "iana", + extensions: ["djvu", "djv"] + }, + "image/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "image/vnd.dwg": { + source: "iana", + extensions: ["dwg"] + }, + "image/vnd.dxf": { + source: "iana", + extensions: ["dxf"] + }, + "image/vnd.fastbidsheet": { + source: "iana", + extensions: ["fbs"] + }, + "image/vnd.fpx": { + source: "iana", + extensions: ["fpx"] + }, + "image/vnd.fst": { + source: "iana", + extensions: ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + source: "iana", + extensions: ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + source: "iana", + extensions: ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + source: "iana" + }, + "image/vnd.microsoft.icon": { + source: "iana", + compressible: true, + extensions: ["ico"] + }, + "image/vnd.mix": { + source: "iana" + }, + "image/vnd.mozilla.apng": { + source: "iana" + }, + "image/vnd.ms-dds": { + compressible: true, + extensions: ["dds"] + }, + "image/vnd.ms-modi": { + source: "iana", + extensions: ["mdi"] + }, + "image/vnd.ms-photo": { + source: "apache", + extensions: ["wdp"] + }, + "image/vnd.net-fpx": { + source: "iana", + extensions: ["npx"] + }, + "image/vnd.pco.b16": { + source: "iana", + extensions: ["b16"] + }, + "image/vnd.radiance": { + source: "iana" + }, + "image/vnd.sealed.png": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + source: "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + source: "iana" + }, + "image/vnd.svf": { + source: "iana" + }, + "image/vnd.tencent.tap": { + source: "iana", + extensions: ["tap"] + }, + "image/vnd.valve.source.texture": { + source: "iana", + extensions: ["vtf"] + }, + "image/vnd.wap.wbmp": { + source: "iana", + extensions: ["wbmp"] + }, + "image/vnd.xiff": { + source: "iana", + extensions: ["xif"] + }, + "image/vnd.zbrush.pcx": { + source: "iana", + extensions: ["pcx"] + }, + "image/webp": { + source: "apache", + extensions: ["webp"] + }, + "image/wmf": { + source: "iana", + extensions: ["wmf"] + }, + "image/x-3ds": { + source: "apache", + extensions: ["3ds"] + }, + "image/x-cmu-raster": { + source: "apache", + extensions: ["ras"] + }, + "image/x-cmx": { + source: "apache", + extensions: ["cmx"] + }, + "image/x-freehand": { + source: "apache", + extensions: ["fh", "fhc", "fh4", "fh5", "fh7"] + }, + "image/x-icon": { + source: "apache", + compressible: true, + extensions: ["ico"] + }, + "image/x-jng": { + source: "nginx", + extensions: ["jng"] + }, + "image/x-mrsid-image": { + source: "apache", + extensions: ["sid"] + }, + "image/x-ms-bmp": { + source: "nginx", + compressible: true, + extensions: ["bmp"] + }, + "image/x-pcx": { + source: "apache", + extensions: ["pcx"] + }, + "image/x-pict": { + source: "apache", + extensions: ["pic", "pct"] + }, + "image/x-portable-anymap": { + source: "apache", + extensions: ["pnm"] + }, + "image/x-portable-bitmap": { + source: "apache", + extensions: ["pbm"] + }, + "image/x-portable-graymap": { + source: "apache", + extensions: ["pgm"] + }, + "image/x-portable-pixmap": { + source: "apache", + extensions: ["ppm"] + }, + "image/x-rgb": { + source: "apache", + extensions: ["rgb"] + }, + "image/x-tga": { + source: "apache", + extensions: ["tga"] + }, + "image/x-xbitmap": { + source: "apache", + extensions: ["xbm"] + }, + "image/x-xcf": { + compressible: false + }, + "image/x-xpixmap": { + source: "apache", + extensions: ["xpm"] + }, + "image/x-xwindowdump": { + source: "apache", + extensions: ["xwd"] + }, + "message/cpim": { + source: "iana" + }, + "message/delivery-status": { + source: "iana" + }, + "message/disposition-notification": { + source: "iana", + extensions: [ + "disposition-notification" + ] + }, + "message/external-body": { + source: "iana" + }, + "message/feedback-report": { + source: "iana" + }, + "message/global": { + source: "iana", + extensions: ["u8msg"] + }, + "message/global-delivery-status": { + source: "iana", + extensions: ["u8dsn"] + }, + "message/global-disposition-notification": { + source: "iana", + extensions: ["u8mdn"] + }, + "message/global-headers": { + source: "iana", + extensions: ["u8hdr"] + }, + "message/http": { + source: "iana", + compressible: false + }, + "message/imdn+xml": { + source: "iana", + compressible: true + }, + "message/news": { + source: "iana" + }, + "message/partial": { + source: "iana", + compressible: false + }, + "message/rfc822": { + source: "iana", + compressible: true, + extensions: ["eml", "mime"] + }, + "message/s-http": { + source: "iana" + }, + "message/sip": { + source: "iana" + }, + "message/sipfrag": { + source: "iana" + }, + "message/tracking-status": { + source: "iana" + }, + "message/vnd.si.simp": { + source: "iana" + }, + "message/vnd.wfa.wsc": { + source: "iana", + extensions: ["wsc"] + }, + "model/3mf": { + source: "iana", + extensions: ["3mf"] + }, + "model/e57": { + source: "iana" + }, + "model/gltf+json": { + source: "iana", + compressible: true, + extensions: ["gltf"] + }, + "model/gltf-binary": { + source: "iana", + compressible: true, + extensions: ["glb"] + }, + "model/iges": { + source: "iana", + compressible: false, + extensions: ["igs", "iges"] + }, + "model/mesh": { + source: "iana", + compressible: false, + extensions: ["msh", "mesh", "silo"] + }, + "model/mtl": { + source: "iana", + extensions: ["mtl"] + }, + "model/obj": { + source: "iana", + extensions: ["obj"] + }, + "model/step": { + source: "iana" + }, + "model/step+xml": { + source: "iana", + compressible: true, + extensions: ["stpx"] + }, + "model/step+zip": { + source: "iana", + compressible: false, + extensions: ["stpz"] + }, + "model/step-xml+zip": { + source: "iana", + compressible: false, + extensions: ["stpxz"] + }, + "model/stl": { + source: "iana", + extensions: ["stl"] + }, + "model/vnd.collada+xml": { + source: "iana", + compressible: true, + extensions: ["dae"] + }, + "model/vnd.dwf": { + source: "iana", + extensions: ["dwf"] + }, + "model/vnd.flatland.3dml": { + source: "iana" + }, + "model/vnd.gdl": { + source: "iana", + extensions: ["gdl"] + }, + "model/vnd.gs-gdl": { + source: "apache" + }, + "model/vnd.gs.gdl": { + source: "iana" + }, + "model/vnd.gtw": { + source: "iana", + extensions: ["gtw"] + }, + "model/vnd.moml+xml": { + source: "iana", + compressible: true + }, + "model/vnd.mts": { + source: "iana", + extensions: ["mts"] + }, + "model/vnd.opengex": { + source: "iana", + extensions: ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + source: "iana", + extensions: ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + source: "iana", + extensions: ["x_t"] + }, + "model/vnd.pytha.pyox": { + source: "iana" + }, + "model/vnd.rosette.annotated-data-model": { + source: "iana" + }, + "model/vnd.sap.vds": { + source: "iana", + extensions: ["vds"] + }, + "model/vnd.usdz+zip": { + source: "iana", + compressible: false, + extensions: ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + source: "iana", + extensions: ["bsp"] + }, + "model/vnd.vtu": { + source: "iana", + extensions: ["vtu"] + }, + "model/vrml": { + source: "iana", + compressible: false, + extensions: ["wrl", "vrml"] + }, + "model/x3d+binary": { + source: "apache", + compressible: false, + extensions: ["x3db", "x3dbz"] + }, + "model/x3d+fastinfoset": { + source: "iana", + extensions: ["x3db"] + }, + "model/x3d+vrml": { + source: "apache", + compressible: false, + extensions: ["x3dv", "x3dvz"] + }, + "model/x3d+xml": { + source: "iana", + compressible: true, + extensions: ["x3d", "x3dz"] + }, + "model/x3d-vrml": { + source: "iana", + extensions: ["x3dv"] + }, + "multipart/alternative": { + source: "iana", + compressible: false + }, + "multipart/appledouble": { + source: "iana" + }, + "multipart/byteranges": { + source: "iana" + }, + "multipart/digest": { + source: "iana" + }, + "multipart/encrypted": { + source: "iana", + compressible: false + }, + "multipart/form-data": { + source: "iana", + compressible: false + }, + "multipart/header-set": { + source: "iana" + }, + "multipart/mixed": { + source: "iana" + }, + "multipart/multilingual": { + source: "iana" + }, + "multipart/parallel": { + source: "iana" + }, + "multipart/related": { + source: "iana", + compressible: false + }, + "multipart/report": { + source: "iana" + }, + "multipart/signed": { + source: "iana", + compressible: false + }, + "multipart/vnd.bint.med-plus": { + source: "iana" + }, + "multipart/voice-message": { + source: "iana" + }, + "multipart/x-mixed-replace": { + source: "iana" + }, + "text/1d-interleaved-parityfec": { + source: "iana" + }, + "text/cache-manifest": { + source: "iana", + compressible: true, + extensions: ["appcache", "manifest"] + }, + "text/calendar": { + source: "iana", + extensions: ["ics", "ifb"] + }, + "text/calender": { + compressible: true + }, + "text/cmd": { + compressible: true + }, + "text/coffeescript": { + extensions: ["coffee", "litcoffee"] + }, + "text/cql": { + source: "iana" + }, + "text/cql-expression": { + source: "iana" + }, + "text/cql-identifier": { + source: "iana" + }, + "text/css": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["css"] + }, + "text/csv": { + source: "iana", + compressible: true, + extensions: ["csv"] + }, + "text/csv-schema": { + source: "iana" + }, + "text/directory": { + source: "iana" + }, + "text/dns": { + source: "iana" + }, + "text/ecmascript": { + source: "iana" + }, + "text/encaprtp": { + source: "iana" + }, + "text/enriched": { + source: "iana" + }, + "text/fhirpath": { + source: "iana" + }, + "text/flexfec": { + source: "iana" + }, + "text/fwdred": { + source: "iana" + }, + "text/gff3": { + source: "iana" + }, + "text/grammar-ref-list": { + source: "iana" + }, + "text/html": { + source: "iana", + compressible: true, + extensions: ["html", "htm", "shtml"] + }, + "text/jade": { + extensions: ["jade"] + }, + "text/javascript": { + source: "iana", + compressible: true + }, + "text/jcr-cnd": { + source: "iana" + }, + "text/jsx": { + compressible: true, + extensions: ["jsx"] + }, + "text/less": { + compressible: true, + extensions: ["less"] + }, + "text/markdown": { + source: "iana", + compressible: true, + extensions: ["markdown", "md"] + }, + "text/mathml": { + source: "nginx", + extensions: ["mml"] + }, + "text/mdx": { + compressible: true, + extensions: ["mdx"] + }, + "text/mizar": { + source: "iana" + }, + "text/n3": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["n3"] + }, + "text/parameters": { + source: "iana", + charset: "UTF-8" + }, + "text/parityfec": { + source: "iana" + }, + "text/plain": { + source: "iana", + compressible: true, + extensions: ["txt", "text", "conf", "def", "list", "log", "in", "ini"] + }, + "text/provenance-notation": { + source: "iana", + charset: "UTF-8" + }, + "text/prs.fallenstein.rst": { + source: "iana" + }, + "text/prs.lines.tag": { + source: "iana", + extensions: ["dsc"] + }, + "text/prs.prop.logic": { + source: "iana" + }, + "text/raptorfec": { + source: "iana" + }, + "text/red": { + source: "iana" + }, + "text/rfc822-headers": { + source: "iana" + }, + "text/richtext": { + source: "iana", + compressible: true, + extensions: ["rtx"] + }, + "text/rtf": { + source: "iana", + compressible: true, + extensions: ["rtf"] + }, + "text/rtp-enc-aescm128": { + source: "iana" + }, + "text/rtploopback": { + source: "iana" + }, + "text/rtx": { + source: "iana" + }, + "text/sgml": { + source: "iana", + extensions: ["sgml", "sgm"] + }, + "text/shaclc": { + source: "iana" + }, + "text/shex": { + source: "iana", + extensions: ["shex"] + }, + "text/slim": { + extensions: ["slim", "slm"] + }, + "text/spdx": { + source: "iana", + extensions: ["spdx"] + }, + "text/strings": { + source: "iana" + }, + "text/stylus": { + extensions: ["stylus", "styl"] + }, + "text/t140": { + source: "iana" + }, + "text/tab-separated-values": { + source: "iana", + compressible: true, + extensions: ["tsv"] + }, + "text/troff": { + source: "iana", + extensions: ["t", "tr", "roff", "man", "me", "ms"] + }, + "text/turtle": { + source: "iana", + charset: "UTF-8", + extensions: ["ttl"] + }, + "text/ulpfec": { + source: "iana" + }, + "text/uri-list": { + source: "iana", + compressible: true, + extensions: ["uri", "uris", "urls"] + }, + "text/vcard": { + source: "iana", + compressible: true, + extensions: ["vcard"] + }, + "text/vnd.a": { + source: "iana" + }, + "text/vnd.abc": { + source: "iana" + }, + "text/vnd.ascii-art": { + source: "iana" + }, + "text/vnd.curl": { + source: "iana", + extensions: ["curl"] + }, + "text/vnd.curl.dcurl": { + source: "apache", + extensions: ["dcurl"] + }, + "text/vnd.curl.mcurl": { + source: "apache", + extensions: ["mcurl"] + }, + "text/vnd.curl.scurl": { + source: "apache", + extensions: ["scurl"] + }, + "text/vnd.debian.copyright": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.dmclientscript": { + source: "iana" + }, + "text/vnd.dvb.subtitle": { + source: "iana", + extensions: ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + source: "iana", + extensions: ["ged"] + }, + "text/vnd.ficlab.flt": { + source: "iana" + }, + "text/vnd.fly": { + source: "iana", + extensions: ["fly"] + }, + "text/vnd.fmi.flexstor": { + source: "iana", + extensions: ["flx"] + }, + "text/vnd.gml": { + source: "iana" + }, + "text/vnd.graphviz": { + source: "iana", + extensions: ["gv"] + }, + "text/vnd.hans": { + source: "iana" + }, + "text/vnd.hgl": { + source: "iana" + }, + "text/vnd.in3d.3dml": { + source: "iana", + extensions: ["3dml"] + }, + "text/vnd.in3d.spot": { + source: "iana", + extensions: ["spot"] + }, + "text/vnd.iptc.newsml": { + source: "iana" + }, + "text/vnd.iptc.nitf": { + source: "iana" + }, + "text/vnd.latex-z": { + source: "iana" + }, + "text/vnd.motorola.reflex": { + source: "iana" + }, + "text/vnd.ms-mediapackage": { + source: "iana" + }, + "text/vnd.net2phone.commcenter.command": { + source: "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + source: "iana" + }, + "text/vnd.senx.warpscript": { + source: "iana" + }, + "text/vnd.si.uricatalogue": { + source: "iana" + }, + "text/vnd.sosi": { + source: "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + source: "iana", + charset: "UTF-8", + extensions: ["jad"] + }, + "text/vnd.trolltech.linguist": { + source: "iana", + charset: "UTF-8" + }, + "text/vnd.wap.si": { + source: "iana" + }, + "text/vnd.wap.sl": { + source: "iana" + }, + "text/vnd.wap.wml": { + source: "iana", + extensions: ["wml"] + }, + "text/vnd.wap.wmlscript": { + source: "iana", + extensions: ["wmls"] + }, + "text/vtt": { + source: "iana", + charset: "UTF-8", + compressible: true, + extensions: ["vtt"] + }, + "text/x-asm": { + source: "apache", + extensions: ["s", "asm"] + }, + "text/x-c": { + source: "apache", + extensions: ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] + }, + "text/x-component": { + source: "nginx", + extensions: ["htc"] + }, + "text/x-fortran": { + source: "apache", + extensions: ["f", "for", "f77", "f90"] + }, + "text/x-gwt-rpc": { + compressible: true + }, + "text/x-handlebars-template": { + extensions: ["hbs"] + }, + "text/x-java-source": { + source: "apache", + extensions: ["java"] + }, + "text/x-jquery-tmpl": { + compressible: true + }, + "text/x-lua": { + extensions: ["lua"] + }, + "text/x-markdown": { + compressible: true, + extensions: ["mkd"] + }, + "text/x-nfo": { + source: "apache", + extensions: ["nfo"] + }, + "text/x-opml": { + source: "apache", + extensions: ["opml"] + }, + "text/x-org": { + compressible: true, + extensions: ["org"] + }, + "text/x-pascal": { + source: "apache", + extensions: ["p", "pas"] + }, + "text/x-processing": { + compressible: true, + extensions: ["pde"] + }, + "text/x-sass": { + extensions: ["sass"] + }, + "text/x-scss": { + extensions: ["scss"] + }, + "text/x-setext": { + source: "apache", + extensions: ["etx"] + }, + "text/x-sfv": { + source: "apache", + extensions: ["sfv"] + }, + "text/x-suse-ymp": { + compressible: true, + extensions: ["ymp"] + }, + "text/x-uuencode": { + source: "apache", + extensions: ["uu"] + }, + "text/x-vcalendar": { + source: "apache", + extensions: ["vcs"] + }, + "text/x-vcard": { + source: "apache", + extensions: ["vcf"] + }, + "text/xml": { + source: "iana", + compressible: true, + extensions: ["xml"] + }, + "text/xml-external-parsed-entity": { + source: "iana" + }, + "text/yaml": { + compressible: true, + extensions: ["yaml", "yml"] + }, + "video/1d-interleaved-parityfec": { + source: "iana" + }, + "video/3gpp": { + source: "iana", + extensions: ["3gp", "3gpp"] + }, + "video/3gpp-tt": { + source: "iana" + }, + "video/3gpp2": { + source: "iana", + extensions: ["3g2"] + }, + "video/av1": { + source: "iana" + }, + "video/bmpeg": { + source: "iana" + }, + "video/bt656": { + source: "iana" + }, + "video/celb": { + source: "iana" + }, + "video/dv": { + source: "iana" + }, + "video/encaprtp": { + source: "iana" + }, + "video/ffv1": { + source: "iana" + }, + "video/flexfec": { + source: "iana" + }, + "video/h261": { + source: "iana", + extensions: ["h261"] + }, + "video/h263": { + source: "iana", + extensions: ["h263"] + }, + "video/h263-1998": { + source: "iana" + }, + "video/h263-2000": { + source: "iana" + }, + "video/h264": { + source: "iana", + extensions: ["h264"] + }, + "video/h264-rcdo": { + source: "iana" + }, + "video/h264-svc": { + source: "iana" + }, + "video/h265": { + source: "iana" + }, + "video/iso.segment": { + source: "iana", + extensions: ["m4s"] + }, + "video/jpeg": { + source: "iana", + extensions: ["jpgv"] + }, + "video/jpeg2000": { + source: "iana" + }, + "video/jpm": { + source: "apache", + extensions: ["jpm", "jpgm"] + }, + "video/jxsv": { + source: "iana" + }, + "video/mj2": { + source: "iana", + extensions: ["mj2", "mjp2"] + }, + "video/mp1s": { + source: "iana" + }, + "video/mp2p": { + source: "iana" + }, + "video/mp2t": { + source: "iana", + extensions: ["ts"] + }, + "video/mp4": { + source: "iana", + compressible: false, + extensions: ["mp4", "mp4v", "mpg4"] + }, + "video/mp4v-es": { + source: "iana" + }, + "video/mpeg": { + source: "iana", + compressible: false, + extensions: ["mpeg", "mpg", "mpe", "m1v", "m2v"] + }, + "video/mpeg4-generic": { + source: "iana" + }, + "video/mpv": { + source: "iana" + }, + "video/nv": { + source: "iana" + }, + "video/ogg": { + source: "iana", + compressible: false, + extensions: ["ogv"] + }, + "video/parityfec": { + source: "iana" + }, + "video/pointer": { + source: "iana" + }, + "video/quicktime": { + source: "iana", + compressible: false, + extensions: ["qt", "mov"] + }, + "video/raptorfec": { + source: "iana" + }, + "video/raw": { + source: "iana" + }, + "video/rtp-enc-aescm128": { + source: "iana" + }, + "video/rtploopback": { + source: "iana" + }, + "video/rtx": { + source: "iana" + }, + "video/scip": { + source: "iana" + }, + "video/smpte291": { + source: "iana" + }, + "video/smpte292m": { + source: "iana" + }, + "video/ulpfec": { + source: "iana" + }, + "video/vc1": { + source: "iana" + }, + "video/vc2": { + source: "iana" + }, + "video/vnd.cctv": { + source: "iana" + }, + "video/vnd.dece.hd": { + source: "iana", + extensions: ["uvh", "uvvh"] + }, + "video/vnd.dece.mobile": { + source: "iana", + extensions: ["uvm", "uvvm"] + }, + "video/vnd.dece.mp4": { + source: "iana" + }, + "video/vnd.dece.pd": { + source: "iana", + extensions: ["uvp", "uvvp"] + }, + "video/vnd.dece.sd": { + source: "iana", + extensions: ["uvs", "uvvs"] + }, + "video/vnd.dece.video": { + source: "iana", + extensions: ["uvv", "uvvv"] + }, + "video/vnd.directv.mpeg": { + source: "iana" + }, + "video/vnd.directv.mpeg-tts": { + source: "iana" + }, + "video/vnd.dlna.mpeg-tts": { + source: "iana" + }, + "video/vnd.dvb.file": { + source: "iana", + extensions: ["dvb"] + }, + "video/vnd.fvt": { + source: "iana", + extensions: ["fvt"] + }, + "video/vnd.hns.video": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + source: "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + source: "iana" + }, + "video/vnd.iptvforum.ttsavc": { + source: "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + source: "iana" + }, + "video/vnd.motorola.video": { + source: "iana" + }, + "video/vnd.motorola.videop": { + source: "iana" + }, + "video/vnd.mpegurl": { + source: "iana", + extensions: ["mxu", "m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + source: "iana", + extensions: ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + source: "iana" + }, + "video/vnd.nokia.mp4vr": { + source: "iana" + }, + "video/vnd.nokia.videovoip": { + source: "iana" + }, + "video/vnd.objectvideo": { + source: "iana" + }, + "video/vnd.radgamettools.bink": { + source: "iana" + }, + "video/vnd.radgamettools.smacker": { + source: "iana" + }, + "video/vnd.sealed.mpeg1": { + source: "iana" + }, + "video/vnd.sealed.mpeg4": { + source: "iana" + }, + "video/vnd.sealed.swf": { + source: "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + source: "iana" + }, + "video/vnd.uvvu.mp4": { + source: "iana", + extensions: ["uvu", "uvvu"] + }, + "video/vnd.vivo": { + source: "iana", + extensions: ["viv"] + }, + "video/vnd.youtube.yt": { + source: "iana" + }, + "video/vp8": { + source: "iana" + }, + "video/vp9": { + source: "iana" + }, + "video/webm": { + source: "apache", + compressible: false, + extensions: ["webm"] + }, + "video/x-f4v": { + source: "apache", + extensions: ["f4v"] + }, + "video/x-fli": { + source: "apache", + extensions: ["fli"] + }, + "video/x-flv": { + source: "apache", + compressible: false, + extensions: ["flv"] + }, + "video/x-m4v": { + source: "apache", + extensions: ["m4v"] + }, + "video/x-matroska": { + source: "apache", + compressible: false, + extensions: ["mkv", "mk3d", "mks"] + }, + "video/x-mng": { + source: "apache", + extensions: ["mng"] + }, + "video/x-ms-asf": { + source: "apache", + extensions: ["asf", "asx"] + }, + "video/x-ms-vob": { + source: "apache", + extensions: ["vob"] + }, + "video/x-ms-wm": { + source: "apache", + extensions: ["wm"] + }, + "video/x-ms-wmv": { + source: "apache", + compressible: false, + extensions: ["wmv"] + }, + "video/x-ms-wmx": { + source: "apache", + extensions: ["wmx"] + }, + "video/x-ms-wvx": { + source: "apache", + extensions: ["wvx"] + }, + "video/x-msvideo": { + source: "apache", + extensions: ["avi"] + }, + "video/x-sgi-movie": { + source: "apache", + extensions: ["movie"] + }, + "video/x-smv": { + source: "apache", + extensions: ["smv"] + }, + "x-conference/x-cooltalk": { + source: "apache", + extensions: ["ice"] + }, + "x-shader/x-fragment": { + compressible: true + }, + "x-shader/x-vertex": { + compressible: true } - }) + }; } +}); - async [kDestroy] (err) { - return new Promise((resolve) => { - const requests = this[kQueue].splice(this[kPendingIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) - } +// node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js +var require_mime_db = __commonJS({ + "node_modules/.pnpm/mime-db@1.52.0/node_modules/mime-db/index.js"(exports2, module2) { + module2.exports = require_db(); + } +}); - const callback = () => { - if (this[kClosedResolve]) { - // TODO (fix): Should we error here with ClientDestroyedError? - this[kClosedResolve]() - this[kClosedResolve] = null - } - resolve() +// node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js +var require_mime_types = __commonJS({ + "node_modules/.pnpm/mime-types@2.1.35/node_modules/mime-types/index.js"(exports2) { + "use strict"; + var db = require_mime_db(); + var extname = __require("path").extname; + var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/; + var TEXT_TYPE_REGEXP = /^text\//i; + exports2.charset = charset; + exports2.charsets = { lookup: charset }; + exports2.contentType = contentType; + exports2.extension = extension; + exports2.extensions = /* @__PURE__ */ Object.create(null); + exports2.lookup = lookup; + exports2.types = /* @__PURE__ */ Object.create(null); + populateMaps(exports2.extensions, exports2.types); + function charset(type2) { + if (!type2 || typeof type2 !== "string") { + return false; } - - if (this[kHTTP2Session] != null) { - util.destroy(this[kHTTP2Session], err) - this[kHTTP2Session] = null - this[kHTTP2SessionState] = null + var match = EXTRACT_TYPE_REGEXP.exec(type2); + var mime = match && db[match[1].toLowerCase()]; + if (mime && mime.charset) { + return mime.charset; } - - if (!this[kSocket]) { - queueMicrotask(callback) - } else { - util.destroy(this[kSocket].on('close', callback), err) + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return "UTF-8"; } - - resume(this) - }) - } -} - -function onHttp2SessionError (err) { - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') - - this[kSocket][kError] = err - - onError(this[kClient], err) -} - -function onHttp2FrameError (type, code, id) { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - - if (id === 0) { - this[kSocket][kError] = err - onError(this[kClient], err) - } -} - -function onHttp2SessionEnd () { - util.destroy(this, new SocketError('other side closed')) - util.destroy(this[kSocket], new SocketError('other side closed')) -} - -function onHTTP2GoAway (code) { - const client = this[kClient] - const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) - client[kSocket] = null - client[kHTTP2Session] = null - - if (client.destroyed) { - assert(this[kPending] === 0) - - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(this, request, err) + return false; } - } else if (client[kRunning] > 0) { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - errorRequest(client, request, err) - } - - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', - client[kUrl], - [client], - err - ) - - resume(client) -} - -const constants = __nccwpck_require__(10307) -const createRedirectInterceptor = __nccwpck_require__(92130) -const EMPTY_BUF = Buffer.alloc(0) - -async function lazyllhttp () { - const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(79741) : undefined - - let mod - try { - mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(15919), '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 || __nccwpck_require__(79741), '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) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_begin: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageBegin() || 0 - }, - wasm_on_header_field: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_header_value: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 - }, - wasm_on_body: (p, at, len) => { - assert.strictEqual(currentParser.ptr, p) - const start = at - currentBufferPtr + currentBufferRef.byteOffset - return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0 - }, - wasm_on_message_complete: (p) => { - assert.strictEqual(currentParser.ptr, p) - return currentParser.onMessageComplete() || 0 - } - - /* eslint-enable camelcase */ - } - }) -} - -let llhttpInstance = null -let llhttpPromise = lazyllhttp() -llhttpPromise.catch() - -let currentParser = null -let currentBufferRef = null -let currentBufferSize = 0 -let currentBufferPtr = null - -const TIMEOUT_HEADERS = 1 -const TIMEOUT_BODY = 2 -const TIMEOUT_IDLE = 3 - -class Parser { - constructor (client, socket, { exports }) { - assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) - - this.llhttp = exports - this.ptr = this.llhttp.llhttp_alloc(constants.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[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[kMaxResponseSize] - } - - setTimeout (value, type) { - this.timeoutType = type - if (value !== this.timeoutValue) { - timers.clearTimeout(this.timeout) - if (value) { - this.timeout = timers.setTimeout(onParserTimeout, value, this) - // istanbul ignore else: only for jest - if (this.timeout.unref) { - this.timeout.unref() - } - } else { - this.timeout = null + function contentType(str2) { + if (!str2 || typeof str2 !== "string") { + return false; } - this.timeoutValue = value - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() + var mime = str2.indexOf("/") === -1 ? exports2.lookup(str2) : str2; + if (!mime) { + return false; } - } - } - - resume () { - if (this.socket.destroyed || !this.paused) { - return - } - - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_resume(this.ptr) - - assert(this.timeoutType === TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() + if (mime.indexOf("charset") === -1) { + var charset2 = exports2.charset(mime); + if (charset2) mime += "; charset=" + charset2.toLowerCase(); } + return mime; } - - this.paused = false - this.execute(this.socket.read() || EMPTY_BUF) // Flush parser. - this.readMore() - } - - readMore () { - while (!this.paused && this.ptr) { - const chunk = this.socket.read() - if (chunk === null) { - break + function extension(type2) { + if (!type2 || typeof type2 !== "string") { + return false; } - this.execute(chunk) - } - } - - execute (data) { - assert(this.ptr != null) - assert(currentParser == null) - assert(!this.paused) - - const { socket, llhttp } = this - - if (data.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr) + var match = EXTRACT_TYPE_REGEXP.exec(type2); + var exts = match && exports2.extensions[match[1].toLowerCase()]; + if (!exts || !exts.length) { + return false; } - currentBufferSize = Math.ceil(data.length / 4096) * 4096 - currentBufferPtr = llhttp.malloc(currentBufferSize) + return exts[0]; } - - new Uint8Array(llhttp.memory.buffer, currentBufferPtr, 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 { - currentBufferRef = data - currentParser = this - ret = llhttp.llhttp_execute(this.ptr, 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 { - currentParser = null - currentBufferRef = null - } - - const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr - - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data.slice(offset)) - } else if (ret === constants.ERROR.PAUSED) { - this.paused = true - socket.unshift(data.slice(offset)) - } else if (ret !== constants.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 HTTPParserError(message, constants.ERROR[ret], data.slice(offset)) + function lookup(path2) { + if (!path2 || typeof path2 !== "string") { + return false; } - } catch (err) { - util.destroy(socket, err) - } - } - - destroy () { - assert(this.ptr != null) - assert(currentParser == null) - - this.llhttp.llhttp_free(this.ptr) - this.ptr = null - - timers.clearTimeout(this.timeout) - this.timeout = null - this.timeoutValue = null - this.timeoutType = null - - this.paused = false - } - - onStatus (buf) { - this.statusText = buf.toString() - } - - onMessageBegin () { - const { socket, client } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 - } - - const request = client[kQueue][client[kRunningIdx]] - if (!request) { - return -1 + var extension2 = extname("x." + path2).toLowerCase().substr(1); + if (!extension2) { + return false; + } + return exports2.types[extension2] || false; } - } - - 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]) + function populateMaps(extensions, types2) { + var preference = ["nginx", "apache", void 0, "iana"]; + Object.keys(db).forEach(function forEachMimeType(type2) { + var mime = db[type2]; + var exts = mime.extensions; + if (!exts || !exts.length) { + return; + } + extensions[type2] = exts; + for (var i = 0; i < exts.length; i++) { + var extension2 = exts[i]; + if (types2[extension2]) { + var from = preference.indexOf(db[types2[extension2]].source); + var to = preference.indexOf(mime.source); + if (types2[extension2] !== "application/octet-stream" && (from > to || from === to && types2[extension2].substr(0, 12) === "application/")) { + continue; + } + } + types2[extension2] = type2; + } + }); } - - 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]) +// node_modules/.pnpm/type-is@1.6.18/node_modules/type-is/index.js +var require_type_is = __commonJS({ + "node_modules/.pnpm/type-is@1.6.18/node_modules/type-is/index.js"(exports2, module2) { + "use strict"; + var typer = require_media_typer(); + var mime = require_mime_types(); + module2.exports = typeofrequest; + module2.exports.is = typeis; + module2.exports.hasBody = hasbody; + module2.exports.normalize = normalize2; + module2.exports.match = mimeMatch; + function typeis(value, types_) { + var i; + var types2 = types_; + var val = tryNormalizeType(value); + if (!val) { + return false; + } + if (types2 && !Array.isArray(types2)) { + types2 = new Array(arguments.length - 1); + for (i = 0; i < types2.length; i++) { + types2[i] = arguments[i + 1]; + } + } + if (!types2 || !types2.length) { + return val; + } + var type2; + for (i = 0; i < types2.length; i++) { + if (mimeMatch(normalize2(type2 = types2[i]), val)) { + return type2[0] === "+" || type2.indexOf("*") !== -1 ? val : type2; + } + } + return false; } - - 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() + function hasbody(req) { + return req.headers["transfer-encoding"] !== void 0 || !isNaN(req.headers["content-length"]); } - - this.trackHeader(buf.length) - } - - trackHeader (len) { - this.headersSize += len - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()) + function typeofrequest(req, types_) { + var types2 = types_; + if (!hasbody(req)) { + return null; + } + if (arguments.length > 2) { + types2 = new Array(arguments.length - 1); + for (var i = 0; i < types2.length; i++) { + types2[i] = arguments[i + 1]; + } + } + var value = req.headers["content-type"]; + return typeis(value, types2); } - } - - onUpgrade (head) { - const { upgrade, client, socket, headers, statusCode } = this - - assert(upgrade) - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(!socket.destroyed) - assert(socket === client[kSocket]) - assert(!this.paused) - assert(request.upgrade || request.method === 'CONNECT') - - this.statusCode = null - this.statusText = '' - this.shouldKeepAlive = null - - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 - - socket.unshift(head) - - socket[kParser].destroy() - socket[kParser] = null - - socket[kClient] = null - socket[kError] = null - socket - .removeListener('error', onSocketError) - .removeListener('readable', onSocketReadable) - .removeListener('end', onSocketEnd) - .removeListener('close', onSocketClose) - - client[kSocket] = null - client[kQueue][client[kRunningIdx]++] = null - client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade')) - - try { - request.onUpgrade(statusCode, headers, socket) - } catch (err) { - util.destroy(socket, err) + function normalize2(type2) { + if (typeof type2 !== "string") { + return false; + } + switch (type2) { + case "urlencoded": + return "application/x-www-form-urlencoded"; + case "multipart": + return "multipart/*"; + } + if (type2[0] === "+") { + return "*/*" + type2; + } + return type2.indexOf("/") === -1 ? mime.lookup(type2) : type2; } - - resume(client) - } - - onHeadersComplete (statusCode, upgrade, shouldKeepAlive) { - const { client, socket, headers, statusText } = this - - /* istanbul ignore next: difficult to make a test case for */ - if (socket.destroyed) { - return -1 + function mimeMatch(expected, actual) { + if (expected === false) { + return false; + } + var actualParts = actual.split("/"); + var expectedParts = expected.split("/"); + if (actualParts.length !== 2 || expectedParts.length !== 2) { + return false; + } + if (expectedParts[0] !== "*" && expectedParts[0] !== actualParts[0]) { + return false; + } + if (expectedParts[1].substr(0, 2) === "*+") { + return expectedParts[1].length <= actualParts[1].length + 1 && expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length); + } + if (expectedParts[1] !== "*" && expectedParts[1] !== actualParts[1]) { + return false; + } + return true; } - - const request = client[kQueue][client[kRunningIdx]] - - /* istanbul ignore next: difficult to make a test case for */ - if (!request) { - return -1 + function normalizeType(value) { + var type2 = typer.parse(value); + type2.parameters = void 0; + return typer.format(type2); } - - assert(!this.upgrade) - assert(this.statusCode < 200) - - if (statusCode === 100) { - util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) - return -1 + function tryNormalizeType(value) { + if (!value) { + return null; + } + try { + return normalizeType(value); + } catch (err) { + return null; + } } + } +}); - /* this can only happen if server is misbehaving */ - if (upgrade && !request.upgrade) { - util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) - return -1 +// node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/json.js +var require_json = __commonJS({ + "node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/json.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var createError = require_http_errors(); + var debug3 = require_src2()("body-parser:json"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = json2; + var FIRST_CHAR_REGEXP = /^[\x20\x09\x0a\x0d]*([^\x20\x09\x0a\x0d])/; + var JSON_SYNTAX_CHAR = "#"; + var JSON_SYNTAX_REGEXP = /#+/g; + function json2(options2) { + var opts = options2 || {}; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var inflate = opts.inflate !== false; + var reviver = opts.reviver; + var strict = opts.strict !== false; + var type2 = opts.type || "application/json"; + var verify2 = opts.verify || false; + if (verify2 !== false && typeof verify2 !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2; + function parse2(body) { + if (body.length === 0) { + return {}; + } + if (strict) { + var first = firstchar(body); + if (first !== "{" && first !== "[") { + debug3("strict violation"); + throw createStrictSyntaxError(body, first); + } + } + try { + debug3("parse json"); + return JSON.parse(body, reviver); + } catch (e) { + throw normalizeJsonSyntaxError(e, { + message: e.message, + stack: e.stack + }); + } + } + return function jsonParser(req, res, next) { + if (req._body) { + debug3("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug3("skip empty body"); + next(); + return; + } + debug3("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug3("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || "utf-8"; + if (charset.slice(0, 4) !== "utf-") { + debug3("invalid charset"); + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset, + type: "charset.unsupported" + })); + return; + } + read(req, res, next, parse2, debug3, { + encoding: charset, + inflate, + limit, + verify: verify2 + }); + }; } - - assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) - - this.statusCode = statusCode - this.shouldKeepAlive = ( - shouldKeepAlive || - // Override llhttp value which does not allow keepAlive for HEAD. - (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive') - ) - - if (this.statusCode >= 200) { - const bodyTimeout = request.bodyTimeout != null - ? request.bodyTimeout - : client[kBodyTimeout] - this.setTimeout(bodyTimeout, TIMEOUT_BODY) - } else if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() + function createStrictSyntaxError(str2, char) { + var index = str2.indexOf(char); + var partial = ""; + if (index !== -1) { + partial = str2.substring(0, index) + JSON_SYNTAX_CHAR; + for (var i = index + 1; i < str2.length; i++) { + partial += JSON_SYNTAX_CHAR; + } + } + try { + JSON.parse(partial); + throw new SyntaxError("strict violation"); + } catch (e) { + return normalizeJsonSyntaxError(e, { + message: e.message.replace(JSON_SYNTAX_REGEXP, function(placeholder) { + return str2.substring(index, index + placeholder.length); + }), + stack: e.stack + }); } } - - if (request.method === 'CONNECT') { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 + function firstchar(str2) { + var match = FIRST_CHAR_REGEXP.exec(str2); + return match ? match[1] : void 0; } - - if (upgrade) { - assert(client[kRunning] === 1) - this.upgrade = true - return 2 + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; + } } - - assert(this.headers.length % 2 === 0) - this.headers = [] - this.headersSize = 0 - - if (this.shouldKeepAlive && client[kPipelining]) { - const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null - - if (keepAliveTimeout != null) { - const timeout = Math.min( - keepAliveTimeout - client[kKeepAliveTimeoutThreshold], - client[kKeepAliveMaxTimeout] - ) - if (timeout <= 0) { - socket[kReset] = true - } else { - client[kKeepAliveTimeoutValue] = timeout + function normalizeJsonSyntaxError(error, obj) { + var keys = Object.getOwnPropertyNames(error); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key !== "stack" && key !== "message") { + delete error[key]; } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout] } - } else { - // Stop more requests from being dispatched. - socket[kReset] = true - } - - const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - - if (request.aborted) { - return -1 + error.stack = obj.stack.replace(error.message, obj.message); + error.message = obj.message; + return error; } - - if (request.method === 'HEAD') { - return 1 + function typeChecker(type2) { + return function checkType(req) { + return Boolean(typeis(req, type2)); + }; } + } +}); - if (statusCode < 200) { - return 1 +// node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/raw.js +var require_raw = __commonJS({ + "node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/raw.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var debug3 = require_src2()("body-parser:raw"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = raw; + function raw(options2) { + var opts = options2 || {}; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type2 = opts.type || "application/octet-stream"; + var verify2 = opts.verify || false; + if (verify2 !== false && typeof verify2 !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2; + function parse2(buf) { + return buf; + } + return function rawParser(req, res, next) { + if (req._body) { + debug3("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug3("skip empty body"); + next(); + return; + } + debug3("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug3("skip parsing"); + next(); + return; + } + read(req, res, next, parse2, debug3, { + encoding: null, + inflate, + limit, + verify: verify2 + }); + }; } - - if (socket[kBlocking]) { - socket[kBlocking] = false - resume(client) + function typeChecker(type2) { + return function checkType(req) { + return Boolean(typeis(req, type2)); + }; } - - return pause ? constants.ERROR.PAUSED : 0 } +}); - onBody (buf) { - const { client, socket, statusCode, maxResponseSize } = this - - if (socket.destroyed) { - return -1 +// node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/text.js +var require_text = __commonJS({ + "node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/text.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var debug3 = require_src2()("body-parser:text"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = text; + function text(options2) { + var opts = options2 || {}; + var defaultCharset = opts.defaultCharset || "utf-8"; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type2 = opts.type || "text/plain"; + var verify2 = opts.verify || false; + if (verify2 !== false && typeof verify2 !== "function") { + throw new TypeError("option verify must be function"); + } + var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2; + function parse2(buf) { + return buf; + } + return function textParser(req, res, next) { + if (req._body) { + debug3("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug3("skip empty body"); + next(); + return; + } + debug3("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug3("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || defaultCharset; + read(req, res, next, parse2, debug3, { + encoding: charset, + inflate, + limit, + verify: verify2 + }); + }; } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert.strictEqual(this.timeoutType, TIMEOUT_BODY) - if (this.timeout) { - // istanbul ignore else: only for jest - if (this.timeout.refresh) { - this.timeout.refresh() + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; } } - - assert(statusCode >= 200) - - if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { - util.destroy(socket, new ResponseExceededMaxSizeError()) - return -1 - } - - this.bytesRead += buf.length - - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED + function typeChecker(type2) { + return function checkType(req) { + return Boolean(typeis(req, type2)); + }; } } +}); - onMessageComplete () { - const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this - - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1 - } - - if (upgrade) { - return - } - - const request = client[kQueue][client[kRunningIdx]] - assert(request) - - assert(statusCode >= 100) - - this.statusCode = null - this.statusText = '' - this.bytesRead = 0 - this.contentLength = '' - this.keepAlive = '' - this.connection = '' - - 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)) { - util.destroy(socket, new ResponseContentLengthMismatchError()) - return -1 - } - - request.onComplete(headers) +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js +var require_es_errors = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) { + "use strict"; + module2.exports = Error; + } +}); - client[kQueue][client[kRunningIdx]++] = null +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js +var require_eval = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) { + "use strict"; + module2.exports = EvalError; + } +}); - if (socket[kWriting]) { - assert.strictEqual(client[kRunning], 0) - // Response completed before request. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (!shouldKeepAlive) { - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (socket[kReset] && client[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. - util.destroy(socket, new InformationalError('reset')) - return constants.ERROR.PAUSED - } else if (client[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(resume, client) - } else { - resume(client) - } +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js +var require_range = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) { + "use strict"; + module2.exports = RangeError; } -} +}); -function onParserTimeout (parser) { - const { socket, timeoutType, client } = parser +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js +var require_ref = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) { + "use strict"; + module2.exports = ReferenceError; + } +}); - /* istanbul ignore else */ - if (timeoutType === TIMEOUT_HEADERS) { - if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { - assert(!parser.paused, 'cannot be paused while waiting for headers') - util.destroy(socket, new HeadersTimeoutError()) - } - } else if (timeoutType === TIMEOUT_BODY) { - if (!parser.paused) { - util.destroy(socket, new BodyTimeoutError()) - } - } else if (timeoutType === TIMEOUT_IDLE) { - assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) - util.destroy(socket, new InformationalError('socket idle timeout')) +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js +var require_syntax = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) { + "use strict"; + module2.exports = SyntaxError; } -} +}); -function onSocketReadable () { - const { [kParser]: parser } = this - if (parser) { - parser.readMore() +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js +var require_type = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) { + "use strict"; + module2.exports = TypeError; } -} +}); -function onSocketError (err) { - const { [kClient]: client, [kParser]: parser } = this +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js +var require_uri = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) { + "use strict"; + module2.exports = URIError; + } +}); - assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') +// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports2, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); - if (client[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 - } +// node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports2, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; } +}); - this[kError] = err +// node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js +var require_has_proto = __commonJS({ + "node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports2, module2) { + "use strict"; + var test = { + __proto__: null, + foo: {} + }; + var $Object = Object; + module2.exports = function hasProto() { + return { __proto__: test }.foo === test.foo && !(test instanceof $Object); + }; + } +}); - onError(this[kClient], err) -} +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js +var require_implementation = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports2, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var toStr = Object.prototype.toString; + var max = Math.max; + var funcType = "[object Function]"; + var concatty = function concatty2(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + return arr; + }; + var slicy = function slicy2(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; + }; + var joiny = function(arr, joiner) { + var str2 = ""; + for (var i = 0; i < arr.length; i += 1) { + str2 += arr[i]; + if (i + 1 < arr.length) { + str2 += joiner; + } + } + return str2; + }; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + }; + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = "$" + i; + } + bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); -function onError (client, err) { - if ( - client[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. +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation(); + module2.exports = Function.prototype.bind || implementation; + } +}); - assert(client[kPendingIdx] === client[kRunningIdx]) +// node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js +var require_hasown = __commonJS({ + "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports2, module2) { + "use strict"; + var call = Function.prototype.call; + var $hasOwn = Object.prototype.hasOwnProperty; + var bind = require_function_bind(); + module2.exports = bind.call(call, $hasOwn); + } +}); - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) +// node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports2, module2) { + "use strict"; + var undefined2; + var $Error = require_es_errors(); + var $EvalError = require_eval(); + var $RangeError = require_range(); + var $ReferenceError = require_ref(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $URIError = require_uri(); + var $Function = Function; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e) { + } + }; + var $gOPD = Object.getOwnPropertyDescriptor; + if ($gOPD) { + try { + $gOPD({}, ""); + } catch (e) { + $gOPD = null; + } } - assert(client[kSize] === 0) + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var hasProto = require_has_proto()(); + var getProto = Object.getPrototypeOf || (hasProto ? function(x) { + return x.__proto__; + } : null); + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + __proto__: null, + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": $Error, + "%eval%": eval, + // eslint-disable-line no-eval + "%EvalError%": $EvalError, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": $URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + }; + if (getProto) { + try { + null.error; + } catch (e) { + errorProto = getProto(getProto(e)); + INTRINSICS["%Error.prototype%"] = errorProto; + } + } + var errorProto; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + if (fn) { + value = fn.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + __proto__: null, + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_hasown(); + var $concat = bind.call(Function.call, Array.prototype.concat); + var $spliceApply = bind.call(Function.apply, Array.prototype.splice); + var $replace = bind.call(Function.call, String.prototype.replace); + var $strSlice = bind.call(Function.call, String.prototype.slice); + var $exec = bind.call(Function.call, RegExp.prototype.exec); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void 0; + } + if ($gOPD && i + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; } -} - -function onSocketEnd () { - const { [kParser]: parser, [kClient]: client } = this +}); - if (client[kHTTPConnVersion] !== 'h2') { - if (parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() - return +// node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js +var require_es_define_property = __commonJS({ + "node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false; + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } } + module2.exports = $defineProperty; } +}); - util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) -} - -function onSocketClose () { - const { [kClient]: client, [kParser]: parser } = this - - if (client[kHTTPConnVersion] === 'h1' && parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - // We treat all incoming data so far as a valid response. - parser.onMessageComplete() +// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } } - - this[kParser].destroy() - this[kParser] = null + module2.exports = $gOPD; } +}); - const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) +// node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js +var require_define_data_property = __commonJS({ + "node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var gopd = require_gopd(); + module2.exports = function defineDataProperty(obj, property, value) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new $TypeError("`obj` must be an object or a function`"); + } + if (typeof property !== "string" && typeof property !== "symbol") { + throw new $TypeError("`property` must be a string or a symbol`"); + } + if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { + throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); + } + if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { + throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); + } + if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { + throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); + } + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("`loose`, if provided, must be a boolean"); + } + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + var desc = !!gopd && gopd(obj, property); + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + obj[property] = value; + } else { + throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + } + }; + } +}); - client[kSocket] = null +// node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js +var require_has_property_descriptors = __commonJS({ + "node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var hasPropertyDescriptors = function hasPropertyDescriptors2() { + return !!$defineProperty; + }; + hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], "length", { value: 1 }).length !== 1; + } catch (e) { + return true; + } + }; + module2.exports = hasPropertyDescriptors; + } +}); - if (client.destroyed) { - assert(client[kPending] === 0) +// node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js +var require_set_function_length = __commonJS({ + "node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var gOPD = require_gopd(); + var $TypeError = require_type(); + var $floor = GetIntrinsic("%Math.floor%"); + module2.exports = function setFunctionLength(fn, length) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { + throw new $TypeError("`length` must be a positive 32-bit integer"); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ("length" in fn && gOPD) { + var desc = gOPD(fn, "length"); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); + } else { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); + } + } + return fn; + }; + } +}); - // Fail entire queue. - const requests = client[kQueue].splice(client[kRunningIdx]) - for (let i = 0; i < requests.length; i++) { - const request = requests[i] - errorRequest(client, request, err) +// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var setFunctionLength = require_set_function_length(); + var $TypeError = require_type(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); + var $defineProperty = require_es_define_property(); + var $max = GetIntrinsic("%Math.max%"); + module2.exports = function callBind(originalFunction) { + if (typeof originalFunction !== "function") { + throw new $TypeError("a function is required"); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); + }; + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; } - } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { - // Fail head of pipeline. - const request = client[kQueue][client[kRunningIdx]] - client[kQueue][client[kRunningIdx]++] = null - - errorRequest(client, request, err) } +}); - client[kPendingIdx] = client[kRunningIdx] - - assert(client[kRunning] === 0) - - client.emit('disconnect', client[kUrl], [client], err) - - resume(client) -} - -async function connect (client) { - assert(!client[kConnecting]) - assert(!client[kSocket]) - - let { host, hostname, protocol, port } = client[kUrl] - - // Resolve ipv6 - if (hostname[0] === '[') { - const idx = hostname.indexOf(']') - - assert(idx !== -1) - const ip = hostname.substring(1, idx) - - assert(net.isIP(ip)) - hostname = ip +// node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); + } + return intrinsic; + }; } +}); - client[kConnecting] = true - - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }) +// node_modules/.pnpm/object-inspect@1.13.3/node_modules/object-inspect/util.inspect.js +var require_util_inspect = __commonJS({ + "node_modules/.pnpm/object-inspect@1.13.3/node_modules/object-inspect/util.inspect.js"(exports2, module2) { + module2.exports = __require("util").inspect; } +}); - try { - const socket = await new Promise((resolve, reject) => { - client[kConnector]({ - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, (err, socket) => { - if (err) { - reject(err) - } else { - resolve(socket) +// node_modules/.pnpm/object-inspect@1.13.3/node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + "node_modules/.pnpm/object-inspect@1.13.3/node_modules/object-inspect/index.js"(exports2, module2) { + var hasMap = typeof Map === "function" && Map.prototype; + var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; + var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; + var mapForEach = hasMap && Map.prototype.forEach; + var hasSet = typeof Set === "function" && Set.prototype; + var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; + var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; + var setForEach = hasSet && Set.prototype.forEach; + var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; + var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; + var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var booleanValueOf = Boolean.prototype.valueOf; + var objectToString2 = Object.prototype.toString; + var functionToString = Function.prototype.toString; + var $match = String.prototype.match; + var $slice = String.prototype.slice; + var $replace = String.prototype.replace; + var $toUpperCase = String.prototype.toUpperCase; + var $toLowerCase = String.prototype.toLowerCase; + var $test = RegExp.prototype.test; + var $concat = Array.prototype.concat; + var $join = Array.prototype.join; + var $arrSlice = Array.prototype.slice; + var $floor = Math.floor; + var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; + var gOPS = Object.getOwnPropertySymbols; + var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; + var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; + var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; + var isEnumerable = Object.prototype.propertyIsEnumerable; + var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) { + return O.__proto__; + } : null); + function addNumericSeparator(num, str2) { + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str2)) { + return str2; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === "number") { + var int2 = num < 0 ? -$floor(-num) : $floor(num); + if (int2 !== num) { + var intStr = String(int2); + var dec = $slice.call(str2, intStr.length + 1); + return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + } + } + return $replace.call(str2, sepRegex, "$&_"); + } + var utilInspect = require_util_inspect(); + var inspectCustom = utilInspect.custom; + var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + var quotes = { + __proto__: null, + "double": '"', + single: "'" + }; + var quoteREs = { + __proto__: null, + "double": /(["\\])/g, + single: /(['\\])/g + }; + module2.exports = function inspect_(obj, options2, depth, seen) { + var opts = options2 || {}; + if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, "customInspect") ? opts.customInspect : true; + if (typeof customInspect !== "boolean" && customInspect !== "symbol") { + throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + } + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + if (typeof obj === "undefined") { + return "undefined"; + } + if (obj === null) { + return "null"; + } + if (typeof obj === "boolean") { + return obj ? "true" : "false"; + } + if (typeof obj === "string") { + return inspectString(obj, opts); + } + if (typeof obj === "number") { + if (obj === 0) { + return Infinity / obj > 0 ? "0" : "-0"; + } + var str2 = String(obj); + return numericSeparator ? addNumericSeparator(obj, str2) : str2; + } + if (typeof obj === "bigint") { + var bigIntStr = String(obj) + "n"; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; + if (typeof depth === "undefined") { + depth = 0; + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { + return isArray(obj) ? "[Array]" : "[Object]"; + } + var indent = getIndent(opts, depth); + if (typeof seen === "undefined") { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return "[Circular]"; + } + function inspect2(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, "quoteStyle")) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + if (typeof obj === "function" && !isRegExp2(obj)) { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect2); + return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); + return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement2(obj)) { + var s = "<" + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); } - }) - }) - - if (client.destroyed) { - util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) - return - } - - client[kConnecting] = false - - assert(socket) - - const isH2 = socket.alpnProtocol === 'h2' - if (isH2) { - if (!h2ExperimentalWarned) { - h2ExperimentalWarned = true - process.emitWarning('H2 support is experimental, expect them to change at any time.', { - code: 'UNDICI-H2' - }) + s += ">"; + if (obj.childNodes && obj.childNodes.length) { + s += "..."; + } + s += ""; + return s; } - - const session = http2.connect(client[kUrl], { - createConnection: () => socket, - peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams - }) - - client[kHTTPConnVersion] = 'h2' - session[kClient] = client - session[kSocket] = socket - session.on('error', onHttp2SessionError) - session.on('frameError', onHttp2FrameError) - session.on('end', onHttp2SessionEnd) - session.on('goaway', onHTTP2GoAway) - session.on('close', onSocketClose) - session.unref() - - client[kHTTP2Session] = session - socket[kHTTP2Session] = session - } else { - if (!llhttpInstance) { - llhttpInstance = await llhttpPromise - llhttpPromise = null + if (isArray(obj)) { + if (obj.length === 0) { + return "[]"; + } + var xs = arrObjKeys(obj, inspect2); + if (indent && !singleLineValues(xs)) { + return "[" + indentedJoin(xs, indent) + "]"; + } + return "[ " + $join.call(xs, ", ") + " ]"; } - - socket[kNoRef] = false - socket[kWriting] = false - socket[kReset] = false - socket[kBlocking] = false - socket[kParser] = new Parser(client, socket, llhttpInstance) + if (isError2(obj)) { + var parts = arrObjKeys(obj, inspect2); + if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { + return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect2(obj.cause), parts), ", ") + " }"; + } + if (parts.length === 0) { + return "[" + String(obj) + "]"; + } + return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; + } + if (typeof obj === "object" && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function(value, key) { + mapParts.push(inspect2(key, obj, true) + " => " + inspect2(value, obj)); + }); + } + return collectionOf("Map", mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function(value) { + setParts.push(inspect2(value, obj)); + }); + } + return collectionOf("Set", setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf("WeakMap"); + } + if (isWeakSet(obj)) { + return weakCollectionOf("WeakSet"); + } + if (isWeakRef(obj)) { + return weakCollectionOf("WeakRef"); + } + if (isNumber(obj)) { + return markBoxed(inspect2(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect2(bigIntValueOf.call(obj))); + } + if (isBoolean2(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString2(obj)) { + return markBoxed(inspect2(String(obj))); + } + if (typeof window !== "undefined" && obj === window) { + return "{ [object Window] }"; + } + if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { + return "{ [object globalThis] }"; + } + if (!isDate(obj) && !isRegExp2(obj)) { + var ys = arrObjKeys(obj, inspect2); + var isPlainObject4 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? "" : "null prototype"; + var stringTag = !isPlainObject4 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; + var constructorTag = isPlainObject4 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; + var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); + if (ys.length === 0) { + return tag + "{}"; + } + if (indent) { + return tag + "{" + indentedJoin(ys, indent) + "}"; + } + return tag + "{ " + $join.call(ys, ", ") + " }"; + } + return String(obj); + }; + function wrapQuotes(s, defaultStyle, opts) { + var style = opts.quoteStyle || defaultStyle; + var quoteChar = quotes[style]; + return quoteChar + s + quoteChar; } - - socket[kCounter] = 0 - socket[kMaxRequests] = client[kMaxRequests] - socket[kClient] = client - socket[kError] = null - - socket - .on('error', onSocketError) - .on('readable', onSocketReadable) - .on('end', onSocketEnd) - .on('close', onSocketClose) - - client[kSocket] = socket - - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }) + function quote(s) { + return $replace.call(String(s), /"/g, """); } - client.emit('connect', client[kUrl], [client]) - } catch (err) { - if (client.destroyed) { - return + function isArray(obj) { + return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); } - - client[kConnecting] = false - - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ - connectParams: { - host, - hostname, - protocol, - port, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - error: err - }) + function isDate(obj) { + return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); } - - if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { - assert(client[kRunning] === 0) - while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { - const request = client[kQueue][client[kPendingIdx]++] - errorRequest(client, request, err) - } - } else { - onError(client, err) + function isRegExp2(obj) { + return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); } - - client.emit('connectionError', client[kUrl], [client], err) - } - - resume(client) -} - -function emitDrain (client) { - client[kNeedDrain] = 0 - client.emit('drain', client[kUrl], [client]) -} - -function resume (client, sync) { - if (client[kResuming] === 2) { - return - } - - client[kResuming] = 2 - - _resume(client, sync) - client[kResuming] = 0 - - if (client[kRunningIdx] > 256) { - client[kQueue].splice(0, client[kRunningIdx]) - client[kPendingIdx] -= client[kRunningIdx] - client[kRunningIdx] = 0 - } -} - -function _resume (client, sync) { - while (true) { - if (client.destroyed) { - assert(client[kPending] === 0) - return + function isError2(obj) { + return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); } - - if (client[kClosedResolve] && !client[kSize]) { - client[kClosedResolve]() - client[kClosedResolve] = null - return + function isString2(obj) { + return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); } - - const socket = client[kSocket] - - if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { - if (client[kSize] === 0) { - if (!socket[kNoRef] && socket.unref) { - socket.unref() - socket[kNoRef] = true - } - } else if (socket[kNoRef] && socket.ref) { - socket.ref() - socket[kNoRef] = false + function isNumber(obj) { + return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isBoolean2(obj) { + return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === "object" && obj instanceof Symbol; } - - if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) - } - } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { - if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { - const request = client[kQueue][client[kRunningIdx]] - const headersTimeout = request.headersTimeout != null - ? request.headersTimeout - : client[kHeadersTimeout] - socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS) - } + if (typeof obj === "symbol") { + return true; + } + if (!obj || typeof obj !== "object" || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) { } + return false; } - - if (client[kBusy]) { - client[kNeedDrain] = 2 - } else if (client[kNeedDrain] === 2) { - if (sync) { - client[kNeedDrain] = 1 - process.nextTick(emitDrain, client) - } else { - emitDrain(client) + function isBigInt(obj) { + if (!obj || typeof obj !== "object" || !bigIntValueOf) { + return false; } - continue + try { + bigIntValueOf.call(obj); + return true; + } catch (e) { + } + return false; } - - if (client[kPending] === 0) { - return + var hasOwn = Object.prototype.hasOwnProperty || function(key) { + return key in this; + }; + function has(obj, key) { + return hasOwn.call(obj, key); } - - if (client[kRunning] >= (client[kPipelining] || 1)) { - return + function toStr(obj) { + return objectToString2.call(obj); } - - const request = client[kQueue][client[kPendingIdx]] - - if (client[kUrl].protocol === 'https:' && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return + function nameOf(f) { + if (f.name) { + return f.name; } - - client[kServerName] = request.servername - - if (socket && socket.servername !== request.servername) { - util.destroy(socket, new InformationalError('servername changed')) - return + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { + return m[1]; } + return null; } - - if (client[kConnecting]) { - return + function indexOf(xs, x) { + if (xs.indexOf) { + return xs.indexOf(x); + } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { + return i; + } + } + return -1; } - - if (!socket && !client[kHTTP2Session]) { - connect(client) - return + function isMap(x) { + if (!mapSize || !x || typeof x !== "object") { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; + } catch (e) { + } + return false; } - - if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return + function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== "object") { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; + } catch (e) { + } + return false; } - - if (client[kRunning] > 0 && !request.idempotent) { - // Non-idempotent request cannot be retried. - // Ensure that no other requests are inflight and - // could cause failure. - return + function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== "object") { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) { + } + return false; } - - if (client[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 + function isSet(x) { + if (!setSize || !x || typeof x !== "object") { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; + } catch (e) { + } + return false; } - - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && - (util.isStream(request.body) || util.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 + function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== "object") { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; + } catch (e) { + } + return false; } - - if (!request.aborted && write(client, request)) { - client[kPendingIdx]++ - } else { - client[kQueue].splice(client[kPendingIdx], 1) + function isElement2(x) { + if (!x || typeof x !== "object") { + return false; + } + if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === "string" && typeof x.getAttribute === "function"; + } + function inspectString(str2, opts) { + if (str2.length > opts.maxStringLength) { + var remaining = str2.length - opts.maxStringLength; + var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); + return inspectString($slice.call(str2, 0, opts.maxStringLength), opts) + trailer; + } + var quoteRE = quoteREs[opts.quoteStyle || "single"]; + quoteRE.lastIndex = 0; + var s = $replace.call($replace.call(str2, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, "single", opts); + } + function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: "b", + 9: "t", + 10: "n", + 12: "f", + 13: "r" + }[n]; + if (x) { + return "\\" + x; + } + return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); + } + function markBoxed(str2) { + return "Object(" + str2 + ")"; + } + function weakCollectionOf(type2) { + return type2 + " { ? }"; + } + function collectionOf(type2, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", "); + return type2 + " (" + size + ") {" + joinedEntries + "}"; + } + function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], "\n") >= 0) { + return false; + } + } + return true; } - } -} - -// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 -function shouldSendContentLength (method) { - return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' -} - -function write (client, request) { - if (client[kHTTPConnVersion] === 'h2') { - writeH2(client, client[kHTTP2Session], request) - return - } - - const { body, method, path, host, upgrade, headers, blocking, 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 = util.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 (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false + function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === " ") { + baseIndent = " "; + } else if (typeof opts.indent === "number" && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), " "); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; } - - process.emitWarning(new RequestContentLengthMismatchError()) - } - - const socket = client[kSocket] - - try { - request.onConnect((err) => { - if (request.aborted || request.completed) { - return + function indentedJoin(xs, indent) { + if (xs.length === 0) { + return ""; } - - errorRequest(client, request, err || new RequestAbortedError()) - - util.destroy(socket, new InformationalError('aborted')) - }) - } catch (err) { - errorRequest(client, request, err) - } - - 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[kReset] = true - } - - if (upgrade || method === 'CONNECT') { - // On CONNECT or upgrade, block pipeline from dispatching further - // requests on this connection. - - socket[kReset] = true - } - - if (reset != null) { - socket[kReset] = reset - } - - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true - } - - if (blocking) { - socket[kBlocking] = true - } - - let header = `${method} ${path} HTTP/1.1\r\n` - - if (typeof host === 'string') { - header += `host: ${host}\r\n` - } else { - header += client[kHostHeader] - } - - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n` - } else if (client[kPipelining] && !socket[kReset]) { - header += 'connection: keep-alive\r\n' - } else { - header += 'connection: close\r\n' - } - - if (headers) { - header += headers - } - - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ request, headers: header, socket }) - } - - /* istanbul ignore else: assertion */ - if (!body || bodyLength === 0) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') - } else { - assert(contentLength === null, 'no body must not have content length') - socket.write(`${header}\r\n`, 'latin1') - } - request.onRequestSent() - } else if (util.isBuffer(body)) { - 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[kReset] = true - } - } else if (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) - } else { - writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) + var lineJoiner = "\n" + indent.prev + indent.base; + return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; } - } else if (util.isStream(body)) { - writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) - } else if (util.isIterable(body)) { - writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) - } else { - assert(false) - } - - return true -} - -function writeH2 (client, session, request) { - const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request - - let headers - if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) - else headers = reqHeaders - - if (upgrade) { - 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 + function arrObjKeys(obj, inspect2) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect2(obj[i], obj) : ""; + } } - - errorRequest(client, request, err || new RequestAbortedError()) - }) - } catch (err) { - errorRequest(client, request, err) - } - - if (request.aborted) { - return false - } - - /** @type {import('node:http2').ClientHttp2Stream} */ - let stream - const h2State = client[kHTTP2SessionState] - - headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] - headers[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 }) - - if (stream.id && !stream.pending) { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - } else { - stream.once('ready', () => { - request.onUpgrade(null, null, stream) - ++h2State.openStreams - }) + var syms = typeof gOPS === "function" ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap["$" + syms[k]] = syms[k]; + } + } + for (var key in obj) { + if (!has(obj, key)) { + continue; + } + if (isArr && String(Number(key)) === key && key < obj.length) { + continue; + } + if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { + continue; + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect2(key, obj) + ": " + inspect2(obj[key], obj)); + } else { + xs.push(key + ": " + inspect2(obj[key], obj)); + } + } + if (typeof gOPS === "function") { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push("[" + inspect2(syms[j]) + "]: " + inspect2(obj[syms[j]], obj)); + } + } + } + return xs; } - - 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[HTTP2_HEADER_PATH] = path - headers[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 = util.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 +// node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js +var require_side_channel = __commonJS({ + "node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var inspect2 = require_object_inspect(); + var $TypeError = require_type(); + var $WeakMap = GetIntrinsic("%WeakMap%", true); + var $Map = GetIntrinsic("%Map%", true); + var $weakMapGet = callBound("WeakMap.prototype.get", true); + var $weakMapSet = callBound("WeakMap.prototype.set", true); + var $weakMapHas = callBound("WeakMap.prototype.has", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSet = callBound("Map.prototype.set", true); + var $mapHas = callBound("Map.prototype.has", true); + var listGetNode = function(list, key) { + var prev = list; + var curr; + for (; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = /** @type {NonNullable} */ + list.next; + list.next = curr; + return curr; + } + } + }; + var listGet = function(objects, key) { + var node2 = listGetNode(objects, key); + return node2 && node2.value; + }; + var listSet = function(objects, key, value) { + var node2 = listGetNode(objects, key); + if (node2) { + node2.value = value; + } else { + objects.next = /** @type {import('.').ListNode} */ + { + // eslint-disable-line no-param-reassign, no-extra-parens + key, + next: objects.next, + value + }; + } + }; + var listHas = function(objects, key) { + return !!listGetNode(objects, key); + }; + module2.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + throw new $TypeError("Side channel does not contain " + inspect2(key)); + } + }, + get: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { + return listGet($o, key); + } + } + }, + has: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { + return listHas($o, key); + } + } + return false; + }, + set: function(key, value) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; + }; } +}); - // https://github.com/nodejs/undici/issues/2046 - // A user agent may send a Content-Length header with 0 value, this should be allowed. - if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { - if (client[kStrictContentLength]) { - errorRequest(client, request, new RequestContentLengthMismatchError()) - return false - } - - process.emitWarning(new RequestContentLengthMismatchError()) +// node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/formats.js +var require_formats = __commonJS({ + "node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/formats.js"(exports2, module2) { + "use strict"; + var replace = String.prototype.replace; + var percentTwenties = /%20/g; + var Format = { + RFC1738: "RFC1738", + RFC3986: "RFC3986" + }; + module2.exports = { + "default": Format.RFC3986, + formatters: { + RFC1738: function(value) { + return replace.call(value, percentTwenties, "+"); + }, + RFC3986: function(value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 + }; } +}); - if (contentLength != null) { - assert(body, 'no body must not have content length') - headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}` +// node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/utils.js +var require_utils4 = __commonJS({ + "node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/utils.js"(exports2, module2) { + "use strict"; + var formats = require_formats(); + var has = Object.prototype.hasOwnProperty; + var isArray = Array.isArray; + var hexTable = function() { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); + } + return array; + }(); + var compactQueue = function compactQueue2(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + if (isArray(obj)) { + var compacted = []; + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== "undefined") { + compacted.push(obj[j]); + } + } + item.obj[item.prop] = compacted; + } + } + }; + var arrayToObject = function arrayToObject2(source, options2) { + var obj = options2 && options2.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== "undefined") { + obj[i] = source[i]; + } + } + return obj; + }; + var merge3 = function merge4(target, source, options2) { + if (!source) { + return target; + } + if (typeof source !== "object") { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === "object") { + if (options2 && (options2.plainObjects || options2.allowPrototypes) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + return target; + } + if (!target || typeof target !== "object") { + return [target].concat(source); + } + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options2); + } + if (isArray(target) && isArray(source)) { + source.forEach(function(item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { + target[i] = merge4(targetItem, item, options2); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + return Object.keys(source).reduce(function(acc, key) { + var value = source[key]; + if (has.call(acc, key)) { + acc[key] = merge4(acc[key], value, options2); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); + }; + var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function(acc, key) { + acc[key] = source[key]; + return acc; + }, target); + }; + var decode = function(str2, decoder, charset) { + var strWithoutPlus = str2.replace(/\+/g, " "); + if (charset === "iso-8859-1") { + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } + }; + var limit = 1024; + var encode = function encode2(str2, defaultEncoder, charset, kind, format2) { + if (str2.length === 0) { + return str2; + } + var string = str2; + if (typeof str2 === "symbol") { + string = Symbol.prototype.toString.call(str2); + } else if (typeof str2 !== "string") { + string = String(str2); + } + if (charset === "iso-8859-1") { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { + return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; + }); + } + var out = ""; + for (var j = 0; j < string.length; j += limit) { + var segment = string.length >= limit ? string.slice(j, j + limit) : string; + var arr = []; + for (var i = 0; i < segment.length; ++i) { + var c = segment.charCodeAt(i); + if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format2 === formats.RFC1738 && (c === 40 || c === 41)) { + arr[arr.length] = segment.charAt(i); + continue; + } + if (c < 128) { + arr[arr.length] = hexTable[c]; + continue; + } + if (c < 2048) { + arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63]; + continue; + } + if (c < 55296 || c >= 57344) { + arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + continue; + } + i += 1; + c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023); + arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + } + out += arr.join(""); + } + return out; + }; + var compact = function compact2(value) { + var queue = [{ obj: { o: value }, prop: "o" }]; + var refs = []; + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj, prop: key }); + refs.push(val); + } + } + } + compactQueue(queue); + return value; + }; + var isRegExp2 = function isRegExp3(obj) { + return Object.prototype.toString.call(obj) === "[object RegExp]"; + }; + var isBuffer = function isBuffer2(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + }; + var combine = function combine2(a, b) { + return [].concat(a, b); + }; + var maybeMap = function maybeMap2(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); + }; + module2.exports = { + arrayToObject, + assign, + combine, + compact, + decode, + encode, + isBuffer, + isRegExp: isRegExp2, + maybeMap, + merge: merge3 + }; } +}); - session.ref() - - const shouldEndStream = method === 'GET' || method === 'HEAD' - if (expectContinue) { - headers[HTTP2_HEADER_EXPECT] = '100-continue' - stream = session.request(headers, { endStream: shouldEndStream, signal }) - - stream.once('continue', writeBodyH2) - } else { - stream = session.request(headers, { - endStream: shouldEndStream, - signal - }) - writeBodyH2() - } - - // Increment counter as we have new several streams open - ++h2State.openStreams - - stream.once('response', headers => { - const { [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[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.destroy(stream, err) - } - }) - - stream.once('frameError', (type, code) => { - const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) - errorRequest(client, request, err) - - if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { - h2State.streams -= 1 - util.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 (util.isBuffer(body)) { - 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 (util.isBlobLike(body)) { - if (typeof body.stream === 'function') { - writeIterable({ - client, - request, - contentLength, - h2stream: stream, - expectsPayload, - body: body.stream(), - socket: client[kSocket], - header: '' - }) +// node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/stringify.js +var require_stringify = __commonJS({ + "node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/stringify.js"(exports2, module2) { + "use strict"; + var getSideChannel = require_side_channel(); + var utils = require_utils4(); + var formats = require_formats(); + var has = Object.prototype.hasOwnProperty; + var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + "[]"; + }, + comma: "comma", + indices: function indices(prefix, key) { + return prefix + "[" + key + "]"; + }, + repeat: function repeat2(prefix) { + return prefix; + } + }; + var isArray = Array.isArray; + var push = Array.prototype.push; + var pushToArray = function(arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); + }; + var toISO = Date.prototype.toISOString; + var defaultFormat = formats["default"]; + var defaults = { + addQueryPrefix: false, + allowDots: false, + allowEmptyArrays: false, + arrayFormat: "indices", + charset: "utf-8", + charsetSentinel: false, + delimiter: "&", + encode: true, + encodeDotInKeys: false, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false + }; + var isNonNullishPrimitive = function isNonNullishPrimitive2(v) { + return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint"; + }; + var sentinel = {}; + var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format2, formatter, encodeValuesOnly, charset, sideChannel) { + var obj = object; + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) { + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== "undefined") { + if (pos === step) { + throw new RangeError("Cyclic object value"); + } else { + findFlag = true; + } + } + if (typeof tmpSc.get(sentinel) === "undefined") { + step = 0; + } + } + if (typeof filter === "function") { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === "comma" && isArray(obj)) { + obj = utils.maybeMap(obj, function(value2) { + if (value2 instanceof Date) { + return serializeDate(value2); + } + return value2; + }); + } + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format2) : prefix; + } + obj = ""; + } + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format2); + return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format2))]; + } + return [formatter(prefix) + "=" + formatter(String(obj))]; + } + var values = []; + if (typeof obj === "undefined") { + return values; + } + var objKeys; + if (generateArrayPrefix === "comma" && isArray(obj)) { + if (encodeValuesOnly && encoder) { + obj = utils.maybeMap(obj, encoder); + } + objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }]; + } else if (isArray(filter)) { + objKeys = filter; } else { - writeBlob({ - body, - client, - request, - contentLength, - expectsPayload, - h2stream: stream, - header: '', - socket: client[kSocket] - }) + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, "%2E") : prefix; + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix; + if (allowEmptyArrays && isArray(obj) && obj.length === 0) { + return adjustedPrefix + "[]"; + } + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key]; + if (skipNulls && value === null) { + continue; + } + var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, "%2E") : key; + var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify2( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + allowEmptyArrays, + strictNullHandling, + skipNulls, + encodeDotInKeys, + generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, + filter, + sort, + allowDots, + serializeDate, + format2, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + return values; + }; + var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) { + if (!opts) { + return defaults; + } + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { + throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + } + if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") { + throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided"); + } + if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") { + throw new TypeError("Encoder has to be a function."); + } + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { + throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + } + var format2 = formats["default"]; + if (typeof opts.format !== "undefined") { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError("Unknown format option provided."); + } + format2 = opts.format; + } + var formatter = formats.formatters[format2]; + var filter = defaults.filter; + if (typeof opts.filter === "function" || isArray(opts.filter)) { + filter = opts.filter; + } + var arrayFormat; + if (opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if ("indices" in opts) { + arrayFormat = opts.indices ? "indices" : "repeat"; + } else { + arrayFormat = defaults.arrayFormat; } - } else if (util.isStream(body)) { - writeStream({ - body, - client, - request, - contentLength, - expectsPayload, - socket: client[kSocket], - h2stream: stream, - header: '' - }) - } else if (util.isIterable(body)) { - writeIterable({ - body, - client, - request, - contentLength, - expectsPayload, - header: '', - h2stream: stream, - socket: client[kSocket] - }) - } else { - assert(false) - } - } -} - -function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') - - if (client[kHTTPConnVersion] === 'h2') { - // For HTTP/2, is enough to pipe the stream - const pipe = pipeline( - body, - h2stream, - (err) => { - if (err) { - util.destroy(body, err) - util.destroy(h2stream, err) + if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") { + throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); + } + var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + return { + addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + arrayFormat, + charset, + charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, + commaRoundTrip: opts.commaRoundTrip, + delimiter: typeof opts.delimiter === "undefined" ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === "boolean" ? opts.encode : defaults.encode, + encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults.encodeDotInKeys, + encoder: typeof opts.encoder === "function" ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter, + format: format2, + formatter, + serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === "function" ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling + }; + }; + module2.exports = function(object, opts) { + var obj = object; + var options2 = normalizeStringifyOptions(opts); + var objKeys; + var filter; + if (typeof options2.filter === "function") { + filter = options2.filter; + obj = filter("", obj); + } else if (isArray(options2.filter)) { + filter = options2.filter; + objKeys = filter; + } + var keys = []; + if (typeof obj !== "object" || obj === null) { + return ""; + } + var generateArrayPrefix = arrayPrefixGenerators[options2.arrayFormat]; + var commaRoundTrip = generateArrayPrefix === "comma" && options2.commaRoundTrip; + if (!objKeys) { + objKeys = Object.keys(obj); + } + if (options2.sort) { + objKeys.sort(options2.sort); + } + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + if (options2.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options2.allowEmptyArrays, + options2.strictNullHandling, + options2.skipNulls, + options2.encodeDotInKeys, + options2.encode ? options2.encoder : null, + options2.filter, + options2.sort, + options2.allowDots, + options2.serializeDate, + options2.format, + options2.formatter, + options2.encodeValuesOnly, + options2.charset, + sideChannel + )); + } + var joined = keys.join(options2.delimiter); + var prefix = options2.addQueryPrefix === true ? "?" : ""; + if (options2.charsetSentinel) { + if (options2.charset === "iso-8859-1") { + prefix += "utf8=%26%2310003%3B&"; } else { - request.onRequestSent() + prefix += "utf8=%E2%9C%93&"; } } - ) - - pipe.on('data', onPipeData) - pipe.once('end', () => { - pipe.removeListener('data', onPipeData) - util.destroy(pipe) - }) - - function onPipeData (chunk) { - request.onBodySent(chunk) - } - - return + return joined.length > 0 ? prefix + joined : ""; + }; } +}); - let finished = false - - const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) - - const onData = function (chunk) { - if (finished) { - return - } - - try { - if (!writer.write(chunk) && this.pause) { - this.pause() +// node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/parse.js +var require_parse2 = __commonJS({ + "node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/parse.js"(exports2, module2) { + "use strict"; + var utils = require_utils4(); + var has = Object.prototype.hasOwnProperty; + var isArray = Array.isArray; + var defaults = { + allowDots: false, + allowEmptyArrays: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: "utf-8", + charsetSentinel: false, + comma: false, + decodeDotInKeys: false, + decoder: utils.decode, + delimiter: "&", + depth: 5, + duplicates: "combine", + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1e3, + parseArrays: true, + plainObjects: false, + strictDepth: false, + strictNullHandling: false + }; + var interpretNumericEntities = function(str2) { + return str2.replace(/&#(\d+);/g, function($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); + }; + var parseArrayValue = function(val, options2) { + if (val && typeof val === "string" && options2.comma && val.indexOf(",") > -1) { + return val.split(","); } - } catch (err) { - util.destroy(this, err) - } - } - const onDrain = function () { - if (finished) { - return - } - - if (body.resume) { - body.resume() - } - } - const onAbort = function () { - if (finished) { - return - } - const err = new RequestAbortedError() - queueMicrotask(() => onFinished(err)) - } - const onFinished = function (err) { - if (finished) { - return - } - - finished = true - - assert(socket.destroyed || (socket[kWriting] && client[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 + return val; + }; + var isoSentinel = "utf8=%26%2310003%3B"; + var charsetSentinel = "utf8=%E2%9C%93"; + var parseValues = function parseQueryStringValues(str2, options2) { + var obj = { __proto__: null }; + var cleanStr = options2.ignoreQueryPrefix ? str2.replace(/^\?/, "") : str2; + cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); + var limit = options2.parameterLimit === Infinity ? void 0 : options2.parameterLimit; + var parts = cleanStr.split(options2.delimiter, limit); + var skipIndex = -1; + var i; + var charset = options2.charset; + if (options2.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf("utf8=") === 0) { + if (parts[i] === charsetSentinel) { + charset = "utf-8"; + } else if (parts[i] === isoSentinel) { + charset = "iso-8859-1"; + } + skipIndex = i; + i = parts.length; + } + } } - } - - writer.destroy(err) - - if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) { - util.destroy(body, err) - } else { - util.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) -} - -async function writeBlob ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength === body.size, 'blob body must have content length') - - const isH2 = client[kHTTPConnVersion] === 'h2' - try { - if (contentLength != null && contentLength !== body.size) { - throw new 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[kReset] = true - } - - resume(client) - } catch (err) { - util.destroy(isH2 ? h2stream : socket, err) - } -} - -async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { - assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined') - - let callback = null - function onDrain () { - if (callback) { - const cb = callback - callback = null - cb() - } - } - - const waitForDrain = () => new Promise((resolve, reject) => { - assert(callback === null) - - if (socket[kError]) { - reject(socket[kError]) - } else { - callback = resolve - } - }) - - if (client[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[kError]) { - throw socket[kError] + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; } - - const res = h2stream.write(chunk) - request.onBodySent(chunk) - if (!res) { - await waitForDrain() + var part = parts[i]; + var bracketEqualsPos = part.indexOf("]="); + var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; + var key, val; + if (pos === -1) { + key = options2.decoder(part, defaults.decoder, charset, "key"); + val = options2.strictNullHandling ? null : ""; + } else { + key = options2.decoder(part.slice(0, pos), defaults.decoder, charset, "key"); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options2), + function(encodedVal) { + return options2.decoder(encodedVal, defaults.decoder, charset, "value"); + } + ); + } + if (val && options2.interpretNumericEntities && charset === "iso-8859-1") { + val = interpretNumericEntities(val); + } + if (part.indexOf("[]=") > -1) { + val = isArray(val) ? [val] : val; + } + var existing = has.call(obj, key); + if (existing && options2.duplicates === "combine") { + obj[key] = utils.combine(obj[key], val); + } else if (!existing || options2.duplicates === "last") { + obj[key] = val; } } - } 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 AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) - try { - // It's up to the user to somehow abort the async iterable. - for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError] + return obj; + }; + var parseObject = function(chain, val, options2, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options2); + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + if (root === "[]" && options2.parseArrays) { + obj = options2.allowEmptyArrays && (leaf === "" || options2.strictNullHandling && leaf === null) ? [] : [].concat(leaf); + } else { + obj = options2.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; + var decodedRoot = options2.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot; + var index = parseInt(decodedRoot, 10); + if (!options2.parseArrays && decodedRoot === "") { + obj = { 0: leaf }; + } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options2.parseArrays && index <= options2.arrayLimit)) { + obj = []; + obj[index] = leaf; + } else if (decodedRoot !== "__proto__") { + obj[decodedRoot] = leaf; + } + } + leaf = obj; } - - if (!writer.write(chunk)) { - await waitForDrain() + return leaf; + }; + var parseKeys = function parseQueryStringKeys(givenKey, val, options2, valuesParsed) { + if (!givenKey) { + return; } - } - - writer.end() - } catch (err) { - writer.destroy(err) - } finally { - socket - .off('close', onDrain) - .off('drain', onDrain) + var key = options2.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey; + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + var segment = options2.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + var keys = []; + if (parent) { + if (!options2.plainObjects && has.call(Object.prototype, parent)) { + if (!options2.allowPrototypes) { + return; + } + } + keys.push(parent); + } + var i = 0; + while (options2.depth > 0 && (segment = child.exec(key)) !== null && i < options2.depth) { + i += 1; + if (!options2.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options2.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + if (segment) { + if (options2.strictDepth === true) { + throw new RangeError("Input depth exceeded depth option of " + options2.depth + " and strictDepth is true"); + } + keys.push("[" + key.slice(segment.index) + "]"); + } + return parseObject(keys, val, options2, valuesParsed); + }; + var normalizeParseOptions = function normalizeParseOptions2(opts) { + if (!opts) { + return defaults; + } + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { + throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + } + if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") { + throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided"); + } + if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") { + throw new TypeError("Decoder has to be a function."); + } + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { + throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + } + var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset; + var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates; + if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") { + throw new TypeError("The duplicates option must be either combine, first, or last"); + } + var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + return { + allowDots, + allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, + allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit, + charset, + charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma, + decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys, + decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth, + duplicates, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects, + strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth, + strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling + }; + }; + module2.exports = function(str2, opts) { + var options2 = normalizeParseOptions(opts); + if (str2 === "" || str2 === null || typeof str2 === "undefined") { + return options2.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + } + var tempObj = typeof str2 === "string" ? parseValues(str2, options2) : str2; + var obj = options2.plainObjects ? /* @__PURE__ */ Object.create(null) : {}; + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options2, typeof str2 === "string"); + obj = utils.merge(obj, newObj, options2); + } + if (options2.allowSparse === true) { + return obj; + } + return utils.compact(obj); + }; } -} - -class AsyncWriter { - constructor ({ socket, request, contentLength, client, expectsPayload, header }) { - this.socket = socket - this.request = request - this.contentLength = contentLength - this.client = client - this.bytesWritten = 0 - this.expectsPayload = expectsPayload - this.header = header +}); - socket[kWriting] = true +// node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/index.js +var require_lib5 = __commonJS({ + "node_modules/.pnpm/qs@6.13.0/node_modules/qs/lib/index.js"(exports2, module2) { + "use strict"; + var stringify = require_stringify(); + var parse2 = require_parse2(); + var formats = require_formats(); + module2.exports = { + formats, + parse: parse2, + stringify + }; } +}); - write (chunk) { - const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this - - if (socket[kError]) { - throw socket[kError] +// node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/urlencoded.js +var require_urlencoded = __commonJS({ + "node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/lib/types/urlencoded.js"(exports2, module2) { + "use strict"; + var bytes = require_bytes(); + var contentType = require_content_type(); + var createError = require_http_errors(); + var debug3 = require_src2()("body-parser:urlencoded"); + var deprecate = require_depd()("body-parser"); + var read = require_read(); + var typeis = require_type_is(); + module2.exports = urlencoded; + var parsers = /* @__PURE__ */ Object.create(null); + function urlencoded(options2) { + var opts = options2 || {}; + if (opts.extended === void 0) { + deprecate("undefined extended: provide extended option"); + } + var extended = opts.extended !== false; + var inflate = opts.inflate !== false; + var limit = typeof opts.limit !== "number" ? bytes.parse(opts.limit || "100kb") : opts.limit; + var type2 = opts.type || "application/x-www-form-urlencoded"; + var verify2 = opts.verify || false; + var depth = typeof opts.depth !== "number" ? Number(opts.depth || 32) : opts.depth; + if (verify2 !== false && typeof verify2 !== "function") { + throw new TypeError("option verify must be function"); + } + var queryparse = extended ? extendedparser(opts) : simpleparser(opts); + var shouldParse = typeof type2 !== "function" ? typeChecker(type2) : type2; + function parse2(body) { + return body.length ? queryparse(body) : {}; + } + return function urlencodedParser(req, res, next) { + if (req._body) { + debug3("body already parsed"); + next(); + return; + } + req.body = req.body || {}; + if (!typeis.hasBody(req)) { + debug3("skip empty body"); + next(); + return; + } + debug3("content-type %j", req.headers["content-type"]); + if (!shouldParse(req)) { + debug3("skip parsing"); + next(); + return; + } + var charset = getCharset(req) || "utf-8"; + if (charset !== "utf-8") { + debug3("invalid charset"); + next(createError(415, 'unsupported charset "' + charset.toUpperCase() + '"', { + charset, + type: "charset.unsupported" + })); + return; + } + read(req, res, next, parse2, debug3, { + debug: debug3, + encoding: charset, + inflate, + limit, + verify: verify2, + depth + }); + }; } - - if (socket.destroyed) { - return false + function extendedparser(options2) { + var parameterLimit = options2.parameterLimit !== void 0 ? options2.parameterLimit : 1e3; + var depth = typeof options2.depth !== "number" ? Number(options2.depth || 32) : options2.depth; + var parse2 = parser2("qs"); + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError("option parameterLimit must be a positive number"); + } + if (isNaN(depth) || depth < 0) { + throw new TypeError("option depth must be a zero or a positive number"); + } + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0; + } + return function queryparse(body) { + var paramCount = parameterCount(body, parameterLimit); + if (paramCount === void 0) { + debug3("too many parameters"); + throw createError(413, "too many parameters", { + type: "parameters.too.many" + }); + } + var arrayLimit = Math.max(100, paramCount); + debug3("parse extended urlencoding"); + try { + return parse2(body, { + allowPrototypes: true, + arrayLimit, + depth, + strictDepth: true, + parameterLimit + }); + } catch (err) { + if (err instanceof RangeError) { + throw createError(400, "The input exceeded the depth", { + type: "querystring.parse.rangeError" + }); + } else { + throw err; + } + } + }; } - - const len = Buffer.byteLength(chunk) - if (!len) { - return true + function getCharset(req) { + try { + return (contentType.parse(req).parameters.charset || "").toLowerCase(); + } catch (e) { + return void 0; + } } - - // We should defer writing chunks. - if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() + function parameterCount(body, limit) { + var count = 0; + var index = 0; + while ((index = body.indexOf("&", index)) !== -1) { + count++; + index++; + if (count === limit) { + return void 0; + } } - - process.emitWarning(new RequestContentLengthMismatchError()) + return count; } - - socket.cork() - - if (bytesWritten === 0) { - if (!expectsPayload) { - socket[kReset] = true + function parser2(name) { + var mod = parsers[name]; + if (mod !== void 0) { + return mod.parse; } - - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1') - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1') + switch (name) { + case "qs": + mod = require_lib5(); + break; + case "querystring": + mod = __require("querystring"); + break; } + parsers[name] = mod; + return mod.parse; } - - 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[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() - } + function simpleparser(options2) { + var parameterLimit = options2.parameterLimit !== void 0 ? options2.parameterLimit : 1e3; + var parse2 = parser2("querystring"); + if (isNaN(parameterLimit) || parameterLimit < 1) { + throw new TypeError("option parameterLimit must be a positive number"); + } + if (isFinite(parameterLimit)) { + parameterLimit = parameterLimit | 0; } + return function queryparse(body) { + var paramCount = parameterCount(body, parameterLimit); + if (paramCount === void 0) { + debug3("too many parameters"); + throw createError(413, "too many parameters", { + type: "parameters.too.many" + }); + } + debug3("parse urlencoding"); + return parse2(body, void 0, void 0, { maxKeys: parameterLimit }); + }; } - - return ret - } - - end () { - const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this - request.onRequestSent() - - socket[kWriting] = false - - if (socket[kError]) { - throw socket[kError] + function typeChecker(type2) { + return function checkType(req) { + return Boolean(typeis(req, type2)); + }; } + } +}); - if (socket.destroyed) { - return +// node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/index.js +var require_body_parser = __commonJS({ + "node_modules/.pnpm/body-parser@1.20.3/node_modules/body-parser/index.js"(exports2, module2) { + "use strict"; + var deprecate = require_depd()("body-parser"); + var parsers = /* @__PURE__ */ Object.create(null); + exports2 = module2.exports = deprecate.function( + bodyParser, + "bodyParser: use individual json/urlencoded middlewares" + ); + Object.defineProperty(exports2, "json", { + configurable: true, + enumerable: true, + get: createParserGetter("json") + }); + Object.defineProperty(exports2, "raw", { + configurable: true, + enumerable: true, + get: createParserGetter("raw") + }); + Object.defineProperty(exports2, "text", { + configurable: true, + enumerable: true, + get: createParserGetter("text") + }); + Object.defineProperty(exports2, "urlencoded", { + configurable: true, + enumerable: true, + get: createParserGetter("urlencoded") + }); + function bodyParser(options2) { + var opts = Object.create(options2 || null, { + type: { + configurable: true, + enumerable: true, + value: void 0, + writable: true + } + }); + var _urlencoded = exports2.urlencoded(opts); + var _json = exports2.json(opts); + return function bodyParser2(req, res, next) { + _json(req, res, function(err) { + if (err) return next(err); + _urlencoded(req, res, next); + }); + }; } - - 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') + function createParserGetter(name) { + return function get() { + return loadParser(name); + }; } - - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError() - } else { - process.emitWarning(new RequestContentLengthMismatchError()) + function loadParser(parserName) { + var parser2 = parsers[parserName]; + if (parser2 !== void 0) { + return parser2; } - } - - if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - // istanbul ignore else: only for jest - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh() + switch (parserName) { + case "json": + parser2 = require_json(); + break; + case "raw": + parser2 = require_raw(); + break; + case "text": + parser2 = require_text(); + break; + case "urlencoded": + parser2 = require_urlencoded(); + break; } + return parsers[parserName] = parser2; } - - resume(client) - } - - destroy (err) { - const { socket, client } = this - - socket[kWriting] = false - - if (err) { - assert(client[kRunning] <= 1, 'pipeline should only contain this request') - util.destroy(socket, err) - } - } -} - -function errorRequest (client, request, err) { - try { - request.onError(err) - assert(request.aborted) - } catch (err) { - client.emit('error', err) - } -} - -module.exports = Client - - -/***/ }), - -/***/ 60547: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* istanbul ignore file: only for Node 12 */ - -const { kConnected, kSize } = __nccwpck_require__(34856) - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer } +}); - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) +// node_modules/.pnpm/merge-descriptors@1.0.3/node_modules/merge-descriptors/index.js +var require_merge_descriptors = __commonJS({ + "node_modules/.pnpm/merge-descriptors@1.0.3/node_modules/merge-descriptors/index.js"(exports2, module2) { + "use strict"; + module2.exports = merge3; + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + function merge3(dest, src, redefine) { + if (!dest) { + throw new TypeError("argument dest is required"); + } + if (!src) { + throw new TypeError("argument src is required"); + } + if (redefine === void 0) { + redefine = true; + } + Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) { + if (!redefine && hasOwnProperty2.call(dest, name)) { + return; } - }) + var descriptor = Object.getOwnPropertyDescriptor(src, name); + Object.defineProperty(dest, name, descriptor); + }); + return dest; } } -} +}); -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: CompatWeakRef, - FinalizationRegistry: CompatFinalizer +// node_modules/.pnpm/encodeurl@2.0.0/node_modules/encodeurl/index.js +var require_encodeurl = __commonJS({ + "node_modules/.pnpm/encodeurl@2.0.0/node_modules/encodeurl/index.js"(exports2, module2) { + "use strict"; + module2.exports = encodeUrl; + var ENCODE_CHARS_REGEXP = /(?:[^\x21\x23-\x3B\x3D\x3F-\x5F\x61-\x7A\x7C\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g; + var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g; + var UNMATCHED_SURROGATE_PAIR_REPLACE = "$1\uFFFD$2"; + function encodeUrl(url) { + return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI); } } - return { - WeakRef: global.WeakRef || CompatWeakRef, - FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer - } -} - - -/***/ }), - -/***/ 30516: -/***/ ((module) => { - -"use strict"; - - -// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size -const maxAttributeValueSize = 1024 - -// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size -const maxNameValuePairSize = 4096 - -module.exports = { - maxAttributeValueSize, - maxNameValuePairSize -} - - -/***/ }), - -/***/ 88829: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { parseSetCookie } = __nccwpck_require__(27042) -const { stringify, getHeadersList } = __nccwpck_require__(13325) -const { webidl } = __nccwpck_require__(29) -const { Headers } = __nccwpck_require__(72908) - -/** - * @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 getCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getCookies' }) - - webidl.brandCheck(headers, 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 deleteCookie (headers, name, attributes) { - webidl.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) - - webidl.brandCheck(headers, Headers, { strict: false }) - - name = webidl.converters.DOMString(name) - attributes = webidl.converters.DeleteCookieAttributes(attributes) - - // Matches behavior of - // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 - setCookie(headers, { - name, - value: '', - expires: new Date(0), - ...attributes - }) -} - -/** - * @param {Headers} headers - * @returns {Cookie[]} - */ -function getSetCookies (headers) { - webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) - - webidl.brandCheck(headers, Headers, { strict: false }) - - const cookies = getHeadersList(headers).cookies - - if (!cookies) { - return [] - } - - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) -} - -/** - * @param {Headers} headers - * @param {Cookie} cookie - * @returns {void} - */ -function setCookie (headers, cookie) { - webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) - - webidl.brandCheck(headers, Headers, { strict: false }) - - cookie = webidl.converters.Cookie(cookie) - - const str = stringify(cookie) - - if (str) { - headers.append('Set-Cookie', stringify(cookie)) - } -} - -webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null - } -]) +}); -webidl.converters.Cookie = webidl.dictionaryConverter([ - { - converter: webidl.converters.DOMString, - key: 'name' - }, - { - converter: webidl.converters.DOMString, - key: 'value' - }, - { - converter: webidl.nullableConverter((value) => { - if (typeof value === 'number') { - return webidl.converters['unsigned long long'](value) +// node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js +var require_escape_html = __commonJS({ + "node_modules/.pnpm/escape-html@1.0.3/node_modules/escape-html/index.js"(exports2, module2) { + "use strict"; + var matchHtmlRegExp = /["'&<>]/; + module2.exports = escapeHtml; + function escapeHtml(string) { + var str2 = "" + string; + var match = matchHtmlRegExp.exec(str2); + if (!match) { + return str2; + } + var escape2; + var html = ""; + var index = 0; + var lastIndex = 0; + for (index = match.index; index < str2.length; index++) { + switch (str2.charCodeAt(index)) { + case 34: + escape2 = """; + break; + case 38: + escape2 = "&"; + break; + case 39: + escape2 = "'"; + break; + case 60: + escape2 = "<"; + break; + case 62: + escape2 = ">"; + break; + default: + continue; + } + if (lastIndex !== index) { + html += str2.substring(lastIndex, index); + } + lastIndex = index + 1; + html += escape2; } - - return new Date(value) - }), - key: 'expires', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters['long long']), - key: 'maxAge', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'domain', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.DOMString), - key: 'path', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'secure', - defaultValue: null - }, - { - converter: webidl.nullableConverter(webidl.converters.boolean), - key: 'httpOnly', - defaultValue: null - }, - { - converter: webidl.converters.USVString, - key: 'sameSite', - allowedValues: ['Strict', 'Lax', 'None'] - }, - { - converter: webidl.sequenceConverter(webidl.converters.DOMString), - key: 'unparsed', - defaultValue: [] - } -]) - -module.exports = { - getCookies, - deleteCookie, - getSetCookies, - setCookie -} - - -/***/ }), - -/***/ 27042: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(30516) -const { isCTLExcludingHtab } = __nccwpck_require__(13325) -const { collectASequenceOfCodePointsFast } = __nccwpck_require__(43911) -const assert = __nccwpck_require__(42613) - -/** - * @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 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 (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 = 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 = collectASequenceOfCodePointsFast( - '=', - nameValuePair, - position - ) - value = nameValuePair.slice(position.position + 1) - } - - // 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 > maxNameValuePairSize) { - return null - } - - // 6. The cookie-name is the name string, and the cookie-value is the - // value string. - return { - name, value, ...parseUnparsedAttributes(unparsedAttributes) - } -} - -/** - * 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 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). - 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 = collectASequenceOfCodePointsFast( - ';', - unparsedAttributes, - { position: 0 } - ) - 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 = 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 > maxAttributeValueSize) { - return 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 parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) - } - - // 2. If the remainder of attribute-value contains a non-DIGIT - // character, ignore the cookie-av. - if (!/^\d+$/.test(attributeValue)) { - return 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' + return lastIndex !== index ? html + str2.substring(lastIndex, index) : html; } - - // 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}`) - } - - // 8. Return to Step 1 of this algorithm. - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) -} - -module.exports = { - parseSetCookie, - parseUnparsedAttributes -} - - -/***/ }), - -/***/ 13325: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(42613) -const { kHeadersList } = __nccwpck_require__(34856) - -function 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 +// node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js +var require_parseurl = __commonJS({ + "node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js"(exports2, module2) { + "use strict"; + var url = __require("url"); + var parse2 = url.parse; + var Url = url.Url; + module2.exports = parseurl; + module2.exports.original = originalurl; + function parseurl(req) { + var url2 = req.url; + if (url2 === void 0) { + return void 0; + } + var parsed = req._parsedUrl; + if (fresh(url2, parsed)) { + return parsed; + } + parsed = fastparse(url2); + parsed._raw = url2; + return req._parsedUrl = parsed; } - } -} - -/** - CHAR = - token = 1* - separators = "(" | ")" | "<" | ">" | "@" - | "," | ";" | ":" | "\" | <"> - | "/" | "[" | "]" | "?" | "=" - | "{" | "}" | SP | HT - * @param {string} name - */ -function 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') - } - } -} - -/** - 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 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') - } - } -} - -/** - * path-value = - * @param {string} path - */ -function validateCookiePath (path) { - for (const char of path) { - const code = char.charCodeAt(0) - - if (code < 0x21 || char === ';') { - throw new Error('Invalid cookie path') - } - } -} - -/** - * I have no idea why these values aren't allowed to be honest, - * but Deno tests these. - Khafra - * @param {string} domain - */ -function 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] - - 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 - - GMT = %x47.4D.54 ; "GMT", case-sensitive - - time-of-day = hour ":" minute ":" second - ; 00:00:00 - 23:59:60 (leap second) - - hour = 2DIGIT - minute = 2DIGIT - second = 2DIGIT - */ -function 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 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 stringify (cookie) { - if (cookie.name.length === 0) { - return null - } - - validateCookieName(cookie.name) - 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 = '/' - } - - if (cookie.secure) { - out.push('Secure') - } - - if (cookie.httpOnly) { - out.push('HttpOnly') - } - - if (typeof cookie.maxAge === 'number') { - validateCookieMaxAge(cookie.maxAge) - out.push(`Max-Age=${cookie.maxAge}`) - } - - if (cookie.domain) { - validateCookieDomain(cookie.domain) - out.push(`Domain=${cookie.domain}`) - } - - if (cookie.path) { - validateCookiePath(cookie.path) - out.push(`Path=${cookie.path}`) - } - - if (cookie.expires && cookie.expires.toString() !== 'Invalid Date') { - out.push(`Expires=${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') + function originalurl(req) { + var url2 = req.originalUrl; + if (typeof url2 !== "string") { + return parseurl(req); + } + var parsed = req._parsedOriginalUrl; + if (fresh(url2, parsed)) { + return parsed; + } + parsed = fastparse(url2); + parsed._raw = url2; + return req._parsedOriginalUrl = parsed; + } + function fastparse(str2) { + if (typeof str2 !== "string" || str2.charCodeAt(0) !== 47) { + return parse2(str2); + } + var pathname = str2; + var query = null; + var search = null; + for (var i = 1; i < str2.length; i++) { + switch (str2.charCodeAt(i)) { + case 63: + if (search === null) { + pathname = str2.substring(0, i); + query = str2.substring(i + 1); + search = str2.substring(i); + } + break; + case 9: + /* \t */ + case 10: + /* \n */ + case 12: + /* \f */ + case 13: + /* \r */ + case 32: + /* */ + case 35: + /* # */ + case 160: + case 65279: + return parse2(str2); + } + } + var url2 = Url !== void 0 ? new Url() : {}; + url2.path = str2; + url2.href = str2; + url2.pathname = pathname; + if (search !== null) { + url2.query = query; + url2.search = search; + } + return url2; + } + function fresh(url2, parsedUrl) { + return typeof parsedUrl === "object" && parsedUrl !== null && (Url === void 0 || parsedUrl instanceof Url) && parsedUrl._raw === url2; } - - const [key, ...value] = part.split('=') - - out.push(`${key.trim()}=${value.join('=')}`) - } - - return out.join('; ') -} - -let kHeadersListNode - -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] - } - - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) - - assert(kHeadersListNode, 'Headers cannot be parsed') } +}); - const headersList = headers[kHeadersListNode] - assert(headersList) - - return headersList -} - -module.exports = { - isCTLExcludingHtab, - stringify, - getHeadersList -} - - -/***/ }), - -/***/ 2559: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const net = __nccwpck_require__(69278) -const assert = __nccwpck_require__(42613) -const util = __nccwpck_require__(33465) -const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(33862) - -let 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 SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return +// node_modules/.pnpm/finalhandler@1.3.1/node_modules/finalhandler/index.js +var require_finalhandler = __commonJS({ + "node_modules/.pnpm/finalhandler@1.3.1/node_modules/finalhandler/index.js"(exports2, module2) { + "use strict"; + var debug3 = require_src2()("finalhandler"); + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var onFinished = require_on_finished(); + var parseUrl4 = require_parseurl(); + var statuses = require_statuses(); + var unpipe = require_unpipe(); + var DOUBLE_SPACE_REGEXP = /\x20{2}/g; + var NEWLINE_REGEXP = /\n/g; + var defer = typeof setImmediate === "function" ? setImmediate : function(fn) { + process.nextTick(fn.bind.apply(fn, arguments)); + }; + var isFinished = onFinished.isFinished; + function createHtmlDocument(message) { + var body = escapeHtml(message).replace(NEWLINE_REGEXP, "
").replace(DOUBLE_SPACE_REGEXP, "  "); + return '\n\n\n\nError\n\n\n
' + body + "
\n\n\n"; + } + module2.exports = finalhandler; + function finalhandler(req, res, options2) { + var opts = options2 || {}; + var env = opts.env || process.env.NODE_ENV || "development"; + var onerror = opts.onerror; + return function(err) { + var headers; + var msg; + var status; + if (!err && headersSent(res)) { + debug3("cannot 404 after headers sent"); + return; } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) + if (err) { + status = getErrorStatusCode(err); + if (status === void 0) { + status = getResponseStatusCode(res); + } else { + headers = getErrorHeaders(err); + } + msg = getErrorMessage(err, status, env); + } else { + status = 404; + msg = "Cannot " + req.method + " " + encodeUrl(getResourceName(req)); + } + debug3("default %s", status); + if (err && onerror) { + defer(onerror, err, req, res); + } + if (headersSent(res)) { + debug3("cannot %d after headers sent", status); + if (req.socket) { + req.socket.destroy(); + } + return; } - }) + send(req, res, status, headers, msg); + }; } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null + function getErrorHeaders(err) { + if (!err.headers || typeof err.headers !== "object") { + return void 0; + } + var headers = /* @__PURE__ */ Object.create(null); + var keys = Object.keys(err.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + headers[key] = err.headers[key]; + } + return headers; } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return + function getErrorMessage(err, status, env) { + var msg; + if (env !== "production") { + msg = err.stack; + if (!msg && typeof err.toString === "function") { + msg = err.toString(); + } } - - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) + return msg || statuses.message[status]; } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() + function getErrorStatusCode(err) { + if (typeof err.status === "number" && err.status >= 400 && err.status < 600) { + return err.status; + } + if (typeof err.statusCode === "number" && err.statusCode >= 400 && err.statusCode < 600) { + return err.statusCode; + } + return void 0; } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) + function getResourceName(req) { + try { + return parseUrl4.original(req).pathname; + } catch (e) { + return "resource"; + } + } + function getResponseStatusCode(res) { + var status = res.statusCode; + if (typeof status !== "number" || status < 400 || status > 599) { + status = 500; + } + return status; + } + function headersSent(res) { + return typeof res.headersSent !== "boolean" ? Boolean(res._header) : res.headersSent; + } + function send(req, res, status, headers, message) { + function write() { + var body = createHtmlDocument(message); + res.statusCode = status; + if (req.httpVersionMajor < 2) { + res.statusMessage = statuses.message[status]; + } + res.removeHeader("Content-Encoding"); + res.removeHeader("Content-Language"); + res.removeHeader("Content-Range"); + setHeaders(res, headers); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Content-Type", "text/html; charset=utf-8"); + res.setHeader("Content-Length", Buffer.byteLength(body, "utf8")); + if (req.method === "HEAD") { + res.end(); + return; + } + res.end(body, "utf8"); + } + if (isFinished(req)) { + write(); + return; + } + unpipe(req); + onFinished(req, write); + req.resume(); } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return + function setHeaders(res, headers) { + if (!headers) { + return; } - - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) + var keys = Object.keys(headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + res.setHeader(key, headers[key]); } - - this._sessionCache.set(sessionKey, session) } } -} - -function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError('maxCachedSessions must be a positive integer or zero') - } +}); - const options = { path: socketPath, ...opts } - const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions) - timeout = timeout == null ? 10e3 : timeout - allowH2 = allowH2 != null ? allowH2 : false - return function connect ({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { - let socket - if (protocol === 'https:') { - if (!tls) { - tls = __nccwpck_require__(64756) +// node_modules/.pnpm/array-flatten@1.1.1/node_modules/array-flatten/array-flatten.js +var require_array_flatten = __commonJS({ + "node_modules/.pnpm/array-flatten@1.1.1/node_modules/array-flatten/array-flatten.js"(exports2, module2) { + "use strict"; + module2.exports = arrayFlatten; + function flattenWithDepth(array, result, depth) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (depth > 0 && Array.isArray(value)) { + flattenWithDepth(value, result, depth - 1); + } else { + result.push(value); + } } - servername = servername || options.servername || util.getServerName(host) || null - - const sessionKey = servername || hostname - const session = sessionCache.get(sessionKey) || null - - assert(sessionKey) - - socket = tls.connect({ - highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... - ...options, - servername, - session, - localAddress, - // TODO(HTTP/2): Add support for h2c - ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], - socket: httpSocket, // upgrade socket connection - 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) - }) - } else { - assert(!httpSocket, 'httpSocket can only be sent on TLS update') - socket = net.connect({ - highWaterMark: 64 * 1024, // Same as nodejs fs streams. - ...options, - localAddress, - port: port || 80, - host: hostname - }) + return result; } - - // 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) + function flattenForever(array, result) { + for (var i = 0; i < array.length; i++) { + var value = array[i]; + if (Array.isArray(value)) { + flattenForever(value, result); + } else { + result.push(value); + } + } + return result; } + function arrayFlatten(array, depth) { + if (depth == null) { + return flattenForever(array, []); + } + return flattenWithDepth(array, [], depth); + } + } +}); - const cancelTimeout = setupTimeout(() => onConnectTimeout(socket), timeout) - - socket - .setNoDelay(true) - .once(protocol === 'https:' ? 'secureConnect' : 'connect', function () { - cancelTimeout() - - if (callback) { - const cb = callback - callback = null - cb(null, this) +// node_modules/.pnpm/path-to-regexp@0.1.10/node_modules/path-to-regexp/index.js +var require_path_to_regexp = __commonJS({ + "node_modules/.pnpm/path-to-regexp@0.1.10/node_modules/path-to-regexp/index.js"(exports2, module2) { + module2.exports = pathToRegexp; + var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g; + function pathToRegexp(path2, keys, options2) { + options2 = options2 || {}; + keys = keys || []; + var strict = options2.strict; + var end2 = options2.end !== false; + var flags = options2.sensitive ? "" : "i"; + var lookahead = options2.lookahead !== false; + var extraOffset = 0; + var keysOffset = keys.length; + var i = 0; + var name = 0; + var pos = 0; + var backtrack = ""; + var m; + if (path2 instanceof RegExp) { + while (m = MATCHING_GROUP_REGEXP.exec(path2.source)) { + if (m[0][0] === "\\") continue; + keys.push({ + name: m[1] || name++, + optional: false, + offset: m.index + }); } - }) - .on('error', function (err) { - cancelTimeout() - - if (callback) { - const cb = callback - callback = null - cb(err) + return path2; + } + if (Array.isArray(path2)) { + path2 = path2.map(function(value) { + return pathToRegexp(value, keys, options2).source; + }); + return new RegExp(path2.join("|"), flags); + } + path2 = path2.replace( + /\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g, + function(match, slash, format2, key, capture, star, optional, offset) { + pos = offset + match.length; + if (match[0] === "\\") { + backtrack += match; + return match; + } + if (match === ".") { + backtrack += "\\."; + extraOffset += 1; + return "\\."; + } + backtrack = slash || format2 ? "" : path2.slice(pos, offset); + if (match === "*") { + extraOffset += 3; + return "(.*)"; + } + if (match === "/(") { + backtrack += "/"; + extraOffset += 2; + return "/(?:"; + } + slash = slash || ""; + format2 = format2 ? "\\." : ""; + optional = optional || ""; + capture = capture ? capture.replace(/\\.|\*/, function(m2) { + return m2 === "*" ? "(.*)" : m2; + }) : backtrack ? "((?:(?!/|" + backtrack + ").)+?)" : "([^/" + format2 + "]+?)"; + keys.push({ + name: key, + optional: !!optional, + offset: offset + extraOffset + }); + var result = "(?:" + format2 + slash + capture + (star ? "((?:[/" + format2 + "].+?)?)" : "") + ")" + optional; + extraOffset += result.length - match.length; + return result; } - }) - - return socket - } -} - -function 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() + ); + while (m = MATCHING_GROUP_REGEXP.exec(path2)) { + if (m[0][0] === "\\") continue; + if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) { + keys.splice(keysOffset + i, 0, { + name: name++, + // Unnamed matching groups must be consistently linear. + optional: false, + offset: m.index + }); + } + i++; } - }) - }, timeout) - return () => { - clearTimeout(timeoutId) - clearImmediate(s1) - clearImmediate(s2) - } -} - -function onConnectTimeout (socket) { - util.destroy(socket, new ConnectTimeoutError()) -} - -module.exports = buildConnector - - -/***/ }), - -/***/ 48088: -/***/ ((module) => { - -"use strict"; - - -/** @type {Record} */ -const headerNameLowerCasedRecord = {} - -// https://developer.mozilla.org/docs/Web/HTTP/Headers -const 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 < wellknownHeaderNames.length; ++i) { - const key = wellknownHeaderNames[i] - const lowerCasedKey = key.toLowerCase() - headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = - lowerCasedKey -} - -// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. -Object.setPrototypeOf(headerNameLowerCasedRecord, null) - -module.exports = { - wellknownHeaderNames, - headerNameLowerCasedRecord -} - - -/***/ }), - -/***/ 33862: -/***/ ((module) => { - -"use strict"; - - -class UndiciError extends Error { - constructor (message) { - super(message) - this.name = 'UndiciError' - this.code = 'UND_ERR' - } -} - -class ConnectTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ConnectTimeoutError) - this.name = 'ConnectTimeoutError' - this.message = message || 'Connect Timeout Error' - this.code = 'UND_ERR_CONNECT_TIMEOUT' - } -} - -class HeadersTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersTimeoutError) - this.name = 'HeadersTimeoutError' - this.message = message || 'Headers Timeout Error' - this.code = 'UND_ERR_HEADERS_TIMEOUT' - } -} - -class HeadersOverflowError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, HeadersOverflowError) - this.name = 'HeadersOverflowError' - this.message = message || 'Headers Overflow Error' - this.code = 'UND_ERR_HEADERS_OVERFLOW' - } -} - -class BodyTimeoutError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, BodyTimeoutError) - this.name = 'BodyTimeoutError' - this.message = message || 'Body Timeout Error' - this.code = 'UND_ERR_BODY_TIMEOUT' + path2 += strict ? "" : path2[path2.length - 1] === "/" ? "?" : "/?"; + if (end2) { + path2 += "$"; + } else if (path2[path2.length - 1] !== "/") { + path2 += lookahead ? "(?=/|$)" : "(?:/|$)"; + } + return new RegExp("^" + path2, flags); + } } -} +}); -class ResponseStatusCodeError extends UndiciError { - constructor (message, statusCode, headers, body) { - super(message) - Error.captureStackTrace(this, 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 +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/layer.js +var require_layer = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/layer.js"(exports2, module2) { + "use strict"; + var pathRegexp = require_path_to_regexp(); + var debug3 = require_src2()("express:router:layer"); + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + module2.exports = Layer; + function Layer(path2, options2, fn) { + if (!(this instanceof Layer)) { + return new Layer(path2, options2, fn); + } + debug3("new %o", path2); + var opts = options2 || {}; + this.handle = fn; + this.name = fn.name || ""; + this.params = void 0; + this.path = void 0; + this.regexp = pathRegexp(path2, this.keys = [], opts); + this.regexp.fast_star = path2 === "*"; + this.regexp.fast_slash = path2 === "/" && opts.end === false; + } + Layer.prototype.handle_error = function handle_error(error, req, res, next) { + var fn = this.handle; + if (fn.length !== 4) { + return next(error); + } + try { + fn(error, req, res, next); + } catch (err) { + next(err); + } + }; + Layer.prototype.handle_request = function handle(req, res, next) { + var fn = this.handle; + if (fn.length > 3) { + return next(); + } + try { + fn(req, res, next); + } catch (err) { + next(err); + } + }; + Layer.prototype.match = function match(path2) { + var match2; + if (path2 != null) { + if (this.regexp.fast_slash) { + this.params = {}; + this.path = ""; + return true; + } + if (this.regexp.fast_star) { + this.params = { "0": decode_param(path2) }; + this.path = path2; + return true; + } + match2 = this.regexp.exec(path2); + } + if (!match2) { + this.params = void 0; + this.path = void 0; + return false; + } + this.params = {}; + this.path = match2[0]; + var keys = this.keys; + var params = this.params; + for (var i = 1; i < match2.length; i++) { + var key = keys[i - 1]; + var prop = key.name; + var val = decode_param(match2[i]); + if (val !== void 0 || !hasOwnProperty2.call(params, prop)) { + params[prop] = val; + } + } + return true; + }; + function decode_param(val) { + if (typeof val !== "string" || val.length === 0) { + return val; + } + try { + return decodeURIComponent(val); + } catch (err) { + if (err instanceof URIError) { + err.message = "Failed to decode param '" + val + "'"; + err.status = err.statusCode = 400; + } + throw err; + } + } } -} +}); -class InvalidArgumentError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidArgumentError) - this.name = 'InvalidArgumentError' - this.message = message || 'Invalid Argument Error' - this.code = 'UND_ERR_INVALID_ARG' +// node_modules/.pnpm/methods@1.1.2/node_modules/methods/index.js +var require_methods = __commonJS({ + "node_modules/.pnpm/methods@1.1.2/node_modules/methods/index.js"(exports2, module2) { + "use strict"; + var http4 = __require("http"); + module2.exports = getCurrentNodeMethods() || getBasicNodeMethods(); + function getCurrentNodeMethods() { + return http4.METHODS && http4.METHODS.map(function lowerCaseMethod(method) { + return method.toLowerCase(); + }); + } + function getBasicNodeMethods() { + return [ + "get", + "post", + "put", + "head", + "delete", + "options", + "trace", + "copy", + "lock", + "mkcol", + "move", + "purge", + "propfind", + "proppatch", + "unlock", + "report", + "mkactivity", + "checkout", + "merge", + "m-search", + "notify", + "subscribe", + "unsubscribe", + "patch", + "search", + "connect" + ]; + } } -} +}); -class InvalidReturnValueError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InvalidReturnValueError) - this.name = 'InvalidReturnValueError' - this.message = message || 'Invalid Return Value Error' - this.code = 'UND_ERR_INVALID_RETURN_VALUE' +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/route.js +var require_route = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/route.js"(exports2, module2) { + "use strict"; + var debug3 = require_src2()("express:router:route"); + var flatten = require_array_flatten(); + var Layer = require_layer(); + var methods = require_methods(); + var slice = Array.prototype.slice; + var toString2 = Object.prototype.toString; + module2.exports = Route; + function Route(path2) { + this.path = path2; + this.stack = []; + debug3("new %o", path2); + this.methods = {}; + } + Route.prototype._handles_method = function _handles_method(method) { + if (this.methods._all) { + return true; + } + var name = typeof method === "string" ? method.toLowerCase() : method; + if (name === "head" && !this.methods["head"]) { + name = "get"; + } + return Boolean(this.methods[name]); + }; + Route.prototype._options = function _options() { + var methods2 = Object.keys(this.methods); + if (this.methods.get && !this.methods.head) { + methods2.push("head"); + } + for (var i = 0; i < methods2.length; i++) { + methods2[i] = methods2[i].toUpperCase(); + } + return methods2; + }; + Route.prototype.dispatch = function dispatch(req, res, done) { + var idx = 0; + var stack = this.stack; + var sync = 0; + if (stack.length === 0) { + return done(); + } + var method = typeof req.method === "string" ? req.method.toLowerCase() : req.method; + if (method === "head" && !this.methods["head"]) { + method = "get"; + } + req.route = this; + next(); + function next(err) { + if (err && err === "route") { + return done(); + } + if (err && err === "router") { + return done(err); + } + if (++sync > 100) { + return setImmediate(next, err); + } + var layer = stack[idx++]; + if (!layer) { + return done(err); + } + if (layer.method && layer.method !== method) { + next(err); + } else if (err) { + layer.handle_error(err, req, res, next); + } else { + layer.handle_request(req, res, next); + } + sync = 0; + } + }; + Route.prototype.all = function all() { + var handles = flatten(slice.call(arguments)); + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + if (typeof handle !== "function") { + var type2 = toString2.call(handle); + var msg = "Route.all() requires a callback function but got a " + type2; + throw new TypeError(msg); + } + var layer = Layer("/", {}, handle); + layer.method = void 0; + this.methods._all = true; + this.stack.push(layer); + } + return this; + }; + methods.forEach(function(method) { + Route.prototype[method] = function() { + var handles = flatten(slice.call(arguments)); + for (var i = 0; i < handles.length; i++) { + var handle = handles[i]; + if (typeof handle !== "function") { + var type2 = toString2.call(handle); + var msg = "Route." + method + "() requires a callback function but got a " + type2; + throw new Error(msg); + } + debug3("%s %o", method, this.path); + var layer = Layer("/", {}, handle); + layer.method = method; + this.methods[method] = true; + this.stack.push(layer); + } + return this; + }; + }); } -} +}); -class RequestAbortedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestAbortedError) - this.name = 'AbortError' - this.message = message || 'Request aborted' - this.code = 'UND_ERR_ABORTED' +// node_modules/.pnpm/utils-merge@1.0.1/node_modules/utils-merge/index.js +var require_utils_merge = __commonJS({ + "node_modules/.pnpm/utils-merge@1.0.1/node_modules/utils-merge/index.js"(exports2, module2) { + exports2 = module2.exports = function(a, b) { + if (a && b) { + for (var key in b) { + a[key] = b[key]; + } + } + return a; + }; } -} +}); -class InformationalError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, InformationalError) - this.name = 'InformationalError' - this.message = message || 'Request information' - this.code = 'UND_ERR_INFO' +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/index.js +var require_router = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/router/index.js"(exports2, module2) { + "use strict"; + var Route = require_route(); + var Layer = require_layer(); + var methods = require_methods(); + var mixin = require_utils_merge(); + var debug3 = require_src2()("express:router"); + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var parseUrl4 = require_parseurl(); + var setPrototypeOf = require_setprototypeof(); + var objectRegExp = /^\[object (\S+)\]$/; + var slice = Array.prototype.slice; + var toString2 = Object.prototype.toString; + var proto = module2.exports = function(options2) { + var opts = options2 || {}; + function router(req, res, next) { + router.handle(req, res, next); + } + setPrototypeOf(router, proto); + router.params = {}; + router._params = []; + router.caseSensitive = opts.caseSensitive; + router.mergeParams = opts.mergeParams; + router.strict = opts.strict; + router.stack = []; + return router; + }; + proto.param = function param(name, fn) { + if (typeof name === "function") { + deprecate("router.param(fn): Refactor to use path params"); + this._params.push(name); + return; + } + var params = this._params; + var len = params.length; + var ret; + if (name[0] === ":") { + deprecate("router.param(" + JSON.stringify(name) + ", fn): Use router.param(" + JSON.stringify(name.slice(1)) + ", fn) instead"); + name = name.slice(1); + } + for (var i = 0; i < len; ++i) { + if (ret = params[i](name, fn)) { + fn = ret; + } + } + if ("function" !== typeof fn) { + throw new Error("invalid param() call for " + name + ", got " + fn); + } + (this.params[name] = this.params[name] || []).push(fn); + return this; + }; + proto.handle = function handle(req, res, out) { + var self2 = this; + debug3("dispatching %s %s", req.method, req.url); + var idx = 0; + var protohost = getProtohost(req.url) || ""; + var removed = ""; + var slashAdded = false; + var sync = 0; + var paramcalled = {}; + var options2 = []; + var stack = self2.stack; + var parentParams = req.params; + var parentUrl = req.baseUrl || ""; + var done = restore(out, req, "baseUrl", "next", "params"); + req.next = next; + if (req.method === "OPTIONS") { + done = wrap2(done, function(old, err) { + if (err || options2.length === 0) return old(err); + sendOptionsResponse(res, options2, old); + }); + } + req.baseUrl = parentUrl; + req.originalUrl = req.originalUrl || req.url; + next(); + function next(err) { + var layerError = err === "route" ? null : err; + if (slashAdded) { + req.url = req.url.slice(1); + slashAdded = false; + } + if (removed.length !== 0) { + req.baseUrl = parentUrl; + req.url = protohost + removed + req.url.slice(protohost.length); + removed = ""; + } + if (layerError === "router") { + setImmediate(done, null); + return; + } + if (idx >= stack.length) { + setImmediate(done, layerError); + return; + } + if (++sync > 100) { + return setImmediate(next, err); + } + var path2 = getPathname(req); + if (path2 == null) { + return done(layerError); + } + var layer; + var match; + var route; + while (match !== true && idx < stack.length) { + layer = stack[idx++]; + match = matchLayer(layer, path2); + route = layer.route; + if (typeof match !== "boolean") { + layerError = layerError || match; + } + if (match !== true) { + continue; + } + if (!route) { + continue; + } + if (layerError) { + match = false; + continue; + } + var method = req.method; + var has_method = route._handles_method(method); + if (!has_method && method === "OPTIONS") { + appendMethods(options2, route._options()); + } + if (!has_method && method !== "HEAD") { + match = false; + } + } + if (match !== true) { + return done(layerError); + } + if (route) { + req.route = route; + } + req.params = self2.mergeParams ? mergeParams(layer.params, parentParams) : layer.params; + var layerPath = layer.path; + self2.process_params(layer, paramcalled, req, res, function(err2) { + if (err2) { + next(layerError || err2); + } else if (route) { + layer.handle_request(req, res, next); + } else { + trim_prefix(layer, layerError, layerPath, path2); + } + sync = 0; + }); + } + function trim_prefix(layer, layerError, layerPath, path2) { + if (layerPath.length !== 0) { + if (layerPath !== path2.slice(0, layerPath.length)) { + next(layerError); + return; + } + var c = path2[layerPath.length]; + if (c && c !== "/" && c !== ".") return next(layerError); + debug3("trim prefix (%s) from url %s", layerPath, req.url); + removed = layerPath; + req.url = protohost + req.url.slice(protohost.length + removed.length); + if (!protohost && req.url[0] !== "/") { + req.url = "/" + req.url; + slashAdded = true; + } + req.baseUrl = parentUrl + (removed[removed.length - 1] === "/" ? removed.substring(0, removed.length - 1) : removed); + } + debug3("%s %s : %s", layer.name, layerPath, req.originalUrl); + if (layerError) { + layer.handle_error(layerError, req, res, next); + } else { + layer.handle_request(req, res, next); + } + } + }; + proto.process_params = function process_params(layer, called, req, res, done) { + var params = this.params; + var keys = layer.keys; + if (!keys || keys.length === 0) { + return done(); + } + var i = 0; + var name; + var paramIndex = 0; + var key; + var paramVal; + var paramCallbacks; + var paramCalled; + function param(err) { + if (err) { + return done(err); + } + if (i >= keys.length) { + return done(); + } + paramIndex = 0; + key = keys[i++]; + name = key.name; + paramVal = req.params[name]; + paramCallbacks = params[name]; + paramCalled = called[name]; + if (paramVal === void 0 || !paramCallbacks) { + return param(); + } + if (paramCalled && (paramCalled.match === paramVal || paramCalled.error && paramCalled.error !== "route")) { + req.params[name] = paramCalled.value; + return param(paramCalled.error); + } + called[name] = paramCalled = { + error: null, + match: paramVal, + value: paramVal + }; + paramCallback(); + } + function paramCallback(err) { + var fn = paramCallbacks[paramIndex++]; + paramCalled.value = req.params[key.name]; + if (err) { + paramCalled.error = err; + param(err); + return; + } + if (!fn) return param(); + try { + fn(req, res, paramCallback, paramVal, key.name); + } catch (e) { + paramCallback(e); + } + } + param(); + }; + proto.use = function use(fn) { + var offset = 0; + var path2 = "/"; + if (typeof fn !== "function") { + var arg = fn; + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + if (typeof arg !== "function") { + offset = 1; + path2 = fn; + } + } + var callbacks = flatten(slice.call(arguments, offset)); + if (callbacks.length === 0) { + throw new TypeError("Router.use() requires a middleware function"); + } + for (var i = 0; i < callbacks.length; i++) { + var fn = callbacks[i]; + if (typeof fn !== "function") { + throw new TypeError("Router.use() requires a middleware function but got a " + gettype(fn)); + } + debug3("use %o %s", path2, fn.name || ""); + var layer = new Layer(path2, { + sensitive: this.caseSensitive, + strict: false, + end: false + }, fn); + layer.route = void 0; + this.stack.push(layer); + } + return this; + }; + proto.route = function route(path2) { + var route2 = new Route(path2); + var layer = new Layer(path2, { + sensitive: this.caseSensitive, + strict: this.strict, + end: true + }, route2.dispatch.bind(route2)); + layer.route = route2; + this.stack.push(layer); + return route2; + }; + methods.concat("all").forEach(function(method) { + proto[method] = function(path2) { + var route = this.route(path2); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; + }); + function appendMethods(list, addition) { + for (var i = 0; i < addition.length; i++) { + var method = addition[i]; + if (list.indexOf(method) === -1) { + list.push(method); + } + } + } + function getPathname(req) { + try { + return parseUrl4(req).pathname; + } catch (err) { + return void 0; + } + } + function getProtohost(url) { + if (typeof url !== "string" || url.length === 0 || url[0] === "/") { + return void 0; + } + var searchIndex = url.indexOf("?"); + var pathLength = searchIndex !== -1 ? searchIndex : url.length; + var fqdnIndex = url.slice(0, pathLength).indexOf("://"); + return fqdnIndex !== -1 ? url.substring(0, url.indexOf("/", 3 + fqdnIndex)) : void 0; + } + function gettype(obj) { + var type2 = typeof obj; + if (type2 !== "object") { + return type2; + } + return toString2.call(obj).replace(objectRegExp, "$1"); + } + function matchLayer(layer, path2) { + try { + return layer.match(path2); + } catch (err) { + return err; + } + } + function mergeParams(params, parent) { + if (typeof parent !== "object" || !parent) { + return params; + } + var obj = mixin({}, parent); + if (!(0 in params) || !(0 in parent)) { + return mixin(obj, params); + } + var i = 0; + var o = 0; + while (i in params) { + i++; + } + while (o in parent) { + o++; + } + for (i--; i >= 0; i--) { + params[i + o] = params[i]; + if (i < o) { + delete params[i]; + } + } + return mixin(obj, params); + } + function restore(fn, obj) { + var props = new Array(arguments.length - 2); + var vals = new Array(arguments.length - 2); + for (var i = 0; i < props.length; i++) { + props[i] = arguments[i + 2]; + vals[i] = obj[props[i]]; + } + return function() { + for (var i2 = 0; i2 < props.length; i2++) { + obj[props[i2]] = vals[i2]; + } + return fn.apply(this, arguments); + }; + } + function sendOptionsResponse(res, options2, next) { + try { + var body = options2.join(","); + res.set("Allow", body); + res.send(body); + } catch (err) { + next(err); + } + } + function wrap2(old, fn) { + return function proxy() { + var args = new Array(arguments.length + 1); + args[0] = old; + for (var i = 0, len = arguments.length; i < len; i++) { + args[i + 1] = arguments[i]; + } + fn.apply(this, args); + }; + } } -} +}); -class RequestContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, RequestContentLengthMismatchError) - this.name = 'RequestContentLengthMismatchError' - this.message = message || 'Request body length does not match content-length header' - this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/middleware/init.js +var require_init = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/middleware/init.js"(exports2) { + "use strict"; + var setPrototypeOf = require_setprototypeof(); + exports2.init = function(app) { + return function expressInit(req, res, next) { + if (app.enabled("x-powered-by")) res.setHeader("X-Powered-By", "Express"); + req.res = res; + res.req = req; + req.next = next; + setPrototypeOf(req, app.request); + setPrototypeOf(res, app.response); + res.locals = res.locals || /* @__PURE__ */ Object.create(null); + next(); + }; + }; } -} +}); -class ResponseContentLengthMismatchError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseContentLengthMismatchError) - this.name = 'ResponseContentLengthMismatchError' - this.message = message || 'Response body length does not match content-length header' - this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/middleware/query.js +var require_query = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/middleware/query.js"(exports2, module2) { + "use strict"; + var merge3 = require_utils_merge(); + var parseUrl4 = require_parseurl(); + var qs = require_lib5(); + module2.exports = function query(options2) { + var opts = merge3({}, options2); + var queryparse = qs.parse; + if (typeof options2 === "function") { + queryparse = options2; + opts = void 0; + } + if (opts !== void 0 && opts.allowPrototypes === void 0) { + opts.allowPrototypes = true; + } + return function query2(req, res, next) { + if (!req.query) { + var val = parseUrl4(req).query; + req.query = queryparse(val, opts); + } + next(); + }; + }; } -} +}); -class ClientDestroyedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientDestroyedError) - this.name = 'ClientDestroyedError' - this.message = message || 'The client is destroyed' - this.code = 'UND_ERR_DESTROYED' +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/view.js +var require_view = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/view.js"(exports2, module2) { + "use strict"; + var debug3 = require_src2()("express:view"); + var path2 = __require("path"); + var fs2 = __require("fs"); + var dirname3 = path2.dirname; + var basename2 = path2.basename; + var extname = path2.extname; + var join5 = path2.join; + var resolve4 = path2.resolve; + module2.exports = View; + function View(name, options2) { + var opts = options2 || {}; + this.defaultEngine = opts.defaultEngine; + this.ext = extname(name); + this.name = name; + this.root = opts.root; + if (!this.ext && !this.defaultEngine) { + throw new Error("No default engine was specified and no extension was provided."); + } + var fileName = name; + if (!this.ext) { + this.ext = this.defaultEngine[0] !== "." ? "." + this.defaultEngine : this.defaultEngine; + fileName += this.ext; + } + if (!opts.engines[this.ext]) { + var mod = this.ext.slice(1); + debug3('require "%s"', mod); + var fn = __require(mod).__express; + if (typeof fn !== "function") { + throw new Error('Module "' + mod + '" does not provide a view engine.'); + } + opts.engines[this.ext] = fn; + } + this.engine = opts.engines[this.ext]; + this.path = this.lookup(fileName); + } + View.prototype.lookup = function lookup(name) { + var path3; + var roots = [].concat(this.root); + debug3('lookup "%s"', name); + for (var i = 0; i < roots.length && !path3; i++) { + var root = roots[i]; + var loc = resolve4(root, name); + var dir = dirname3(loc); + var file = basename2(loc); + path3 = this.resolve(dir, file); + } + return path3; + }; + View.prototype.render = function render(options2, callback) { + debug3('render "%s"', this.path); + this.engine(this.path, options2, callback); + }; + View.prototype.resolve = function resolve5(dir, file) { + var ext = this.ext; + var path3 = join5(dir, file); + var stat = tryStat(path3); + if (stat && stat.isFile()) { + return path3; + } + path3 = join5(dir, basename2(file, ext), "index" + ext); + stat = tryStat(path3); + if (stat && stat.isFile()) { + return path3; + } + }; + function tryStat(path3) { + debug3('stat "%s"', path3); + try { + return fs2.statSync(path3); + } catch (e) { + return void 0; + } + } } -} +}); -class ClientClosedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ClientClosedError) - this.name = 'ClientClosedError' - this.message = message || 'The client is closed' - this.code = 'UND_ERR_CLOSED' +// node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js +var require_content_disposition = __commonJS({ + "node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js"(exports2, module2) { + "use strict"; + module2.exports = contentDisposition; + module2.exports.parse = parse2; + var basename2 = __require("path").basename; + var Buffer3 = require_safe_buffer().Buffer; + var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g; + var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/; + var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g; + var NON_LATIN1_REGEXP = /[^\x20-\x7e\xa0-\xff]/g; + var QESC_REGEXP = /\\([\u0000-\u007f])/g; + var QUOTE_REGEXP = /([\\"])/g; + var PARAM_REGEXP = /;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g; + var TEXT_REGEXP = /^[\x20-\x7e\x80-\xff]+$/; + var TOKEN_REGEXP = /^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/; + var EXT_VALUE_REGEXP = /^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/; + var DISPOSITION_TYPE_REGEXP = /^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/; + function contentDisposition(filename, options2) { + var opts = options2 || {}; + var type2 = opts.type || "attachment"; + var params = createparams(filename, opts.fallback); + return format2(new ContentDisposition(type2, params)); + } + function createparams(filename, fallback) { + if (filename === void 0) { + return; + } + var params = {}; + if (typeof filename !== "string") { + throw new TypeError("filename must be a string"); + } + if (fallback === void 0) { + fallback = true; + } + if (typeof fallback !== "string" && typeof fallback !== "boolean") { + throw new TypeError("fallback must be a string or boolean"); + } + if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) { + throw new TypeError("fallback must be ISO-8859-1 string"); + } + var name = basename2(filename); + var isQuotedString = TEXT_REGEXP.test(name); + var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename2(fallback); + var hasFallback = typeof fallbackName === "string" && fallbackName !== name; + if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) { + params["filename*"] = name; + } + if (isQuotedString || hasFallback) { + params.filename = hasFallback ? fallbackName : name; + } + return params; + } + function format2(obj) { + var parameters = obj.parameters; + var type2 = obj.type; + if (!type2 || typeof type2 !== "string" || !TOKEN_REGEXP.test(type2)) { + throw new TypeError("invalid type"); + } + var string = String(type2).toLowerCase(); + if (parameters && typeof parameters === "object") { + var param; + var params = Object.keys(parameters).sort(); + for (var i = 0; i < params.length; i++) { + param = params[i]; + var val = param.substr(-1) === "*" ? ustring(parameters[param]) : qstring(parameters[param]); + string += "; " + param + "=" + val; + } + } + return string; + } + function decodefield(str2) { + var match = EXT_VALUE_REGEXP.exec(str2); + if (!match) { + throw new TypeError("invalid extended field value"); + } + var charset = match[1].toLowerCase(); + var encoded = match[2]; + var value; + var binary2 = encoded.replace(HEX_ESCAPE_REPLACE_REGEXP, pdecode); + switch (charset) { + case "iso-8859-1": + value = getlatin1(binary2); + break; + case "utf-8": + value = Buffer3.from(binary2, "binary").toString("utf8"); + break; + default: + throw new TypeError("unsupported charset in extended field"); + } + return value; + } + function getlatin1(val) { + return String(val).replace(NON_LATIN1_REGEXP, "?"); + } + function parse2(string) { + if (!string || typeof string !== "string") { + throw new TypeError("argument string is required"); + } + var match = DISPOSITION_TYPE_REGEXP.exec(string); + if (!match) { + throw new TypeError("invalid type format"); + } + var index = match[0].length; + var type2 = match[1].toLowerCase(); + var key; + var names = []; + var params = {}; + var value; + index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ";" ? index - 1 : index; + while (match = PARAM_REGEXP.exec(string)) { + if (match.index !== index) { + throw new TypeError("invalid parameter format"); + } + index += match[0].length; + key = match[1].toLowerCase(); + value = match[2]; + if (names.indexOf(key) !== -1) { + throw new TypeError("invalid duplicate parameter"); + } + names.push(key); + if (key.indexOf("*") + 1 === key.length) { + key = key.slice(0, -1); + value = decodefield(value); + params[key] = value; + continue; + } + if (typeof params[key] === "string") { + continue; + } + if (value[0] === '"') { + value = value.substr(1, value.length - 2).replace(QESC_REGEXP, "$1"); + } + params[key] = value; + } + if (index !== -1 && index !== string.length) { + throw new TypeError("invalid parameter format"); + } + return new ContentDisposition(type2, params); + } + function pdecode(str2, hex) { + return String.fromCharCode(parseInt(hex, 16)); + } + function pencode(char) { + return "%" + String(char).charCodeAt(0).toString(16).toUpperCase(); + } + function qstring(val) { + var str2 = String(val); + return '"' + str2.replace(QUOTE_REGEXP, "\\$1") + '"'; + } + function ustring(val) { + var str2 = String(val); + var encoded = encodeURIComponent(str2).replace(ENCODE_URL_ATTR_CHAR_REGEXP, pencode); + return "UTF-8''" + encoded; + } + function ContentDisposition(type2, parameters) { + this.type = type2; + this.parameters = parameters; + } } -} +}); -class SocketError extends UndiciError { - constructor (message, socket) { - super(message) - Error.captureStackTrace(this, SocketError) - this.name = 'SocketError' - this.message = message || 'Socket error' - this.code = 'UND_ERR_SOCKET' - this.socket = socket +// node_modules/.pnpm/encodeurl@1.0.2/node_modules/encodeurl/index.js +var require_encodeurl2 = __commonJS({ + "node_modules/.pnpm/encodeurl@1.0.2/node_modules/encodeurl/index.js"(exports2, module2) { + "use strict"; + module2.exports = encodeUrl; + var ENCODE_CHARS_REGEXP = /(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g; + var UNMATCHED_SURROGATE_PAIR_REGEXP = /(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g; + var UNMATCHED_SURROGATE_PAIR_REPLACE = "$1\uFFFD$2"; + function encodeUrl(url) { + return String(url).replace(UNMATCHED_SURROGATE_PAIR_REGEXP, UNMATCHED_SURROGATE_PAIR_REPLACE).replace(ENCODE_CHARS_REGEXP, encodeURI); + } } -} +}); -class NotSupportedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'NotSupportedError' - this.message = message || 'Not supported error' - this.code = 'UND_ERR_NOT_SUPPORTED' +// node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js +var require_etag = __commonJS({ + "node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js"(exports2, module2) { + "use strict"; + module2.exports = etag; + var crypto2 = __require("crypto"); + var Stats = __require("fs").Stats; + var toString2 = Object.prototype.toString; + function entitytag(entity) { + if (entity.length === 0) { + return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'; + } + var hash = crypto2.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27); + var len = typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length; + return '"' + len.toString(16) + "-" + hash + '"'; + } + function etag(entity, options2) { + if (entity == null) { + throw new TypeError("argument entity is required"); + } + var isStats = isstats(entity); + var weak = options2 && typeof options2.weak === "boolean" ? options2.weak : isStats; + if (!isStats && typeof entity !== "string" && !Buffer.isBuffer(entity)) { + throw new TypeError("argument entity must be string, Buffer, or fs.Stats"); + } + var tag = isStats ? stattag(entity) : entitytag(entity); + return weak ? "W/" + tag : tag; + } + function isstats(obj) { + if (typeof Stats === "function" && obj instanceof Stats) { + return true; + } + return obj && typeof obj === "object" && "ctime" in obj && toString2.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString2.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number"; + } + function stattag(stat) { + var mtime = stat.mtime.getTime().toString(16); + var size = stat.size.toString(16); + return '"' + size + "-" + mtime + '"'; + } } -} +}); -class BalancedPoolMissingUpstreamError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, NotSupportedError) - this.name = 'MissingUpstreamError' - this.message = message || 'No upstream has been added to the BalancedPool' - this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' +// node_modules/.pnpm/fresh@0.5.2/node_modules/fresh/index.js +var require_fresh = __commonJS({ + "node_modules/.pnpm/fresh@0.5.2/node_modules/fresh/index.js"(exports2, module2) { + "use strict"; + var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/; + module2.exports = fresh; + function fresh(reqHeaders, resHeaders) { + var modifiedSince = reqHeaders["if-modified-since"]; + var noneMatch = reqHeaders["if-none-match"]; + if (!modifiedSince && !noneMatch) { + return false; + } + var cacheControl = reqHeaders["cache-control"]; + if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) { + return false; + } + if (noneMatch && noneMatch !== "*") { + var etag = resHeaders["etag"]; + if (!etag) { + return false; + } + var etagStale = true; + var matches = parseTokenList(noneMatch); + for (var i = 0; i < matches.length; i++) { + var match = matches[i]; + if (match === etag || match === "W/" + etag || "W/" + match === etag) { + etagStale = false; + break; + } + } + if (etagStale) { + return false; + } + } + if (modifiedSince) { + var lastModified = resHeaders["last-modified"]; + var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince)); + if (modifiedStale) { + return false; + } + } + return true; + } + function parseHttpDate(date) { + var timestamp2 = date && Date.parse(date); + return typeof timestamp2 === "number" ? timestamp2 : NaN; + } + function parseTokenList(str2) { + var end2 = 0; + var list = []; + var start = 0; + for (var i = 0, len = str2.length; i < len; i++) { + switch (str2.charCodeAt(i)) { + case 32: + if (start === end2) { + start = end2 = i + 1; + } + break; + case 44: + list.push(str2.substring(start, end2)); + start = end2 = i + 1; + break; + default: + end2 = i + 1; + break; + } + } + list.push(str2.substring(start, end2)); + return list; + } } -} +}); -class HTTPParserError extends Error { - constructor (message, code, data) { - super(message) - Error.captureStackTrace(this, HTTPParserError) - this.name = 'HTTPParserError' - this.code = code ? `HPE_${code}` : undefined - this.data = data ? data.toString() : undefined +// node_modules/.pnpm/mime@1.6.0/node_modules/mime/types.json +var require_types = __commonJS({ + "node_modules/.pnpm/mime@1.6.0/node_modules/mime/types.json"(exports2, module2) { + module2.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomsvc+xml": ["atomsvc"], "application/bdoc": ["bdoc"], "application/ccxml+xml": ["ccxml"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma"], "application/emma+xml": ["emma"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/font-tdpfr": ["pfr"], "application/font-woff": [], "application/font-woff2": [], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/patch-ops-error+xml": ["xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/prs.cww": ["cww"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/vnd.3gpp.pic-bw-large": ["plb"], "application/vnd.3gpp.pic-bw-small": ["psb"], "application/vnd.3gpp.pic-bw-var": ["pvb"], "application/vnd.3gpp2.tcap": ["tcap"], "application/vnd.3m.post-it-notes": ["pwn"], "application/vnd.accpac.simply.aso": ["aso"], "application/vnd.accpac.simply.imp": ["imp"], "application/vnd.acucobol": ["acu"], "application/vnd.acucorp": ["atc", "acutc"], "application/vnd.adobe.air-application-installer-package+zip": ["air"], "application/vnd.adobe.formscentral.fcdt": ["fcdt"], "application/vnd.adobe.fxp": ["fxp", "fxpl"], "application/vnd.adobe.xdp+xml": ["xdp"], "application/vnd.adobe.xfdf": ["xfdf"], "application/vnd.ahead.space": ["ahead"], "application/vnd.airzip.filesecure.azf": ["azf"], "application/vnd.airzip.filesecure.azs": ["azs"], "application/vnd.amazon.ebook": ["azw"], "application/vnd.americandynamics.acc": ["acc"], "application/vnd.amiga.ami": ["ami"], "application/vnd.android.package-archive": ["apk"], "application/vnd.anser-web-certificate-issue-initiation": ["cii"], "application/vnd.anser-web-funds-transfer-initiation": ["fti"], "application/vnd.antix.game-component": ["atx"], "application/vnd.apple.installer+xml": ["mpkg"], "application/vnd.apple.mpegurl": ["m3u8"], "application/vnd.apple.pkpass": ["pkpass"], "application/vnd.aristanetworks.swi": ["swi"], "application/vnd.astraea-software.iota": ["iota"], "application/vnd.audiograph": ["aep"], "application/vnd.blueice.multipass": ["mpm"], "application/vnd.bmi": ["bmi"], "application/vnd.businessobjects": ["rep"], "application/vnd.chemdraw+xml": ["cdxml"], "application/vnd.chipnuts.karaoke-mmd": ["mmd"], "application/vnd.cinderella": ["cdy"], "application/vnd.claymore": ["cla"], "application/vnd.cloanto.rp9": ["rp9"], "application/vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], "application/vnd.cluetrust.cartomobile-config": ["c11amc"], "application/vnd.cluetrust.cartomobile-config-pkg": ["c11amz"], "application/vnd.commonspace": ["csp"], "application/vnd.contact.cmsg": ["cdbcmsg"], "application/vnd.cosmocaller": ["cmc"], "application/vnd.crick.clicker": ["clkx"], "application/vnd.crick.clicker.keyboard": ["clkk"], "application/vnd.crick.clicker.palette": ["clkp"], "application/vnd.crick.clicker.template": ["clkt"], "application/vnd.crick.clicker.wordbank": ["clkw"], "application/vnd.criticaltools.wbs+xml": ["wbs"], "application/vnd.ctc-posml": ["pml"], "application/vnd.cups-ppd": ["ppd"], "application/vnd.curl.car": ["car"], "application/vnd.curl.pcurl": ["pcurl"], "application/vnd.dart": ["dart"], "application/vnd.data-vision.rdz": ["rdz"], "application/vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], "application/vnd.dece.ttml+xml": ["uvt", "uvvt"], "application/vnd.dece.unspecified": ["uvx", "uvvx"], "application/vnd.dece.zip": ["uvz", "uvvz"], "application/vnd.denovo.fcselayout-link": ["fe_launch"], "application/vnd.dna": ["dna"], "application/vnd.dolby.mlp": ["mlp"], "application/vnd.dpgraph": ["dpg"], "application/vnd.dreamfactory": ["dfac"], "application/vnd.ds-keypoint": ["kpxx"], "application/vnd.dvb.ait": ["ait"], "application/vnd.dvb.service": ["svc"], "application/vnd.dynageo": ["geo"], "application/vnd.ecowin.chart": ["mag"], "application/vnd.enliven": ["nml"], "application/vnd.epson.esf": ["esf"], "application/vnd.epson.msf": ["msf"], "application/vnd.epson.quickanime": ["qam"], "application/vnd.epson.salt": ["slt"], "application/vnd.epson.ssf": ["ssf"], "application/vnd.eszigno3+xml": ["es3", "et3"], "application/vnd.ezpix-album": ["ez2"], "application/vnd.ezpix-package": ["ez3"], "application/vnd.fdf": ["fdf"], "application/vnd.fdsn.mseed": ["mseed"], "application/vnd.fdsn.seed": ["seed", "dataless"], "application/vnd.flographit": ["gph"], "application/vnd.fluxtime.clip": ["ftc"], "application/vnd.framemaker": ["fm", "frame", "maker", "book"], "application/vnd.frogans.fnc": ["fnc"], "application/vnd.frogans.ltf": ["ltf"], "application/vnd.fsc.weblaunch": ["fsc"], "application/vnd.fujitsu.oasys": ["oas"], "application/vnd.fujitsu.oasys2": ["oa2"], "application/vnd.fujitsu.oasys3": ["oa3"], "application/vnd.fujitsu.oasysgp": ["fg5"], "application/vnd.fujitsu.oasysprs": ["bh2"], "application/vnd.fujixerox.ddd": ["ddd"], "application/vnd.fujixerox.docuworks": ["xdw"], "application/vnd.fujixerox.docuworks.binder": ["xbd"], "application/vnd.fuzzysheet": ["fzs"], "application/vnd.genomatix.tuxedo": ["txd"], "application/vnd.geogebra.file": ["ggb"], "application/vnd.geogebra.tool": ["ggt"], "application/vnd.geometry-explorer": ["gex", "gre"], "application/vnd.geonext": ["gxt"], "application/vnd.geoplan": ["g2w"], "application/vnd.geospace": ["g3w"], "application/vnd.gmx": ["gmx"], "application/vnd.google-apps.document": ["gdoc"], "application/vnd.google-apps.presentation": ["gslides"], "application/vnd.google-apps.spreadsheet": ["gsheet"], "application/vnd.google-earth.kml+xml": ["kml"], "application/vnd.google-earth.kmz": ["kmz"], "application/vnd.grafeq": ["gqf", "gqs"], "application/vnd.groove-account": ["gac"], "application/vnd.groove-help": ["ghf"], "application/vnd.groove-identity-message": ["gim"], "application/vnd.groove-injector": ["grv"], "application/vnd.groove-tool-message": ["gtm"], "application/vnd.groove-tool-template": ["tpl"], "application/vnd.groove-vcard": ["vcg"], "application/vnd.hal+xml": ["hal"], "application/vnd.handheld-entertainment+xml": ["zmm"], "application/vnd.hbci": ["hbci"], "application/vnd.hhe.lesson-player": ["les"], "application/vnd.hp-hpgl": ["hpgl"], "application/vnd.hp-hpid": ["hpid"], "application/vnd.hp-hps": ["hps"], "application/vnd.hp-jlyt": ["jlt"], "application/vnd.hp-pcl": ["pcl"], "application/vnd.hp-pclxl": ["pclxl"], "application/vnd.hydrostatix.sof-data": ["sfd-hdstx"], "application/vnd.ibm.minipay": ["mpy"], "application/vnd.ibm.modcap": ["afp", "listafp", "list3820"], "application/vnd.ibm.rights-management": ["irm"], "application/vnd.ibm.secure-container": ["sc"], "application/vnd.iccprofile": ["icc", "icm"], "application/vnd.igloader": ["igl"], "application/vnd.immervision-ivp": ["ivp"], "application/vnd.immervision-ivu": ["ivu"], "application/vnd.insors.igm": ["igm"], "application/vnd.intercon.formnet": ["xpw", "xpx"], "application/vnd.intergeo": ["i2g"], "application/vnd.intu.qbo": ["qbo"], "application/vnd.intu.qfx": ["qfx"], "application/vnd.ipunplugged.rcprofile": ["rcprofile"], "application/vnd.irepository.package+xml": ["irp"], "application/vnd.is-xpr": ["xpr"], "application/vnd.isac.fcs": ["fcs"], "application/vnd.jam": ["jam"], "application/vnd.jcp.javame.midlet-rms": ["rms"], "application/vnd.jisp": ["jisp"], "application/vnd.joost.joda-archive": ["joda"], "application/vnd.kahootz": ["ktz", "ktr"], "application/vnd.kde.karbon": ["karbon"], "application/vnd.kde.kchart": ["chrt"], "application/vnd.kde.kformula": ["kfo"], "application/vnd.kde.kivio": ["flw"], "application/vnd.kde.kontour": ["kon"], "application/vnd.kde.kpresenter": ["kpr", "kpt"], "application/vnd.kde.kspread": ["ksp"], "application/vnd.kde.kword": ["kwd", "kwt"], "application/vnd.kenameaapp": ["htke"], "application/vnd.kidspiration": ["kia"], "application/vnd.kinar": ["kne", "knp"], "application/vnd.koan": ["skp", "skd", "skt", "skm"], "application/vnd.kodak-descriptor": ["sse"], "application/vnd.las.las+xml": ["lasxml"], "application/vnd.llamagraphics.life-balance.desktop": ["lbd"], "application/vnd.llamagraphics.life-balance.exchange+xml": ["lbe"], "application/vnd.lotus-1-2-3": ["123"], "application/vnd.lotus-approach": ["apr"], "application/vnd.lotus-freelance": ["pre"], "application/vnd.lotus-notes": ["nsf"], "application/vnd.lotus-organizer": ["org"], "application/vnd.lotus-screencam": ["scm"], "application/vnd.lotus-wordpro": ["lwp"], "application/vnd.macports.portpkg": ["portpkg"], "application/vnd.mcd": ["mcd"], "application/vnd.medcalcdata": ["mc1"], "application/vnd.mediastation.cdkey": ["cdkey"], "application/vnd.mfer": ["mwf"], "application/vnd.mfmp": ["mfm"], "application/vnd.micrografx.flo": ["flo"], "application/vnd.micrografx.igx": ["igx"], "application/vnd.mif": ["mif"], "application/vnd.mobius.daf": ["daf"], "application/vnd.mobius.dis": ["dis"], "application/vnd.mobius.mbk": ["mbk"], "application/vnd.mobius.mqy": ["mqy"], "application/vnd.mobius.msl": ["msl"], "application/vnd.mobius.plc": ["plc"], "application/vnd.mobius.txf": ["txf"], "application/vnd.mophun.application": ["mpn"], "application/vnd.mophun.certificate": ["mpc"], "application/vnd.mozilla.xul+xml": ["xul"], "application/vnd.ms-artgalry": ["cil"], "application/vnd.ms-cab-compressed": ["cab"], "application/vnd.ms-excel": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"], "application/vnd.ms-excel.addin.macroenabled.12": ["xlam"], "application/vnd.ms-excel.sheet.binary.macroenabled.12": ["xlsb"], "application/vnd.ms-excel.sheet.macroenabled.12": ["xlsm"], "application/vnd.ms-excel.template.macroenabled.12": ["xltm"], "application/vnd.ms-fontobject": ["eot"], "application/vnd.ms-htmlhelp": ["chm"], "application/vnd.ms-ims": ["ims"], "application/vnd.ms-lrm": ["lrm"], "application/vnd.ms-officetheme": ["thmx"], "application/vnd.ms-outlook": ["msg"], "application/vnd.ms-pki.seccat": ["cat"], "application/vnd.ms-pki.stl": ["stl"], "application/vnd.ms-powerpoint": ["ppt", "pps", "pot"], "application/vnd.ms-powerpoint.addin.macroenabled.12": ["ppam"], "application/vnd.ms-powerpoint.presentation.macroenabled.12": ["pptm"], "application/vnd.ms-powerpoint.slide.macroenabled.12": ["sldm"], "application/vnd.ms-powerpoint.slideshow.macroenabled.12": ["ppsm"], "application/vnd.ms-powerpoint.template.macroenabled.12": ["potm"], "application/vnd.ms-project": ["mpp", "mpt"], "application/vnd.ms-word.document.macroenabled.12": ["docm"], "application/vnd.ms-word.template.macroenabled.12": ["dotm"], "application/vnd.ms-works": ["wps", "wks", "wcm", "wdb"], "application/vnd.ms-wpl": ["wpl"], "application/vnd.ms-xpsdocument": ["xps"], "application/vnd.mseq": ["mseq"], "application/vnd.musician": ["mus"], "application/vnd.muvee.style": ["msty"], "application/vnd.mynfc": ["taglet"], "application/vnd.neurolanguage.nlu": ["nlu"], "application/vnd.nitf": ["ntf", "nitf"], "application/vnd.noblenet-directory": ["nnd"], "application/vnd.noblenet-sealer": ["nns"], "application/vnd.noblenet-web": ["nnw"], "application/vnd.nokia.n-gage.data": ["ngdat"], "application/vnd.nokia.n-gage.symbian.install": ["n-gage"], "application/vnd.nokia.radio-preset": ["rpst"], "application/vnd.nokia.radio-presets": ["rpss"], "application/vnd.novadigm.edm": ["edm"], "application/vnd.novadigm.edx": ["edx"], "application/vnd.novadigm.ext": ["ext"], "application/vnd.oasis.opendocument.chart": ["odc"], "application/vnd.oasis.opendocument.chart-template": ["otc"], "application/vnd.oasis.opendocument.database": ["odb"], "application/vnd.oasis.opendocument.formula": ["odf"], "application/vnd.oasis.opendocument.formula-template": ["odft"], "application/vnd.oasis.opendocument.graphics": ["odg"], "application/vnd.oasis.opendocument.graphics-template": ["otg"], "application/vnd.oasis.opendocument.image": ["odi"], "application/vnd.oasis.opendocument.image-template": ["oti"], "application/vnd.oasis.opendocument.presentation": ["odp"], "application/vnd.oasis.opendocument.presentation-template": ["otp"], "application/vnd.oasis.opendocument.spreadsheet": ["ods"], "application/vnd.oasis.opendocument.spreadsheet-template": ["ots"], "application/vnd.oasis.opendocument.text": ["odt"], "application/vnd.oasis.opendocument.text-master": ["odm"], "application/vnd.oasis.opendocument.text-template": ["ott"], "application/vnd.oasis.opendocument.text-web": ["oth"], "application/vnd.olpc-sugar": ["xo"], "application/vnd.oma.dd2+xml": ["dd2"], "application/vnd.openofficeorg.extension": ["oxt"], "application/vnd.openxmlformats-officedocument.presentationml.presentation": ["pptx"], "application/vnd.openxmlformats-officedocument.presentationml.slide": ["sldx"], "application/vnd.openxmlformats-officedocument.presentationml.slideshow": ["ppsx"], "application/vnd.openxmlformats-officedocument.presentationml.template": ["potx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": ["xlsx"], "application/vnd.openxmlformats-officedocument.spreadsheetml.template": ["xltx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.document": ["docx"], "application/vnd.openxmlformats-officedocument.wordprocessingml.template": ["dotx"], "application/vnd.osgeo.mapguide.package": ["mgp"], "application/vnd.osgi.dp": ["dp"], "application/vnd.osgi.subsystem": ["esa"], "application/vnd.palm": ["pdb", "pqa", "oprc"], "application/vnd.pawaafile": ["paw"], "application/vnd.pg.format": ["str"], "application/vnd.pg.osasli": ["ei6"], "application/vnd.picsel": ["efif"], "application/vnd.pmi.widget": ["wg"], "application/vnd.pocketlearn": ["plf"], "application/vnd.powerbuilder6": ["pbd"], "application/vnd.previewsystems.box": ["box"], "application/vnd.proteus.magazine": ["mgz"], "application/vnd.publishare-delta-tree": ["qps"], "application/vnd.pvi.ptid1": ["ptid"], "application/vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], "application/vnd.realvnc.bed": ["bed"], "application/vnd.recordare.musicxml": ["mxl"], "application/vnd.recordare.musicxml+xml": ["musicxml"], "application/vnd.rig.cryptonote": ["cryptonote"], "application/vnd.rim.cod": ["cod"], "application/vnd.rn-realmedia": ["rm"], "application/vnd.rn-realmedia-vbr": ["rmvb"], "application/vnd.route66.link66+xml": ["link66"], "application/vnd.sailingtracker.track": ["st"], "application/vnd.seemail": ["see"], "application/vnd.sema": ["sema"], "application/vnd.semd": ["semd"], "application/vnd.semf": ["semf"], "application/vnd.shana.informed.formdata": ["ifm"], "application/vnd.shana.informed.formtemplate": ["itp"], "application/vnd.shana.informed.interchange": ["iif"], "application/vnd.shana.informed.package": ["ipk"], "application/vnd.simtech-mindmapper": ["twd", "twds"], "application/vnd.smaf": ["mmf"], "application/vnd.smart.teacher": ["teacher"], "application/vnd.solent.sdkm+xml": ["sdkm", "sdkd"], "application/vnd.spotfire.dxp": ["dxp"], "application/vnd.spotfire.sfs": ["sfs"], "application/vnd.stardivision.calc": ["sdc"], "application/vnd.stardivision.draw": ["sda"], "application/vnd.stardivision.impress": ["sdd"], "application/vnd.stardivision.math": ["smf"], "application/vnd.stardivision.writer": ["sdw", "vor"], "application/vnd.stardivision.writer-global": ["sgl"], "application/vnd.stepmania.package": ["smzip"], "application/vnd.stepmania.stepchart": ["sm"], "application/vnd.sun.wadl+xml": ["wadl"], "application/vnd.sun.xml.calc": ["sxc"], "application/vnd.sun.xml.calc.template": ["stc"], "application/vnd.sun.xml.draw": ["sxd"], "application/vnd.sun.xml.draw.template": ["std"], "application/vnd.sun.xml.impress": ["sxi"], "application/vnd.sun.xml.impress.template": ["sti"], "application/vnd.sun.xml.math": ["sxm"], "application/vnd.sun.xml.writer": ["sxw"], "application/vnd.sun.xml.writer.global": ["sxg"], "application/vnd.sun.xml.writer.template": ["stw"], "application/vnd.sus-calendar": ["sus", "susp"], "application/vnd.svd": ["svd"], "application/vnd.symbian.install": ["sis", "sisx"], "application/vnd.syncml+xml": ["xsm"], "application/vnd.syncml.dm+wbxml": ["bdm"], "application/vnd.syncml.dm+xml": ["xdm"], "application/vnd.tao.intent-module-archive": ["tao"], "application/vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], "application/vnd.tmobile-livetv": ["tmo"], "application/vnd.trid.tpt": ["tpt"], "application/vnd.triscape.mxs": ["mxs"], "application/vnd.trueapp": ["tra"], "application/vnd.ufdl": ["ufd", "ufdl"], "application/vnd.uiq.theme": ["utz"], "application/vnd.umajin": ["umj"], "application/vnd.unity": ["unityweb"], "application/vnd.uoml+xml": ["uoml"], "application/vnd.vcx": ["vcx"], "application/vnd.visio": ["vsd", "vst", "vss", "vsw"], "application/vnd.visionary": ["vis"], "application/vnd.vsf": ["vsf"], "application/vnd.wap.wbxml": ["wbxml"], "application/vnd.wap.wmlc": ["wmlc"], "application/vnd.wap.wmlscriptc": ["wmlsc"], "application/vnd.webturbo": ["wtb"], "application/vnd.wolfram.player": ["nbp"], "application/vnd.wordperfect": ["wpd"], "application/vnd.wqd": ["wqd"], "application/vnd.wt.stf": ["stf"], "application/vnd.xara": ["xar"], "application/vnd.xfdl": ["xfdl"], "application/vnd.yamaha.hv-dic": ["hvd"], "application/vnd.yamaha.hv-script": ["hvs"], "application/vnd.yamaha.hv-voice": ["hvp"], "application/vnd.yamaha.openscoreformat": ["osf"], "application/vnd.yamaha.openscoreformat.osfpvg+xml": ["osfpvg"], "application/vnd.yamaha.smaf-audio": ["saf"], "application/vnd.yamaha.smaf-phrase": ["spf"], "application/vnd.yellowriver-custom-menu": ["cmp"], "application/vnd.zul": ["zir", "zirz"], "application/vnd.zzazz.deck+xml": ["zaz"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/x-7z-compressed": ["7z"], "application/x-abiword": ["abw"], "application/x-ace-compressed": ["ace"], "application/x-apple-diskimage": [], "application/x-arj": ["arj"], "application/x-authorware-bin": ["aab", "x32", "u32", "vox"], "application/x-authorware-map": ["aam"], "application/x-authorware-seg": ["aas"], "application/x-bcpio": ["bcpio"], "application/x-bdoc": [], "application/x-bittorrent": ["torrent"], "application/x-blorb": ["blb", "blorb"], "application/x-bzip": ["bz"], "application/x-bzip2": ["bz2", "boz"], "application/x-cbr": ["cbr", "cba", "cbt", "cbz", "cb7"], "application/x-cdlink": ["vcd"], "application/x-cfs-compressed": ["cfs"], "application/x-chat": ["chat"], "application/x-chess-pgn": ["pgn"], "application/x-chrome-extension": ["crx"], "application/x-cocoa": ["cco"], "application/x-conference": ["nsc"], "application/x-cpio": ["cpio"], "application/x-csh": ["csh"], "application/x-debian-package": ["udeb"], "application/x-dgc-compressed": ["dgc"], "application/x-director": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], "application/x-doom": ["wad"], "application/x-dtbncx+xml": ["ncx"], "application/x-dtbook+xml": ["dtb"], "application/x-dtbresource+xml": ["res"], "application/x-dvi": ["dvi"], "application/x-envoy": ["evy"], "application/x-eva": ["eva"], "application/x-font-bdf": ["bdf"], "application/x-font-ghostscript": ["gsf"], "application/x-font-linux-psf": ["psf"], "application/x-font-pcf": ["pcf"], "application/x-font-snf": ["snf"], "application/x-font-type1": ["pfa", "pfb", "pfm", "afm"], "application/x-freearc": ["arc"], "application/x-futuresplash": ["spl"], "application/x-gca-compressed": ["gca"], "application/x-glulx": ["ulx"], "application/x-gnumeric": ["gnumeric"], "application/x-gramps-xml": ["gramps"], "application/x-gtar": ["gtar"], "application/x-hdf": ["hdf"], "application/x-httpd-php": ["php"], "application/x-install-instructions": ["install"], "application/x-iso9660-image": [], "application/x-java-archive-diff": ["jardiff"], "application/x-java-jnlp-file": ["jnlp"], "application/x-latex": ["latex"], "application/x-lua-bytecode": ["luac"], "application/x-lzh-compressed": ["lzh", "lha"], "application/x-makeself": ["run"], "application/x-mie": ["mie"], "application/x-mobipocket-ebook": ["prc", "mobi"], "application/x-ms-application": ["application"], "application/x-ms-shortcut": ["lnk"], "application/x-ms-wmd": ["wmd"], "application/x-ms-wmz": ["wmz"], "application/x-ms-xbap": ["xbap"], "application/x-msaccess": ["mdb"], "application/x-msbinder": ["obd"], "application/x-mscardfile": ["crd"], "application/x-msclip": ["clp"], "application/x-msdos-program": [], "application/x-msdownload": ["com", "bat"], "application/x-msmediaview": ["mvb", "m13", "m14"], "application/x-msmetafile": ["wmf", "emf", "emz"], "application/x-msmoney": ["mny"], "application/x-mspublisher": ["pub"], "application/x-msschedule": ["scd"], "application/x-msterminal": ["trm"], "application/x-mswrite": ["wri"], "application/x-netcdf": ["nc", "cdf"], "application/x-ns-proxy-autoconfig": ["pac"], "application/x-nzb": ["nzb"], "application/x-perl": ["pl", "pm"], "application/x-pilot": [], "application/x-pkcs12": ["p12", "pfx"], "application/x-pkcs7-certificates": ["p7b", "spc"], "application/x-pkcs7-certreqresp": ["p7r"], "application/x-rar-compressed": ["rar"], "application/x-redhat-package-manager": ["rpm"], "application/x-research-info-systems": ["ris"], "application/x-sea": ["sea"], "application/x-sh": ["sh"], "application/x-shar": ["shar"], "application/x-shockwave-flash": ["swf"], "application/x-silverlight-app": ["xap"], "application/x-sql": ["sql"], "application/x-stuffit": ["sit"], "application/x-stuffitx": ["sitx"], "application/x-subrip": ["srt"], "application/x-sv4cpio": ["sv4cpio"], "application/x-sv4crc": ["sv4crc"], "application/x-t3vm-image": ["t3"], "application/x-tads": ["gam"], "application/x-tar": ["tar"], "application/x-tcl": ["tcl", "tk"], "application/x-tex": ["tex"], "application/x-tex-tfm": ["tfm"], "application/x-texinfo": ["texinfo", "texi"], "application/x-tgif": ["obj"], "application/x-ustar": ["ustar"], "application/x-virtualbox-hdd": ["hdd"], "application/x-virtualbox-ova": ["ova"], "application/x-virtualbox-ovf": ["ovf"], "application/x-virtualbox-vbox": ["vbox"], "application/x-virtualbox-vbox-extpack": ["vbox-extpack"], "application/x-virtualbox-vdi": ["vdi"], "application/x-virtualbox-vhd": ["vhd"], "application/x-virtualbox-vmdk": ["vmdk"], "application/x-wais-source": ["src"], "application/x-web-app-manifest+json": ["webapp"], "application/x-x509-ca-cert": ["der", "crt", "pem"], "application/x-xfig": ["fig"], "application/x-xliff+xml": ["xlf"], "application/x-xpinstall": ["xpi"], "application/x-xz": ["xz"], "application/x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], "application/xaml+xml": ["xaml"], "application/xcap-diff+xml": ["xdf"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": [], "audio/adpcm": ["adp"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mp3": [], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/vnd.dece.audio": ["uva", "uvva"], "audio/vnd.digital-winds": ["eol"], "audio/vnd.dra": ["dra"], "audio/vnd.dts": ["dts"], "audio/vnd.dts.hd": ["dtshd"], "audio/vnd.lucent.voice": ["lvp"], "audio/vnd.ms-playready.media.pya": ["pya"], "audio/vnd.nuera.ecelp4800": ["ecelp4800"], "audio/vnd.nuera.ecelp7470": ["ecelp7470"], "audio/vnd.nuera.ecelp9600": ["ecelp9600"], "audio/vnd.rip": ["rip"], "audio/wav": ["wav"], "audio/wave": [], "audio/webm": ["weba"], "audio/x-aac": ["aac"], "audio/x-aiff": ["aif", "aiff", "aifc"], "audio/x-caf": ["caf"], "audio/x-flac": ["flac"], "audio/x-m4a": [], "audio/x-matroska": ["mka"], "audio/x-mpegurl": ["m3u"], "audio/x-ms-wax": ["wax"], "audio/x-ms-wma": ["wma"], "audio/x-pn-realaudio": ["ram", "ra"], "audio/x-pn-realaudio-plugin": ["rmp"], "audio/x-realaudio": [], "audio/x-wav": [], "audio/xm": ["xm"], "chemical/x-cdx": ["cdx"], "chemical/x-cif": ["cif"], "chemical/x-cmdf": ["cmdf"], "chemical/x-cml": ["cml"], "chemical/x-csml": ["csml"], "chemical/x-xyz": ["xyz"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/apng": ["apng"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/ief": ["ief"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/ktx": ["ktx"], "image/png": ["png"], "image/prs.btif": ["btif"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/tiff": ["tiff", "tif"], "image/vnd.adobe.photoshop": ["psd"], "image/vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], "image/vnd.djvu": ["djvu", "djv"], "image/vnd.dvb.subtitle": [], "image/vnd.dwg": ["dwg"], "image/vnd.dxf": ["dxf"], "image/vnd.fastbidsheet": ["fbs"], "image/vnd.fpx": ["fpx"], "image/vnd.fst": ["fst"], "image/vnd.fujixerox.edmics-mmr": ["mmr"], "image/vnd.fujixerox.edmics-rlc": ["rlc"], "image/vnd.ms-modi": ["mdi"], "image/vnd.ms-photo": ["wdp"], "image/vnd.net-fpx": ["npx"], "image/vnd.wap.wbmp": ["wbmp"], "image/vnd.xiff": ["xif"], "image/webp": ["webp"], "image/x-3ds": ["3ds"], "image/x-cmu-raster": ["ras"], "image/x-cmx": ["cmx"], "image/x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], "image/x-icon": ["ico"], "image/x-jng": ["jng"], "image/x-mrsid-image": ["sid"], "image/x-ms-bmp": [], "image/x-pcx": ["pcx"], "image/x-pict": ["pic", "pct"], "image/x-portable-anymap": ["pnm"], "image/x-portable-bitmap": ["pbm"], "image/x-portable-graymap": ["pgm"], "image/x-portable-pixmap": ["ppm"], "image/x-rgb": ["rgb"], "image/x-tga": ["tga"], "image/x-xbitmap": ["xbm"], "image/x-xpixmap": ["xpm"], "image/x-xwindowdump": ["xwd"], "message/rfc822": ["eml", "mime"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/vnd.collada+xml": ["dae"], "model/vnd.dwf": ["dwf"], "model/vnd.gdl": ["gdl"], "model/vnd.gtw": ["gtw"], "model/vnd.mts": ["mts"], "model/vnd.vtu": ["vtu"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["x3db", "x3dbz"], "model/x3d+vrml": ["x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/hjson": ["hjson"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/prs.lines.tag": ["dsc"], "text/richtext": ["rtx"], "text/rtf": [], "text/sgml": ["sgml", "sgm"], "text/slim": ["slim", "slm"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vnd.curl": ["curl"], "text/vnd.curl.dcurl": ["dcurl"], "text/vnd.curl.mcurl": ["mcurl"], "text/vnd.curl.scurl": ["scurl"], "text/vnd.dvb.subtitle": ["sub"], "text/vnd.fly": ["fly"], "text/vnd.fmi.flexstor": ["flx"], "text/vnd.graphviz": ["gv"], "text/vnd.in3d.3dml": ["3dml"], "text/vnd.in3d.spot": ["spot"], "text/vnd.sun.j2me.app-descriptor": ["jad"], "text/vnd.wap.wml": ["wml"], "text/vnd.wap.wmlscript": ["wmls"], "text/vtt": ["vtt"], "text/x-asm": ["s", "asm"], "text/x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], "text/x-component": ["htc"], "text/x-fortran": ["f", "for", "f77", "f90"], "text/x-handlebars-template": ["hbs"], "text/x-java-source": ["java"], "text/x-lua": ["lua"], "text/x-markdown": ["mkd"], "text/x-nfo": ["nfo"], "text/x-opml": ["opml"], "text/x-org": [], "text/x-pascal": ["p", "pas"], "text/x-processing": ["pde"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "text/x-setext": ["etx"], "text/x-sfv": ["sfv"], "text/x-suse-ymp": ["ymp"], "text/x-uuencode": ["uu"], "text/x-vcalendar": ["vcs"], "text/x-vcard": ["vcf"], "text/xml": [], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/jpeg": ["jpgv"], "video/jpm": ["jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/vnd.dece.hd": ["uvh", "uvvh"], "video/vnd.dece.mobile": ["uvm", "uvvm"], "video/vnd.dece.pd": ["uvp", "uvvp"], "video/vnd.dece.sd": ["uvs", "uvvs"], "video/vnd.dece.video": ["uvv", "uvvv"], "video/vnd.dvb.file": ["dvb"], "video/vnd.fvt": ["fvt"], "video/vnd.mpegurl": ["mxu", "m4u"], "video/vnd.ms-playready.media.pyv": ["pyv"], "video/vnd.uvvu.mp4": ["uvu", "uvvu"], "video/vnd.vivo": ["viv"], "video/webm": ["webm"], "video/x-f4v": ["f4v"], "video/x-fli": ["fli"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-mng": ["mng"], "video/x-ms-asf": ["asf", "asx"], "video/x-ms-vob": ["vob"], "video/x-ms-wm": ["wm"], "video/x-ms-wmv": ["wmv"], "video/x-ms-wmx": ["wmx"], "video/x-ms-wvx": ["wvx"], "video/x-msvideo": ["avi"], "video/x-sgi-movie": ["movie"], "video/x-smv": ["smv"], "x-conference/x-cooltalk": ["ice"] }; } -} +}); -class ResponseExceededMaxSizeError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, ResponseExceededMaxSizeError) - this.name = 'ResponseExceededMaxSizeError' - this.message = message || 'Response content exceeded max size' - this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' +// node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js +var require_mime = __commonJS({ + "node_modules/.pnpm/mime@1.6.0/node_modules/mime/mime.js"(exports2, module2) { + var path2 = __require("path"); + var fs2 = __require("fs"); + function Mime() { + this.types = /* @__PURE__ */ Object.create(null); + this.extensions = /* @__PURE__ */ Object.create(null); + } + Mime.prototype.define = function(map2) { + for (var type2 in map2) { + var exts = map2[type2]; + for (var i = 0; i < exts.length; i++) { + if (process.env.DEBUG_MIME && this.types[exts[i]]) { + console.warn((this._loading || "define()").replace(/.*\//, ""), 'changes "' + exts[i] + '" extension type from ' + this.types[exts[i]] + " to " + type2); + } + this.types[exts[i]] = type2; + } + if (!this.extensions[type2]) { + this.extensions[type2] = exts[0]; + } + } + }; + Mime.prototype.load = function(file) { + this._loading = file; + var map2 = {}, content = fs2.readFileSync(file, "ascii"), lines = content.split(/[\r\n]+/); + lines.forEach(function(line) { + var fields = line.replace(/\s*#.*|^\s*|\s*$/g, "").split(/\s+/); + map2[fields.shift()] = fields; + }); + this.define(map2); + this._loading = null; + }; + Mime.prototype.lookup = function(path3, fallback) { + var ext = path3.replace(/^.*[\.\/\\]/, "").toLowerCase(); + return this.types[ext] || fallback || this.default_type; + }; + Mime.prototype.extension = function(mimeType) { + var type2 = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); + return this.extensions[type2]; + }; + var mime = new Mime(); + mime.define(require_types()); + mime.default_type = mime.lookup("bin"); + mime.Mime = Mime; + mime.charsets = { + lookup: function(mimeType, fallback) { + return /^text\/|^application\/(javascript|json)/.test(mimeType) ? "UTF-8" : fallback; + } + }; + module2.exports = mime; } -} - -class RequestRetryError extends UndiciError { - constructor (message, code, { headers, data }) { - super(message) - Error.captureStackTrace(this, 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, - UndiciError, - HeadersTimeoutError, - HeadersOverflowError, - BodyTimeoutError, - RequestContentLengthMismatchError, - ConnectTimeoutError, - ResponseStatusCodeError, - InvalidArgumentError, - InvalidReturnValueError, - RequestAbortedError, - ClientDestroyedError, - ClientClosedError, - InformationalError, - SocketError, - NotSupportedError, - ResponseContentLengthMismatchError, - BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError, - RequestRetryError -} - - -/***/ }), - -/***/ 4916: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - InvalidArgumentError, - NotSupportedError -} = __nccwpck_require__(33862) -const assert = __nccwpck_require__(42613) -const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(34856) -const util = __nccwpck_require__(33465) - -// 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 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 headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/ - -// Verifies that a given path is valid does not contain control chars \x00 to \x20 -const invalidPathRegex = /[^\u0021-\u00ff]/ - -const kHandler = Symbol('handler') - -const channels = {} - -let extractBody - -try { - const diagnosticsChannel = __nccwpck_require__(31637) - channels.create = diagnosticsChannel.channel('undici:request:create') - channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') - channels.headers = diagnosticsChannel.channel('undici:request:headers') - channels.trailers = diagnosticsChannel.channel('undici:request:trailers') - channels.error = diagnosticsChannel.channel('undici:request:error') -} catch { - channels.create = { hasSubscribers: false } - channels.bodySent = { hasSubscribers: false } - channels.headers = { hasSubscribers: false } - channels.trailers = { hasSubscribers: false } - channels.error = { hasSubscribers: false } -} - -class Request { - constructor (origin, { - path, - method, - body, - headers, - query, - idempotent, - blocking, - upgrade, - headersTimeout, - bodyTimeout, - reset, - throwOnError, - expectContinue - }, handler) { - if (typeof path !== 'string') { - throw new InvalidArgumentError('path must be a string') - } else if ( - path[0] !== '/' && - !(path.startsWith('http://') || path.startsWith('https://')) && - method !== 'CONNECT' - ) { - throw new InvalidArgumentError('path must be an absolute URL or start with a slash') - } else if (invalidPathRegex.exec(path) !== null) { - throw new InvalidArgumentError('invalid request path') - } +}); - if (typeof method !== 'string') { - throw new InvalidArgumentError('method must be a string') - } else if (tokenRegExp.exec(method) === null) { - throw new InvalidArgumentError('invalid request method') +// node_modules/.pnpm/range-parser@1.2.1/node_modules/range-parser/index.js +var require_range_parser = __commonJS({ + "node_modules/.pnpm/range-parser@1.2.1/node_modules/range-parser/index.js"(exports2, module2) { + "use strict"; + module2.exports = rangeParser; + function rangeParser(size, str2, options2) { + if (typeof str2 !== "string") { + throw new TypeError("argument str must be a string"); + } + var index = str2.indexOf("="); + if (index === -1) { + return -2; + } + var arr = str2.slice(index + 1).split(","); + var ranges = []; + ranges.type = str2.slice(0, index); + for (var i = 0; i < arr.length; i++) { + var range = arr[i].split("-"); + var start = parseInt(range[0], 10); + var end2 = parseInt(range[1], 10); + if (isNaN(start)) { + start = size - end2; + end2 = size - 1; + } else if (isNaN(end2)) { + end2 = size - 1; + } + if (end2 > size - 1) { + end2 = size - 1; + } + if (isNaN(start) || isNaN(end2) || start > end2 || start < 0) { + continue; + } + ranges.push({ + start, + end: end2 + }); + } + if (ranges.length < 1) { + return -1; + } + return options2 && options2.combine ? combineRanges(ranges) : ranges; } - - if (upgrade && typeof upgrade !== 'string') { - throw new InvalidArgumentError('upgrade must be a string') + function combineRanges(ranges) { + var ordered = ranges.map(mapWithIndex).sort(sortByRangeStart); + for (var j = 0, i = 1; i < ordered.length; i++) { + var range = ordered[i]; + var current = ordered[j]; + if (range.start > current.end + 1) { + ordered[++j] = range; + } else if (range.end > current.end) { + current.end = range.end; + current.index = Math.min(current.index, range.index); + } + } + ordered.length = j + 1; + var combined = ordered.sort(sortByRangeIndex).map(mapWithoutIndex); + combined.type = ranges.type; + return combined; } - - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError('invalid headersTimeout') + function mapWithIndex(range, index) { + return { + start: range.start, + end: range.end, + index + }; } - - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError('invalid bodyTimeout') + function mapWithoutIndex(range) { + return { + start: range.start, + end: range.end + }; } - - if (reset != null && typeof reset !== 'boolean') { - throw new InvalidArgumentError('invalid reset') + function sortByRangeIndex(a, b) { + return a.index - b.index; } - - if (expectContinue != null && typeof expectContinue !== 'boolean') { - throw new InvalidArgumentError('invalid expectContinue') + function sortByRangeStart(a, b) { + return a.start - b.start; } + } +}); - this.headersTimeout = headersTimeout - - this.bodyTimeout = bodyTimeout - - this.throwOnError = throwOnError === true - - this.method = method - - this.abort = null - - if (body == null) { - this.body = null - } else if (util.isStream(body)) { - this.body = body - - const rState = this.body._readableState - if (!rState || !rState.autoDestroy) { - this.endHandler = function autoDestroy () { - util.destroy(this) +// node_modules/.pnpm/send@0.19.0/node_modules/send/index.js +var require_send = __commonJS({ + "node_modules/.pnpm/send@0.19.0/node_modules/send/index.js"(exports2, module2) { + "use strict"; + var createError = require_http_errors(); + var debug3 = require_src2()("send"); + var deprecate = require_depd()("send"); + var destroy = require_destroy2(); + var encodeUrl = require_encodeurl2(); + var escapeHtml = require_escape_html(); + var etag = require_etag(); + var fresh = require_fresh(); + var fs2 = __require("fs"); + var mime = require_mime(); + var ms = require_ms(); + var onFinished = require_on_finished(); + var parseRange = require_range_parser(); + var path2 = __require("path"); + var statuses = require_statuses(); + var Stream = __require("stream"); + var util2 = __require("util"); + var extname = path2.extname; + var join5 = path2.join; + var normalize2 = path2.normalize; + var resolve4 = path2.resolve; + var sep2 = path2.sep; + var BYTES_RANGE_REGEXP = /^ *bytes=/; + var MAX_MAXAGE = 60 * 60 * 24 * 365 * 1e3; + var UP_PATH_REGEXP = /(?:^|[\\/])\.\.(?:[\\/]|$)/; + module2.exports = send; + module2.exports.mime = mime; + function send(req, path3, options2) { + return new SendStream(req, path3, options2); + } + function SendStream(req, path3, options2) { + Stream.call(this); + var opts = options2 || {}; + this.options = opts; + this.path = path3; + this.req = req; + this._acceptRanges = opts.acceptRanges !== void 0 ? Boolean(opts.acceptRanges) : true; + this._cacheControl = opts.cacheControl !== void 0 ? Boolean(opts.cacheControl) : true; + this._etag = opts.etag !== void 0 ? Boolean(opts.etag) : true; + this._dotfiles = opts.dotfiles !== void 0 ? opts.dotfiles : "ignore"; + if (this._dotfiles !== "ignore" && this._dotfiles !== "allow" && this._dotfiles !== "deny") { + throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"'); + } + this._hidden = Boolean(opts.hidden); + if (opts.hidden !== void 0) { + deprecate("hidden: use dotfiles: '" + (this._hidden ? "allow" : "ignore") + "' instead"); + } + if (opts.dotfiles === void 0) { + this._dotfiles = void 0; + } + this._extensions = opts.extensions !== void 0 ? normalizeList(opts.extensions, "extensions option") : []; + this._immutable = opts.immutable !== void 0 ? Boolean(opts.immutable) : false; + this._index = opts.index !== void 0 ? normalizeList(opts.index, "index option") : ["index.html"]; + this._lastModified = opts.lastModified !== void 0 ? Boolean(opts.lastModified) : true; + this._maxage = opts.maxAge || opts.maxage; + this._maxage = typeof this._maxage === "string" ? ms(this._maxage) : Number(this._maxage); + this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0; + this._root = opts.root ? resolve4(opts.root) : null; + if (!this._root && opts.from) { + this.from(opts.from); + } + } + util2.inherits(SendStream, Stream); + SendStream.prototype.etag = deprecate.function(function etag2(val) { + this._etag = Boolean(val); + debug3("etag %s", this._etag); + return this; + }, "send.etag: pass etag as option"); + SendStream.prototype.hidden = deprecate.function(function hidden(val) { + this._hidden = Boolean(val); + this._dotfiles = void 0; + debug3("hidden %s", this._hidden); + return this; + }, "send.hidden: use dotfiles option"); + SendStream.prototype.index = deprecate.function(function index(paths) { + var index2 = !paths ? [] : normalizeList(paths, "paths argument"); + debug3("index %o", paths); + this._index = index2; + return this; + }, "send.index: pass index as option"); + SendStream.prototype.root = function root(path3) { + this._root = resolve4(String(path3)); + debug3("root %s", this._root); + return this; + }; + SendStream.prototype.from = deprecate.function( + SendStream.prototype.root, + "send.from: pass root as option" + ); + SendStream.prototype.root = deprecate.function( + SendStream.prototype.root, + "send.root: pass root as option" + ); + SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) { + this._maxage = typeof maxAge === "string" ? ms(maxAge) : Number(maxAge); + this._maxage = !isNaN(this._maxage) ? Math.min(Math.max(0, this._maxage), MAX_MAXAGE) : 0; + debug3("max-age %d", this._maxage); + return this; + }, "send.maxage: pass maxAge as option"); + SendStream.prototype.error = function error(status, err) { + if (hasListeners(this, "error")) { + return this.emit("error", createHttpError(status, err)); + } + var res = this.res; + var msg = statuses.message[status] || String(status); + var doc = createHtmlDocument("Error", escapeHtml(msg)); + clearHeaders(res); + if (err && err.headers) { + setHeaders(res, err.headers); + } + res.statusCode = status; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.end(doc); + }; + SendStream.prototype.hasTrailingSlash = function hasTrailingSlash() { + return this.path[this.path.length - 1] === "/"; + }; + SendStream.prototype.isConditionalGET = function isConditionalGET() { + return this.req.headers["if-match"] || this.req.headers["if-unmodified-since"] || this.req.headers["if-none-match"] || this.req.headers["if-modified-since"]; + }; + SendStream.prototype.isPreconditionFailure = function isPreconditionFailure() { + var req = this.req; + var res = this.res; + var match = req.headers["if-match"]; + if (match) { + var etag2 = res.getHeader("ETag"); + return !etag2 || match !== "*" && parseTokenList(match).every(function(match2) { + return match2 !== etag2 && match2 !== "W/" + etag2 && "W/" + match2 !== etag2; + }); + } + var unmodifiedSince = parseHttpDate(req.headers["if-unmodified-since"]); + if (!isNaN(unmodifiedSince)) { + var lastModified = parseHttpDate(res.getHeader("Last-Modified")); + return isNaN(lastModified) || lastModified > unmodifiedSince; + } + return false; + }; + SendStream.prototype.removeContentHeaderFields = function removeContentHeaderFields() { + var res = this.res; + res.removeHeader("Content-Encoding"); + res.removeHeader("Content-Language"); + res.removeHeader("Content-Length"); + res.removeHeader("Content-Range"); + res.removeHeader("Content-Type"); + }; + SendStream.prototype.notModified = function notModified() { + var res = this.res; + debug3("not modified"); + this.removeContentHeaderFields(); + res.statusCode = 304; + res.end(); + }; + SendStream.prototype.headersAlreadySent = function headersAlreadySent() { + var err = new Error("Can't set headers after they are sent."); + debug3("headers already sent"); + this.error(500, err); + }; + SendStream.prototype.isCachable = function isCachable() { + var statusCode = this.res.statusCode; + return statusCode >= 200 && statusCode < 300 || statusCode === 304; + }; + SendStream.prototype.onStatError = function onStatError(error) { + switch (error.code) { + case "ENAMETOOLONG": + case "ENOENT": + case "ENOTDIR": + this.error(404, error); + break; + default: + this.error(500, error); + break; + } + }; + SendStream.prototype.isFresh = function isFresh() { + return fresh(this.req.headers, { + etag: this.res.getHeader("ETag"), + "last-modified": this.res.getHeader("Last-Modified") + }); + }; + SendStream.prototype.isRangeFresh = function isRangeFresh() { + var ifRange = this.req.headers["if-range"]; + if (!ifRange) { + return true; + } + if (ifRange.indexOf('"') !== -1) { + var etag2 = this.res.getHeader("ETag"); + return Boolean(etag2 && ifRange.indexOf(etag2) !== -1); + } + var lastModified = this.res.getHeader("Last-Modified"); + return parseHttpDate(lastModified) <= parseHttpDate(ifRange); + }; + SendStream.prototype.redirect = function redirect(path3) { + var res = this.res; + if (hasListeners(this, "directory")) { + this.emit("directory", res, path3); + return; + } + if (this.hasTrailingSlash()) { + this.error(403); + return; + } + var loc = encodeUrl(collapseLeadingSlashes(this.path + "/")); + var doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc)); + res.statusCode = 301; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Location", loc); + res.end(doc); + }; + SendStream.prototype.pipe = function pipe(res) { + var root = this._root; + this.res = res; + var path3 = decode(this.path); + if (path3 === -1) { + this.error(400); + return res; + } + if (~path3.indexOf("\0")) { + this.error(400); + return res; + } + var parts; + if (root !== null) { + if (path3) { + path3 = normalize2("." + sep2 + path3); } - this.body.on('end', this.endHandler) + if (UP_PATH_REGEXP.test(path3)) { + debug3('malicious path "%s"', path3); + this.error(403); + return res; + } + parts = path3.split(sep2); + path3 = normalize2(join5(root, path3)); + } else { + if (UP_PATH_REGEXP.test(path3)) { + debug3('malicious path "%s"', path3); + this.error(403); + return res; + } + parts = normalize2(path3).split(sep2); + path3 = resolve4(path3); } - - this.errorHandler = err => { - if (this.abort) { - this.abort(err) - } else { - this.error = err - } - } - this.body.on('error', this.errorHandler) - } else if (util.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 (util.isFormDataLike(body) || util.isIterable(body) || util.isBlobLike(body)) { - this.body = body - } else { - throw new 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 ? util.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 InvalidArgumentError('headers array must be even') + if (containsDotFile(parts)) { + var access = this._dotfiles; + if (access === void 0) { + access = parts[parts.length - 1][0] === "." ? this._hidden ? "allow" : "ignore" : "allow"; + } + debug3('%s dotfile "%s"', access, path3); + switch (access) { + case "allow": + break; + case "deny": + this.error(403); + return res; + case "ignore": + default: + this.error(404); + return res; + } + } + if (this._index.length && this.hasTrailingSlash()) { + this.sendIndex(path3); + return res; + } + this.sendFile(path3); + return res; + }; + SendStream.prototype.send = function send2(path3, stat) { + var len = stat.size; + var options2 = this.options; + var opts = {}; + var res = this.res; + var req = this.req; + var ranges = req.headers.range; + var offset = options2.start || 0; + if (headersSent(res)) { + this.headersAlreadySent(); + return; + } + debug3('pipe "%s"', path3); + this.setHeader(path3, stat); + this.type(path3); + if (this.isConditionalGET()) { + if (this.isPreconditionFailure()) { + this.error(412); + return; + } + if (this.isCachable() && this.isFresh()) { + this.notModified(); + return; + } + } + len = Math.max(0, len - offset); + if (options2.end !== void 0) { + var bytes = options2.end - offset + 1; + if (len > bytes) len = bytes; + } + if (this._acceptRanges && BYTES_RANGE_REGEXP.test(ranges)) { + ranges = parseRange(len, ranges, { + combine: true + }); + if (!this.isRangeFresh()) { + debug3("range stale"); + ranges = -2; + } + if (ranges === -1) { + debug3("range unsatisfiable"); + res.setHeader("Content-Range", contentRange("bytes", len)); + return this.error(416, { + headers: { "Content-Range": res.getHeader("Content-Range") } + }); + } + if (ranges !== -2 && ranges.length === 1) { + debug3("range %j", ranges); + res.statusCode = 206; + res.setHeader("Content-Range", contentRange("bytes", len, ranges[0])); + offset += ranges[0].start; + len = ranges[0].end - ranges[0].start + 1; + } + } + for (var prop in options2) { + opts[prop] = options2[prop]; + } + opts.start = offset; + opts.end = Math.max(offset, offset + len - 1); + res.setHeader("Content-Length", len); + if (req.method === "HEAD") { + res.end(); + return; + } + this.stream(path3, opts); + }; + SendStream.prototype.sendFile = function sendFile(path3) { + var i = 0; + var self2 = this; + debug3('stat "%s"', path3); + fs2.stat(path3, function onstat(err, stat) { + if (err && err.code === "ENOENT" && !extname(path3) && path3[path3.length - 1] !== sep2) { + return next(err); + } + if (err) return self2.onStatError(err); + if (stat.isDirectory()) return self2.redirect(path3); + self2.emit("file", path3, stat); + self2.send(path3, stat); + }); + function next(err) { + if (self2._extensions.length <= i) { + return err ? self2.onStatError(err) : self2.error(404); + } + var p = path3 + "." + self2._extensions[i++]; + debug3('stat "%s"', p); + fs2.stat(p, function(err2, stat) { + if (err2) return next(err2); + if (stat.isDirectory()) return next(); + self2.emit("file", p, stat); + self2.send(p, stat); + }); + } + }; + SendStream.prototype.sendIndex = function sendIndex(path3) { + var i = -1; + var self2 = this; + function next(err) { + if (++i >= self2._index.length) { + if (err) return self2.onStatError(err); + return self2.error(404); + } + var p = join5(path3, self2._index[i]); + debug3('stat "%s"', p); + fs2.stat(p, function(err2, stat) { + if (err2) return next(err2); + if (stat.isDirectory()) return next(); + self2.emit("file", p, stat); + self2.send(p, stat); + }); + } + next(); + }; + SendStream.prototype.stream = function stream(path3, options2) { + var self2 = this; + var res = this.res; + var stream2 = fs2.createReadStream(path3, options2); + this.emit("stream", stream2); + stream2.pipe(res); + function cleanup() { + destroy(stream2, true); + } + onFinished(res, cleanup); + stream2.on("error", function onerror(err) { + cleanup(); + self2.onStatError(err); + }); + stream2.on("end", function onend() { + self2.emit("end"); + }); + }; + SendStream.prototype.type = function type2(path3) { + var res = this.res; + if (res.getHeader("Content-Type")) return; + var type3 = mime.lookup(path3); + if (!type3) { + debug3("no content-type"); + return; } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]) + var charset = mime.charsets.lookup(type3); + debug3("content-type %s", type3); + res.setHeader("Content-Type", type3 + (charset ? "; charset=" + charset : "")); + }; + SendStream.prototype.setHeader = function setHeader(path3, stat) { + var res = this.res; + this.emit("headers", res, path3, stat); + if (this._acceptRanges && !res.getHeader("Accept-Ranges")) { + debug3("accept ranges"); + res.setHeader("Accept-Ranges", "bytes"); + } + if (this._cacheControl && !res.getHeader("Cache-Control")) { + var cacheControl = "public, max-age=" + Math.floor(this._maxage / 1e3); + if (this._immutable) { + cacheControl += ", immutable"; + } + debug3("cache-control %s", cacheControl); + res.setHeader("Cache-Control", cacheControl); + } + if (this._lastModified && !res.getHeader("Last-Modified")) { + var modified = stat.mtime.toUTCString(); + debug3("modified %s", modified); + res.setHeader("Last-Modified", modified); + } + if (this._etag && !res.getHeader("ETag")) { + var val = etag(stat); + debug3("etag %s", val); + res.setHeader("ETag", val); } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(this, key, headers[key]) + }; + function clearHeaders(res) { + var headers = getHeaderNames(res); + for (var i = 0; i < headers.length; i++) { + res.removeHeader(headers[i]); } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') } - - if (util.isFormDataLike(this.body)) { - if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { - throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') - } - - if (!extractBody) { - extractBody = (__nccwpck_require__(1380).extractBody) + function collapseLeadingSlashes(str2) { + for (var i = 0; i < str2.length; i++) { + if (str2[i] !== "/") { + break; + } } - - const [bodyStream, contentType] = extractBody(body) - if (this.contentType == null) { - this.contentType = contentType - this.headers += `content-type: ${contentType}\r\n` + return i > 1 ? "/" + str2.substr(i) : str2; + } + function containsDotFile(parts) { + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + if (part.length > 1 && part[0] === ".") { + return true; + } } - this.body = bodyStream.stream - this.contentLength = bodyStream.length - } else if (util.isBlobLike(body) && this.contentType == null && body.type) { - this.contentType = body.type - this.headers += `content-type: ${body.type}\r\n` + return false; } - - util.validateHandler(handler, method, upgrade) - - this.servername = util.getServerName(this.host) - - this[kHandler] = handler - - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }) + function contentRange(type2, size, range) { + return type2 + " " + (range ? range.start + "-" + range.end : "*") + "/" + size; } - } - - onBodySent (chunk) { - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk) - } catch (err) { - this.abort(err) - } + function createHtmlDocument(title, body) { + return '\n\n\n\n' + title + "\n\n\n
" + body + "
\n\n\n"; } - } - - onRequestSent () { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }) + function createHttpError(status, err) { + if (!err) { + return createError(status); + } + return err instanceof Error ? createError(status, err, { expose: false }) : createError(status, err); } - - if (this[kHandler].onRequestSent) { + function decode(path3) { try { - return this[kHandler].onRequestSent() + return decodeURIComponent(path3); } catch (err) { - this.abort(err) + return -1; } } - } - - onConnect (abort) { - assert(!this.aborted) - assert(!this.completed) - - if (this.error) { - abort(this.error) - } else { - this.abort = abort - return this[kHandler].onConnect(abort) - } - } - - onHeaders (statusCode, headers, resume, statusText) { - assert(!this.aborted) - assert(!this.completed) - - if (channels.headers.hasSubscribers) { - channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) + function getHeaderNames(res) { + return typeof res.getHeaderNames !== "function" ? Object.keys(res._headers || {}) : res.getHeaderNames(); } - - try { - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) - } catch (err) { - this.abort(err) + function hasListeners(emitter, type2) { + var count = typeof emitter.listenerCount !== "function" ? emitter.listeners(type2).length : emitter.listenerCount(type2); + return count > 0; } - } - - onData (chunk) { - assert(!this.aborted) - assert(!this.completed) - - try { - return this[kHandler].onData(chunk) - } catch (err) { - this.abort(err) - return false + function headersSent(res) { + return typeof res.headersSent !== "boolean" ? Boolean(res._header) : res.headersSent; } - } - - onUpgrade (statusCode, headers, socket) { - assert(!this.aborted) - assert(!this.completed) - - return this[kHandler].onUpgrade(statusCode, headers, socket) - } - - onComplete (trailers) { - this.onFinally() - - assert(!this.aborted) - - this.completed = true - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ request: this, trailers }) + function normalizeList(val, name) { + var list = [].concat(val || []); + for (var i = 0; i < list.length; i++) { + if (typeof list[i] !== "string") { + throw new TypeError(name + " must be array of strings or false"); + } + } + return list; } - - try { - return this[kHandler].onComplete(trailers) - } catch (err) { - // TODO (fix): This might be a bad idea? - this.onError(err) + function parseHttpDate(date) { + var timestamp2 = date && Date.parse(date); + return typeof timestamp2 === "number" ? timestamp2 : NaN; } - } - - onError (error) { - this.onFinally() - - if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error }) + function parseTokenList(str2) { + var end2 = 0; + var list = []; + var start = 0; + for (var i = 0, len = str2.length; i < len; i++) { + switch (str2.charCodeAt(i)) { + case 32: + if (start === end2) { + start = end2 = i + 1; + } + break; + case 44: + if (start !== end2) { + list.push(str2.substring(start, end2)); + } + start = end2 = i + 1; + break; + default: + end2 = i + 1; + break; + } + } + if (start !== end2) { + list.push(str2.substring(start, end2)); + } + return list; } - - if (this.aborted) { - return + function setHeaders(res, headers) { + var keys = Object.keys(headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + res.setHeader(key, headers[key]); + } } - this.aborted = true - - return this[kHandler].onError(error) } +}); - 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 +// node_modules/.pnpm/forwarded@0.2.0/node_modules/forwarded/index.js +var require_forwarded = __commonJS({ + "node_modules/.pnpm/forwarded@0.2.0/node_modules/forwarded/index.js"(exports2, module2) { + "use strict"; + module2.exports = forwarded; + function forwarded(req) { + if (!req) { + throw new TypeError("argument req is required"); + } + var proxyAddrs = parse2(req.headers["x-forwarded-for"] || ""); + var socketAddr = getSocketAddr(req); + var addrs = [socketAddr].concat(proxyAddrs); + return addrs; + } + function getSocketAddr(req) { + return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress; + } + function parse2(header) { + var end2 = header.length; + var list = []; + var start = header.length; + for (var i = header.length - 1; i >= 0; i--) { + switch (header.charCodeAt(i)) { + case 32: + if (start === end2) { + start = end2 = i; + } + break; + case 44: + if (start !== end2) { + list.push(header.substring(start, end2)); + } + start = end2 = i; + break; + default: + start = i; + break; + } + } + if (start !== end2) { + list.push(header.substring(start, end2)); + } + return list; } } +}); - // TODO: adjust to support H2 - addHeader (key, value) { - processHeader(this, key, value) - return this - } - - static [kHTTP1BuildRequest] (origin, opts, handler) { - // TODO: Migrate header parsing here, to make Requests - // HTTP agnostic - return new Request(origin, opts, handler) +// node_modules/.pnpm/ipaddr.js@1.9.1/node_modules/ipaddr.js/lib/ipaddr.js +var require_ipaddr = __commonJS({ + "node_modules/.pnpm/ipaddr.js@1.9.1/node_modules/ipaddr.js/lib/ipaddr.js"(exports2, module2) { + (function() { + var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex; + ipaddr = {}; + root = this; + if (typeof module2 !== "undefined" && module2 !== null && module2.exports) { + module2.exports = ipaddr; + } else { + root["ipaddr"] = ipaddr; + } + matchCIDR = function(first, second, partSize, cidrBits) { + var part, shift; + if (first.length !== second.length) { + throw new Error("ipaddr: cannot match CIDR for objects with different lengths"); + } + part = 0; + while (cidrBits > 0) { + shift = partSize - cidrBits; + if (shift < 0) { + shift = 0; + } + if (first[part] >> shift !== second[part] >> shift) { + return false; + } + cidrBits -= partSize; + part += 1; + } + return true; + }; + ipaddr.subnetMatch = function(address, rangeList, defaultName) { + var k, len, rangeName, rangeSubnets, subnet; + if (defaultName == null) { + defaultName = "unicast"; + } + for (rangeName in rangeList) { + rangeSubnets = rangeList[rangeName]; + if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) { + rangeSubnets = [rangeSubnets]; + } + for (k = 0, len = rangeSubnets.length; k < len; k++) { + subnet = rangeSubnets[k]; + if (address.kind() === subnet[0].kind()) { + if (address.match.apply(address, subnet)) { + return rangeName; + } + } + } + } + return defaultName; + }; + ipaddr.IPv4 = function() { + function IPv4(octets) { + var k, len, octet; + if (octets.length !== 4) { + throw new Error("ipaddr: ipv4 octet count should be 4"); + } + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!(0 <= octet && octet <= 255)) { + throw new Error("ipaddr: ipv4 octet should fit in 8 bits"); + } + } + this.octets = octets; + } + IPv4.prototype.kind = function() { + return "ipv4"; + }; + IPv4.prototype.toString = function() { + return this.octets.join("."); + }; + IPv4.prototype.toNormalizedString = function() { + return this.toString(); + }; + IPv4.prototype.toByteArray = function() { + return this.octets.slice(0); + }; + IPv4.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== "ipv4") { + throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one"); + } + return matchCIDR(this.octets, other.octets, 8, cidrRange); + }; + IPv4.prototype.SpecialRanges = { + unspecified: [[new IPv4([0, 0, 0, 0]), 8]], + broadcast: [[new IPv4([255, 255, 255, 255]), 32]], + multicast: [[new IPv4([224, 0, 0, 0]), 4]], + linkLocal: [[new IPv4([169, 254, 0, 0]), 16]], + loopback: [[new IPv4([127, 0, 0, 0]), 8]], + carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]], + "private": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]], + reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]] + }; + IPv4.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv4.prototype.toIPv4MappedAddress = function() { + return ipaddr.IPv6.parse("::ffff:" + this.toString()); + }; + IPv4.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, octet, stop, zeros, zerotable; + zerotable = { + 0: 8, + 128: 7, + 192: 6, + 224: 5, + 240: 4, + 248: 3, + 252: 2, + 254: 1, + 255: 0 + }; + cidr = 0; + stop = false; + for (i = k = 3; k >= 0; i = k += -1) { + octet = this.octets[i]; + if (octet in zerotable) { + zeros = zerotable[octet]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 8) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 32 - cidr; + }; + return IPv4; + }(); + ipv4Part = "(0?\\d+|0x[a-f0-9]+)"; + ipv4Regexes = { + fourOctet: new RegExp("^" + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "$", "i"), + longValue: new RegExp("^" + ipv4Part + "$", "i") + }; + ipaddr.IPv4.parser = function(string) { + var match, parseIntAuto, part, shift, value; + parseIntAuto = function(string2) { + if (string2[0] === "0" && string2[1] !== "x") { + return parseInt(string2, 8); + } else { + return parseInt(string2); + } + }; + if (match = string.match(ipv4Regexes.fourOctet)) { + return function() { + var k, len, ref, results; + ref = match.slice(1, 6); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseIntAuto(part)); + } + return results; + }(); + } else if (match = string.match(ipv4Regexes.longValue)) { + value = parseIntAuto(match[1]); + if (value > 4294967295 || value < 0) { + throw new Error("ipaddr: address outside defined range"); + } + return function() { + var k, results; + results = []; + for (shift = k = 0; k <= 24; shift = k += 8) { + results.push(value >> shift & 255); + } + return results; + }().reverse(); + } else { + return null; + } + }; + ipaddr.IPv6 = function() { + function IPv6(parts, zoneId) { + var i, k, l, len, part, ref; + if (parts.length === 16) { + this.parts = []; + for (i = k = 0; k <= 14; i = k += 2) { + this.parts.push(parts[i] << 8 | parts[i + 1]); + } + } else if (parts.length === 8) { + this.parts = parts; + } else { + throw new Error("ipaddr: ipv6 part count should be 8 or 16"); + } + ref = this.parts; + for (l = 0, len = ref.length; l < len; l++) { + part = ref[l]; + if (!(0 <= part && part <= 65535)) { + throw new Error("ipaddr: ipv6 part should fit in 16 bits"); + } + } + if (zoneId) { + this.zoneId = zoneId; + } + } + IPv6.prototype.kind = function() { + return "ipv6"; + }; + IPv6.prototype.toString = function() { + return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, "::"); + }; + IPv6.prototype.toRFC5952String = function() { + var bestMatchIndex, bestMatchLength, match, regex2, string; + regex2 = /((^|:)(0(:|$)){2,})/g; + string = this.toNormalizedString(); + bestMatchIndex = 0; + bestMatchLength = -1; + while (match = regex2.exec(string)) { + if (match[0].length > bestMatchLength) { + bestMatchIndex = match.index; + bestMatchLength = match[0].length; + } + } + if (bestMatchLength < 0) { + return string; + } + return string.substring(0, bestMatchIndex) + "::" + string.substring(bestMatchIndex + bestMatchLength); + }; + IPv6.prototype.toByteArray = function() { + var bytes, k, len, part, ref; + bytes = []; + ref = this.parts; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + bytes.push(part >> 8); + bytes.push(part & 255); + } + return bytes; + }; + IPv6.prototype.toNormalizedString = function() { + var addr, part, suffix; + addr = function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16)); + } + return results; + }.call(this).join(":"); + suffix = ""; + if (this.zoneId) { + suffix = "%" + this.zoneId; + } + return addr + suffix; + }; + IPv6.prototype.toFixedLengthString = function() { + var addr, part, suffix; + addr = function() { + var k, len, ref, results; + ref = this.parts; + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(part.toString(16).padStart(4, "0")); + } + return results; + }.call(this).join(":"); + suffix = ""; + if (this.zoneId) { + suffix = "%" + this.zoneId; + } + return addr + suffix; + }; + IPv6.prototype.match = function(other, cidrRange) { + var ref; + if (cidrRange === void 0) { + ref = other, other = ref[0], cidrRange = ref[1]; + } + if (other.kind() !== "ipv6") { + throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one"); + } + return matchCIDR(this.parts, other.parts, 16, cidrRange); + }; + IPv6.prototype.SpecialRanges = { + unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128], + linkLocal: [new IPv6([65152, 0, 0, 0, 0, 0, 0, 0]), 10], + multicast: [new IPv6([65280, 0, 0, 0, 0, 0, 0, 0]), 8], + loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128], + uniqueLocal: [new IPv6([64512, 0, 0, 0, 0, 0, 0, 0]), 7], + ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 65535, 0, 0]), 96], + rfc6145: [new IPv6([0, 0, 0, 0, 65535, 0, 0, 0]), 96], + rfc6052: [new IPv6([100, 65435, 0, 0, 0, 0, 0, 0]), 96], + "6to4": [new IPv6([8194, 0, 0, 0, 0, 0, 0, 0]), 16], + teredo: [new IPv6([8193, 0, 0, 0, 0, 0, 0, 0]), 32], + reserved: [[new IPv6([8193, 3512, 0, 0, 0, 0, 0, 0]), 32]] + }; + IPv6.prototype.range = function() { + return ipaddr.subnetMatch(this, this.SpecialRanges); + }; + IPv6.prototype.isIPv4MappedAddress = function() { + return this.range() === "ipv4Mapped"; + }; + IPv6.prototype.toIPv4Address = function() { + var high, low, ref; + if (!this.isIPv4MappedAddress()) { + throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4"); + } + ref = this.parts.slice(-2), high = ref[0], low = ref[1]; + return new ipaddr.IPv4([high >> 8, high & 255, low >> 8, low & 255]); + }; + IPv6.prototype.prefixLengthFromSubnetMask = function() { + var cidr, i, k, part, stop, zeros, zerotable; + zerotable = { + 0: 16, + 32768: 15, + 49152: 14, + 57344: 13, + 61440: 12, + 63488: 11, + 64512: 10, + 65024: 9, + 65280: 8, + 65408: 7, + 65472: 6, + 65504: 5, + 65520: 4, + 65528: 3, + 65532: 2, + 65534: 1, + 65535: 0 + }; + cidr = 0; + stop = false; + for (i = k = 7; k >= 0; i = k += -1) { + part = this.parts[i]; + if (part in zerotable) { + zeros = zerotable[part]; + if (stop && zeros !== 0) { + return null; + } + if (zeros !== 16) { + stop = true; + } + cidr += zeros; + } else { + return null; + } + } + return 128 - cidr; + }; + return IPv6; + }(); + ipv6Part = "(?:[0-9a-f]+::?)+"; + zoneIndex = "%[0-9a-z]{1,}"; + ipv6Regexes = { + zoneIndex: new RegExp(zoneIndex, "i"), + "native": new RegExp("^(::)?(" + ipv6Part + ")?([0-9a-f]+)?(::)?(" + zoneIndex + ")?$", "i"), + transitional: new RegExp("^((?:" + ipv6Part + ")|(?:::)(?:" + ipv6Part + ")?)" + (ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part + "\\." + ipv4Part) + ("(" + zoneIndex + ")?$"), "i") + }; + expandIPv6 = function(string, parts) { + var colonCount, lastColon, part, replacement, replacementCount, zoneId; + if (string.indexOf("::") !== string.lastIndexOf("::")) { + return null; + } + zoneId = (string.match(ipv6Regexes["zoneIndex"]) || [])[0]; + if (zoneId) { + zoneId = zoneId.substring(1); + string = string.replace(/%.+$/, ""); + } + colonCount = 0; + lastColon = -1; + while ((lastColon = string.indexOf(":", lastColon + 1)) >= 0) { + colonCount++; + } + if (string.substr(0, 2) === "::") { + colonCount--; + } + if (string.substr(-2, 2) === "::") { + colonCount--; + } + if (colonCount > parts) { + return null; + } + replacementCount = parts - colonCount; + replacement = ":"; + while (replacementCount--) { + replacement += "0:"; + } + string = string.replace("::", replacement); + if (string[0] === ":") { + string = string.slice(1); + } + if (string[string.length - 1] === ":") { + string = string.slice(0, -1); + } + parts = function() { + var k, len, ref, results; + ref = string.split(":"); + results = []; + for (k = 0, len = ref.length; k < len; k++) { + part = ref[k]; + results.push(parseInt(part, 16)); + } + return results; + }(); + return { + parts, + zoneId + }; + }; + ipaddr.IPv6.parser = function(string) { + var addr, k, len, match, octet, octets, zoneId; + if (ipv6Regexes["native"].test(string)) { + return expandIPv6(string, 8); + } else if (match = string.match(ipv6Regexes["transitional"])) { + zoneId = match[6] || ""; + addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6); + if (addr.parts) { + octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])]; + for (k = 0, len = octets.length; k < len; k++) { + octet = octets[k]; + if (!(0 <= octet && octet <= 255)) { + return null; + } + } + addr.parts.push(octets[0] << 8 | octets[1]); + addr.parts.push(octets[2] << 8 | octets[3]); + return { + parts: addr.parts, + zoneId: addr.zoneId + }; + } + } + return null; + }; + ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) { + return this.parser(string) !== null; + }; + ipaddr.IPv4.isValid = function(string) { + var e; + try { + new this(this.parser(string)); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + ipaddr.IPv4.isValidFourPartDecimal = function(string) { + if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/)) { + return true; + } else { + return false; + } + }; + ipaddr.IPv6.isValid = function(string) { + var addr, e; + if (typeof string === "string" && string.indexOf(":") === -1) { + return false; + } + try { + addr = this.parser(string); + new this(addr.parts, addr.zoneId); + return true; + } catch (error1) { + e = error1; + return false; + } + }; + ipaddr.IPv4.parse = function(string) { + var parts; + parts = this.parser(string); + if (parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(parts); + }; + ipaddr.IPv6.parse = function(string) { + var addr; + addr = this.parser(string); + if (addr.parts === null) { + throw new Error("ipaddr: string is not formatted like ip address"); + } + return new this(addr.parts, addr.zoneId); + }; + ipaddr.IPv4.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 32) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range"); + }; + ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) { + var filledOctetCount, j, octets; + prefix = parseInt(prefix); + if (prefix < 0 || prefix > 32) { + throw new Error("ipaddr: invalid IPv4 prefix length"); + } + octets = [0, 0, 0, 0]; + j = 0; + filledOctetCount = Math.floor(prefix / 8); + while (j < filledOctetCount) { + octets[j] = 255; + j++; + } + if (filledOctetCount < 4) { + octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - prefix % 8; + } + return new this(octets); + }; + ipaddr.IPv4.broadcastAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv4.networkAddressFromCIDR = function(string) { + var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets; + try { + cidr = this.parseCIDR(string); + ipInterfaceOctets = cidr[0].toByteArray(); + subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray(); + octets = []; + i = 0; + while (i < 4) { + octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10)); + i++; + } + return new this(octets); + } catch (error1) { + error = error1; + throw new Error("ipaddr: the address does not have IPv4 CIDR format"); + } + }; + ipaddr.IPv6.parseCIDR = function(string) { + var maskLength, match, parsed; + if (match = string.match(/^(.+)\/(\d+)$/)) { + maskLength = parseInt(match[2]); + if (maskLength >= 0 && maskLength <= 128) { + parsed = [this.parse(match[1]), maskLength]; + Object.defineProperty(parsed, "toString", { + value: function() { + return this.join("/"); + } + }); + return parsed; + } + } + throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range"); + }; + ipaddr.isValid = function(string) { + return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string); + }; + ipaddr.parse = function(string) { + if (ipaddr.IPv6.isValid(string)) { + return ipaddr.IPv6.parse(string); + } else if (ipaddr.IPv4.isValid(string)) { + return ipaddr.IPv4.parse(string); + } else { + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format"); + } + }; + ipaddr.parseCIDR = function(string) { + var e; + try { + return ipaddr.IPv6.parseCIDR(string); + } catch (error1) { + e = error1; + try { + return ipaddr.IPv4.parseCIDR(string); + } catch (error12) { + e = error12; + throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format"); + } + } + }; + ipaddr.fromByteArray = function(bytes) { + var length; + length = bytes.length; + if (length === 4) { + return new ipaddr.IPv4(bytes); + } else if (length === 16) { + return new ipaddr.IPv6(bytes); + } else { + throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address"); + } + }; + ipaddr.process = function(string) { + var addr; + addr = this.parse(string); + if (addr.kind() === "ipv6" && addr.isIPv4MappedAddress()) { + return addr.toIPv4Address(); + } else { + return addr; + } + }; + }).call(exports2); } +}); - static [kHTTP2BuildRequest] (origin, opts, handler) { - const headers = opts.headers - opts = { ...opts, headers: null } - - const request = new Request(origin, opts, handler) - - request.headers = {} - - if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError('headers array must be even') +// node_modules/.pnpm/proxy-addr@2.0.7/node_modules/proxy-addr/index.js +var require_proxy_addr = __commonJS({ + "node_modules/.pnpm/proxy-addr@2.0.7/node_modules/proxy-addr/index.js"(exports2, module2) { + "use strict"; + module2.exports = proxyaddr; + module2.exports.all = alladdrs; + module2.exports.compile = compile; + var forwarded = require_forwarded(); + var ipaddr = require_ipaddr(); + var DIGIT_REGEXP = /^[0-9]+$/; + var isip = ipaddr.isValid; + var parseip = ipaddr.parse; + var IP_RANGES = { + linklocal: ["169.254.0.0/16", "fe80::/10"], + loopback: ["127.0.0.1/8", "::1/128"], + uniquelocal: ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16", "fc00::/7"] + }; + function alladdrs(req, trust) { + var addrs = forwarded(req); + if (!trust) { + return addrs; } - for (let i = 0; i < headers.length; i += 2) { - processHeader(request, headers[i], headers[i + 1], true) + if (typeof trust !== "function") { + trust = compile(trust); } - } else if (headers && typeof headers === 'object') { - const keys = Object.keys(headers) - for (let i = 0; i < keys.length; i++) { - const key = keys[i] - processHeader(request, key, headers[key], true) + for (var i = 0; i < addrs.length - 1; i++) { + if (trust(addrs[i], i)) continue; + addrs.length = i + 1; } - } else if (headers != null) { - throw new InvalidArgumentError('headers must be an object or an array') - } - - return request - } - - static [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 - } - - return headers - } -} - -function processHeaderValue (key, val, skipAppend) { - if (val && typeof val === 'object') { - throw new InvalidArgumentError(`invalid ${key} header`) - } - - val = val != null ? `${val}` : '' - - if (headerCharRegex.exec(val) !== null) { - throw new InvalidArgumentError(`invalid ${key} header`) - } - - return skipAppend ? val : `${key}: ${val}\r\n` -} - -function processHeader (request, key, val, skipAppend = false) { - if (val && (typeof val === 'object' && !Array.isArray(val))) { - throw new InvalidArgumentError(`invalid ${key} header`) - } else if (val === undefined) { - return - } - - if ( - request.host === null && - key.length === 4 && - key.toLowerCase() === 'host' - ) { - if (headerCharRegex.exec(val) !== null) { - throw new 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 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] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } else if ( - key.length === 17 && - key.toLowerCase() === 'transfer-encoding' - ) { - throw new 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 InvalidArgumentError('invalid connection header') - } else if (value === 'close') { - request.reset = true - } - } else if ( - key.length === 10 && - key.toLowerCase() === 'keep-alive' - ) { - throw new InvalidArgumentError('invalid keep-alive header') - } else if ( - key.length === 7 && - key.toLowerCase() === 'upgrade' - ) { - throw new InvalidArgumentError('invalid upgrade header') - } else if ( - key.length === 6 && - key.toLowerCase() === 'expect' - ) { - throw new NotSupportedError('expect header not supported') - } else if (tokenRegExp.exec(key) === null) { - throw new 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] += `,${processHeaderValue(key, val[i], skipAppend)}` - else request.headers[key] = processHeaderValue(key, val[i], skipAppend) - } else { - request.headers += processHeaderValue(key, val[i]) + return addrs; + } + function compile(val) { + if (!val) { + throw new TypeError("argument is required"); + } + var trust; + if (typeof val === "string") { + trust = [val]; + } else if (Array.isArray(val)) { + trust = val.slice(); + } else { + throw new TypeError("unsupported trust argument"); + } + for (var i = 0; i < trust.length; i++) { + val = trust[i]; + if (!Object.prototype.hasOwnProperty.call(IP_RANGES, val)) { + continue; } + val = IP_RANGES[val]; + trust.splice.apply(trust, [i, 1].concat(val)); + i += val.length - 1; + } + return compileTrust(compileRangeSubnets(trust)); + } + function compileRangeSubnets(arr) { + var rangeSubnets = new Array(arr.length); + for (var i = 0; i < arr.length; i++) { + rangeSubnets[i] = parseipNotation(arr[i]); + } + return rangeSubnets; + } + function compileTrust(rangeSubnets) { + var len = rangeSubnets.length; + return len === 0 ? trustNone : len === 1 ? trustSingle(rangeSubnets[0]) : trustMulti(rangeSubnets); + } + function parseipNotation(note) { + var pos = note.lastIndexOf("/"); + var str2 = pos !== -1 ? note.substring(0, pos) : note; + if (!isip(str2)) { + throw new TypeError("invalid IP address: " + str2); + } + var ip = parseip(str2); + if (pos === -1 && ip.kind() === "ipv6" && ip.isIPv4MappedAddress()) { + ip = ip.toIPv4Address(); + } + var max = ip.kind() === "ipv6" ? 128 : 32; + var range = pos !== -1 ? note.substring(pos + 1, note.length) : null; + if (range === null) { + range = max; + } else if (DIGIT_REGEXP.test(range)) { + range = parseInt(range, 10); + } else if (ip.kind() === "ipv4" && isip(range)) { + range = parseNetmask(range); + } else { + range = null; } - } else { - if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) - else request.headers += processHeaderValue(key, val) - } - } -} - -module.exports = Request - - -/***/ }), - -/***/ 34856: -/***/ ((module) => { - -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') -} - - -/***/ }), - -/***/ 33465: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const assert = __nccwpck_require__(42613) -const { kDestroyed, kBodyUsed } = __nccwpck_require__(34856) -const { IncomingMessage } = __nccwpck_require__(58611) -const stream = __nccwpck_require__(2203) -const net = __nccwpck_require__(69278) -const { InvalidArgumentError } = __nccwpck_require__(33862) -const { Blob } = __nccwpck_require__(20181) -const nodeUtil = __nccwpck_require__(39023) -const { stringify } = __nccwpck_require__(83480) -const { headerNameLowerCasedRecord } = __nccwpck_require__(48088) - -const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) - -function nop () {} - -function 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 isBlobLike (object) { - return (Blob && object instanceof Blob) || ( - object && - typeof object === 'object' && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - /^(Blob|File)$/.test(object[Symbol.toStringTag]) - ) -} - -function buildURL (url, queryParams) { - if (url.includes('?') || url.includes('#')) { - throw new Error('Query params cannot be passed when url already contains "?" or "#".') - } - - const stringified = stringify(queryParams) - - if (stringified) { - url += '?' + stringified - } - - return url -} - -function parseURL (url) { - if (typeof url === 'string') { - url = new URL(url) - - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new InvalidArgumentError('Invalid URL protocol: the URL must start with `http:` or `https:`.') + if (range <= 0 || range > max) { + throw new TypeError("invalid range on address: " + note); + } + return [ip, range]; } - - return url - } - - if (!url || typeof url !== 'object') { - throw new InvalidArgumentError('Invalid URL: The URL argument must be a non-null object.') - } - - if (!/^https?:/.test(url.origin || url.protocol)) { - throw new 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 InvalidArgumentError('Invalid URL: port must be a valid integer or a string representation of an integer.') + function parseNetmask(netmask) { + var ip = parseip(netmask); + var kind = ip.kind(); + return kind === "ipv4" ? ip.prefixLengthFromSubnetMask() : null; } - - if (url.path != null && typeof url.path !== 'string') { - throw new InvalidArgumentError('Invalid URL path: the path must be a string or null/undefined.') + function proxyaddr(req, trust) { + if (!req) { + throw new TypeError("req argument is required"); + } + if (!trust) { + throw new TypeError("trust argument is required"); + } + var addrs = alladdrs(req, trust); + var addr = addrs[addrs.length - 1]; + return addr; } - - if (url.pathname != null && typeof url.pathname !== 'string') { - throw new InvalidArgumentError('Invalid URL pathname: the pathname must be a string or null/undefined.') + function trustNone() { + return false; } - - if (url.hostname != null && typeof url.hostname !== 'string') { - throw new InvalidArgumentError('Invalid URL hostname: the hostname must be a string or null/undefined.') + function trustMulti(subnets) { + return function trust(addr) { + if (!isip(addr)) return false; + var ip = parseip(addr); + var ipconv; + var kind = ip.kind(); + for (var i = 0; i < subnets.length; i++) { + var subnet = subnets[i]; + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetrange = subnet[1]; + var trusted = ip; + if (kind !== subnetkind) { + if (subnetkind === "ipv4" && !ip.isIPv4MappedAddress()) { + continue; + } + if (!ipconv) { + ipconv = subnetkind === "ipv4" ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + trusted = ipconv; + } + if (trusted.match(subnetip, subnetrange)) { + return true; + } + } + return false; + }; } - - if (url.origin != null && typeof url.origin !== 'string') { - throw new InvalidArgumentError('Invalid URL origin: the origin must be a string or null/undefined.') + function trustSingle(subnet) { + var subnetip = subnet[0]; + var subnetkind = subnetip.kind(); + var subnetisipv4 = subnetkind === "ipv4"; + var subnetrange = subnet[1]; + return function trust(addr) { + if (!isip(addr)) return false; + var ip = parseip(addr); + var kind = ip.kind(); + if (kind !== subnetkind) { + if (subnetisipv4 && !ip.isIPv4MappedAddress()) { + return false; + } + ip = subnetisipv4 ? ip.toIPv4Address() : ip.toIPv4MappedAddress(); + } + return ip.match(subnetip, subnetrange); + }; } + } +}); - 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) +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/utils.js +var require_utils5 = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/utils.js"(exports2) { + "use strict"; + var Buffer3 = require_safe_buffer().Buffer; + var contentDisposition = require_content_disposition(); + var contentType = require_content_type(); + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var mime = require_send().mime; + var etag = require_etag(); + var proxyaddr = require_proxy_addr(); + var qs = require_lib5(); + var querystring = __require("querystring"); + exports2.etag = createETagGenerator({ weak: false }); + exports2.wetag = createETagGenerator({ weak: true }); + exports2.isAbsolute = function(path2) { + if ("/" === path2[0]) return true; + if (":" === path2[1] && ("\\" === path2[2] || "/" === path2[2])) return true; + if ("\\\\" === path2.substring(0, 2)) return true; + }; + exports2.flatten = deprecate.function( + flatten, + "utils.flatten: use array-flatten npm module instead" + ); + exports2.normalizeType = function(type2) { + return ~type2.indexOf("/") ? acceptParams(type2) : { value: mime.lookup(type2), params: {} }; + }; + exports2.normalizeTypes = function(types2) { + var ret = []; + for (var i = 0; i < types2.length; ++i) { + ret.push(exports2.normalizeType(types2[i])); + } + return ret; + }; + exports2.contentDisposition = deprecate.function( + contentDisposition, + "utils.contentDisposition: use content-disposition npm module instead" + ); + function acceptParams(str2) { + var parts = str2.split(/ *; */); + var ret = { value: parts[0], quality: 1, params: {} }; + for (var i = 1; i < parts.length; ++i) { + var pms = parts[i].split(/ *= */); + if ("q" === pms[0]) { + ret.quality = parseFloat(pms[1]); + } else { + ret.params[pms[0]] = pms[1]; + } + } + return ret; } - - if (path && !path.startsWith('/')) { - path = `/${path}` + exports2.compileETag = function(val) { + var fn; + if (typeof val === "function") { + return val; + } + switch (val) { + case true: + case "weak": + fn = exports2.wetag; + break; + case false: + break; + case "strong": + fn = exports2.etag; + break; + default: + throw new TypeError("unknown value for etag function: " + val); + } + return fn; + }; + exports2.compileQueryParser = function compileQueryParser(val) { + var fn; + if (typeof val === "function") { + return val; + } + switch (val) { + case true: + case "simple": + fn = querystring.parse; + break; + case false: + fn = newObject; + break; + case "extended": + fn = parseExtendedQueryString; + break; + default: + throw new TypeError("unknown value for query parser function: " + val); + } + return fn; + }; + exports2.compileTrust = function(val) { + if (typeof val === "function") return val; + if (val === true) { + return function() { + return true; + }; + } + if (typeof val === "number") { + return function(a, i) { + return i < val; + }; + } + if (typeof val === "string") { + val = val.split(",").map(function(v) { + return v.trim(); + }); + } + return proxyaddr.compile(val || []); + }; + exports2.setCharset = function setCharset(type2, charset) { + if (!type2 || !charset) { + return type2; + } + var parsed = contentType.parse(type2); + parsed.parameters.charset = charset; + return contentType.format(parsed); + }; + function createETagGenerator(options2) { + return function generateETag(body, encoding) { + var buf = !Buffer3.isBuffer(body) ? Buffer3.from(body, encoding) : body; + return etag(buf, options2); + }; } - // 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) - } - - return url -} - -function parseOrigin (url) { - url = parseURL(url) - - if (url.pathname !== '/' || url.search || url.hash) { - throw new InvalidArgumentError('invalid url') - } - - return url -} - -function getHostname (host) { - if (host[0] === '[') { - const idx = host.indexOf(']') - - assert(idx !== -1) - return host.substring(1, idx) - } - - 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 getServerName (host) { - if (!host) { - return null - } - - assert.strictEqual(typeof host, 'string') - - const servername = getHostname(host) - if (net.isIP(servername)) { - return '' - } - - return servername -} - -function deepClone (obj) { - return JSON.parse(JSON.stringify(obj)) -} - -function isAsyncIterable (obj) { - return !!(obj != null && typeof obj[Symbol.asyncIterator] === 'function') -} - -function isIterable (obj) { - return !!(obj != null && (typeof obj[Symbol.iterator] === 'function' || typeof obj[Symbol.asyncIterator] === 'function')) -} - -function bodyLength (body) { - if (body == null) { - return 0 - } else if (isStream(body)) { - const state = body._readableState - return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) - ? state.length - : null - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null - } else if (isBuffer(body)) { - return body.byteLength - } - - return null -} - -function isDestroyed (stream) { - return !stream || !!(stream.destroyed || stream[kDestroyed]) -} - -function isReadableAborted (stream) { - const state = stream && stream._readableState - return isDestroyed(stream) && state && !state.endEmitted -} - -function destroy (stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return - } - - if (typeof stream.destroy === 'function') { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - // See: https://github.com/nodejs/node/pull/38505/files - stream.socket = null + function parseExtendedQueryString(str2) { + return qs.parse(str2, { + allowPrototypes: true + }); + } + function newObject() { + return {}; } - - stream.destroy(err) - } else if (err) { - process.nextTick((stream, err) => { - stream.emit('error', err) - }, stream, err) - } - - if (stream.destroyed !== true) { - stream[kDestroyed] = true } -} - -const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/ -function parseKeepAliveTimeout (val) { - const m = val.toString().match(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 headerNameToString (value) { - return headerNameLowerCasedRecord[value] || value.toLowerCase() -} - -function 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') +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/application.js +var require_application = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/application.js"(exports2, module2) { + "use strict"; + var finalhandler = require_finalhandler(); + var Router = require_router(); + var methods = require_methods(); + var middleware2 = require_init(); + var query = require_query(); + var debug3 = require_src2()("express:application"); + var View = require_view(); + var http4 = __require("http"); + var compileETag = require_utils5().compileETag; + var compileQueryParser = require_utils5().compileQueryParser; + var compileTrust = require_utils5().compileTrust; + var deprecate = require_depd()("express"); + var flatten = require_array_flatten(); + var merge3 = require_utils_merge(); + var resolve4 = __require("path").resolve; + var setPrototypeOf = require_setprototypeof(); + var hasOwnProperty2 = Object.prototype.hasOwnProperty; + var slice = Array.prototype.slice; + var app = exports2 = module2.exports = {}; + var trustProxyDefaultSymbol = "@@symbol:trust_proxy_default"; + app.init = function init2() { + this.cache = {}; + this.engines = {}; + this.settings = {}; + this.defaultConfiguration(); + }; + app.defaultConfiguration = function defaultConfiguration() { + var env = process.env.NODE_ENV || "development"; + this.enable("x-powered-by"); + this.set("etag", "weak"); + this.set("env", env); + this.set("query parser", "extended"); + this.set("subdomain offset", 2); + this.set("trust proxy", false); + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: true + }); + debug3("booting in %s mode", env); + this.on("mount", function onmount(parent) { + if (this.settings[trustProxyDefaultSymbol] === true && typeof parent.settings["trust proxy fn"] === "function") { + delete this.settings["trust proxy"]; + delete this.settings["trust proxy fn"]; + } + setPrototypeOf(this.request, parent.request); + setPrototypeOf(this.response, parent.response); + setPrototypeOf(this.engines, parent.engines); + setPrototypeOf(this.settings, parent.settings); + }); + this.locals = /* @__PURE__ */ Object.create(null); + this.mountpath = "/"; + this.locals.settings = this.settings; + this.set("view", View); + this.set("views", resolve4("views")); + this.set("jsonp callback name", "callback"); + if (env === "production") { + this.enable("view cache"); + } + Object.defineProperty(this, "router", { + get: function() { + throw new Error("'app.router' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app."); + } + }); + }; + app.lazyrouter = function lazyrouter() { + if (!this._router) { + this._router = new Router({ + caseSensitive: this.enabled("case sensitive routing"), + strict: this.enabled("strict routing") + }); + this._router.use(query(this.get("query parser fn"))); + this._router.use(middleware2.init(this)); } - } else { - if (!Array.isArray(val)) { - val = [val] - obj[key] = val + }; + app.handle = function handle(req, res, callback) { + var router = this._router; + var done = callback || finalhandler(req, res, { + env: this.get("env"), + onerror: logerror.bind(this) + }); + if (!router) { + debug3("no routes defined on app"); + done(); + return; + } + router.handle(req, res, done); + }; + app.use = function use(fn) { + var offset = 0; + var path2 = "/"; + if (typeof fn !== "function") { + var arg = fn; + while (Array.isArray(arg) && arg.length !== 0) { + arg = arg[0]; + } + if (typeof arg !== "function") { + offset = 1; + path2 = fn; + } + } + var fns = flatten(slice.call(arguments, offset)); + if (fns.length === 0) { + throw new TypeError("app.use() requires a middleware function"); + } + this.lazyrouter(); + var router = this._router; + fns.forEach(function(fn2) { + if (!fn2 || !fn2.handle || !fn2.set) { + return router.use(path2, fn2); + } + debug3(".use app under %s", path2); + fn2.mountpath = path2; + fn2.parent = this; + router.use(path2, function mounted_app(req, res, next) { + var orig = req.app; + fn2.handle(req, res, function(err) { + setPrototypeOf(req, orig.request); + setPrototypeOf(res, orig.response); + next(err); + }); + }); + fn2.emit("mount", this); + }, this); + return this; + }; + app.route = function route(path2) { + this.lazyrouter(); + return this._router.route(path2); + }; + app.engine = function engine(ext, fn) { + if (typeof fn !== "function") { + throw new Error("callback function required"); + } + var extension = ext[0] !== "." ? "." + ext : ext; + this.engines[extension] = fn; + return this; + }; + app.param = function param(name, fn) { + this.lazyrouter(); + if (Array.isArray(name)) { + for (var i = 0; i < name.length; i++) { + this.param(name[i], fn); + } + return this; + } + this._router.param(name, fn); + return this; + }; + app.set = function set3(setting, val) { + if (arguments.length === 1) { + var settings = this.settings; + while (settings && settings !== Object.prototype) { + if (hasOwnProperty2.call(settings, setting)) { + return settings[setting]; + } + settings = Object.getPrototypeOf(settings); + } + return void 0; + } + debug3('set "%s" to %o', setting, val); + this.settings[setting] = val; + switch (setting) { + case "etag": + this.set("etag fn", compileETag(val)); + break; + case "query parser": + this.set("query parser fn", compileQueryParser(val)); + break; + case "trust proxy": + this.set("trust proxy fn", compileTrust(val)); + Object.defineProperty(this.settings, trustProxyDefaultSymbol, { + configurable: true, + value: false + }); + break; + } + return this; + }; + app.path = function path2() { + return this.parent ? this.parent.path() + this.mountpath : ""; + }; + app.enabled = function enabled(setting) { + return Boolean(this.set(setting)); + }; + app.disabled = function disabled(setting) { + return !this.set(setting); + }; + app.enable = function enable(setting) { + return this.set(setting, true); + }; + app.disable = function disable(setting) { + return this.set(setting, false); + }; + methods.forEach(function(method) { + app[method] = function(path2) { + if (method === "get" && arguments.length === 1) { + return this.set(path2); + } + this.lazyrouter(); + var route = this._router.route(path2); + route[method].apply(route, slice.call(arguments, 1)); + return this; + }; + }); + app.all = function all(path2) { + this.lazyrouter(); + var route = this._router.route(path2); + var args = slice.call(arguments, 1); + for (var i = 0; i < methods.length; i++) { + route[methods[i]].apply(route, args); + } + return this; + }; + app.del = deprecate.function(app.delete, "app.del: Use app.delete instead"); + app.render = function render(name, options2, callback) { + var cache = this.cache; + var done = callback; + var engines = this.engines; + var opts = options2; + var renderOptions = {}; + var view; + if (typeof options2 === "function") { + done = options2; + opts = {}; + } + merge3(renderOptions, this.locals); + if (opts._locals) { + merge3(renderOptions, opts._locals); + } + merge3(renderOptions, opts); + if (renderOptions.cache == null) { + renderOptions.cache = this.enabled("view cache"); + } + if (renderOptions.cache) { + view = cache[name]; + } + if (!view) { + var View2 = this.get("view"); + view = new View2(name, { + defaultEngine: this.get("view engine"), + root: this.get("views"), + engines + }); + if (!view.path) { + var dirs = Array.isArray(view.root) && view.root.length > 1 ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' : 'directory "' + view.root + '"'; + var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); + err.view = view; + return done(err); + } + if (renderOptions.cache) { + cache[name] = view; + } } - val.push(headers[i + 1].toString('utf8')) + tryRender(view, renderOptions, done); + }; + app.listen = function listen() { + var server = http4.createServer(this); + return server.listen.apply(server, arguments); + }; + function logerror(err) { + if (this.get("env") !== "test") console.error(err.stack || err.toString()); } - } - - // 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 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) + function tryRender(view, options2, callback) { + try { + view.render(options2, callback); + } catch (err) { + callback(err); + } } } +}); - // See https://github.com/nodejs/node/pull/46528 - if (hasContentLength && contentDispositionIdx !== -1) { - ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') - } - - return ret -} - -function isBuffer (buffer) { - // See, https://github.com/mcollina/undici/pull/319 - return buffer instanceof Uint8Array || Buffer.isBuffer(buffer) -} - -function validateHandler (handler, method, upgrade) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') - } - - if (typeof handler.onConnect !== 'function') { - throw new InvalidArgumentError('invalid onConnect method') - } - - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') - } - - if (typeof handler.onBodySent !== 'function' && handler.onBodySent !== undefined) { - throw new InvalidArgumentError('invalid onBodySent method') - } - - if (upgrade || method === 'CONNECT') { - if (typeof handler.onUpgrade !== 'function') { - throw new InvalidArgumentError('invalid onUpgrade method') +// node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/charset.js +var require_charset = __commonJS({ + "node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/charset.js"(exports2, module2) { + "use strict"; + module2.exports = preferredCharsets; + module2.exports.preferredCharsets = preferredCharsets; + var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + function parseAcceptCharset(accept) { + var accepts = accept.split(","); + for (var i = 0, j = 0; i < accepts.length; i++) { + var charset = parseCharset(accepts[i].trim(), i); + if (charset) { + accepts[j++] = charset; + } + } + accepts.length = j; + return accepts; + } + function parseCharset(str2, i) { + var match = simpleCharsetRegExp.exec(str2); + if (!match) return null; + var charset = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split("="); + if (p[0] === "q") { + q = parseFloat(p[1]); + break; + } + } + } + return { + charset, + q, + i + }; + } + function getCharsetPriority(charset, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(charset, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; } - } else { - if (typeof handler.onHeaders !== 'function') { - throw new InvalidArgumentError('invalid onHeaders method') + function specify(charset, spec, index) { + var s = 0; + if (spec.charset.toLowerCase() === charset.toLowerCase()) { + s |= 1; + } else if (spec.charset !== "*") { + return null; + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; } - - if (typeof handler.onData !== 'function') { - throw new InvalidArgumentError('invalid onData method') + function preferredCharsets(accept, provided) { + var accepts = parseAcceptCharset(accept === void 0 ? "*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullCharset); + } + var priorities = provided.map(function getPriority(type2, index) { + return getCharsetPriority(type2, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getCharset(priority) { + return provided[priorities.indexOf(priority)]; + }); } - - if (typeof handler.onComplete !== 'function') { - throw new InvalidArgumentError('invalid onComplete method') + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullCharset(spec) { + return spec.charset; + } + function isQuality(spec) { + return spec.q > 0; } } -} - -// A body is disturbed if it has been read from and it cannot -// be re-used without losing state or data. -function isDisturbed (body) { - return !!(body && ( - stream.isDisturbed - ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? - : body[kBodyUsed] || - body.readableDidRead || - (body._readableState && body._readableState.dataEmitted) || - isReadableAborted(body) - )) -} - -function isErrored (body) { - return !!(body && ( - stream.isErrored - ? stream.isErrored(body) - : /state: 'errored'/.test(nodeUtil.inspect(body) - ))) -} - -function isReadable (body) { - return !!(body && ( - stream.isReadable - ? stream.isReadable(body) - : /state: 'readable'/.test(nodeUtil.inspect(body) - ))) -} - -function 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 - } -} - -async function * convertIterableToBuffer (iterable) { - for await (const chunk of iterable) { - yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) - } -} - -let ReadableStream -function ReadableStreamFrom (iterable) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) - } - - if (ReadableStream.from) { - return ReadableStream.from(convertIterableToBuffer(iterable)) - } +}); - let iterator - return new ReadableStream( - { - async start () { - iterator = iterable[Symbol.asyncIterator]() - }, - async pull (controller) { - const { done, value } = await iterator.next() - if (done) { - queueMicrotask(() => { - controller.close() - }) - } else { - const buf = Buffer.isBuffer(value) ? value : Buffer.from(value) - controller.enqueue(new Uint8Array(buf)) +// node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js +var require_encoding = __commonJS({ + "node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js"(exports2, module2) { + "use strict"; + module2.exports = preferredEncodings; + module2.exports.preferredEncodings = preferredEncodings; + var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/; + function parseAcceptEncoding(accept) { + var accepts = accept.split(","); + var hasIdentity = false; + var minQuality = 1; + for (var i = 0, j = 0; i < accepts.length; i++) { + var encoding = parseEncoding(accepts[i].trim(), i); + if (encoding) { + accepts[j++] = encoding; + hasIdentity = hasIdentity || specify("identity", encoding); + minQuality = Math.min(minQuality, encoding.q || 1); + } + } + if (!hasIdentity) { + accepts[j++] = { + encoding: "identity", + q: minQuality, + i + }; + } + accepts.length = j; + return accepts; + } + function parseEncoding(str2, i) { + var match = simpleEncodingRegExp.exec(str2); + if (!match) return null; + var encoding = match[1]; + var q = 1; + if (match[2]) { + var params = match[2].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].trim().split("="); + if (p[0] === "q") { + q = parseFloat(p[1]); + break; + } } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() } - }, - 0 - ) -} - -// The chunk should be a FormData instance and contains -// all the required methods. -function isFormDataLike (object) { - return ( - object && - typeof object === 'object' && - typeof object.append === 'function' && - typeof object.delete === 'function' && - typeof object.get === 'function' && - typeof object.getAll === 'function' && - typeof object.has === 'function' && - typeof object.set === 'function' && - object[Symbol.toStringTag] === 'FormData' - ) -} - -function 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 + return { + encoding, + q, + i + }; } - } -} - -function addAbortListener (signal, listener) { - if ('addEventListener' in signal) { - signal.addEventListener('abort', listener, { once: true }) - return () => signal.removeEventListener('abort', listener) - } - signal.addListener('abort', listener) - return () => signal.removeListener('abort', listener) -} - -const hasToWellFormed = !!String.prototype.toWellFormed - -/** - * @param {string} val - */ -function toUSVString (val) { - if (hasToWellFormed) { - return `${val}`.toWellFormed() - } else if (nodeUtil.toUSVString) { - return nodeUtil.toUSVString(val) - } - - return `${val}` -} - -// Parsed accordingly to RFC 9110 -// https://www.rfc-editor.org/rfc/rfc9110#field.content-range -function 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 -} - -const kEnumerableProperty = Object.create(null) -kEnumerableProperty.enumerable = true - -module.exports = { - kEnumerableProperty, - nop, - isDisturbed, - isErrored, - isReadable, - toUSVString, - isReadableAborted, - isBlobLike, - parseOrigin, - parseURL, - getServerName, - isStream, - isIterable, - isAsyncIterable, - isDestroyed, - headerNameToString, - parseRawHeaders, - parseHeaders, - parseKeepAliveTimeout, - destroy, - bodyLength, - deepClone, - ReadableStreamFrom, - isBuffer, - validateHandler, - getSocketInfo, - isFormDataLike, - buildURL, - throwIfAborted, - addAbortListener, - parseRangeHeader, - nodeMajor, - nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), - safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -} - - -/***/ }), - -/***/ 9368: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Dispatcher = __nccwpck_require__(59724) -const { - ClientDestroyedError, - ClientClosedError, - InvalidArgumentError -} = __nccwpck_require__(33862) -const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(34856) - -const kDestroyed = Symbol('destroyed') -const kClosed = Symbol('closed') -const kOnDestroyed = Symbol('onDestroyed') -const kOnClosed = Symbol('onClosed') -const kInterceptedDispatch = Symbol('Intercepted Dispatch') - -class DispatcherBase extends Dispatcher { - constructor () { - super() - - this[kDestroyed] = false - this[kOnDestroyed] = null - this[kClosed] = false - this[kOnClosed] = [] - } - - get destroyed () { - return this[kDestroyed] - } - - get closed () { - return this[kClosed] - } - - get interceptors () { - return this[kInterceptors] - } - - set interceptors (newInterceptors) { - if (newInterceptors) { - for (let i = newInterceptors.length - 1; i >= 0; i--) { - const interceptor = this[kInterceptors][i] - if (typeof interceptor !== 'function') { - throw new InvalidArgumentError('interceptor must be an function') + function getEncodingPriority(encoding, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(encoding, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; } } + return priority; } - - this[kInterceptors] = newInterceptors - } - - close (callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data) - }) - }) + function specify(encoding, spec, index) { + var s = 0; + if (spec.encoding.toLowerCase() === encoding.toLowerCase()) { + s |= 1; + } else if (spec.encoding !== "*") { + return null; + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') + function preferredEncodings(accept, provided) { + var accepts = parseAcceptEncoding(accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullEncoding); + } + var priorities = provided.map(function getPriority(type2, index) { + return getEncodingPriority(type2, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getEncoding(priority) { + return provided[priorities.indexOf(priority)]; + }); } - - if (this[kDestroyed]) { - queueMicrotask(() => callback(new ClientDestroyedError(), null)) - return + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; + } + function getFullEncoding(spec) { + return spec.encoding; } + function isQuality(spec) { + return spec.q > 0; + } + } +}); - if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) +// node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/language.js +var require_language = __commonJS({ + "node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/language.js"(exports2, module2) { + "use strict"; + module2.exports = preferredLanguages; + module2.exports.preferredLanguages = preferredLanguages; + var simpleLanguageRegExp = /^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/; + function parseAcceptLanguage(accept) { + var accepts = accept.split(","); + for (var i = 0, j = 0; i < accepts.length; i++) { + var language = parseLanguage(accepts[i].trim(), i); + if (language) { + accepts[j++] = language; + } + } + accepts.length = j; + return accepts; + } + function parseLanguage(str2, i) { + var match = simpleLanguageRegExp.exec(str2); + if (!match) return null; + var prefix = match[1]; + var suffix = match[2]; + var full = prefix; + if (suffix) full += "-" + suffix; + var q = 1; + if (match[3]) { + var params = match[3].split(";"); + for (var j = 0; j < params.length; j++) { + var p = params[j].split("="); + if (p[0] === "q") q = parseFloat(p[1]); + } } - return + return { + prefix, + suffix, + q, + i, + full + }; } - - this[kClosed] = true - this[kOnClosed].push(callback) - - const onClosed = () => { - const callbacks = this[kOnClosed] - this[kOnClosed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) + function getLanguagePriority(language, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(language, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; + } + function specify(language, spec, index) { + var p = parseLanguage(language); + if (!p) return null; + var s = 0; + if (spec.full.toLowerCase() === p.full.toLowerCase()) { + s |= 4; + } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) { + s |= 2; + } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) { + s |= 1; + } else if (spec.full !== "*") { + return null; } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; } - - // Should not error. - this[kClose]() - .then(() => this.destroy()) - .then(() => { - queueMicrotask(onClosed) - }) - } - - destroy (err, callback) { - if (typeof err === 'function') { - callback = err - err = null + function preferredLanguages(accept, provided) { + var accepts = parseAcceptLanguage(accept === void 0 ? "*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullLanguage); + } + var priorities = provided.map(function getPriority(type2, index) { + return getLanguagePriority(type2, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) { + return provided[priorities.indexOf(priority)]; + }); } - - 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) - }) - }) + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; } - - if (typeof callback !== 'function') { - throw new InvalidArgumentError('invalid callback') + function getFullLanguage(spec) { + return spec.full; + } + function isQuality(spec) { + return spec.q > 0; } + } +}); - if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback) - } else { - queueMicrotask(() => callback(null, null)) +// node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js +var require_mediaType = __commonJS({ + "node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js"(exports2, module2) { + "use strict"; + module2.exports = preferredMediaTypes; + module2.exports.preferredMediaTypes = preferredMediaTypes; + var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/; + function parseAccept(accept) { + var accepts = splitMediaTypes(accept); + for (var i = 0, j = 0; i < accepts.length; i++) { + var mediaType = parseMediaType(accepts[i].trim(), i); + if (mediaType) { + accepts[j++] = mediaType; + } + } + accepts.length = j; + return accepts; + } + function parseMediaType(str2, i) { + var match = simpleMediaTypeRegExp.exec(str2); + if (!match) return null; + var params = /* @__PURE__ */ Object.create(null); + var q = 1; + var subtype = match[2]; + var type2 = match[1]; + if (match[3]) { + var kvps = splitParameters(match[3]).map(splitKeyValuePair); + for (var j = 0; j < kvps.length; j++) { + var pair = kvps[j]; + var key = pair[0].toLowerCase(); + var val = pair[1]; + var value = val && val[0] === '"' && val[val.length - 1] === '"' ? val.substr(1, val.length - 2) : val; + if (key === "q") { + q = parseFloat(value); + break; + } + params[key] = value; + } } - return + return { + type: type2, + subtype, + params, + q, + i + }; } - - if (!err) { - err = new ClientDestroyedError() + function getMediaTypePriority(type2, accepted, index) { + var priority = { o: -1, q: 0, s: 0 }; + for (var i = 0; i < accepted.length; i++) { + var spec = specify(type2, accepted[i], index); + if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) { + priority = spec; + } + } + return priority; } - - this[kDestroyed] = true - this[kOnDestroyed] = this[kOnDestroyed] || [] - this[kOnDestroyed].push(callback) - - const onDestroyed = () => { - const callbacks = this[kOnDestroyed] - this[kOnDestroyed] = null - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null) + function specify(type2, spec, index) { + var p = parseMediaType(type2); + var s = 0; + if (!p) { + return null; } + if (spec.type.toLowerCase() == p.type.toLowerCase()) { + s |= 4; + } else if (spec.type != "*") { + return null; + } + if (spec.subtype.toLowerCase() == p.subtype.toLowerCase()) { + s |= 2; + } else if (spec.subtype != "*") { + return null; + } + var keys = Object.keys(spec.params); + if (keys.length > 0) { + if (keys.every(function(k) { + return spec.params[k] == "*" || (spec.params[k] || "").toLowerCase() == (p.params[k] || "").toLowerCase(); + })) { + s |= 1; + } else { + return null; + } + } + return { + i: index, + o: spec.i, + q: spec.q, + s + }; } - - // Should not error. - this[kDestroy](err).then(() => { - queueMicrotask(onDestroyed) - }) - } - - [kInterceptedDispatch] (opts, handler) { - if (!this[kInterceptors] || this[kInterceptors].length === 0) { - this[kInterceptedDispatch] = this[kDispatch] - return this[kDispatch](opts, handler) + function preferredMediaTypes(accept, provided) { + var accepts = parseAccept(accept === void 0 ? "*/*" : accept || ""); + if (!provided) { + return accepts.filter(isQuality).sort(compareSpecs).map(getFullType); + } + var priorities = provided.map(function getPriority(type2, index) { + return getMediaTypePriority(type2, accepts, index); + }); + return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) { + return provided[priorities.indexOf(priority)]; + }); } - - let dispatch = this[kDispatch].bind(this) - for (let i = this[kInterceptors].length - 1; i >= 0; i--) { - dispatch = this[kInterceptors][i](dispatch) + function compareSpecs(a, b) { + return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0; } - this[kInterceptedDispatch] = dispatch - return dispatch(opts, handler) - } - - dispatch (opts, handler) { - if (!handler || typeof handler !== 'object') { - throw new InvalidArgumentError('handler must be an object') + function getFullType(spec) { + return spec.type + "/" + spec.subtype; } - - try { - if (!opts || typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object.') + function isQuality(spec) { + return spec.q > 0; + } + function quoteCount(string) { + var count = 0; + var index = 0; + while ((index = string.indexOf('"', index)) !== -1) { + count++; + index++; } - - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError() + return count; + } + function splitKeyValuePair(str2) { + var index = str2.indexOf("="); + var key; + var val; + if (index === -1) { + key = str2; + } else { + key = str2.substr(0, index); + val = str2.substr(index + 1); } - - if (this[kClosed]) { - throw new ClientClosedError() + return [key, val]; + } + function splitMediaTypes(accept) { + var accepts = accept.split(","); + for (var i = 1, j = 0; i < accepts.length; i++) { + if (quoteCount(accepts[j]) % 2 == 0) { + accepts[++j] = accepts[i]; + } else { + accepts[j] += "," + accepts[i]; + } } - - return this[kInterceptedDispatch](opts, handler) - } catch (err) { - if (typeof handler.onError !== 'function') { - throw new InvalidArgumentError('invalid onError method') + accepts.length = j + 1; + return accepts; + } + function splitParameters(str2) { + var parameters = str2.split(";"); + for (var i = 1, j = 0; i < parameters.length; i++) { + if (quoteCount(parameters[j]) % 2 == 0) { + parameters[++j] = parameters[i]; + } else { + parameters[j] += ";" + parameters[i]; + } } - - handler.onError(err) - - return false + parameters.length = j + 1; + for (var i = 0; i < parameters.length; i++) { + parameters[i] = parameters[i].trim(); + } + return parameters; } } -} - -module.exports = DispatcherBase - - -/***/ }), - -/***/ 59724: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const EventEmitter = __nccwpck_require__(24434) - -class Dispatcher extends EventEmitter { - dispatch () { - throw new Error('not implemented') - } +}); - close () { - throw new Error('not implemented') +// node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/index.js +var require_negotiator = __commonJS({ + "node_modules/.pnpm/negotiator@0.6.3/node_modules/negotiator/index.js"(exports2, module2) { + "use strict"; + var preferredCharsets = require_charset(); + var preferredEncodings = require_encoding(); + var preferredLanguages = require_language(); + var preferredMediaTypes = require_mediaType(); + module2.exports = Negotiator; + module2.exports.Negotiator = Negotiator; + function Negotiator(request2) { + if (!(this instanceof Negotiator)) { + return new Negotiator(request2); + } + this.request = request2; + } + Negotiator.prototype.charset = function charset(available) { + var set3 = this.charsets(available); + return set3 && set3[0]; + }; + Negotiator.prototype.charsets = function charsets(available) { + return preferredCharsets(this.request.headers["accept-charset"], available); + }; + Negotiator.prototype.encoding = function encoding(available) { + var set3 = this.encodings(available); + return set3 && set3[0]; + }; + Negotiator.prototype.encodings = function encodings(available) { + return preferredEncodings(this.request.headers["accept-encoding"], available); + }; + Negotiator.prototype.language = function language(available) { + var set3 = this.languages(available); + return set3 && set3[0]; + }; + Negotiator.prototype.languages = function languages(available) { + return preferredLanguages(this.request.headers["accept-language"], available); + }; + Negotiator.prototype.mediaType = function mediaType(available) { + var set3 = this.mediaTypes(available); + return set3 && set3[0]; + }; + Negotiator.prototype.mediaTypes = function mediaTypes(available) { + return preferredMediaTypes(this.request.headers.accept, available); + }; + Negotiator.prototype.preferredCharset = Negotiator.prototype.charset; + Negotiator.prototype.preferredCharsets = Negotiator.prototype.charsets; + Negotiator.prototype.preferredEncoding = Negotiator.prototype.encoding; + Negotiator.prototype.preferredEncodings = Negotiator.prototype.encodings; + Negotiator.prototype.preferredLanguage = Negotiator.prototype.language; + Negotiator.prototype.preferredLanguages = Negotiator.prototype.languages; + Negotiator.prototype.preferredMediaType = Negotiator.prototype.mediaType; + Negotiator.prototype.preferredMediaTypes = Negotiator.prototype.mediaTypes; } +}); - destroy () { - throw new Error('not implemented') +// node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/index.js +var require_accepts = __commonJS({ + "node_modules/.pnpm/accepts@1.3.8/node_modules/accepts/index.js"(exports2, module2) { + "use strict"; + var Negotiator = require_negotiator(); + var mime = require_mime_types(); + module2.exports = Accepts; + function Accepts(req) { + if (!(this instanceof Accepts)) { + return new Accepts(req); + } + this.headers = req.headers; + this.negotiator = new Negotiator(req); + } + Accepts.prototype.type = Accepts.prototype.types = function(types_) { + var types2 = types_; + if (types2 && !Array.isArray(types2)) { + types2 = new Array(arguments.length); + for (var i = 0; i < types2.length; i++) { + types2[i] = arguments[i]; + } + } + if (!types2 || types2.length === 0) { + return this.negotiator.mediaTypes(); + } + if (!this.headers.accept) { + return types2[0]; + } + var mimes = types2.map(extToMime); + var accepts = this.negotiator.mediaTypes(mimes.filter(validMime)); + var first = accepts[0]; + return first ? types2[mimes.indexOf(first)] : false; + }; + Accepts.prototype.encoding = Accepts.prototype.encodings = function(encodings_) { + var encodings = encodings_; + if (encodings && !Array.isArray(encodings)) { + encodings = new Array(arguments.length); + for (var i = 0; i < encodings.length; i++) { + encodings[i] = arguments[i]; + } + } + if (!encodings || encodings.length === 0) { + return this.negotiator.encodings(); + } + return this.negotiator.encodings(encodings)[0] || false; + }; + Accepts.prototype.charset = Accepts.prototype.charsets = function(charsets_) { + var charsets = charsets_; + if (charsets && !Array.isArray(charsets)) { + charsets = new Array(arguments.length); + for (var i = 0; i < charsets.length; i++) { + charsets[i] = arguments[i]; + } + } + if (!charsets || charsets.length === 0) { + return this.negotiator.charsets(); + } + return this.negotiator.charsets(charsets)[0] || false; + }; + Accepts.prototype.lang = Accepts.prototype.langs = Accepts.prototype.language = Accepts.prototype.languages = function(languages_) { + var languages = languages_; + if (languages && !Array.isArray(languages)) { + languages = new Array(arguments.length); + for (var i = 0; i < languages.length; i++) { + languages[i] = arguments[i]; + } + } + if (!languages || languages.length === 0) { + return this.negotiator.languages(); + } + return this.negotiator.languages(languages)[0] || false; + }; + function extToMime(type2) { + return type2.indexOf("/") === -1 ? mime.lookup(type2) : type2; + } + function validMime(type2) { + return typeof type2 === "string"; + } } -} - -module.exports = Dispatcher - - -/***/ }), - -/***/ 1380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Busboy = __nccwpck_require__(69766) -const util = __nccwpck_require__(33465) -const { - ReadableStreamFrom, - isBlobLike, - isReadableStreamLike, - readableStreamClose, - createDeferredPromise, - fullyReadBody -} = __nccwpck_require__(42696) -const { FormData } = __nccwpck_require__(12894) -const { kState } = __nccwpck_require__(68323) -const { webidl } = __nccwpck_require__(29) -const { DOMException, structuredClone } = __nccwpck_require__(84135) -const { Blob, File: NativeFile } = __nccwpck_require__(20181) -const { kBodyUsed } = __nccwpck_require__(34856) -const assert = __nccwpck_require__(42613) -const { isErrored } = __nccwpck_require__(33465) -const { isUint8Array, isArrayBuffer } = __nccwpck_require__(98253) -const { File: UndiciFile } = __nccwpck_require__(60066) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(43911) - -let ReadableStream = globalThis.ReadableStream - -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile -const textEncoder = new TextEncoder() -const textDecoder = new TextDecoder() +}); -// https://fetch.spec.whatwg.org/#concept-bodyinit-extract -function extractBody (object, keepalive = false) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/request.js +var require_request = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/request.js"(exports2, module2) { + "use strict"; + var accepts = require_accepts(); + var deprecate = require_depd()("express"); + var isIP2 = __require("net").isIP; + var typeis = require_type_is(); + var http4 = __require("http"); + var fresh = require_fresh(); + var parseRange = require_range_parser(); + var parse2 = require_parseurl(); + var proxyaddr = require_proxy_addr(); + var req = Object.create(http4.IncomingMessage.prototype); + module2.exports = req; + req.get = req.header = function header(name) { + if (!name) { + throw new TypeError("name argument is required to req.get"); + } + if (typeof name !== "string") { + throw new TypeError("name must be a string to req.get"); + } + var lc = name.toLowerCase(); + switch (lc) { + case "referer": + case "referrer": + return this.headers.referrer || this.headers.referer; + default: + return this.headers[lc]; + } + }; + req.accepts = function() { + var accept = accepts(this); + return accept.types.apply(accept, arguments); + }; + req.acceptsEncodings = function() { + var accept = accepts(this); + return accept.encodings.apply(accept, arguments); + }; + req.acceptsEncoding = deprecate.function( + req.acceptsEncodings, + "req.acceptsEncoding: Use acceptsEncodings instead" + ); + req.acceptsCharsets = function() { + var accept = accepts(this); + return accept.charsets.apply(accept, arguments); + }; + req.acceptsCharset = deprecate.function( + req.acceptsCharsets, + "req.acceptsCharset: Use acceptsCharsets instead" + ); + req.acceptsLanguages = function() { + var accept = accepts(this); + return accept.languages.apply(accept, arguments); + }; + req.acceptsLanguage = deprecate.function( + req.acceptsLanguages, + "req.acceptsLanguage: Use acceptsLanguages instead" + ); + req.range = function range(size, options2) { + var range2 = this.get("Range"); + if (!range2) return; + return parseRange(size, range2, options2); + }; + req.param = function param(name, defaultValue) { + var params = this.params || {}; + var body = this.body || {}; + var query = this.query || {}; + var args = arguments.length === 1 ? "name" : "name, default"; + deprecate("req.param(" + args + "): Use req.params, req.body, or req.query instead"); + if (null != params[name] && params.hasOwnProperty(name)) return params[name]; + if (null != body[name]) return body[name]; + if (null != query[name]) return query[name]; + return defaultValue; + }; + req.is = function is(types2) { + var arr = types2; + if (!Array.isArray(types2)) { + arr = new Array(arguments.length); + for (var i = 0; i < arr.length; i++) { + arr[i] = arguments[i]; + } + } + return typeis(this, arr); + }; + defineGetter(req, "protocol", function protocol() { + var proto = this.connection.encrypted ? "https" : "http"; + var trust = this.app.get("trust proxy fn"); + if (!trust(this.connection.remoteAddress, 0)) { + return proto; + } + var header = this.get("X-Forwarded-Proto") || proto; + var index = header.indexOf(","); + return index !== -1 ? header.substring(0, index).trim() : header.trim(); + }); + defineGetter(req, "secure", function secure() { + return this.protocol === "https"; + }); + defineGetter(req, "ip", function ip() { + var trust = this.app.get("trust proxy fn"); + return proxyaddr(this, trust); + }); + defineGetter(req, "ips", function ips() { + var trust = this.app.get("trust proxy fn"); + var addrs = proxyaddr.all(this, trust); + addrs.reverse().pop(); + return addrs; + }); + defineGetter(req, "subdomains", function subdomains() { + var hostname2 = this.hostname; + if (!hostname2) return []; + var offset = this.app.get("subdomain offset"); + var subdomains2 = !isIP2(hostname2) ? hostname2.split(".").reverse() : [hostname2]; + return subdomains2.slice(offset); + }); + defineGetter(req, "path", function path2() { + return parse2(this).pathname; + }); + defineGetter(req, "hostname", function hostname2() { + var trust = this.app.get("trust proxy fn"); + var host = this.get("X-Forwarded-Host"); + if (!host || !trust(this.connection.remoteAddress, 0)) { + host = this.get("Host"); + } else if (host.indexOf(",") !== -1) { + host = host.substring(0, host.indexOf(",")).trimRight(); + } + if (!host) return; + var offset = host[0] === "[" ? host.indexOf("]") + 1 : 0; + var index = host.indexOf(":", offset); + return index !== -1 ? host.substring(0, index) : host; + }); + defineGetter(req, "host", deprecate.function(function host() { + return this.hostname; + }, "req.host: Use req.hostname instead")); + defineGetter(req, "fresh", function() { + var method = this.method; + var res = this.res; + var status = res.statusCode; + if ("GET" !== method && "HEAD" !== method) return false; + if (status >= 200 && status < 300 || 304 === status) { + return fresh(this.headers, { + "etag": res.get("ETag"), + "last-modified": res.get("Last-Modified") + }); + } + return false; + }); + defineGetter(req, "stale", function stale() { + return !this.fresh; + }); + defineGetter(req, "xhr", function xhr() { + var val = this.get("X-Requested-With") || ""; + return val.toLowerCase() === "xmlhttprequest"; + }); + function defineGetter(obj, name, getter) { + Object.defineProperty(obj, name, { + configurable: true, + enumerable: true, + get: getter + }); + } } +}); - // 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 (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 ReadableStream({ - async pull (controller) { - controller.enqueue( - typeof source === 'string' ? textEncoder.encode(source) : source - ) - queueMicrotask(() => readableStreamClose(controller)) - }, - start () {}, - type: undefined - }) +// node_modules/.pnpm/cookie-signature@1.0.6/node_modules/cookie-signature/index.js +var require_cookie_signature = __commonJS({ + "node_modules/.pnpm/cookie-signature@1.0.6/node_modules/cookie-signature/index.js"(exports2) { + var crypto2 = __require("crypto"); + exports2.sign = function(val, secret) { + if ("string" != typeof val) throw new TypeError("Cookie value must be provided as a string."); + if ("string" != typeof secret) throw new TypeError("Secret string must be provided."); + return val + "." + crypto2.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, ""); + }; + exports2.unsign = function(val, secret) { + if ("string" != typeof val) throw new TypeError("Signed cookie string must be provided."); + if ("string" != typeof secret) throw new TypeError("Secret string must be provided."); + var str2 = val.slice(0, val.lastIndexOf(".")), mac = exports2.sign(str2, secret); + return sha1(mac) == sha1(val) ? str2 : false; + }; + function sha1(str2) { + return crypto2.createHash("sha1").update(str2).digest("hex"); + } } +}); - // 5. Assert: stream is a ReadableStream object. - assert(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 (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 (util.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 = textEncoder.encode(prefix + - `; name="${escape(normalizeLinefeeds(name))}"` + - `\r\n\r\n${normalizeLinefeeds(value)}\r\n`) - blobParts.push(chunk) - length += chunk.byteLength - } else { - const chunk = 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 +// node_modules/.pnpm/cookie@0.7.1/node_modules/cookie/index.js +var require_cookie = __commonJS({ + "node_modules/.pnpm/cookie@0.7.1/node_modules/cookie/index.js"(exports2) { + "use strict"; + exports2.parse = parse2; + exports2.serialize = serialize; + var __toString = Object.prototype.toString; + var cookieNameRegExp = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; + var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; + var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/; + function parse2(str2, opt) { + if (typeof str2 !== "string") { + throw new TypeError("argument str must be a string"); + } + var obj = {}; + var len = str2.length; + if (len < 2) return obj; + var dec = opt && opt.decode || decode; + var index = 0; + var eqIdx = 0; + var endIdx = 0; + do { + eqIdx = str2.indexOf("=", index); + if (eqIdx === -1) break; + endIdx = str2.indexOf(";", index); + if (endIdx === -1) { + endIdx = len; + } else if (eqIdx > endIdx) { + index = str2.lastIndexOf(";", eqIdx - 1) + 1; + continue; } - } + var keyStartIdx = startIndex(str2, index, eqIdx); + var keyEndIdx = endIndex(str2, eqIdx, keyStartIdx); + var key = str2.slice(keyStartIdx, keyEndIdx); + if (!obj.hasOwnProperty(key)) { + var valStartIdx = startIndex(str2, eqIdx + 1, endIdx); + var valEndIdx = endIndex(str2, endIdx, valStartIdx); + if (str2.charCodeAt(valStartIdx) === 34 && str2.charCodeAt(valEndIdx - 1) === 34) { + valStartIdx++; + valEndIdx--; + } + var val = str2.slice(valStartIdx, valEndIdx); + obj[key] = tryDecode(val, dec); + } + index = endIdx + 1; + } while (index < len); + return obj; } - - const chunk = textEncoder.encode(`--${boundary}--`) - blobParts.push(chunk) - length += chunk.byteLength - if (hasUnknownSizeValue) { - length = null + function startIndex(str2, index, max) { + do { + var code = str2.charCodeAt(index); + if (code !== 32 && code !== 9) return index; + } while (++index < max); + return max; } - - // Set source to object. - source = object - - action = async function * () { - for (const part of blobParts) { - if (part.stream) { - yield * part.stream() - } else { - yield part + function endIndex(str2, index, min) { + while (index > min) { + var code = str2.charCodeAt(--index); + if (code !== 32 && code !== 9) return index + 1; + } + return min; + } + function serialize(name, val, opt) { + var enc = opt && opt.encode || encodeURIComponent; + if (typeof enc !== "function") { + throw new TypeError("option encode is invalid"); + } + if (!cookieNameRegExp.test(name)) { + throw new TypeError("argument name is invalid"); + } + var value = enc(val); + if (!cookieValueRegExp.test(value)) { + throw new TypeError("argument val is invalid"); + } + var str2 = name + "=" + value; + if (!opt) return str2; + if (null != opt.maxAge) { + var maxAge = Math.floor(opt.maxAge); + if (!isFinite(maxAge)) { + throw new TypeError("option maxAge is invalid"); + } + str2 += "; Max-Age=" + maxAge; + } + if (opt.domain) { + if (!domainValueRegExp.test(opt.domain)) { + throw new TypeError("option domain is invalid"); + } + str2 += "; Domain=" + opt.domain; + } + if (opt.path) { + if (!pathValueRegExp.test(opt.path)) { + throw new TypeError("option path is invalid"); + } + str2 += "; Path=" + opt.path; + } + if (opt.expires) { + var expires = opt.expires; + if (!isDate(expires) || isNaN(expires.valueOf())) { + throw new TypeError("option expires is invalid"); + } + str2 += "; Expires=" + expires.toUTCString(); + } + if (opt.httpOnly) { + str2 += "; HttpOnly"; + } + if (opt.secure) { + str2 += "; Secure"; + } + if (opt.partitioned) { + str2 += "; Partitioned"; + } + if (opt.priority) { + var priority = typeof opt.priority === "string" ? opt.priority.toLowerCase() : opt.priority; + switch (priority) { + case "low": + str2 += "; Priority=Low"; + break; + case "medium": + str2 += "; Priority=Medium"; + break; + case "high": + str2 += "; Priority=High"; + break; + default: + throw new TypeError("option priority is invalid"); + } + } + if (opt.sameSite) { + var sameSite = typeof opt.sameSite === "string" ? opt.sameSite.toLowerCase() : opt.sameSite; + switch (sameSite) { + case true: + str2 += "; SameSite=Strict"; + break; + case "lax": + str2 += "; SameSite=Lax"; + break; + case "strict": + str2 += "; SameSite=Strict"; + break; + case "none": + str2 += "; SameSite=None"; + break; + default: + throw new TypeError("option sameSite is invalid"); } } + return str2; } - - // 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 (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 + function decode(str2) { + return str2.indexOf("%") !== -1 ? decodeURIComponent(str2) : str2; } - } else if (typeof object[Symbol.asyncIterator] === 'function') { - // If keepalive is true, then throw a TypeError. - if (keepalive) { - throw new TypeError('keepalive') + function isDate(val) { + return __toString.call(val) === "[object Date]"; } - - // If object is disturbed or locked, then throw a TypeError. - if (util.isDisturbed(object) || object.locked) { - throw new TypeError( - 'Response body object should not be disturbed or locked' - ) + function tryDecode(str2, decode2) { + try { + return decode2(str2); + } catch (e) { + return str2; + } } - - stream = - object instanceof ReadableStream ? object : ReadableStreamFrom(object) } +}); - // 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' || util.isBuffer(source)) { - length = Buffer.byteLength(source) +// node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js +var require_vary = __commonJS({ + "node_modules/.pnpm/vary@1.1.2/node_modules/vary/index.js"(exports2, module2) { + "use strict"; + module2.exports = vary; + module2.exports.append = append; + var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + function append(header, field) { + if (typeof header !== "string") { + throw new TypeError("header argument is required"); + } + if (!field) { + throw new TypeError("field argument is required"); + } + var fields = !Array.isArray(field) ? parse2(String(field)) : field; + for (var j = 0; j < fields.length; j++) { + if (!FIELD_NAME_REGEXP.test(fields[j])) { + throw new TypeError("field argument contains an invalid header name"); + } + } + if (header === "*") { + return header; + } + var val = header; + var vals = parse2(header.toLowerCase()); + if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) { + return "*"; + } + for (var i = 0; i < fields.length; i++) { + var fld = fields[i].toLowerCase(); + if (vals.indexOf(fld) === -1) { + vals.push(fld); + val = val ? val + ", " + fields[i] : fields[i]; + } + } + return val; + } + function parse2(header) { + var end2 = 0; + var list = []; + var start = 0; + for (var i = 0, len = header.length; i < len; i++) { + switch (header.charCodeAt(i)) { + case 32: + if (start === end2) { + start = end2 = i + 1; + } + break; + case 44: + list.push(header.substring(start, end2)); + start = end2 = i + 1; + break; + default: + end2 = i + 1; + break; + } + } + list.push(header.substring(start, end2)); + return list; + } + function vary(res, field) { + if (!res || !res.getHeader || !res.setHeader) { + throw new TypeError("res argument is required"); + } + var val = res.getHeader("Vary") || ""; + var header = Array.isArray(val) ? val.join(", ") : String(val); + if (val = append(header, field)) { + res.setHeader("Vary", val); + } + } } +}); - // 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, done } = await iterator.next() - if (done) { - // When running action is done, close stream. - queueMicrotask(() => { - controller.close() - }) +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/response.js +var require_response = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/response.js"(exports2, module2) { + "use strict"; + var Buffer3 = require_safe_buffer().Buffer; + var contentDisposition = require_content_disposition(); + var createError = require_http_errors(); + var deprecate = require_depd()("express"); + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var http4 = __require("http"); + var isAbsolute2 = require_utils5().isAbsolute; + var onFinished = require_on_finished(); + var path2 = __require("path"); + var statuses = require_statuses(); + var merge3 = require_utils_merge(); + var sign2 = require_cookie_signature().sign; + var normalizeType = require_utils5().normalizeType; + var normalizeTypes = require_utils5().normalizeTypes; + var setCharset = require_utils5().setCharset; + var cookie = require_cookie(); + var send = require_send(); + var extname = path2.extname; + var mime = send.mime; + var resolve4 = path2.resolve; + var vary = require_vary(); + var res = Object.create(http4.ServerResponse.prototype); + module2.exports = res; + var charsetRegExp = /;\s*charset\s*=/; + res.status = function status(code) { + if ((typeof code === "string" || Math.floor(code) !== code) && code > 99 && code < 1e3) { + deprecate("res.status(" + JSON.stringify(code) + "): use res.status(" + Math.floor(code) + ") instead"); + } + this.statusCode = code; + return this; + }; + res.links = function(links) { + var link = this.get("Link") || ""; + if (link) link += ", "; + return this.set("Link", link + Object.keys(links).map(function(rel) { + return "<" + links[rel] + '>; rel="' + rel + '"'; + }).join(", ")); + }; + res.send = function send2(body) { + var chunk = body; + var encoding; + var req = this.req; + var type2; + var app = this.app; + if (arguments.length === 2) { + if (typeof arguments[0] !== "number" && typeof arguments[1] === "number") { + deprecate("res.send(body, status): Use res.status(status).send(body) instead"); + this.statusCode = arguments[1]; } 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 (!isErrored(stream)) { - controller.enqueue(new Uint8Array(value)) + deprecate("res.send(status, body): Use res.status(status).send(body) instead"); + this.statusCode = arguments[0]; + chunk = arguments[1]; + } + } + if (typeof chunk === "number" && arguments.length === 1) { + if (!this.get("Content-Type")) { + this.type("txt"); + } + deprecate("res.send(status): Use res.sendStatus(status) instead"); + this.statusCode = chunk; + chunk = statuses.message[chunk]; + } + switch (typeof chunk) { + // string defaulting to html + case "string": + if (!this.get("Content-Type")) { + this.type("html"); } + break; + case "boolean": + case "number": + case "object": + if (chunk === null) { + chunk = ""; + } else if (Buffer3.isBuffer(chunk)) { + if (!this.get("Content-Type")) { + this.type("bin"); + } + } else { + return this.json(chunk); + } + break; + } + if (typeof chunk === "string") { + encoding = "utf8"; + type2 = this.get("Content-Type"); + if (typeof type2 === "string") { + this.set("Content-Type", setCharset(type2, "utf-8")); + } + } + var etagFn = app.get("etag fn"); + var generateETag = !this.get("ETag") && typeof etagFn === "function"; + var len; + if (chunk !== void 0) { + if (Buffer3.isBuffer(chunk)) { + len = chunk.length; + } else if (!generateETag && chunk.length < 1e3) { + len = Buffer3.byteLength(chunk, encoding); + } else { + chunk = Buffer3.from(chunk, encoding); + encoding = void 0; + len = chunk.length; } - return controller.desiredSize > 0 - }, - async cancel (reason) { - await iterator.return() - }, - type: undefined - }) - } - - // 13. Let body be a body whose stream is stream, source is source, - // and length is length. - const body = { stream, source, length } - - // 14. Return (body, type). - return [body, type] -} - -// https://fetch.spec.whatwg.org/#bodyinit-safely-extract -function safelyExtractBody (object, keepalive = false) { - if (!ReadableStream) { - // istanbul ignore next - ReadableStream = (__nccwpck_require__(63774).ReadableStream) + this.set("Content-Length", len); + } + var etag; + if (generateETag && len !== void 0) { + if (etag = etagFn(chunk, encoding)) { + this.set("ETag", etag); + } + } + if (req.fresh) this.statusCode = 304; + if (204 === this.statusCode || 304 === this.statusCode) { + this.removeHeader("Content-Type"); + this.removeHeader("Content-Length"); + this.removeHeader("Transfer-Encoding"); + chunk = ""; + } + if (this.statusCode === 205) { + this.set("Content-Length", "0"); + this.removeHeader("Transfer-Encoding"); + chunk = ""; + } + if (req.method === "HEAD") { + this.end(); + } else { + this.end(chunk, encoding); + } + return this; + }; + res.json = function json2(obj) { + var val = obj; + if (arguments.length === 2) { + if (typeof arguments[1] === "number") { + deprecate("res.json(obj, status): Use res.status(status).json(obj) instead"); + this.statusCode = arguments[1]; + } else { + deprecate("res.json(status, obj): Use res.status(status).json(obj) instead"); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + var app = this.app; + var escape2 = app.get("json escape"); + var replacer = app.get("json replacer"); + var spaces = app.get("json spaces"); + var body = stringify(val, replacer, spaces, escape2); + if (!this.get("Content-Type")) { + this.set("Content-Type", "application/json"); + } + return this.send(body); + }; + res.jsonp = function jsonp(obj) { + var val = obj; + if (arguments.length === 2) { + if (typeof arguments[1] === "number") { + deprecate("res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead"); + this.statusCode = arguments[1]; + } else { + deprecate("res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead"); + this.statusCode = arguments[0]; + val = arguments[1]; + } + } + var app = this.app; + var escape2 = app.get("json escape"); + var replacer = app.get("json replacer"); + var spaces = app.get("json spaces"); + var body = stringify(val, replacer, spaces, escape2); + var callback = this.req.query[app.get("jsonp callback name")]; + if (!this.get("Content-Type")) { + this.set("X-Content-Type-Options", "nosniff"); + this.set("Content-Type", "application/json"); + } + if (Array.isArray(callback)) { + callback = callback[0]; + } + if (typeof callback === "string" && callback.length !== 0) { + this.set("X-Content-Type-Options", "nosniff"); + this.set("Content-Type", "text/javascript"); + callback = callback.replace(/[^\[\]\w$.]/g, ""); + if (body === void 0) { + body = ""; + } else if (typeof body === "string") { + body = body.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"); + } + body = "/**/ typeof " + callback + " === 'function' && " + callback + "(" + body + ");"; + } + return this.send(body); + }; + res.sendStatus = function sendStatus(statusCode) { + var body = statuses.message[statusCode] || String(statusCode); + this.statusCode = statusCode; + this.type("txt"); + return this.send(body); + }; + res.sendFile = function sendFile(path3, options2, callback) { + var done = callback; + var req = this.req; + var res2 = this; + var next = req.next; + var opts = options2 || {}; + if (!path3) { + throw new TypeError("path argument is required to res.sendFile"); + } + if (typeof path3 !== "string") { + throw new TypeError("path must be a string to res.sendFile"); + } + if (typeof options2 === "function") { + done = options2; + opts = {}; + } + if (!opts.root && !isAbsolute2(path3)) { + throw new TypeError("path must be absolute or specify root to res.sendFile"); + } + var pathname = encodeURI(path3); + var file = send(req, pathname, opts); + sendfile(res2, file, opts, function(err) { + if (done) return done(err); + if (err && err.code === "EISDIR") return next(); + if (err && err.code !== "ECONNABORTED" && err.syscall !== "write") { + next(err); + } + }); + }; + res.sendfile = function(path3, options2, callback) { + var done = callback; + var req = this.req; + var res2 = this; + var next = req.next; + var opts = options2 || {}; + if (typeof options2 === "function") { + done = options2; + opts = {}; + } + var file = send(req, path3, opts); + sendfile(res2, file, opts, function(err) { + if (done) return done(err); + if (err && err.code === "EISDIR") return next(); + if (err && err.code !== "ECONNABORTED" && err.syscall !== "write") { + next(err); + } + }); + }; + res.sendfile = deprecate.function( + res.sendfile, + "res.sendfile: Use res.sendFile instead" + ); + res.download = function download(path3, filename, options2, callback) { + var done = callback; + var name = filename; + var opts = options2 || null; + if (typeof filename === "function") { + done = filename; + name = null; + opts = null; + } else if (typeof options2 === "function") { + done = options2; + opts = null; + } + if (typeof filename === "object" && (typeof options2 === "function" || options2 === void 0)) { + name = null; + opts = filename; + } + var headers = { + "Content-Disposition": contentDisposition(name || path3) + }; + if (opts && opts.headers) { + var keys = Object.keys(opts.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.toLowerCase() !== "content-disposition") { + headers[key] = opts.headers[key]; + } + } + } + opts = Object.create(opts); + opts.headers = headers; + var fullPath = !opts.root ? resolve4(path3) : path3; + return this.sendFile(fullPath, opts, done); + }; + res.contentType = res.type = function contentType(type2) { + var ct = type2.indexOf("/") === -1 ? mime.lookup(type2) : type2; + return this.set("Content-Type", ct); + }; + res.format = function(obj) { + var req = this.req; + var next = req.next; + var keys = Object.keys(obj).filter(function(v) { + return v !== "default"; + }); + var key = keys.length > 0 ? req.accepts(keys) : false; + this.vary("Accept"); + if (key) { + this.set("Content-Type", normalizeType(key).value); + obj[key](req, this, next); + } else if (obj.default) { + obj.default(req, this, next); + } else { + next(createError(406, { + types: normalizeTypes(keys).map(function(o) { + return o.value; + }) + })); + } + return this; + }; + res.attachment = function attachment(filename) { + if (filename) { + this.type(extname(filename)); + } + this.set("Content-Disposition", contentDisposition(filename)); + return this; + }; + res.append = function append(field, val) { + var prev = this.get(field); + var value = val; + if (prev) { + value = Array.isArray(prev) ? prev.concat(val) : Array.isArray(val) ? [prev].concat(val) : [prev, val]; + } + return this.set(field, value); + }; + res.set = res.header = function header(field, val) { + if (arguments.length === 2) { + var value = Array.isArray(val) ? val.map(String) : String(val); + if (field.toLowerCase() === "content-type") { + if (Array.isArray(value)) { + throw new TypeError("Content-Type cannot be set to an Array"); + } + if (!charsetRegExp.test(value)) { + var charset = mime.charsets.lookup(value.split(";")[0]); + if (charset) value += "; charset=" + charset.toLowerCase(); + } + } + this.setHeader(field, value); + } else { + for (var key in field) { + this.set(key, field[key]); + } + } + return this; + }; + res.get = function(field) { + return this.getHeader(field); + }; + res.clearCookie = function clearCookie(name, options2) { + if (options2) { + if (options2.maxAge) { + deprecate('res.clearCookie: Passing "options.maxAge" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + if (options2.expires) { + deprecate('res.clearCookie: Passing "options.expires" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'); + } + } + var opts = merge3({ expires: /* @__PURE__ */ new Date(1), path: "/" }, options2); + return this.cookie(name, "", opts); + }; + res.cookie = function(name, value, options2) { + var opts = merge3({}, options2); + var secret = this.req.secret; + var signed = opts.signed; + if (signed && !secret) { + throw new Error('cookieParser("secret") required for signed cookies'); + } + var val = typeof value === "object" ? "j:" + JSON.stringify(value) : String(value); + if (signed) { + val = "s:" + sign2(val, secret); + } + if (opts.maxAge != null) { + var maxAge = opts.maxAge - 0; + if (!isNaN(maxAge)) { + opts.expires = new Date(Date.now() + maxAge); + opts.maxAge = Math.floor(maxAge / 1e3); + } + } + if (opts.path == null) { + opts.path = "/"; + } + this.append("Set-Cookie", cookie.serialize(name, String(val), opts)); + return this; + }; + res.location = function location(url) { + var loc; + if (url === "back") { + deprecate('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices'); + loc = this.req.get("Referrer") || "/"; + } else { + loc = String(url); + } + return this.set("Location", encodeUrl(loc)); + }; + res.redirect = function redirect(url) { + var address = url; + var body; + var status = 302; + if (arguments.length === 2) { + if (typeof arguments[0] === "number") { + status = arguments[0]; + address = arguments[1]; + } else { + deprecate("res.redirect(url, status): Use res.redirect(status, url) instead"); + status = arguments[1]; + } + } + address = this.location(address).get("Location"); + this.format({ + text: function() { + body = statuses.message[status] + ". Redirecting to " + address; + }, + html: function() { + var u = escapeHtml(address); + body = "

" + statuses.message[status] + ". Redirecting to " + u + "

"; + }, + default: function() { + body = ""; + } + }); + this.statusCode = status; + this.set("Content-Length", Buffer3.byteLength(body)); + if (this.req.method === "HEAD") { + this.end(); + } else { + this.end(body); + } + }; + res.vary = function(field) { + if (!field || Array.isArray(field) && !field.length) { + deprecate("res.vary(): Provide a field name"); + return this; + } + vary(this, field); + return this; + }; + res.render = function render(view, options2, callback) { + var app = this.req.app; + var done = callback; + var opts = options2 || {}; + var req = this.req; + var self2 = this; + if (typeof options2 === "function") { + done = options2; + opts = {}; + } + opts._locals = self2.locals; + done = done || function(err, str2) { + if (err) return req.next(err); + self2.send(str2); + }; + app.render(view, opts, done); + }; + function sendfile(res2, file, options2, callback) { + var done = false; + var streaming; + function onaborted() { + if (done) return; + done = true; + var err = new Error("Request aborted"); + err.code = "ECONNABORTED"; + callback(err); + } + function ondirectory() { + if (done) return; + done = true; + var err = new Error("EISDIR, read"); + err.code = "EISDIR"; + callback(err); + } + function onerror(err) { + if (done) return; + done = true; + callback(err); + } + function onend() { + if (done) return; + done = true; + callback(); + } + function onfile() { + streaming = false; + } + function onfinish(err) { + if (err && err.code === "ECONNRESET") return onaborted(); + if (err) return onerror(err); + if (done) return; + setImmediate(function() { + if (streaming !== false && !done) { + onaborted(); + return; + } + if (done) return; + done = true; + callback(); + }); + } + function onstream() { + streaming = true; + } + file.on("directory", ondirectory); + file.on("end", onend); + file.on("error", onerror); + file.on("file", onfile); + file.on("stream", onstream); + onFinished(res2, onfinish); + if (options2.headers) { + file.on("headers", function headers(res3) { + var obj = options2.headers; + var keys = Object.keys(obj); + for (var i = 0; i < keys.length; i++) { + var k = keys[i]; + res3.setHeader(k, obj[k]); + } + }); + } + file.pipe(res2); + } + function stringify(value, replacer, spaces, escape2) { + var json2 = replacer || spaces ? JSON.stringify(value, replacer, spaces) : JSON.stringify(value); + if (escape2 && typeof json2 === "string") { + json2 = json2.replace(/[<>&]/g, function(c) { + switch (c.charCodeAt(0)) { + case 60: + return "\\u003c"; + case 62: + return "\\u003e"; + case 38: + return "\\u0026"; + /* istanbul ignore next: unreachable default */ + default: + return c; + } + }); + } + return json2; + } } +}); - // 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 - assert(!util.isDisturbed(object), 'The body has already been consumed.') - // istanbul ignore next - assert(!object.locked, 'The stream is locked.') +// node_modules/.pnpm/serve-static@1.16.2/node_modules/serve-static/index.js +var require_serve_static = __commonJS({ + "node_modules/.pnpm/serve-static@1.16.2/node_modules/serve-static/index.js"(exports2, module2) { + "use strict"; + var encodeUrl = require_encodeurl(); + var escapeHtml = require_escape_html(); + var parseUrl4 = require_parseurl(); + var resolve4 = __require("path").resolve; + var send = require_send(); + var url = __require("url"); + module2.exports = serveStatic; + module2.exports.mime = send.mime; + function serveStatic(root, options2) { + if (!root) { + throw new TypeError("root path required"); + } + if (typeof root !== "string") { + throw new TypeError("root path must be a string"); + } + var opts = Object.create(options2 || null); + var fallthrough = opts.fallthrough !== false; + var redirect = opts.redirect !== false; + var setHeaders = opts.setHeaders; + if (setHeaders && typeof setHeaders !== "function") { + throw new TypeError("option setHeaders must be function"); + } + opts.maxage = opts.maxage || opts.maxAge || 0; + opts.root = resolve4(root); + var onDirectory = redirect ? createRedirectDirectoryListener() : createNotFoundDirectoryListener(); + return function serveStatic2(req, res, next) { + if (req.method !== "GET" && req.method !== "HEAD") { + if (fallthrough) { + return next(); + } + res.statusCode = 405; + res.setHeader("Allow", "GET, HEAD"); + res.setHeader("Content-Length", "0"); + res.end(); + return; + } + var forwardError = !fallthrough; + var originalUrl = parseUrl4.original(req); + var path2 = parseUrl4(req).pathname; + if (path2 === "/" && originalUrl.pathname.substr(-1) !== "/") { + path2 = ""; + } + var stream = send(req, path2, opts); + stream.on("directory", onDirectory); + if (setHeaders) { + stream.on("headers", setHeaders); + } + if (fallthrough) { + stream.on("file", function onFile() { + forwardError = true; + }); + } + stream.on("error", function error(err) { + if (forwardError || !(err.statusCode < 500)) { + next(err); + return; + } + next(); + }); + stream.pipe(res); + }; + } + function collapseLeadingSlashes(str2) { + for (var i = 0; i < str2.length; i++) { + if (str2.charCodeAt(i) !== 47) { + break; + } + } + return i > 1 ? "/" + str2.substr(i) : str2; + } + function createHtmlDocument(title, body) { + return '\n\n\n\n' + title + "\n\n\n
" + body + "
\n\n\n"; + } + function createNotFoundDirectoryListener() { + return function notFound() { + this.error(404); + }; + } + function createRedirectDirectoryListener() { + return function redirect(res) { + if (this.hasTrailingSlash()) { + this.error(404); + return; + } + var originalUrl = parseUrl4.original(this.req); + originalUrl.path = null; + originalUrl.pathname = collapseLeadingSlashes(originalUrl.pathname + "/"); + var loc = encodeUrl(url.format(originalUrl)); + var doc = createHtmlDocument("Redirecting", "Redirecting to " + escapeHtml(loc)); + res.statusCode = 301; + res.setHeader("Content-Type", "text/html; charset=UTF-8"); + res.setHeader("Content-Length", Buffer.byteLength(doc)); + res.setHeader("Content-Security-Policy", "default-src 'none'"); + res.setHeader("X-Content-Type-Options", "nosniff"); + res.setHeader("Location", loc); + res.end(doc); + }; + } } +}); - // 2. Return the results of extracting object. - return extractBody(object, keepalive) -} - -function 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 = 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 +// node_modules/.pnpm/express@4.21.1/node_modules/express/lib/express.js +var require_express = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/lib/express.js"(exports2, module2) { + "use strict"; + var bodyParser = require_body_parser(); + var EventEmitter = __require("events").EventEmitter; + var mixin = require_merge_descriptors(); + var proto = require_application(); + var Route = require_route(); + var Router = require_router(); + var req = require_request(); + var res = require_response(); + exports2 = module2.exports = createApplication; + function createApplication() { + var app = function(req2, res2, next) { + app.handle(req2, res2, next); + }; + mixin(app, EventEmitter.prototype, false); + mixin(app, proto, false); + app.request = Object.create(req, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }); + app.response = Object.create(res, { + app: { configurable: true, enumerable: true, writable: true, value: app } + }); + app.init(); + return app; + } + exports2.application = proto; + exports2.request = req; + exports2.response = res; + exports2.Route = Route; + exports2.Router = Router; + exports2.json = bodyParser.json; + exports2.query = require_query(); + exports2.raw = bodyParser.raw; + exports2.static = require_serve_static(); + exports2.text = bodyParser.text; + exports2.urlencoded = bodyParser.urlencoded; + var removedMiddlewares = [ + "bodyParser", + "compress", + "cookieSession", + "session", + "logger", + "cookieParser", + "favicon", + "responseTime", + "errorHandler", + "timeout", + "methodOverride", + "vhost", + "csrf", + "directory", + "limit", + "multipart", + "staticCache" + ]; + removedMiddlewares.forEach(function(name) { + Object.defineProperty(exports2, name, { + get: function() { + throw new Error("Most middleware (like " + name + ") is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware."); + }, + configurable: true + }); + }); } -} +}); -async function * consumeBody (body) { - if (body) { - if (isUint8Array(body)) { - yield body - } else { - const stream = body.stream +// node_modules/.pnpm/express@4.21.1/node_modules/express/index.js +var require_express2 = __commonJS({ + "node_modules/.pnpm/express@4.21.1/node_modules/express/index.js"(exports2, module2) { + "use strict"; + module2.exports = require_express(); + } +}); - if (util.isDisturbed(stream)) { - throw new TypeError('The body has already been consumed.') +// node_modules/.pnpm/get-caller-file@2.0.5/node_modules/get-caller-file/index.js +var require_get_caller_file = __commonJS({ + "node_modules/.pnpm/get-caller-file@2.0.5/node_modules/get-caller-file/index.js"(exports2, module2) { + "use strict"; + module2.exports = function getCallerFile(position) { + if (position === void 0) { + position = 2; } - - if (stream.locked) { - throw new TypeError('The stream is locked.') + if (position >= Error.stackTraceLimit) { + throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `" + position + "` and Error.stackTraceLimit was: `" + Error.stackTraceLimit + "`"); } - - // Compat. - stream[kBodyUsed] = true - - yield * stream - } - } -} - -function throwIfAborted (state) { - if (state.aborted) { - throw new DOMException('The operation was aborted.', 'AbortError') + var oldPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function(_, stack2) { + return stack2; + }; + var stack = new Error().stack; + Error.prepareStackTrace = oldPrepareStackTrace; + if (stack !== null && typeof stack === "object") { + return stack[position] ? stack[position].getFileName() : void 0; + } + }; } -} - -function 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 specConsumeBody(this, (bytes) => { - let mimeType = bodyMimeType(this) +}); - if (mimeType === 'failure') { - mimeType = '' - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType) +// node_modules/.pnpm/pino-http@10.3.0/node_modules/pino-http/logger.js +var require_logger = __commonJS({ + "node_modules/.pnpm/pino-http@10.3.0/node_modules/pino-http/logger.js"(exports2, module2) { + "use strict"; + var { pino: pino3, symbols: { stringifySym, chindingsSym } } = require_pino(); + var serializers = require_pino_std_serializers(); + var getCallerFile = require_get_caller_file(); + var startTime = Symbol("startTime"); + var reqObject = Symbol("reqObject"); + function pinoLogger(opts, stream) { + if (opts && opts._writableState) { + stream = opts; + opts = null; + } + opts = Object.assign({}, opts); + opts.customAttributeKeys = opts.customAttributeKeys || {}; + const reqKey = opts.customAttributeKeys.req || "req"; + const resKey = opts.customAttributeKeys.res || "res"; + const errKey = opts.customAttributeKeys.err || "err"; + const requestIdKey = opts.customAttributeKeys.reqId || "reqId"; + const responseTimeKey = opts.customAttributeKeys.responseTime || "responseTime"; + delete opts.customAttributeKeys; + const customProps = opts.customProps || void 0; + opts.wrapSerializers = "wrapSerializers" in opts ? opts.wrapSerializers : true; + if (opts.wrapSerializers) { + opts.serializers = Object.assign({}, opts.serializers); + const requestSerializer = opts.serializers[reqKey] || opts.serializers.req || serializers.req; + const responseSerializer = opts.serializers[resKey] || opts.serializers.res || serializers.res; + const errorSerializer = opts.serializers[errKey] || opts.serializers.err || serializers.err; + opts.serializers[reqKey] = serializers.wrapRequestSerializer(requestSerializer); + opts.serializers[resKey] = serializers.wrapResponseSerializer(responseSerializer); + opts.serializers[errKey] = serializers.wrapErrorSerializer(errorSerializer); + } + delete opts.wrapSerializers; + if (opts.useLevel && opts.customLogLevel) { + throw new Error("You can't pass 'useLevel' and 'customLogLevel' together"); + } + function getValidLogLevel(level, defaultValue = "info") { + if (level && typeof level === "string") { + const logLevel = level.trim(); + if (validLogLevels.includes(logLevel) === true) { + return logLevel; + } } - - // Return a Blob whose contents are bytes and type attribute - // is mimeType. - return new 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 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 specConsumeBody(this, utf8DecodeBytes, instance) - }, - - json () { - // The json() method steps are to return the result of running - // consume body with this and parse JSON from bytes. - return specConsumeBody(this, parseJSONFromBytes, instance) - }, - - async formData () { - webidl.brandCheck(this, instance) - - throwIfAborted(this[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 FormData() - - let busboy - - try { - busboy = new Busboy({ - headers, - preservePath: true - }) - } catch (err) { - throw new DOMException(`${err}`, 'AbortError') + return defaultValue; + } + function getLogLevelFromCustomLogLevel(customLogLevel2, useLevel2, res, err, req) { + return customLogLevel2 ? getValidLogLevel(customLogLevel2(req, res, err), useLevel2) : useLevel2; + } + const customLogLevel = opts.customLogLevel; + delete opts.customLogLevel; + const theStream = opts.stream || stream; + delete opts.stream; + const autoLogging = opts.autoLogging !== false; + const autoLoggingIgnore = opts.autoLogging && opts.autoLogging.ignore ? opts.autoLogging.ignore : null; + delete opts.autoLogging; + const onRequestReceivedObject = getFunctionOrDefault(opts.customReceivedObject, void 0); + const receivedMessage = getFunctionOrDefault(opts.customReceivedMessage, void 0); + const onRequestSuccessObject = getFunctionOrDefault(opts.customSuccessObject, defaultSuccessfulRequestObjectProvider); + const successMessage = getFunctionOrDefault(opts.customSuccessMessage, defaultSuccessfulRequestMessageProvider); + const onRequestErrorObject = getFunctionOrDefault(opts.customErrorObject, defaultFailedRequestObjectProvider); + const errorMessage = getFunctionOrDefault(opts.customErrorMessage, defaultFailedRequestMessageProvider); + delete opts.customSuccessfulMessage; + delete opts.customErroredMessage; + const quietReqLogger = !!opts.quietReqLogger; + const quietResLogger = !!opts.quietResLogger; + const logger2 = wrapChild(opts, theStream); + const validLogLevels = Object.keys(logger2.levels.values).concat("silent"); + const useLevel = getValidLogLevel(opts.useLevel); + delete opts.useLevel; + const genReqId = reqIdGenFactory(opts.genReqId); + const result = (req, res, next) => { + return loggingMiddleware(logger2, req, res, next); + }; + result.logger = logger2; + return result; + function onResFinished(res, logger3, err) { + let log2 = logger3; + const responseTime = Date.now() - res[startTime]; + const req = res[reqObject]; + const level = getLogLevelFromCustomLogLevel(customLogLevel, useLevel, res, err, req); + if (level === "silent") { + return; } - - 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 File(chunks, filename, { type: mimeType })) - }) - } else { - value.on('data', (chunk) => { - chunks.push(chunk) - }) - value.on('end', () => { - responseFormData.append(name, new File(chunks, filename, { type: mimeType })) - }) + const customPropBindings = typeof customProps === "function" ? customProps(req, res) : customProps; + if (customPropBindings) { + const customPropBindingStr = logger3[stringifySym](customPropBindings).replace(/[{}]/g, ""); + const customPropBindingsStr = logger3[chindingsSym]; + if (!customPropBindingsStr.includes(customPropBindingStr)) { + log2 = logger3.child(customPropBindings); } - }) - - 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 consumeBody(this[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 consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { - throw new TypeError('Expected Uint8Array chunk') + } + if (err || res.err || res.statusCode >= 500) { + const error = err || res.err || new Error("failed with status code " + res.statusCode); + log2[level]( + onRequestErrorObject(req, res, error, { + [resKey]: res, + [errKey]: error, + [responseTimeKey]: responseTime + }), + errorMessage(req, res, error, responseTime) + ); + return; + } + log2[level]( + onRequestSuccessObject(req, res, { + [resKey]: res, + [responseTimeKey]: responseTime + }), + successMessage(req, res, responseTime) + ); + } + function loggingMiddleware(logger3, req, res, next) { + let shouldLogSuccess = true; + req.id = req.id || genReqId(req, res); + const log2 = quietReqLogger ? logger3.child({ [requestIdKey]: req.id }) : logger3; + let fullReqLogger = log2.child({ [reqKey]: req }); + const customPropBindings = typeof customProps === "function" ? customProps(req, res) : customProps; + if (customPropBindings) { + fullReqLogger = fullReqLogger.child(customPropBindings); + } + const responseLogger = quietResLogger ? log2 : fullReqLogger; + const requestLogger = quietReqLogger ? log2 : fullReqLogger; + if (!res.log) { + res.log = responseLogger; + } + if (!res.allLogs) { + res.allLogs = []; + } + res.allLogs.push(responseLogger); + if (!req.log) { + req.log = requestLogger; + } + if (!req.allLogs) { + req.allLogs = []; + } + req.allLogs.push(requestLogger); + res[startTime] = res[startTime] || Date.now(); + res[reqObject] = req; + const onResponseComplete = (err) => { + res.removeListener("close", onResponseComplete); + res.removeListener("finish", onResponseComplete); + res.removeListener("error", onResponseComplete); + return onResFinished(res, responseLogger, err); + }; + if (autoLogging) { + if (autoLoggingIgnore !== null && shouldLogSuccess === true) { + const isIgnored = autoLoggingIgnore(req); + shouldLogSuccess = !isIgnored; + } + if (shouldLogSuccess) { + const shouldLogReceived = receivedMessage !== void 0 || onRequestReceivedObject !== void 0; + if (shouldLogReceived) { + const level = getLogLevelFromCustomLogLevel(customLogLevel, useLevel, res, void 0, req); + const receivedObjectResult = onRequestReceivedObject !== void 0 ? onRequestReceivedObject(req, res, void 0) : {}; + const receivedStringResult = receivedMessage !== void 0 ? receivedMessage(req, res) : void 0; + requestLogger[level](receivedObjectResult, receivedStringResult); } - text += streamingDecoder.decode(chunk, { stream: true }) + res.on("close", onResponseComplete); + res.on("finish", onResponseComplete); } - 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 }) + res.on("error", onResponseComplete); } - - // 3. Return a new FormData object whose entries are entries. - const formData = new FormData() - for (const [name, value] of entries) { - formData.append(name, value) + if (next) { + next(); } - return formData + } + } + function wrapChild(opts, stream) { + const prevLogger = opts.logger; + const prevGenReqId = opts.genReqId; + let logger2 = null; + if (prevLogger) { + opts.logger = void 0; + opts.genReqId = void 0; + logger2 = prevLogger.child({}, opts); + opts.logger = prevLogger; + opts.genReqId = prevGenReqId; } 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() - - throwIfAborted(this[kState]) - - // Otherwise, throw a TypeError. - throw webidl.errors.exception({ - header: `${instance.name}.formData`, - message: 'Could not parse content as FormData.' - }) + if (opts.transport && !opts.transport.caller) { + opts.transport.caller = getCallerFile(); + } + logger2 = pino3(opts, stream); } + return logger2; } - } - - return methods -} - -function mixinBody (prototype) { - Object.assign(prototype.prototype, 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 specConsumeBody (object, convertBytesToJSValue, instance) { - webidl.brandCheck(object, instance) - - throwIfAborted(object[kState]) - - // 1. If object is unusable, then return a promise rejected - // with a TypeError. - if (bodyUnusable(object[kState].body)) { - throw new TypeError('Body is unusable') - } - - // 2. Let promise be a new promise. - const promise = 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) + function reqIdGenFactory(func) { + if (typeof func === "function") return func; + const maxInt = 2147483647; + let nextReqId = 0; + return function genReqId(req, res) { + return req.id || (nextReqId = nextReqId + 1 & maxInt); + }; } + function getFunctionOrDefault(value, defaultValue) { + if (value && typeof value === "function") { + return value; + } + return defaultValue; + } + function defaultSuccessfulRequestObjectProvider(req, res, successObject) { + return successObject; + } + function defaultFailedRequestObjectProvider(req, res, error, errorObject) { + return errorObject; + } + function defaultFailedRequestMessageProvider() { + return "request errored"; + } + function defaultSuccessfulRequestMessageProvider(req, res) { + return !req.readableAborted && res.writableEnded ? "request completed" : "request aborted"; + } + module2.exports = pinoLogger; + module2.exports.stdSerializers = { + err: serializers.err, + req: serializers.req, + res: serializers.res + }; + module2.exports.startTime = startTime; + module2.exports.default = pinoLogger; + module2.exports.pinoHttp = pinoLogger; } +}); - // 5. If object’s body is null, then run successSteps with an - // empty byte sequence. - if (object[kState].body == null) { - successSteps(new Uint8Array()) - return promise.promise - } - - // 6. Otherwise, fully read object’s body given successSteps, - // errorSteps, and object’s relevant global object. - await fullyReadBody(object[kState].body, successSteps, errorSteps) - - // 7. Return promise. - return promise.promise -} - -// https://fetch.spec.whatwg.org/#body-unusable -function 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 || util.isDisturbed(body.stream)) -} - -/** - * @see https://encoding.spec.whatwg.org/#utf-8-decode - * @param {Buffer} buffer - */ -function utf8DecodeBytes (buffer) { - if (buffer.length === 0) { - return '' +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/server/logging-middleware.js +var require_logging_middleware = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/server/logging-middleware.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getLoggingMiddleware = getLoggingMiddleware; + var node_crypto_1 = __require("node:crypto"); + var pino_http_1 = require_logger(); + function getLoggingMiddleware(logger2, options2) { + return (0, pino_http_1.pinoHttp)({ + ...options2, + logger: logger2.child({ name: "http" }), + customSuccessMessage(_req, res) { + const responseTime = Date.now() - res[pino_http_1.startTime]; + return `${res.req.method} ${res.req.url} ${res.statusCode} - ${responseTime}ms`; + }, + customErrorMessage(_err, res) { + const responseTime = Date.now() - res[pino_http_1.startTime]; + return `${res.req.method} ${res.req.url} ${res.statusCode} - ${responseTime}ms`; + }, + genReqId: (req) => req.headers["x-request-id"] || req.headers["x-github-delivery"] || (0, node_crypto_1.randomUUID)() + }); + } } +}); - // 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) +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/webhook-proxy.js +var require_webhook_proxy = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/webhook-proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createWebhookProxy = void 0; + var createWebhookProxy = async (opts) => { + try { + const SmeeClient = (await import("smee-client")).default; + const smee = new SmeeClient({ + logger: opts.logger, + source: opts.url, + target: `http://localhost:${opts.port}${opts.path}`, + fetch: opts.fetch + }); + return smee.start(); + } catch (error) { + opts.logger.warn("Run `npm install --save-dev smee-client` to proxy webhooks to localhost."); + return; + } + }; + exports2.createWebhookProxy = createWebhookProxy; } +}); - // 3. Process a queue with an instance of UTF-8’s - // decoder, ioQueue, output, and "replacement". - const output = textDecoder.decode(buffer) - - // 4. Return output. - return output -} - -/** - * @see https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value - * @param {Uint8Array} bytes - */ -function parseJSONFromBytes (bytes) { - return JSON.parse(utf8DecodeBytes(bytes)) -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-body-mime-type - * @param {import('./response').Response|import('./request').Request} object - */ -function bodyMimeType (object) { - const { headersList } = object[kState] - const contentType = headersList.get('content-type') - - if (contentType === null) { - return 'failure' +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/server/server.js +var require_server = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/server/server.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Server = exports2.defaultWebhooksPath = void 0; + var node_path_1 = __require("node:path"); + var express_1 = __importStar(require_express2()); + var webhooks_1 = (init_dist_src5(), __toCommonJS(dist_src_exports3)); + var logging_middleware_js_1 = require_logging_middleware(); + var webhook_proxy_js_1 = require_webhook_proxy(); + var version_js_1 = require_version2(); + var rebind_log_js_1 = require_rebind_log(); + exports2.defaultWebhooksPath = "/api/github/webhooks"; + var Server = class { + static version = version_js_1.VERSION; + expressApp; + log; + version = version_js_1.VERSION; + probotApp; + state; + constructor(options2 = {}) { + this.expressApp = (0, express_1.default)(); + this.probotApp = new options2.Probot({ + request: options2.request + }); + this.log = options2.log ? (0, rebind_log_js_1.rebindLog)(options2.log) : (0, rebind_log_js_1.rebindLog)(this.probotApp.log.child({ name: "server" })); + this.state = { + cwd: options2.cwd || process.cwd(), + port: options2.port, + host: options2.host, + webhookPath: options2.webhookPath || exports2.defaultWebhooksPath, + webhookProxy: options2.webhookProxy + }; + this.expressApp.use((0, logging_middleware_js_1.getLoggingMiddleware)(this.log, options2.loggingOptions)); + this.expressApp.use("/probot/static/", express_1.default.static((0, node_path_1.join)(__dirname, "..", "..", "static"))); + this.expressApp.use((0, webhooks_1.createNodeMiddleware)(this.probotApp.webhooks, { + path: this.state.webhookPath + })); + this.expressApp.get("/ping", (_req, res) => res.end("PONG")); + } + async load(appFn) { + await appFn(this.probotApp, { + cwd: this.state.cwd, + getRouter: (path2) => this.router(path2) + }); + } + async start() { + this.log.info(`Running Probot v${this.version} (Node.js: ${process.version})`); + const port = this.state.port || 3e3; + const { host, webhookPath, webhookProxy } = this.state; + const printableHost = host ?? "localhost"; + this.state.httpServer = await new Promise((resolve4, reject) => { + const server = this.expressApp.listen(port, ...host ? [host] : [], async () => { + if (webhookProxy) { + this.state.eventSource = await (0, webhook_proxy_js_1.createWebhookProxy)({ + logger: this.log, + path: webhookPath, + port, + url: webhookProxy + }); + } + this.log.info(`Listening on http://${printableHost}:${port}`); + resolve4(server); + }); + server.on("error", (error) => { + if (error.code === "EADDRINUSE") { + error = Object.assign(error, { + message: `Port ${port} is already in use. You can define the PORT environment variable to use a different port.` + }); + } + this.log.error(error); + reject(error); + }); + }); + return this.state.httpServer; + } + async stop() { + if (this.state.eventSource) + this.state.eventSource.close(); + if (!this.state.httpServer) + return; + const server = this.state.httpServer; + return new Promise((resolve4) => server.close(resolve4)); + } + router(path2 = "/") { + const newRouter = (0, express_1.Router)(); + this.expressApp.use(path2, newRouter); + return newRouter; + } + }; + exports2.Server = Server; } +}); - return parseMIMEType(contentType) -} - -module.exports = { - extractBody, - safelyExtractBody, - cloneBody, - mixinBody -} - - -/***/ }), - -/***/ 84135: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(28167) - -const corsSafeListedMethods = ['GET', 'HEAD', 'POST'] -const corsSafeListedMethodsSet = new Set(corsSafeListedMethods) - -const nullBodyStatus = [101, 204, 205, 304] - -const redirectStatus = [301, 302, 303, 307, 308] -const redirectStatusSet = new Set(redirectStatus) - -// https://fetch.spec.whatwg.org/#block-bad-port -const 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 badPortsSet = new Set(badPorts) - -// https://w3c.github.io/webappsec-referrer-policy/#referrer-policies -const referrerPolicy = [ - '', - 'no-referrer', - 'no-referrer-when-downgrade', - 'same-origin', - 'origin', - 'strict-origin', - 'origin-when-cross-origin', - 'strict-origin-when-cross-origin', - 'unsafe-url' -] -const referrerPolicySet = new Set(referrerPolicy) - -const requestRedirect = ['follow', 'manual', 'error'] - -const safeMethods = ['GET', 'HEAD', 'OPTIONS', 'TRACE'] -const safeMethodsSet = new Set(safeMethods) - -const requestMode = ['navigate', 'same-origin', 'no-cors', 'cors'] - -const requestCredentials = ['omit', 'same-origin', 'include'] - -const requestCache = [ - 'default', - 'no-store', - 'reload', - 'no-cache', - 'force-cache', - 'only-if-cached' -] - -// https://fetch.spec.whatwg.org/#request-body-header-name -const 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 requestDuplex = [ - 'half' -] - -// http://fetch.spec.whatwg.org/#forbidden-method -const forbiddenMethods = ['CONNECT', 'TRACE', 'TRACK'] -const forbiddenMethodsSet = new Set(forbiddenMethods) - -const subresource = [ - 'audio', - 'audioworklet', - 'font', - 'image', - 'manifest', - 'paintworklet', - 'script', - 'style', - 'track', - 'video', - 'xslt', - '' -] -const subresourceSet = new Set(subresource) - -/** @type {globalThis['DOMException']} */ -const 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 channel - -/** @type {globalThis['structuredClone']} */ -const 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 = undefined) { - if (arguments.length === 0) { - throw new TypeError('missing argument') - } - - if (!channel) { - channel = new MessageChannel() - } - channel.port1.unref() - channel.port2.unref() - channel.port1.postMessage(value, options?.transfer) - return receiveMessageOnPort(channel.port2).message - } - -module.exports = { - DOMException, - structuredClone, - subresource, - forbiddenMethods, - requestBodyHeader, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - redirectStatus, - corsSafeListedMethods, - nullBodyStatus, - safeMethods, - badPorts, - requestDuplex, - subresourceSet, - badPortsSet, - redirectStatusSet, - corsSafeListedMethodsSet, - safeMethodsSet, - forbiddenMethodsSet, - referrerPolicySet -} - - -/***/ }), - -/***/ 43911: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(42613) -const { atob } = __nccwpck_require__(20181) -const { isomorphicDecode } = __nccwpck_require__(42696) - -const encoder = new TextEncoder() - -/** - * @see https://mimesniff.spec.whatwg.org/#http-token-code-point - */ -const HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/ -const HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/ // eslint-disable-line -/** - * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point - */ -const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line - -// https://fetch.spec.whatwg.org/#data-url-processor -/** @param {URL} dataURL */ -function dataURLProcessor (dataURL) { - // 1. Assert: dataURL’s scheme is "data". - 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 = 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 = 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 = removeASCIIWhitespace(mimeType, true, true) - - // 7. If position is past the end of input, then - // return failure - if (position.position >= input.length) { - return 'failure' +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/probot.js +var require_probot = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/probot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Probot = void 0; + var lru_cache_1 = require_commonjs(); + var auth_js_1 = require_auth(); + var get_log_js_1 = require_get_log(); + var get_probot_octokit_with_defaults_js_1 = require_get_probot_octokit_with_defaults(); + var get_webhooks_js_1 = require_get_webhooks(); + var probot_octokit_js_1 = require_probot_octokit(); + var version_js_1 = require_version2(); + var server_js_1 = require_server(); + var rebind_log_js_1 = require_rebind_log(); + var Probot = class { + static version = version_js_1.VERSION; + static defaults(defaults) { + const ProbotWithDefaults = class extends this { + constructor(...args) { + const options2 = args[0] || {}; + super(Object.assign({}, defaults, options2)); + } + }; + return ProbotWithDefaults; + } + webhooks; + webhookPath; + log; + version; + on; + onAny; + onError; + auth; + state; + constructor(options2 = {}) { + options2.secret = options2.secret || "development"; + let level = options2.logLevel; + const logMessageKey = options2.logMessageKey; + this.log = options2.log ? (0, rebind_log_js_1.rebindLog)(options2.log) : (0, get_log_js_1.getLog)({ level, logMessageKey }); + const cache = new lru_cache_1.LRUCache({ + // cache max. 15000 tokens, that will use less than 10mb memory + max: 15e3, + // Cache for 1 minute less than GitHub expiry + ttl: 1e3 * 60 * 59 + }); + const Octokit2 = (0, get_probot_octokit_with_defaults_js_1.getProbotOctokitWithDefaults)({ + githubToken: options2.githubToken, + Octokit: options2.Octokit || probot_octokit_js_1.ProbotOctokit, + appId: Number(options2.appId), + privateKey: options2.privateKey, + cache, + log: (0, rebind_log_js_1.rebindLog)(this.log), + redisConfig: options2.redisConfig, + baseUrl: options2.baseUrl + }); + const octokitLogger = (0, rebind_log_js_1.rebindLog)(this.log.child({ name: "octokit" })); + const octokit = new Octokit2({ + request: options2.request, + log: { + debug: octokitLogger.debug.bind(octokitLogger), + info: octokitLogger.info.bind(octokitLogger), + warn: octokitLogger.warn.bind(octokitLogger), + error: octokitLogger.error.bind(octokitLogger) + } + }); + this.state = { + cache, + githubToken: options2.githubToken, + log: (0, rebind_log_js_1.rebindLog)(this.log), + Octokit: Octokit2, + octokit, + webhooks: { + secret: options2.secret + }, + appId: Number(options2.appId), + privateKey: options2.privateKey, + host: options2.host, + port: options2.port, + webhookPath: options2.webhookPath || server_js_1.defaultWebhooksPath, + request: options2.request + }; + this.auth = auth_js_1.auth.bind(null, this.state); + this.webhooks = (0, get_webhooks_js_1.getWebhooks)(this.state); + this.webhookPath = this.state.webhookPath; + this.on = this.webhooks.on; + this.onAny = this.webhooks.onAny; + this.onError = this.webhooks.onError; + this.version = version_js_1.VERSION; + } + receive(event) { + this.log.debug({ event }, "Webhook received"); + return this.webhooks.receive(event); + } + async load(appFn, options2 = {}) { + if (Array.isArray(appFn)) { + for (const fn of appFn) { + await this.load(fn); + } + return; + } + return appFn(this, options2); + } + }; + exports2.Probot = Probot; } +}); - // 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 = 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 = isomorphicDecode(body) - - // 2. Set body to the forgiving-base64 decode of - // stringBody. - body = 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) +// node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js +var require_path_exists = __commonJS({ + "node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js"(exports2, module2) { + "use strict"; + var fs2 = __require("fs"); + module2.exports = (fp) => new Promise((resolve4) => { + fs2.access(fp, (err) => { + resolve4(!err); + }); + }); + module2.exports.sync = (fp) => { + try { + fs2.accessSync(fp); + return true; + } catch (err) { + return false; + } + }; } +}); - // 12. If mimeType starts with U+003B (;), then prepend - // "text/plain" to mimeType. - if (mimeType.startsWith(';')) { - mimeType = 'text/plain' + mimeType +// node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js +var require_p_try = __commonJS({ + "node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports2, module2) { + "use strict"; + var pTry = (fn, ...arguments_) => new Promise((resolve4) => { + resolve4(fn(...arguments_)); + }); + module2.exports = pTry; + module2.exports.default = pTry; } +}); - // 13. Let mimeTypeRecord be the result of parsing - // mimeType. - let mimeTypeRecord = parseMIMEType(mimeType) - - // 14. If mimeTypeRecord is failure, then set - // mimeTypeRecord to text/plain;charset=US-ASCII. - if (mimeTypeRecord === 'failure') { - mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') +// node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js +var require_p_limit = __commonJS({ + "node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports2, module2) { + "use strict"; + var pTry = require_p_try(); + var pLimit = (concurrency) => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up")); + } + const queue = []; + let activeCount = 0; + const next = () => { + activeCount--; + if (queue.length > 0) { + queue.shift()(); + } + }; + const run2 = (fn, resolve4, ...args) => { + activeCount++; + const result = pTry(fn, ...args); + resolve4(result); + result.then(next, next); + }; + const enqueue = (fn, resolve4, ...args) => { + if (activeCount < concurrency) { + run2(fn, resolve4, ...args); + } else { + queue.push(run2.bind(null, fn, resolve4, ...args)); + } + }; + const generator = (fn, ...args) => new Promise((resolve4) => enqueue(fn, resolve4, ...args)); + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.length + }, + clearQueue: { + value: () => { + queue.length = 0; + } + } + }); + return generator; + }; + module2.exports = pLimit; + module2.exports.default = pLimit; } +}); - // 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 } -} - -// https://url.spec.whatwg.org/#concept-url-serializer -/** - * @param {URL} url - * @param {boolean} excludeFragment - */ -function URLSerializer (url, excludeFragment = false) { - if (!excludeFragment) { - return url.href +// node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js +var require_p_locate = __commonJS({ + "node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js"(exports2, module2) { + "use strict"; + var pLimit = require_p_limit(); + var EndError = class extends Error { + constructor(value) { + super(); + this.value = value; + } + }; + var testElement = (el, tester) => Promise.resolve(el).then(tester); + var finder = (el) => Promise.all(el).then((val) => val[1] === true && Promise.reject(new EndError(val[0]))); + module2.exports = (iterable, tester, opts) => { + opts = Object.assign({ + concurrency: Infinity, + preserveOrder: true + }, opts); + const limit = pLimit(opts.concurrency); + const items = [...iterable].map((el) => [el, limit(testElement, el, tester)]); + const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity); + return Promise.all(items.map((el) => checkLimit(finder, el))).then(() => { + }).catch((err) => err instanceof EndError ? err.value : Promise.reject(err)); + }; } +}); - const href = url.href - const hashLength = url.hash.length - - return hashLength === 0 ? href : href.substring(0, href.length - hashLength) -} - -// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points -/** - * @param {(char: string) => boolean} condition - * @param {string} input - * @param {{ position: number }} position - */ -function 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++ +// node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js +var require_locate_path = __commonJS({ + "node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js"(exports2, module2) { + "use strict"; + var path2 = __require("path"); + var pathExists = require_path_exists(); + var pLocate = require_p_locate(); + module2.exports = (iterable, options2) => { + options2 = Object.assign({ + cwd: process.cwd() + }, options2); + return pLocate(iterable, (el) => pathExists(path2.resolve(options2.cwd, el)), options2); + }; + module2.exports.sync = (iterable, options2) => { + options2 = Object.assign({ + cwd: process.cwd() + }, options2); + for (const el of iterable) { + if (pathExists.sync(path2.resolve(options2.cwd, el))) { + return el; + } + } + }; } +}); - // 3. Return result. - return result -} - -/** - * A faster collectASequenceOfCodePoints that only works when comparing a single character. - * @param {string} char - * @param {string} input - * @param {{ position: number }} position - */ -function 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) +// node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js +var require_find_up = __commonJS({ + "node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js"(exports2, module2) { + "use strict"; + var path2 = __require("path"); + var locatePath = require_locate_path(); + module2.exports = (filename, opts = {}) => { + const startDir = path2.resolve(opts.cwd || ""); + const { root } = path2.parse(startDir); + const filenames = [].concat(filename); + return new Promise((resolve4) => { + (function find(dir) { + locatePath(filenames, { cwd: dir }).then((file) => { + if (file) { + resolve4(path2.join(dir, file)); + } else if (dir === root) { + resolve4(null); + } else { + find(path2.dirname(dir)); + } + }); + })(startDir); + }); + }; + module2.exports.sync = (filename, opts = {}) => { + let dir = path2.resolve(opts.cwd || ""); + const { root } = path2.parse(dir); + const filenames = [].concat(filename); + while (true) { + const file = locatePath.sync(filenames, { cwd: dir }); + if (file) { + return path2.join(dir, file); + } + if (dir === root) { + return null; + } + dir = path2.dirname(dir); + } + }; } +}); - position.position = idx - return input.slice(start, position.position) -} - -// https://url.spec.whatwg.org/#string-percent-decode -/** @param {string} input */ -function stringPercentDecode (input) { - // 1. Let bytes be the UTF-8 encoding of input. - const bytes = encoder.encode(input) - - // 2. Return the percent-decoding of bytes. - return percentDecode(bytes) -} - -// https://url.spec.whatwg.org/#percent-decode -/** @param {Uint8Array} input */ -function 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) - - // 2. Otherwise, if byte is 0x25 (%) and the next two bytes - // after byte in input are not in the ranges - // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), - // and 0x61 (a) to 0x66 (f), all inclusive, append byte - // to output. - } else if ( - byte === 0x25 && - !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) - ) { - output.push(0x25) - - // 3. Otherwise: - } 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 +// node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = __require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs2) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs2); + } + if (!fs2.lutimes) { + patchLutimes(fs2); + } + fs2.chown = chownFix(fs2.chown); + fs2.fchown = chownFix(fs2.fchown); + fs2.lchown = chownFix(fs2.lchown); + fs2.chmod = chmodFix(fs2.chmod); + fs2.fchmod = chmodFix(fs2.fchmod); + fs2.lchmod = chmodFix(fs2.lchmod); + fs2.chownSync = chownFixSync(fs2.chownSync); + fs2.fchownSync = chownFixSync(fs2.fchownSync); + fs2.lchownSync = chownFixSync(fs2.lchownSync); + fs2.chmodSync = chmodFixSync(fs2.chmodSync); + fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); + fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); + fs2.stat = statFix(fs2.stat); + fs2.fstat = statFix(fs2.fstat); + fs2.lstat = statFix(fs2.lstat); + fs2.statSync = statFixSync(fs2.statSync); + fs2.fstatSync = statFixSync(fs2.fstatSync); + fs2.lstatSync = statFixSync(fs2.lstatSync); + if (fs2.chmod && !fs2.lchmod) { + fs2.lchmod = function(path2, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchmodSync = function() { + }; + } + if (fs2.chown && !fs2.lchown) { + fs2.lchown = function(path2, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchownSync = function() { + }; + } + if (platform2 === "win32") { + fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { + setTimeout(function() { + fs2.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + }(fs2.rename); + } + fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + }(fs2.read); + fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs2, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + }(fs2.readSync); + function patchLchmod(fs3) { + fs3.lchmod = function(path2, mode, callback) { + fs3.open( + path2, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs3.fchmod(fd, mode, function(err2) { + fs3.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs3.lchmodSync = function(path2, mode) { + var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs3.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs3) { + if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { + fs3.lutimes = function(path2, at, mt, cb) { + fs3.open(path2, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs3.futimes(fd, at, mt, function(er2) { + fs3.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs3.lutimesSync = function(path2, at, mt) { + var fd = fs3.openSync(path2, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs3.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } else if (fs3.futimes) { + fs3.lutimes = function(_a2, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs2, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs2, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs2, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs2, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options2, cb) { + if (typeof options2 === "function") { + cb = options2; + options2 = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options2 ? orig.call(fs2, target, options2, callback) : orig.call(fs2, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options2) { + var stats = options2 ? orig.call(fs2, target, options2) : orig.call(fs2, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } } } +}); - // 3. Return output. - return Uint8Array.from(output) -} - -// https://mimesniff.spec.whatwg.org/#parse-a-mime-type -/** @param {string} input */ -function parseMIMEType (input) { - // 1. Remove any leading and trailing HTTP whitespace - // from input. - input = 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 = 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 || !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 = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 8. Remove any trailing HTTP whitespace from subtype. - subtype = 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 || !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. - collectASequenceOfCodePoints( - // https://fetch.spec.whatwg.org/#http-whitespace - char => 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 = 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 +// node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = __require("stream").Stream; + module2.exports = legacy; + function legacy(fs2) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path2, options2) { + if (!(this instanceof ReadStream)) return new ReadStream(path2, options2); + Stream.call(this); + var self2 = this; + this.path = path2; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options2 = options2 || {}; + var keys = Object.keys(options2); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options2[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs2.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path2, options2) { + if (!(this instanceof WriteStream)) return new WriteStream(path2, options2); + Stream.call(this); + this.path = path2; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options2 = options2 || {}; + var keys = Object.keys(options2); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options2[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs2.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } } - - // 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 +// node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; } + } +}); - // 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 = collectAnHTTPQuotedString(input, position, true) - - // 2. Collect a sequence of code points that are not - // U+003B (;) from input, given position. - collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 9. Otherwise: +// node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs2 = __require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util2 = __require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); } else { - // 1. Set parameterValue to the result of collecting - // a sequence of code points that are not U+003B (;) - // from input, given position. - parameterValue = collectASequenceOfCodePointsFast( - ';', - input, - position - ) - - // 2. Remove any trailing HTTP whitespace from parameterValue. - parameterValue = removeHTTPWhitespace(parameterValue, false, true) - - // 3. If parameterValue is the empty string, then continue. - if (parameterValue.length === 0) { - continue + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop3() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug3 = noop3; + if (util2.debuglog) + debug3 = util2.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug3 = function() { + var m = util2.format.apply(util2, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs2[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs2, queue); + fs2.close = function(fs$close) { + function close2(fd, cb) { + return fs$close.call(fs2, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close2, previousSymbol, { + value: fs$close + }); + return close2; + }(fs2.close); + fs2.closeSync = function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs2, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + }(fs2.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug3(fs2[gracefulQueue]); + __require("assert").equal(fs2[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs2[gracefulQueue]); + } + module2.exports = patch(clone(fs2)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { + module2.exports = patch(fs2); + fs2.__patched = true; + } + function patch(fs3) { + polyfills(fs3); + fs3.gracefulify = patch; + fs3.createReadStream = createReadStream; + fs3.createWriteStream = createWriteStream; + var fs$readFile = fs3.readFile; + fs3.readFile = readFile3; + function readFile3(path2, options2, cb) { + if (typeof options2 === "function") + cb = options2, options2 = null; + return go$readFile(path2, options2, cb); + function go$readFile(path3, options3, cb2, startTime) { + return fs$readFile(path3, options3, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path3, options3, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs3.writeFile; + fs3.writeFile = writeFile; + function writeFile(path2, data, options2, cb) { + if (typeof options2 === "function") + cb = options2, options2 = null; + return go$writeFile(path2, data, options2, cb); + function go$writeFile(path3, data2, options3, cb2, startTime) { + return fs$writeFile(path3, data2, options3, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path3, data2, options3, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs3.appendFile; + if (fs$appendFile) + fs3.appendFile = appendFile; + function appendFile(path2, data, options2, cb) { + if (typeof options2 === "function") + cb = options2, options2 = null; + return go$appendFile(path2, data, options2, cb); + function go$appendFile(path3, data2, options3, cb2, startTime) { + return fs$appendFile(path3, data2, options3, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path3, data2, options3, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs3.copyFile; + if (fs$copyFile) + fs3.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs3.readdir; + fs3.readdir = readdir2; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir2(path2, options2, cb) { + if (typeof options2 === "function") + cb = options2, options2 = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options3, cb2, startTime) { + return fs$readdir(path3, fs$readdirCallback( + path3, + options3, + cb2, + startTime + )); + } : function go$readdir2(path3, options3, cb2, startTime) { + return fs$readdir(path3, options3, fs$readdirCallback( + path3, + options3, + cb2, + startTime + )); + }; + return go$readdir(path2, options2, cb); + function fs$readdirCallback(path3, options3, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path3, options3, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs3); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs3.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs3.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs3, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs3, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs3, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs3, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path2, options2) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path2, options2) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path2, options2) { + return new fs3.ReadStream(path2, options2); + } + function createWriteStream(path2, options2) { + return new fs3.WriteStream(path2, options2); + } + var fs$open = fs3.open; + fs3.open = open; + function open(path2, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path2, flags, mode, cb); + function go$open(path3, flags2, mode2, cb2, startTime) { + return fs$open(path3, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } } + return fs3; } - - // 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 && - HTTP_TOKEN_CODEPOINTS.test(parameterName) && - (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && - !mimeType.parameters.has(parameterName) - ) { - mimeType.parameters.set(parameterName, parameterValue) + function enqueue(elem) { + debug3("ENQUEUE", elem[0].name, elem[1]); + fs2[gracefulQueue].push(elem); + retry2(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs2[gracefulQueue].length; ++i) { + if (fs2[gracefulQueue][i].length > 2) { + fs2[gracefulQueue][i][3] = now; + fs2[gracefulQueue][i][4] = now; + } + } + retry2(); + } + function retry2() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs2[gracefulQueue].length === 0) + return; + var elem = fs2[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug3("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug3("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug3("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs2[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry2, 0); + } } } +}); - // 12. Return mimeType. - return mimeType -} - -// https://infra.spec.whatwg.org/#forgiving-base64-decode -/** @param {string} data */ -function 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' +// node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js +var require_strip_bom = __commonJS({ + "node_modules/.pnpm/strip-bom@3.0.0/node_modules/strip-bom/index.js"(exports2, module2) { + "use strict"; + module2.exports = (x) => { + if (typeof x !== "string") { + throw new TypeError("Expected a string, got " + typeof x); + } + if (x.charCodeAt(0) === 65279) { + return x.slice(1); + } + return x; + }; } +}); - // 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' +// node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js +var require_is_arrayish = __commonJS({ + "node_modules/.pnpm/is-arrayish@0.2.1/node_modules/is-arrayish/index.js"(exports2, module2) { + "use strict"; + module2.exports = function isArrayish(obj) { + if (!obj) { + return false; + } + return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && obj.splice instanceof Function; + }; } +}); - const binary = atob(data) - const bytes = new Uint8Array(binary.length) - - for (let byte = 0; byte < binary.length; byte++) { - bytes[byte] = binary.charCodeAt(byte) +// node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js +var require_error_ex = __commonJS({ + "node_modules/.pnpm/error-ex@1.3.2/node_modules/error-ex/index.js"(exports2, module2) { + "use strict"; + var util2 = __require("util"); + var isArrayish = require_is_arrayish(); + var errorEx = function errorEx2(name, properties) { + if (!name || name.constructor !== String) { + properties = name || {}; + name = Error.name; + } + var errorExError = function ErrorEXError(message) { + if (!this) { + return new ErrorEXError(message); + } + message = message instanceof Error ? message.message : message || this.message; + Error.call(this, message); + Error.captureStackTrace(this, errorExError); + this.name = name; + Object.defineProperty(this, "message", { + configurable: true, + enumerable: false, + get: function() { + var newMessage = message.split(/\r?\n/g); + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("message" in modifier) { + newMessage = modifier.message(this[key], newMessage) || newMessage; + if (!isArrayish(newMessage)) { + newMessage = [newMessage]; + } + } + } + return newMessage.join("\n"); + }, + set: function(v) { + message = v; + } + }); + var overwrittenStack = null; + var stackDescriptor = Object.getOwnPropertyDescriptor(this, "stack"); + var stackGetter = stackDescriptor.get; + var stackValue = stackDescriptor.value; + delete stackDescriptor.value; + delete stackDescriptor.writable; + stackDescriptor.set = function(newstack) { + overwrittenStack = newstack; + }; + stackDescriptor.get = function() { + var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); + if (!overwrittenStack) { + stack[0] = this.name + ": " + this.message; + } + var lineCount = 1; + for (var key in properties) { + if (!properties.hasOwnProperty(key)) { + continue; + } + var modifier = properties[key]; + if ("line" in modifier) { + var line = modifier.line(this[key]); + if (line) { + stack.splice(lineCount++, 0, " " + line); + } + } + if ("stack" in modifier) { + modifier.stack(this[key], stack); + } + } + return stack.join("\n"); + }; + Object.defineProperty(this, "stack", stackDescriptor); + }; + if (Object.setPrototypeOf) { + Object.setPrototypeOf(errorExError.prototype, Error.prototype); + Object.setPrototypeOf(errorExError, Error); + } else { + util2.inherits(errorExError, Error); + } + return errorExError; + }; + errorEx.append = function(str2, def) { + return { + message: function(v, message) { + v = v || def; + if (v) { + message[0] += " " + str2.replace("%s", v.toString()); + } + return message; + } + }; + }; + errorEx.line = function(str2, def) { + return { + line: function(v) { + v = v || def; + if (v) { + return str2.replace("%s", v.toString()); + } + return null; + } + }; + }; + module2.exports = errorEx; } +}); - 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 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 ("). - 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 += 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 +// node_modules/.pnpm/json-parse-better-errors@1.0.2/node_modules/json-parse-better-errors/index.js +var require_json_parse_better_errors = __commonJS({ + "node_modules/.pnpm/json-parse-better-errors@1.0.2/node_modules/json-parse-better-errors/index.js"(exports2, module2) { + "use strict"; + module2.exports = parseJson; + function parseJson(txt, reviver, context) { + context = context || 20; + try { + return JSON.parse(txt, reviver); + } catch (e) { + if (typeof txt !== "string") { + const isEmptyArray = Array.isArray(txt) && txt.length === 0; + const errorMessage = "Cannot parse " + (isEmptyArray ? "an empty array" : String(txt)); + throw new TypeError(errorMessage); + } + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i); + const errIdx = syntaxErr ? +syntaxErr[1] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null; + if (errIdx != null) { + const start = errIdx <= context ? 0 : errIdx - context; + const end2 = errIdx + context >= txt.length ? txt.length : errIdx + context; + e.message += ` while parsing near '${start === 0 ? "" : "..."}${txt.slice(start, end2)}${end2 === txt.length ? "" : "..."}'`; + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'`; + } + throw e; } - - // 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 ("). - assert(quoteOrBackslash === '"') - - // 2. Break. - 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 serializeAMimeType (mimeType) { - assert(mimeType !== 'failure') - const { parameters, 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 (!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 +// node_modules/.pnpm/parse-json@4.0.0/node_modules/parse-json/index.js +var require_parse_json = __commonJS({ + "node_modules/.pnpm/parse-json@4.0.0/node_modules/parse-json/index.js"(exports2, module2) { + "use strict"; + var errorEx = require_error_ex(); + var fallback = require_json_parse_better_errors(); + var JSONError = errorEx("JSONError", { + fileName: errorEx.append("in %s") + }); + module2.exports = (input, reviver, filename) => { + if (typeof reviver === "string") { + filename = reviver; + reviver = null; + } + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + fallback(input, reviver); + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ""); + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + throw jsonErr; + } + }; } +}); - // 3. Return serialization. - return serialization -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} char - */ -function isHTTPWhiteSpace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === ' ' -} - -/** - * @see https://fetch.spec.whatwg.org/#http-whitespace - * @param {string} str - */ -function removeHTTPWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++); +// node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js +var require_pify = __commonJS({ + "node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js"(exports2, module2) { + "use strict"; + var processFn = (fn, options2) => function(...args) { + const P = options2.promiseModule; + return new P((resolve4, reject) => { + if (options2.multiArgs) { + args.push((...result) => { + if (options2.errorFirst) { + if (result[0]) { + reject(result); + } else { + result.shift(); + resolve4(result); + } + } else { + resolve4(result); + } + }); + } else if (options2.errorFirst) { + args.push((error, result) => { + if (error) { + reject(error); + } else { + resolve4(result); + } + }); + } else { + args.push(resolve4); + } + fn.apply(this, args); + }); + }; + module2.exports = (input, options2) => { + options2 = Object.assign({ + exclude: [/.+(Sync|Stream)$/], + errorFirst: true, + promiseModule: Promise + }, options2); + const objType = typeof input; + if (!(input !== null && (objType === "object" || objType === "function"))) { + throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${input === null ? "null" : objType}\``); + } + const filter = (key) => { + const match = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key); + return options2.include ? options2.include.some(match) : !options2.exclude.some(match); + }; + let ret; + if (objType === "function") { + ret = function(...args) { + return options2.excludeMain ? input(...args) : processFn(input, options2).apply(this, args); + }; + } else { + ret = Object.create(Object.getPrototypeOf(input)); + } + for (const key in input) { + const property = input[key]; + ret[key] = typeof property === "function" && filter(key) ? processFn(property, options2) : property; + } + return ret; + }; } +}); - if (trailing) { - for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--); +// node_modules/.pnpm/load-json-file@5.3.0/node_modules/load-json-file/index.js +var require_load_json_file = __commonJS({ + "node_modules/.pnpm/load-json-file@5.3.0/node_modules/load-json-file/index.js"(exports2, module2) { + "use strict"; + var path2 = __require("path"); + var fs2 = require_graceful_fs(); + var stripBom = require_strip_bom(); + var parseJson = require_parse_json(); + var pify = require_pify(); + var parse2 = (data, filePath, options2 = {}) => { + data = stripBom(data); + if (typeof options2.beforeParse === "function") { + data = options2.beforeParse(data); + } + return parseJson(data, options2.reviver, path2.relative(process.cwd(), filePath)); + }; + var loadJsonFile = (filePath, options2) => pify(fs2.readFile)(filePath, "utf8").then((data) => parse2(data, filePath, options2)); + module2.exports = loadJsonFile; + module2.exports.default = loadJsonFile; + module2.exports.sync = (filePath, options2) => parse2(fs2.readFileSync(filePath, "utf8"), filePath, options2); } +}); - return str.slice(lead, trail + 1) -} - -/** - * @see https://infra.spec.whatwg.org/#ascii-whitespace - * @param {string} char - */ -function isASCIIWhitespace (char) { - return char === '\r' || char === '\n' || char === '\t' || char === '\f' || char === ' ' -} - -/** - * @see https://infra.spec.whatwg.org/#strip-leading-and-trailing-ascii-whitespace - */ -function removeASCIIWhitespace (str, leading = true, trailing = true) { - let lead = 0 - let trail = str.length - 1 - - if (leading) { - for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++); +// node_modules/.pnpm/pkg-conf@3.1.0/node_modules/pkg-conf/index.js +var require_pkg_conf = __commonJS({ + "node_modules/.pnpm/pkg-conf@3.1.0/node_modules/pkg-conf/index.js"(exports2, module2) { + "use strict"; + var path2 = __require("path"); + var findUp = require_find_up(); + var loadJsonFile = require_load_json_file(); + var filepaths = /* @__PURE__ */ new WeakMap(); + var filepath = (conf) => filepaths.get(conf); + var findNextCwd = (pkgPath) => path2.resolve(path2.dirname(pkgPath), ".."); + var addFilePath = (object, filePath) => { + filepaths.set(object, filePath); + return object; + }; + var pkgConf = (namespace, options2 = {}) => { + if (!namespace) { + return Promise.reject(new TypeError("Expected a namespace")); + } + return findUp("package.json", options2.cwd ? { cwd: options2.cwd } : {}).then((filePath) => { + if (!filePath) { + return addFilePath(Object.assign({}, options2.defaults), filePath); + } + return loadJsonFile(filePath).then((package_) => { + if (options2.skipOnFalse && package_[namespace] === false) { + const newOptions = Object.assign({}, options2, { cwd: findNextCwd(filePath) }); + return pkgConf(namespace, newOptions); + } + return addFilePath(Object.assign({}, options2.defaults, package_[namespace]), filePath); + }); + }); + }; + var sync = (namespace, options2 = {}) => { + if (!namespace) { + throw new TypeError("Expected a namespace"); + } + const filePath = findUp.sync("package.json", options2.cwd ? { cwd: options2.cwd } : {}); + if (!filePath) { + return addFilePath(Object.assign({}, options2.defaults), filePath); + } + const package_ = loadJsonFile.sync(filePath); + if (options2.skipOnFalse && package_[namespace] === false) { + const newOptions = Object.assign({}, options2, { cwd: findNextCwd(filePath) }); + return sync(namespace, newOptions); + } + return addFilePath(Object.assign({}, options2.defaults, package_[namespace]), filePath); + }; + module2.exports = pkgConf; + module2.exports.default = pkgConf; + module2.exports.filepath = filepath; + module2.exports.sync = sync; } +}); - if (trailing) { - for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--); +// node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json +var require_package2 = __commonJS({ + "node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/package.json"(exports2, module2) { + module2.exports = { + name: "dotenv", + version: "16.4.5", + description: "Loads environment variables from .env file", + main: "lib/main.js", + types: "lib/main.d.ts", + exports: { + ".": { + types: "./lib/main.d.ts", + require: "./lib/main.js", + default: "./lib/main.js" + }, + "./config": "./config.js", + "./config.js": "./config.js", + "./lib/env-options": "./lib/env-options.js", + "./lib/env-options.js": "./lib/env-options.js", + "./lib/cli-options": "./lib/cli-options.js", + "./lib/cli-options.js": "./lib/cli-options.js", + "./package.json": "./package.json" + }, + scripts: { + "dts-check": "tsc --project tests/types/tsconfig.json", + lint: "standard", + "lint-readme": "standard-markdown", + pretest: "npm run lint && npm run dts-check", + test: "tap tests/*.js --100 -Rspec", + "test:coverage": "tap --coverage-report=lcov", + prerelease: "npm test", + release: "standard-version" + }, + repository: { + type: "git", + url: "git://github.com/motdotla/dotenv.git" + }, + funding: "https://dotenvx.com", + keywords: [ + "dotenv", + "env", + ".env", + "environment", + "variables", + "config", + "settings" + ], + readmeFilename: "README.md", + license: "BSD-2-Clause", + devDependencies: { + "@definitelytyped/dtslint": "^0.0.133", + "@types/node": "^18.11.3", + decache: "^4.6.1", + sinon: "^14.0.1", + standard: "^17.0.0", + "standard-markdown": "^7.1.0", + "standard-version": "^9.5.0", + tap: "^16.3.0", + tar: "^6.1.11", + typescript: "^4.8.4" + }, + engines: { + node: ">=12" + }, + browser: { + fs: false + } + }; } +}); - return str.slice(lead, trail + 1) -} - -module.exports = { - dataURLProcessor, - URLSerializer, - collectASequenceOfCodePoints, - collectASequenceOfCodePointsFast, - stringPercentDecode, - parseMIMEType, - collectAnHTTPQuotedString, - serializeAMimeType -} - - -/***/ }), - -/***/ 60066: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Blob, File: NativeFile } = __nccwpck_require__(20181) -const { types } = __nccwpck_require__(39023) -const { kState } = __nccwpck_require__(68323) -const { isBlobLike } = __nccwpck_require__(42696) -const { webidl } = __nccwpck_require__(29) -const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(43911) -const { kEnumerableProperty } = __nccwpck_require__(33465) -const encoder = new TextEncoder() - -class File extends 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: - webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) - - fileBits = webidl.converters['sequence'](fileBits) - fileName = webidl.converters.USVString(fileName) - options = 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 = parseMIMEType(t) - - if (t === 'failure') { - t = '' - // eslint-disable-next-line no-labels - break substep +// node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js +var require_main = __commonJS({ + "node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js"(exports2, module2) { + var fs2 = __require("fs"); + var path2 = __require("path"); + var os3 = __require("os"); + var crypto2 = __require("crypto"); + var packageJson = require_package2(); + var version = packageJson.version; + var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg; + function parse2(src) { + const obj = {}; + let lines = src.toString(); + lines = lines.replace(/\r\n?/mg, "\n"); + let match; + while ((match = LINE.exec(lines)) != null) { + const key = match[1]; + let value = match[2] || ""; + value = value.trim(); + const maybeQuote = value[0]; + value = value.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"); + if (maybeQuote === '"') { + value = value.replace(/\\n/g, "\n"); + value = value.replace(/\\r/g, "\r"); + } + obj[key] = value; + } + return obj; + } + function _parseVault(options2) { + const vaultPath = _vaultPath(options2); + const result = DotenvModule.configDotenv({ path: vaultPath }); + if (!result.parsed) { + const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`); + err.code = "MISSING_DATA"; + throw err; + } + const keys = _dotenvKey(options2).split(","); + const length = keys.length; + let decrypted; + for (let i = 0; i < length; i++) { + try { + const key = keys[i].trim(); + const attrs = _instructions(result, key); + decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key); + break; + } catch (error) { + if (i + 1 >= length) { + throw error; + } } - - t = 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 + return DotenvModule.parse(decrypted); } - - // 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(processBlobParts(fileBits, options), { type: t }) - this[kState] = { - name: n, - lastModified: d, - type: t + function _log(message) { + console.log(`[dotenv@${version}][INFO] ${message}`); } - } - - get name () { - webidl.brandCheck(this, File) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, File) - - return this[kState].lastModified - } - - get type () { - webidl.brandCheck(this, File) - - return this[kState].type - } -} - -class 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[kState] = { - blobLike, - name: n, - type: t, - lastModified: d + function _warn(message) { + console.log(`[dotenv@${version}][WARN] ${message}`); } - } - - stream (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.stream(...args) - } - - arrayBuffer (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.arrayBuffer(...args) - } - - slice (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.slice(...args) - } - - text (...args) { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.text(...args) - } - - get size () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.size - } - - get type () { - webidl.brandCheck(this, FileLike) - - return this[kState].blobLike.type - } - - get name () { - webidl.brandCheck(this, FileLike) - - return this[kState].name - } - - get lastModified () { - webidl.brandCheck(this, FileLike) - - return this[kState].lastModified - } - - get [Symbol.toStringTag] () { - return 'File' - } -} - -Object.defineProperties(File.prototype, { - [Symbol.toStringTag]: { - value: 'File', - configurable: true - }, - name: kEnumerableProperty, - lastModified: kEnumerableProperty -}) - -webidl.converters.Blob = webidl.interfaceConverter(Blob) - -webidl.converters.BlobPart = function (V, opts) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + function _debug(message) { + console.log(`[dotenv@${version}][DEBUG] ${message}`); } - - if ( - ArrayBuffer.isView(V) || - types.isAnyArrayBuffer(V) - ) { - return webidl.converters.BufferSource(V, opts) + function _dotenvKey(options2) { + if (options2 && options2.DOTENV_KEY && options2.DOTENV_KEY.length > 0) { + return options2.DOTENV_KEY; + } + if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { + return process.env.DOTENV_KEY; + } + return ""; } - } - - return webidl.converters.USVString(V, opts) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.BlobPart -) - -// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag -webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ - { - key: 'lastModified', - converter: webidl.converters['long long'], - get defaultValue () { - return Date.now() + function _instructions(result, dotenvKey) { + let uri; + try { + uri = new URL(dotenvKey); + } catch (error) { + if (error.code === "ERR_INVALID_URL") { + const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + throw error; + } + const key = uri.password; + if (!key) { + const err = new Error("INVALID_DOTENV_KEY: Missing key part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environment = uri.searchParams.get("environment"); + if (!environment) { + const err = new Error("INVALID_DOTENV_KEY: Missing environment part"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } + const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`; + const ciphertext = result.parsed[environmentKey]; + if (!ciphertext) { + const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`); + err.code = "NOT_FOUND_DOTENV_ENVIRONMENT"; + throw err; + } + return { ciphertext, key }; } - }, - { - key: 'type', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'endings', - converter: (value) => { - value = webidl.converters.DOMString(value) - value = value.toLowerCase() - - if (value !== 'native') { - value = 'transparent' + function _vaultPath(options2) { + let possibleVaultPath = null; + if (options2 && options2.path && options2.path.length > 0) { + if (Array.isArray(options2.path)) { + for (const filepath of options2.path) { + if (fs2.existsSync(filepath)) { + possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`; + } + } + } else { + possibleVaultPath = options2.path.endsWith(".vault") ? options2.path : `${options2.path}.vault`; + } + } else { + possibleVaultPath = path2.resolve(process.cwd(), ".env.vault"); } - - 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 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 = convertLineEndingsNative(s) - } - - // 3. Append the result of UTF-8 encoding s to bytes. - bytes.push(encoder.encode(s)) - } else if ( - types.isAnyArrayBuffer(element) || - 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) { // ArrayBuffer - bytes.push(new Uint8Array(element)) + if (fs2.existsSync(possibleVaultPath)) { + return possibleVaultPath; + } + return null; + } + function _resolveHome(envPath) { + return envPath[0] === "~" ? path2.join(os3.homedir(), envPath.slice(1)) : envPath; + } + function _configVault(options2) { + _log("Loading env from encrypted .env.vault"); + const parsed = DotenvModule._parseVault(options2); + let processEnv = process.env; + if (options2 && options2.processEnv != null) { + processEnv = options2.processEnv; + } + DotenvModule.populate(processEnv, parsed, options2); + return { parsed }; + } + function configDotenv(options2) { + const dotenvPath = path2.resolve(process.cwd(), ".env"); + let encoding = "utf8"; + const debug3 = Boolean(options2 && options2.debug); + if (options2 && options2.encoding) { + encoding = options2.encoding; } else { - bytes.push( - new Uint8Array(element.buffer, element.byteOffset, element.byteLength) - ) + if (debug3) { + _debug("No encoding is specified. UTF-8 is used by default"); + } + } + let optionPaths = [dotenvPath]; + if (options2 && options2.path) { + if (!Array.isArray(options2.path)) { + optionPaths = [_resolveHome(options2.path)]; + } else { + optionPaths = []; + for (const filepath of options2.path) { + optionPaths.push(_resolveHome(filepath)); + } + } + } + let lastError; + const parsedAll = {}; + for (const path3 of optionPaths) { + try { + const parsed = DotenvModule.parse(fs2.readFileSync(path3, { encoding })); + DotenvModule.populate(parsedAll, parsed, options2); + } catch (e) { + if (debug3) { + _debug(`Failed to load ${path3} ${e.message}`); + } + lastError = e; + } + } + let processEnv = process.env; + if (options2 && options2.processEnv != null) { + processEnv = options2.processEnv; + } + DotenvModule.populate(processEnv, parsedAll, options2); + if (lastError) { + return { parsed: parsedAll, error: lastError }; + } else { + return { parsed: parsedAll }; } - } else if (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 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 isFileLike (object) { - return ( - (NativeFile && object instanceof NativeFile) || - object instanceof File || ( - object && - (typeof object.stream === 'function' || - typeof object.arrayBuffer === 'function') && - object[Symbol.toStringTag] === 'File' - ) - ) -} - -module.exports = { File, FileLike, isFileLike } - - -/***/ }), - -/***/ 12894: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(42696) -const { kState } = __nccwpck_require__(68323) -const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(60066) -const { webidl } = __nccwpck_require__(29) -const { Blob, File: NativeFile } = __nccwpck_require__(20181) - -/** @type {globalThis['File']} */ -const File = NativeFile ?? UndiciFile - -// https://xhr.spec.whatwg.org/#formdata -class FormData { - constructor (form) { - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: 'FormData constructor', - argument: 'Argument 1', - types: ['undefined'] - }) + function config2(options2) { + if (_dotenvKey(options2).length === 0) { + return DotenvModule.configDotenv(options2); + } + const vaultPath = _vaultPath(options2); + if (!vaultPath) { + _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`); + return DotenvModule.configDotenv(options2); + } + return DotenvModule._configVault(options2); } - - this[kState] = [] - } - - append (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" - ) + function decrypt(encrypted, keyStr) { + const key = Buffer.from(keyStr.slice(-64), "hex"); + let ciphertext = Buffer.from(encrypted, "base64"); + const nonce = ciphertext.subarray(0, 12); + const authTag = ciphertext.subarray(-16); + ciphertext = ciphertext.subarray(12, -16); + try { + const aesgcm = crypto2.createDecipheriv("aes-256-gcm", key, nonce); + aesgcm.setAuthTag(authTag); + return `${aesgcm.update(ciphertext)}${aesgcm.final()}`; + } catch (error) { + const isRange = error instanceof RangeError; + const invalidKeyLength = error.message === "Invalid key length"; + const decryptionFailed = error.message === "Unsupported state or unable to authenticate data"; + if (isRange || invalidKeyLength) { + const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)"); + err.code = "INVALID_DOTENV_KEY"; + throw err; + } else if (decryptionFailed) { + const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY"); + err.code = "DECRYPTION_FAILED"; + throw err; + } else { + throw error; + } + } } - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? webidl.converters.USVString(filename) - : undefined - - // 2. Let entry be the result of creating an entry with - // name, value, and filename if given. - const entry = makeEntry(name, value, filename) - - // 3. Append entry to this’s entry list. - this[kState].push(entry) - } - - delete (name) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) - - name = webidl.converters.USVString(name) - - // The delete(name) method steps are to remove all entries whose name - // is name from this’s entry list. - this[kState] = this[kState].filter(entry => entry.name !== name) - } - - get (name) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) - - name = 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[kState].findIndex((entry) => entry.name === name) - if (idx === -1) { - return null + function populate(processEnv, parsed, options2 = {}) { + const debug3 = Boolean(options2 && options2.debug); + const override = Boolean(options2 && options2.override); + if (typeof parsed !== "object") { + const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate"); + err.code = "OBJECT_REQUIRED"; + throw err; + } + for (const key of Object.keys(parsed)) { + if (Object.prototype.hasOwnProperty.call(processEnv, key)) { + if (override === true) { + processEnv[key] = parsed[key]; + } + if (debug3) { + if (override === true) { + _debug(`"${key}" is already defined and WAS overwritten`); + } else { + _debug(`"${key}" is already defined and was NOT overwritten`); + } + } + } else { + processEnv[key] = parsed[key]; + } + } } - - // 2. Return the value of the first entry whose name is name from - // this’s entry list. - return this[kState][idx].value - } - - getAll (name) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) - - name = 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[kState] - .filter((entry) => entry.name === name) - .map((entry) => entry.value) + var DotenvModule = { + configDotenv, + _configVault, + _parseVault, + config: config2, + decrypt, + parse: parse2, + populate + }; + module2.exports.configDotenv = DotenvModule.configDotenv; + module2.exports._configVault = DotenvModule._configVault; + module2.exports._parseVault = DotenvModule._parseVault; + module2.exports.config = DotenvModule.config; + module2.exports.decrypt = DotenvModule.decrypt; + module2.exports.parse = DotenvModule.parse; + module2.exports.populate = DotenvModule.populate; + module2.exports = DotenvModule; } +}); - has (name) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) - - name = 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[kState].findIndex((entry) => entry.name === name) !== -1 +// node_modules/.pnpm/update-dotenv@1.1.1_dotenv@16.4.5/node_modules/update-dotenv/index.js +var require_update_dotenv = __commonJS({ + "node_modules/.pnpm/update-dotenv@1.1.1_dotenv@16.4.5/node_modules/update-dotenv/index.js"(exports2, module2) { + var dotenv = require_main(); + var fs2 = __require("fs"); + var path2 = __require("path"); + var { promisify: promisify2 } = __require("util"); + function escapeNewlines(str2) { + return str2.replace(/\n/g, "\\n"); + } + function format2(key, value) { + return `${key}=${escapeNewlines(value)}`; + } + module2.exports = async function updateDotenv(env) { + const filename = path2.join(process.cwd(), ".env"); + try { + const existing = dotenv.parse(await promisify2(fs2.readFile)(filename, "utf-8")); + env = Object.assign(existing, env); + } catch (err) { + if (err.code !== "ENOENT") { + throw err; + } + } + const contents = Object.keys(env).map((key) => format2(key, env[key])).join("\n"); + await promisify2(fs2.writeFile)(filename, contents); + Object.assign(process.env, env); + return env; + }; } +}); - set (name, value, filename = undefined) { - webidl.brandCheck(this, FormData) - - webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) - - if (arguments.length === 3 && !isBlobLike(value)) { - throw new TypeError( - "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" - ) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js +var require_common2 = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js"(exports2, module2) { + "use strict"; + function isNothing2(subject) { + return typeof subject === "undefined" || subject === null; } - - // The set(name, value) and set(name, blobValue, filename) method steps - // are: - - // 1. Let value be value if given; otherwise blobValue. - - name = webidl.converters.USVString(name) - value = isBlobLike(value) - ? webidl.converters.Blob(value, { strict: false }) - : webidl.converters.USVString(value) - filename = arguments.length === 3 - ? toUSVString(filename) - : undefined - - // 2. Let entry be the result of creating an entry with name, value, and - // filename if given. - const entry = 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[kState].findIndex((entry) => entry.name === name) - if (idx !== -1) { - this[kState] = [ - ...this[kState].slice(0, idx), - entry, - ...this[kState].slice(idx + 1).filter((entry) => entry.name !== name) - ] - } else { - // 4. Otherwise, append entry to this’s entry list. - this[kState].push(entry) + function isObject2(subject) { + return typeof subject === "object" && subject !== null; } - } - - entries () { - webidl.brandCheck(this, FormData) - - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key+value' - ) - } - - keys () { - webidl.brandCheck(this, FormData) - - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'key' - ) - } - - values () { - webidl.brandCheck(this, FormData) - - return makeIterator( - () => this[kState].map(pair => [pair.name, pair.value]), - 'FormData', - 'value' - ) - } - - /** - * @param {(value: string, key: string, self: FormData) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, FormData) - - 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'." - ) + function toArray2(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing2(sequence)) return []; + return [sequence]; } - - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) + function extend3(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + function repeat2(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; } + function isNegativeZero2(number) { + return number === 0 && Number.NEGATIVE_INFINITY === 1 / number; + } + module2.exports.isNothing = isNothing2; + module2.exports.isObject = isObject2; + module2.exports.toArray = toArray2; + module2.exports.repeat = repeat2; + module2.exports.isNegativeZero = isNegativeZero2; + module2.exports.extend = extend3; } -} - -FormData.prototype[Symbol.iterator] = FormData.prototype.entries +}); -Object.defineProperties(FormData.prototype, { - [Symbol.toStringTag]: { - value: 'FormData', - configurable: true +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js +var require_exception = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/exception.js"(exports2, module2) { + "use strict"; + function formatError2(exception2, compact) { + var where = "", message = exception2.reason || "(unknown reason)"; + if (!exception2.mark) return message; + if (exception2.mark.name) { + where += 'in "' + exception2.mark.name + '" '; + } + where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")"; + if (!compact && exception2.mark.snippet) { + where += "\n\n" + exception2.mark.snippet; + } + return message + " " + where; + } + function YAMLException2(reason, mark) { + Error.call(this); + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = formatError2(this, false); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack || ""; + } + } + YAMLException2.prototype = Object.create(Error.prototype); + YAMLException2.prototype.constructor = YAMLException2; + YAMLException2.prototype.toString = function toString2(compact) { + return this.name + ": " + formatError2(this, compact); + }; + module2.exports = YAMLException2; } -}) - -/** - * @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 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 (!isFileLike(value)) { - value = value instanceof Blob - ? new File([value], 'blob', { type: value.type }) - : new FileLike(value, 'blob', { type: value.type }) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js +var require_snippet = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js"(exports2, module2) { + "use strict"; + var common2 = require_common2(); + function getLine2(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ""; + var tail = ""; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + if (position - lineStart > maxHalfLength) { + head = " ... "; + lineStart = position - maxHalfLength + head.length; + } + if (lineEnd - position > maxHalfLength) { + tail = " ..."; + lineEnd = position + maxHalfLength - tail.length; + } + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail, + pos: position - lineStart + head.length + // relative position + }; } - - // 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 + function padStart2(string, max) { + return common2.repeat(" ", max - string.length) + string; + } + function makeSnippet2(mark, options2) { + options2 = Object.create(options2 || null); + if (!mark.buffer) return null; + if (!options2.maxLength) options2.maxLength = 79; + if (typeof options2.indent !== "number") options2.indent = 1; + if (typeof options2.linesBefore !== "number") options2.linesBefore = 3; + if (typeof options2.linesAfter !== "number") options2.linesAfter = 2; + var re = /\r?\n|\r|\0/g; + var lineStarts = [0]; + var lineEnds = []; + var match; + var foundLineNo = -1; + while (match = re.exec(mark.buffer)) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + var result = "", i, line; + var lineNoLength = Math.min(mark.line + options2.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options2.maxLength - (options2.indent + lineNoLength + 3); + for (i = 1; i <= options2.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine2( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common2.repeat(" ", options2.indent) + padStart2((mark.line - i + 1).toString(), lineNoLength) + " | " + line.str + "\n" + result; + } + line = getLine2(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common2.repeat(" ", options2.indent) + padStart2((mark.line + 1).toString(), lineNoLength) + " | " + line.str + "\n"; + result += common2.repeat("-", options2.indent + lineNoLength + 3 + line.pos) + "^\n"; + for (i = 1; i <= options2.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine2( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common2.repeat(" ", options2.indent) + padStart2((mark.line + i + 1).toString(), lineNoLength) + " | " + line.str + "\n"; } - - value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile - ? new File([value], filename, options) - : new FileLike(value, filename, options) + return result.replace(/\n$/, ""); } + module2.exports = makeSnippet2; } +}); - // 4. Return an entry whose name is name and whose value is value. - return { name, value } -} - -module.exports = { FormData } - - -/***/ }), - -/***/ 59963: -/***/ ((module) => { - -"use strict"; - - -// In case of breaking changes, increase the version -// number to avoid conflicts. -const globalOrigin = Symbol.for('undici.globalOrigin.1') - -function getGlobalOrigin () { - return globalThis[globalOrigin] -} - -function setGlobalOrigin (newOrigin) { - if (newOrigin === undefined) { - Object.defineProperty(globalThis, 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}`) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js +var require_type2 = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type.js"(exports2, module2) { + "use strict"; + var YAMLException2 = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS2 = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS2 = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases2(map2) { + var result = {}; + if (map2 !== null) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + function Type2(tag, options2) { + options2 = options2 || {}; + Object.keys(options2).forEach(function(name) { + if (TYPE_CONSTRUCTOR_OPTIONS2.indexOf(name) === -1) { + throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.options = options2; + this.tag = tag; + this.kind = options2["kind"] || null; + this.resolve = options2["resolve"] || function() { + return true; + }; + this.construct = options2["construct"] || function(data) { + return data; + }; + this.instanceOf = options2["instanceOf"] || null; + this.predicate = options2["predicate"] || null; + this.represent = options2["represent"] || null; + this.representName = options2["representName"] || null; + this.defaultStyle = options2["defaultStyle"] || null; + this.multi = options2["multi"] || false; + this.styleAliases = compileStyleAliases2(options2["styleAliases"] || null); + if (YAML_NODE_KINDS2.indexOf(this.kind) === -1) { + throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + module2.exports = Type2; } +}); - Object.defineProperty(globalThis, globalOrigin, { - value: parsedURL, - writable: true, - enumerable: false, - configurable: false - }) -} - -module.exports = { - getGlobalOrigin, - setGlobalOrigin -} - - -/***/ }), - -/***/ 72908: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { kHeadersList, kConstruct } = __nccwpck_require__(34856) -const { kGuard } = __nccwpck_require__(68323) -const { kEnumerableProperty } = __nccwpck_require__(33465) -const { - makeIterator, - isValidHeaderName, - isValidHeaderValue -} = __nccwpck_require__(42696) -const { webidl } = __nccwpck_require__(29) -const assert = __nccwpck_require__(42613) - -const kHeadersMap = Symbol('headers map') -const kHeadersSortedMap = Symbol('headers map sorted') - -/** - * @param {number} code - */ -function 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 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 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j - while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i - - return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) -} - -function fill (headers, object) { - // To fill a Headers object headers with a given object object, run these steps: +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js +var require_schema = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema.js"(exports2, module2) { + "use strict"; + var YAMLException2 = require_exception(); + var Type2 = require_type2(); + function compileList2(schema2, name) { + var result = []; + schema2[name].forEach(function(currentType) { + var newIndex = result.length; + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) { + newIndex = previousIndex; + } + }); + result[newIndex] = currentType; + }); + return result; + } + function compileMap2() { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + function collectType(type2) { + if (type2.multi) { + result.multi[type2.kind].push(type2); + result.multi["fallback"].push(type2); + } else { + result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2; + } + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + function Schema2(definition) { + return this.extend(definition); + } + Schema2.prototype.extend = function extend3(definition) { + var implicit = []; + var explicit = []; + if (definition instanceof Type2) { + explicit.push(definition); + } else if (Array.isArray(definition)) { + explicit = explicit.concat(definition); + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + } else { + throw new YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + } + implicit.forEach(function(type2) { + if (!(type2 instanceof Type2)) { + throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + if (type2.loadKind && type2.loadKind !== "scalar") { + throw new YAMLException2("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + if (type2.multi) { + throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + } + }); + explicit.forEach(function(type2) { + if (!(type2 instanceof Type2)) { + throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + }); + var result = Object.create(Schema2.prototype); + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + result.compiledImplicit = compileList2(result, "implicit"); + result.compiledExplicit = compileList2(result, "explicit"); + result.compiledTypeMap = compileMap2(result.compiledImplicit, result.compiledExplicit); + return result; + }; + module2.exports = Schema2; + } +}); - // 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 webidl.errors.exception({ - header: 'Headers constructor', - message: `expected name/value pair to be length 2, found ${header.length}.` - }) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js +var require_str = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/str.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + module2.exports = new Type2("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return data !== null ? data : ""; } - - // 2. Append (header’s first item, header’s second item) to headers. - appendHeader(headers, header[0], header[1]) - } - } 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) { - appendHeader(headers, keys[i], object[keys[i]]) - } - } else { - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) + }); } -} - -/** - * @see https://fetch.spec.whatwg.org/#concept-headers-append - */ -function appendHeader (headers, name, value) { - // 1. Normalize value. - value = headerValueNormalize(value) +}); - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js +var require_seq = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/seq.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + module2.exports = new Type2("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return data !== null ? data : []; + } + }); } +}); - // 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[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (headers[kGuard] === 'request-no-cors') { - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js +var require_map = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/map.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + module2.exports = new Type2("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return data !== null ? data : {}; + } + }); } +}); - // 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[kHeadersList].append(name, value) - - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers -} - -class HeadersList { - /** @type {[string, string][]|null} */ - cookies = null - - constructor (init) { - if (init instanceof HeadersList) { - this[kHeadersMap] = new Map(init[kHeadersMap]) - this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies === null ? null : [...init.cookies] - } else { - this[kHeadersMap] = new Map(init) - this[kHeadersSortedMap] = null - } +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js +var require_failsafe = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/failsafe.js"(exports2, module2) { + "use strict"; + var Schema2 = require_schema(); + module2.exports = new Schema2({ + explicit: [ + require_str(), + require_seq(), + require_map() + ] + }); } +}); - // 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[kHeadersMap].has(name) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js +var require_null = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/null.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + function resolveYamlNull2(data) { + if (data === null) return true; + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull2() { + return null; + } + function isNull2(object) { + return object === null; + } + module2.exports = new Type2("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull2, + construct: constructYamlNull2, + predicate: isNull2, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" + }); } +}); - clear () { - this[kHeadersMap].clear() - this[kHeadersSortedMap] = null - this.cookies = null +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js +var require_bool = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/bool.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + function resolveYamlBoolean2(data) { + if (data === null) return false; + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean2(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean2(object) { + return Object.prototype.toString.call(object) === "[object Boolean]"; + } + module2.exports = new Type2("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean2, + construct: constructYamlBoolean2, + predicate: isBoolean2, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); } +}); - // https://fetch.spec.whatwg.org/#concept-header-list-append - append (name, value) { - this[kHeadersSortedMap] = null - - // 1. If list contains name, then set name to the first such - // header’s name. - const lowercaseName = name.toLowerCase() - const exists = this[kHeadersMap].get(lowercaseName) - - // 2. Append (name, value) to list. - if (exists) { - const delimiter = lowercaseName === 'cookie' ? '; ' : ', ' - this[kHeadersMap].set(lowercaseName, { - name: exists.name, - value: `${exists.value}${delimiter}${value}` - }) - } else { - this[kHeadersMap].set(lowercaseName, { name, value }) - } - - if (lowercaseName === 'set-cookie') { - this.cookies ??= [] - this.cookies.push(value) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js +var require_int = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js"(exports2, module2) { + "use strict"; + var common2 = require_common2(); + var Type2 = require_type2(); + function isHexCode2(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode2(c) { + return 48 <= c && c <= 55; + } + function isDecCode2(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger2(data) { + if (data === null) return false; + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) return false; + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode2(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "o") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode2(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isDecCode2(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits || ch === "_") return false; + return true; } + function constructYamlInteger2(data) { + var value = data, sign2 = 1, ch; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign2 = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign2 * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign2 * parseInt(value.slice(2), 16); + if (value[1] === "o") return sign2 * parseInt(value.slice(2), 8); + } + return sign2 * parseInt(value, 10); + } + function isInteger2(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common2.isNegativeZero(object)); + } + module2.exports = new Type2("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger2, + construct: constructYamlInteger2, + predicate: isInteger2, + represent: { + binary: function(obj) { + return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1); + }, + octal: function(obj) { + return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1); + }, + decimal: function(obj) { + return obj.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(obj) { + return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); } +}); - // https://fetch.spec.whatwg.org/#concept-header-list-set - set (name, value) { - this[kHeadersSortedMap] = null - const lowercaseName = name.toLowerCase() - - if (lowercaseName === 'set-cookie') { - this.cookies = [value] +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js +var require_float = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js"(exports2, module2) { + "use strict"; + var common2 = require_common2(); + var Type2 = require_type2(); + var YAML_FLOAT_PATTERN2 = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" + ); + function resolveYamlFloat2(data) { + if (data === null) return false; + if (!YAML_FLOAT_PATTERN2.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; } - - // 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[kHeadersMap].set(lowercaseName, { name, value }) + function constructYamlFloat2(data) { + var value, sign2; + value = data.replace(/_/g, "").toLowerCase(); + sign2 = value[0] === "-" ? -1 : 1; + if ("+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign2 === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (value === ".nan") { + return NaN; + } + return sign2 * parseFloat(value, 10); + } + var SCIENTIFIC_WITHOUT_DOT2 = /^[-+]?[0-9]+e/; + function representYamlFloat2(object, style) { + var res; + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common2.isNegativeZero(object)) { + return "-0.0"; + } + res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT2.test(res) ? res.replace("e", ".e") : res; + } + function isFloat2(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common2.isNegativeZero(object)); + } + module2.exports = new Type2("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat2, + construct: constructYamlFloat2, + predicate: isFloat2, + represent: representYamlFloat2, + defaultStyle: "lowercase" + }); } +}); - // https://fetch.spec.whatwg.org/#concept-header-list-delete - delete (name) { - this[kHeadersSortedMap] = null +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js +var require_json2 = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/json.js"(exports2, module2) { + "use strict"; + module2.exports = require_failsafe().extend({ + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); - name = name.toLowerCase() +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js +var require_core = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/core.js"(exports2, module2) { + "use strict"; + module2.exports = require_json2(); + } +}); - if (name === 'set-cookie') { - this.cookies = null +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js +var require_timestamp = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/timestamp.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + var YAML_DATE_REGEXP2 = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + ); + var YAML_TIMESTAMP_REGEXP2 = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" + ); + function resolveYamlTimestamp2(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP2.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP2.exec(data) !== null) return true; + return false; } - - this[kHeadersMap].delete(name) + function constructYamlTimestamp2(data) { + var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match = YAML_DATE_REGEXP2.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP2.exec(data); + if (match === null) throw new Error("Date resolve error"); + year = +match[1]; + month = +match[2] - 1; + day = +match[3]; + if (!match[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match[4]; + minute = +match[5]; + second = +match[6]; + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { + fraction += "0"; + } + fraction = +fraction; + } + if (match[9]) { + tz_hour = +match[10]; + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if (match[9] === "-") delta = -delta; + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) date.setTime(date.getTime() - delta); + return date; + } + function representYamlTimestamp2(object) { + return object.toISOString(); + } + module2.exports = new Type2("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp2, + construct: constructYamlTimestamp2, + instanceOf: Date, + represent: representYamlTimestamp2 + }); } +}); - // https://fetch.spec.whatwg.org/#concept-header-list-get - get (name) { - const value = this[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 +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js +var require_merge = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/merge.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + function resolveYamlMerge2(data) { + return data === "<<" || data === null; + } + module2.exports = new Type2("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge2 + }); } +}); - * [Symbol.iterator] () { - // use the lowercased name - for (const [name, { value }] of this[kHeadersMap]) { - yield [name, value] +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js +var require_binary = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/binary.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + var BASE64_MAP2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary2(data) { + if (data === null) return false; + var code, idx, bitlen = 0, max = data.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary2(data) { + var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP2, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); + } + function representYamlBinary2(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; + } + function isBinary2(obj) { + return Object.prototype.toString.call(obj) === "[object Uint8Array]"; } + module2.exports = new Type2("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary2, + construct: constructYamlBinary2, + predicate: isBinary2, + represent: representYamlBinary2 + }); } +}); - get entries () { - const headers = {} - - if (this[kHeadersMap].size) { - for (const { name, value } of this[kHeadersMap].values()) { - headers[name] = value +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js +var require_omap = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/omap.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var _toString2 = Object.prototype.toString; + function resolveYamlOmap2(data) { + if (data === null) return true; + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if (_toString2.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (_hasOwnProperty2.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; } + return true; } - - return headers + function constructYamlOmap2(data) { + return data !== null ? data : []; + } + module2.exports = new Type2("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap2, + construct: constructYamlOmap2 + }); } -} +}); -// https://fetch.spec.whatwg.org/#headers-class -class Headers { - constructor (init = undefined) { - if (init === kConstruct) { - return +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js +var require_pairs = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/pairs.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + var _toString2 = Object.prototype.toString; + function resolveYamlPairs2(data) { + if (data === null) return true; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if (_toString2.call(pair) !== "[object Object]") return false; + keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; } - this[kHeadersList] = new HeadersList() - - // The new Headers(init) constructor steps are: - - // 1. Set this’s guard to "none". - this[kGuard] = 'none' - - // 2. If init is given, then fill this with init. - if (init !== undefined) { - init = webidl.converters.HeadersInit(init) - fill(this, init) + function constructYamlPairs2(data) { + if (data === null) return []; + var index, length, pair, keys, result, object = data; + result = new Array(object.length); + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; } + module2.exports = new Type2("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs2, + construct: constructYamlPairs2 + }); } +}); - // https://fetch.spec.whatwg.org/#dom-headers-append - append (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) - - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) - - return appendHeader(this, name, value) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js +var require_set = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/set.js"(exports2, module2) { + "use strict"; + var Type2 = require_type2(); + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + function resolveYamlSet2(data) { + if (data === null) return true; + var key, object = data; + for (key in object) { + if (_hasOwnProperty2.call(object, key)) { + if (object[key] !== null) return false; + } + } + return true; + } + function constructYamlSet2(data) { + return data !== null ? data : {}; + } + module2.exports = new Type2("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet2, + construct: constructYamlSet2 + }); } +}); - // https://fetch.spec.whatwg.org/#dom-headers-delete - delete (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) - - name = webidl.converters.ByteString(name) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js +var require_default = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/schema/default.js"(exports2, module2) { + "use strict"; + module2.exports = require_core().extend({ + implicit: [ + require_timestamp(), + require_merge() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + } +}); - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.delete', - value: name, - type: 'header name' - }) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js +var require_loader = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports2, module2) { + "use strict"; + var common2 = require_common2(); + var YAMLException2 = require_exception(); + var makeSnippet2 = require_snippet(); + var DEFAULT_SCHEMA2 = require_default(); + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN2 = 1; + var CONTEXT_FLOW_OUT2 = 2; + var CONTEXT_BLOCK_IN2 = 3; + var CONTEXT_BLOCK_OUT2 = 4; + var CHOMPING_CLIP2 = 1; + var CHOMPING_STRIP2 = 2; + var CHOMPING_KEEP2 = 3; + var PATTERN_NON_PRINTABLE2 = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS2 = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS2 = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE2 = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI2 = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function _class2(obj) { + return Object.prototype.toString.call(obj); + } + function is_EOL2(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE2(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL2(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR2(c) { + return c === 44 || c === 91 || c === 93 || c === 123 || c === 125; + } + function fromHexCode2(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen2(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; } - - // 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[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO + function fromDecimalCode2(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; } - - // 6. If this’s header list does not contain name, then - // return. - if (!this[kHeadersList].contains(name)) { - return + function simpleEscapeSequence2(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; } - - // 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[kHeadersList].delete(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-get - get (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) - - name = webidl.converters.ByteString(name) - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.get', - value: name, - type: 'header name' - }) + function charFromCodepoint2(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); } - - // 2. Return the result of getting name from this’s header - // list. - return this[kHeadersList].get(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-has - has (name) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) - - name = webidl.converters.ByteString(name) - - // 1. If name is not a header name, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.has', - value: name, - type: 'header name' - }) + var simpleEscapeCheck2 = new Array(256); + var simpleEscapeMap2 = new Array(256); + for (i = 0; i < 256; i++) { + simpleEscapeCheck2[i] = simpleEscapeSequence2(i) ? 1 : 0; + simpleEscapeMap2[i] = simpleEscapeSequence2(i); + } + var i; + function State2(input, options2) { + this.input = input; + this.filename = options2["filename"] || null; + this.schema = options2["schema"] || DEFAULT_SCHEMA2; + this.onWarning = options2["onWarning"] || null; + this.legacy = options2["legacy"] || false; + this.json = options2["json"] || false; + this.listener = options2["listener"] || null; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.firstTabInLine = -1; + this.documents = []; + } + function generateError2(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), + // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + mark.snippet = makeSnippet2(mark); + return new YAMLException2(message, mark); + } + function throwError2(state, message) { + throw generateError2(state, message); + } + function throwWarning2(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError2(state, message)); + } + } + var directiveHandlers2 = { + YAML: function handleYamlDirective2(state, name, args) { + var match, major, minor; + if (state.version !== null) { + throwError2(state, "duplication of %YAML directive"); + } + if (args.length !== 1) { + throwError2(state, "YAML directive accepts exactly one argument"); + } + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (match === null) { + throwError2(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + if (major !== 1) { + throwError2(state, "unacceptable YAML version of the document"); + } + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (minor !== 1 && minor !== 2) { + throwWarning2(state, "unsupported YAML version of the document"); + } + }, + TAG: function handleTagDirective2(state, name, args) { + var handle, prefix; + if (args.length !== 2) { + throwError2(state, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE2.test(handle)) { + throwError2(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty2.call(state.tagMap, handle)) { + throwError2(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI2.test(prefix)) { + throwError2(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError2(state, "tag prefix is malformed: " + prefix); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment2(state, start, end2, checkJson) { + var _position, _length, _character, _result; + if (start < end2) { + _result = state.input.slice(start, end2); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 9 || 32 <= _character && _character <= 1114111)) { + throwError2(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE2.test(_result)) { + throwError2(state, "the stream contains non-printable characters"); + } + state.result += _result; + } + } + function mergeMappings2(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + if (!common2.isObject(source)) { + throwError2(state, "cannot merge mappings; the provided source object is unacceptable"); + } + sourceKeys = Object.keys(source); + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + if (!_hasOwnProperty2.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + function storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) { + var index, quantity; + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError2(state, "nested arrays are not supported inside keys"); + } + if (typeof keyNode === "object" && _class2(keyNode[index]) === "[object Object]") { + keyNode[index] = "[object Object]"; + } + } + } + if (typeof keyNode === "object" && _class2(keyNode) === "[object Object]") { + keyNode = "[object Object]"; + } + keyNode = String(keyNode); + if (_result === null) { + _result = {}; + } + if (keyTag === "tag:yaml.org,2002:merge") { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings2(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings2(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && !_hasOwnProperty2.call(overridableKeys, keyNode) && _hasOwnProperty2.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError2(state, "duplicated mapping key"); + } + if (keyNode === "__proto__") { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + return _result; + } + function readLineBreak2(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (ch === 10) { + state.position++; + } else if (ch === 13) { + state.position++; + if (state.input.charCodeAt(state.position) === 10) { + state.position++; + } + } else { + throwError2(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + function skipSeparationSpace2(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + while (is_WHITE_SPACE2(ch)) { + if (ch === 9 && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && ch !== 0); + } + if (is_EOL2(ch)) { + readLineBreak2(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning2(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator2(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL2(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines2(state, count) { + if (count === 1) { + state.result += " "; + } else if (count > 1) { + state.result += common2.repeat("\n", count - 1); + } + } + function readPlainScalar2(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL2(ch) || is_FLOW_INDICATOR2(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) { + return false; + } + if (ch === 63 || ch === 45) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL2(following) || withinFlowCollection && is_FLOW_INDICATOR2(following)) { + return false; + } + } + state.kind = "scalar"; + state.result = ""; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (ch !== 0) { + if (ch === 58) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL2(following) || withinFlowCollection && is_FLOW_INDICATOR2(following)) { + break; + } + } else if (ch === 35) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL2(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator2(state) || withinFlowCollection && is_FLOW_INDICATOR2(ch)) { + break; + } else if (is_EOL2(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace2(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment2(state, captureStart, captureEnd, false); + writeFoldedLines2(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE2(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + } + captureSegment2(state, captureStart, captureEnd, false); + if (state.result) { + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar2(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (ch !== 39) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 39) { + captureSegment2(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (ch === 39) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + } else if (is_EOL2(ch)) { + captureSegment2(state, captureStart, captureEnd, true); + writeFoldedLines2(state, skipSeparationSpace2(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator2(state)) { + throwError2(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError2(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar2(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 34) { + return false; + } + state.kind = "scalar"; + state.result = ""; + state.position++; + captureStart = captureEnd = state.position; + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 34) { + captureSegment2(state, captureStart, state.position, true); + state.position++; + return true; + } else if (ch === 92) { + captureSegment2(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL2(ch)) { + skipSeparationSpace2(state, false, nodeIndent); + } else if (ch < 256 && simpleEscapeCheck2[ch]) { + state.result += simpleEscapeMap2[ch]; + state.position++; + } else if ((tmp = escapedHexLen2(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode2(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError2(state, "expected hexadecimal character"); + } + } + state.result += charFromCodepoint2(hexResult); + state.position++; + } else { + throwError2(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL2(ch)) { + captureSegment2(state, captureStart, captureEnd, true); + writeFoldedLines2(state, skipSeparationSpace2(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator2(state)) { + throwError2(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError2(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection2(state, nodeIndent) { + var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = []; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = {}; + } else { + return false; + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (ch !== 0) { + skipSeparationSpace2(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + return true; + } else if (!readNext) { + throwError2(state, "missed comma between flow collection entries"); + } else if (ch === 44) { + throwError2(state, "expected the node content, but found ','"); + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (ch === 63) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL2(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace2(state, true, nodeIndent); + } + } + _line = state.line; + _lineStart = state.lineStart; + _pos = state.position; + composeNode2(state, nodeIndent, CONTEXT_FLOW_IN2, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace2(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && ch === 58) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace2(state, true, nodeIndent); + composeNode2(state, nodeIndent, CONTEXT_FLOW_IN2, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair2(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + skipSeparationSpace2(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === 44) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError2(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar2(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP2, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + state.kind = "scalar"; + state.result = ""; + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + if (ch === 43 || ch === 45) { + if (CHOMPING_CLIP2 === chomping) { + chomping = ch === 43 ? CHOMPING_KEEP2 : CHOMPING_STRIP2; + } else { + throwError2(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode2(ch)) >= 0) { + if (tmp === 0) { + throwError2(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError2(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE2(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE2(ch)); + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL2(ch) && ch !== 0); + } + } + while (ch !== 0) { + readLineBreak2(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL2(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP2) { + state.result += common2.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP2) { + if (didReadContent) { + state.result += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE2(ch)) { + atMoreIndented = true; + state.result += common2.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common2.repeat("\n", emptyLines + 1); + } else if (emptyLines === 0) { + if (didReadContent) { + state.result += " "; + } + } else { + state.result += common2.repeat("\n", emptyLines); + } + } else { + state.result += common2.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines); + } + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL2(ch) && ch !== 0) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment2(state, captureStart, state.position, false); + } + return true; + } + function readBlockSequence2(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError2(state, "tab characters must not be used in indentation"); + } + if (ch !== 45) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL2(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace2(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode2(state, nodeIndent, CONTEXT_BLOCK_IN2, false, true); + _result.push(state.result); + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError2(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + return true; + } + return false; + } + function readBlockMapping2(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + if (state.firstTabInLine !== -1) return false; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError2(state, "tab characters must not be used in indentation"); + } + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((ch === 63 || ch === 58) && is_WS_OR_EOL2(following)) { + if (ch === 63) { + if (atExplicitKey) { + storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError2(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"); + } + state.position += 1; + ch = following; + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + if (!composeNode2(state, flowIndent, CONTEXT_FLOW_OUT2, false, true)) { + break; + } + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 58) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL2(ch)) { + throwError2(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (detected) { + throwError2(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError2(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + if (composeNode2(state, nodeIndent, CONTEXT_BLOCK_OUT2, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) { + throwError2(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair2(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty2(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 33) return false; + if (state.tag !== null) { + throwError2(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (ch === 60) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (ch === 33) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && ch !== 62); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError2(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL2(ch)) { + if (ch === 33) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE2.test(tagHandle)) { + throwError2(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError2(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS2.test(tagName)) { + throwError2(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI2.test(tagName)) { + throwError2(state, "tag name cannot contain such characters: " + tagName); + } + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError2(state, "tag name is malformed: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty2.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if (tagHandle === "!") { + state.tag = "!" + tagName; + } else if (tagHandle === "!!") { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError2(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty2(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 38) return false; + if (state.anchor !== null) { + throwError2(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL2(ch) && !is_FLOW_INDICATOR2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError2(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias2(state) { + var _position, alias, ch; + ch = state.input.charCodeAt(state.position); + if (ch !== 42) return false; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL2(ch) && !is_FLOW_INDICATOR2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError2(state, "name of an alias node must contain at least one character"); + } + alias = state.input.slice(_position, state.position); + if (!_hasOwnProperty2.call(state.anchorMap, alias)) { + throwError2(state, 'unidentified alias "' + alias + '"'); + } + state.result = state.anchorMap[alias]; + skipSeparationSpace2(state, true, -1); + return true; + } + function composeNode2(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type2, flowIndent, blockIndent; + if (state.listener !== null) { + state.listener("open", state); + } + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT2 === nodeContext || CONTEXT_BLOCK_IN2 === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace2(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + if (indentStatus === 1) { + while (readTagProperty2(state) || readAnchorProperty2(state)) { + if (skipSeparationSpace2(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (indentStatus === 1 || CONTEXT_BLOCK_OUT2 === nodeContext) { + if (CONTEXT_FLOW_IN2 === nodeContext || CONTEXT_FLOW_OUT2 === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (indentStatus === 1) { + if (allowBlockCollections && (readBlockSequence2(state, blockIndent) || readBlockMapping2(state, blockIndent, flowIndent)) || readFlowCollection2(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar2(state, flowIndent) || readSingleQuotedScalar2(state, flowIndent) || readDoubleQuotedScalar2(state, flowIndent)) { + hasContent = true; + } else if (readAlias2(state)) { + hasContent = true; + if (state.tag !== null || state.anchor !== null) { + throwError2(state, "alias node should not have any properties"); + } + } else if (readPlainScalar2(state, flowIndent, CONTEXT_FLOW_IN2 === nodeContext)) { + hasContent = true; + if (state.tag === null) { + state.tag = "?"; + } + } + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + hasContent = allowBlockCollections && readBlockSequence2(state, blockIndent); + } + } + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } else if (state.tag === "?") { + if (state.result !== null && state.kind !== "scalar") { + throwError2(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type2 = state.implicitTypes[typeIndex]; + if (type2.resolve(state.result)) { + state.result = type2.construct(state.result); + state.tag = type2.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== "!") { + if (_hasOwnProperty2.call(state.typeMap[state.kind || "fallback"], state.tag)) { + type2 = state.typeMap[state.kind || "fallback"][state.tag]; + } else { + type2 = null; + typeList = state.typeMap.multi[state.kind || "fallback"]; + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type2 = typeList[typeIndex]; + break; + } + } + } + if (!type2) { + throwError2(state, "unknown tag !<" + state.tag + ">"); + } + if (state.result !== null && type2.kind !== state.kind) { + throwError2(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"'); + } + if (!type2.resolve(state.result, state.tag)) { + throwError2(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type2.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + if (state.listener !== null) { + state.listener("close", state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + function readDocument2(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = /* @__PURE__ */ Object.create(null); + state.anchorMap = /* @__PURE__ */ Object.create(null); + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace2(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || ch !== 37) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError2(state, "directive name must not be less than one character in length"); + } + while (ch !== 0) { + while (is_WHITE_SPACE2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (ch === 35) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0 && !is_EOL2(ch)); + break; + } + if (is_EOL2(ch)) break; + _position = state.position; + while (ch !== 0 && !is_WS_OR_EOL2(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (ch !== 0) readLineBreak2(state); + if (_hasOwnProperty2.call(directiveHandlers2, directiveName)) { + directiveHandlers2[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning2(state, 'unknown document directive "' + directiveName + '"'); + } + } + skipSeparationSpace2(state, true, -1); + if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) { + state.position += 3; + skipSeparationSpace2(state, true, -1); + } else if (hasDirectives) { + throwError2(state, "directives end mark is expected"); + } + composeNode2(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT2, false, true); + skipSeparationSpace2(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS2.test(state.input.slice(documentStart, state.position))) { + throwWarning2(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator2(state)) { + if (state.input.charCodeAt(state.position) === 46) { + state.position += 3; + skipSeparationSpace2(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError2(state, "end of the stream or a document separator is expected"); + } else { + return; + } } - - // 2. Return true if this’s header list contains name; - // otherwise false. - return this[kHeadersList].contains(name) - } - - // https://fetch.spec.whatwg.org/#dom-headers-set - set (name, value) { - webidl.brandCheck(this, Headers) - - webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) - - name = webidl.converters.ByteString(name) - value = webidl.converters.ByteString(value) - - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.set', - value, - type: 'header value' - }) + function loadDocuments2(input, options2) { + input = String(input); + options2 = options2 || {}; + if (input.length !== 0) { + if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State2(input, options2); + var nullpos = input.indexOf("\0"); + if (nullpos !== -1) { + state.position = nullpos; + throwError2(state, "null byte is not allowed in input"); + } + state.input += "\0"; + while (state.input.charCodeAt(state.position) === 32) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + readDocument2(state); + } + return state.documents; } - - // 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[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // TODO + function loadAll2(input, iterator2, options2) { + if (iterator2 !== null && typeof iterator2 === "object" && typeof options2 === "undefined") { + options2 = iterator2; + iterator2 = null; + } + var documents = loadDocuments2(input, options2); + if (typeof iterator2 !== "function") { + return documents; + } + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator2(documents[index]); + } } - - // 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[kHeadersList].set(name, value) - } - - // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie - getSetCookie () { - webidl.brandCheck(this, 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[kHeadersList].cookies - - if (list) { - return [...list] + function load2(input, options2) { + var documents = loadDocuments2(input, options2); + if (documents.length === 0) { + return void 0; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException2("expected a single document in the stream, but found more"); } - - return [] + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; } +}); - // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine - get [kHeadersSortedMap] () { - if (this[kHeadersList][kHeadersSortedMap]) { - return this[kHeadersList][kHeadersSortedMap] +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js +var require_dumper = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports2, module2) { + "use strict"; + var common2 = require_common2(); + var YAMLException2 = require_exception(); + var DEFAULT_SCHEMA2 = require_default(); + var _toString2 = Object.prototype.toString; + var _hasOwnProperty2 = Object.prototype.hasOwnProperty; + var CHAR_BOM2 = 65279; + var CHAR_TAB2 = 9; + var CHAR_LINE_FEED2 = 10; + var CHAR_CARRIAGE_RETURN2 = 13; + var CHAR_SPACE2 = 32; + var CHAR_EXCLAMATION2 = 33; + var CHAR_DOUBLE_QUOTE2 = 34; + var CHAR_SHARP2 = 35; + var CHAR_PERCENT2 = 37; + var CHAR_AMPERSAND2 = 38; + var CHAR_SINGLE_QUOTE2 = 39; + var CHAR_ASTERISK2 = 42; + var CHAR_COMMA2 = 44; + var CHAR_MINUS2 = 45; + var CHAR_COLON2 = 58; + var CHAR_EQUALS2 = 61; + var CHAR_GREATER_THAN2 = 62; + var CHAR_QUESTION2 = 63; + var CHAR_COMMERCIAL_AT2 = 64; + var CHAR_LEFT_SQUARE_BRACKET2 = 91; + var CHAR_RIGHT_SQUARE_BRACKET2 = 93; + var CHAR_GRAVE_ACCENT2 = 96; + var CHAR_LEFT_CURLY_BRACKET2 = 123; + var CHAR_VERTICAL_LINE2 = 124; + var CHAR_RIGHT_CURLY_BRACKET2 = 125; + var ESCAPE_SEQUENCES2 = {}; + ESCAPE_SEQUENCES2[0] = "\\0"; + ESCAPE_SEQUENCES2[7] = "\\a"; + ESCAPE_SEQUENCES2[8] = "\\b"; + ESCAPE_SEQUENCES2[9] = "\\t"; + ESCAPE_SEQUENCES2[10] = "\\n"; + ESCAPE_SEQUENCES2[11] = "\\v"; + ESCAPE_SEQUENCES2[12] = "\\f"; + ESCAPE_SEQUENCES2[13] = "\\r"; + ESCAPE_SEQUENCES2[27] = "\\e"; + ESCAPE_SEQUENCES2[34] = '\\"'; + ESCAPE_SEQUENCES2[92] = "\\\\"; + ESCAPE_SEQUENCES2[133] = "\\N"; + ESCAPE_SEQUENCES2[160] = "\\_"; + ESCAPE_SEQUENCES2[8232] = "\\L"; + ESCAPE_SEQUENCES2[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX2 = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + var DEPRECATED_BASE60_SYNTAX2 = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + function compileStyleMap2(schema2, map2) { + var result, keys, index, length, tag, style, type2; + if (map2 === null) return {}; + result = {}; + keys = Object.keys(map2); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map2[tag]); + if (tag.slice(0, 2) === "!!") { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type2 = schema2.compiledTypeMap["fallback"][tag]; + if (type2 && _hasOwnProperty2.call(type2.styleAliases, style)) { + style = type2.styleAliases[style]; + } + result[tag] = style; + } + return result; } - - // 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[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) - const cookies = this[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]]) - } + function encodeHex2(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; } else { - // 2. Otherwise: - - // 1. Let value be the result of getting name from list. - - // 2. Assert: value is non-null. - assert(value !== null) - - // 3. Append (name, value) to headers. - headers.push([name, value]) + throw new YAMLException2("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common2.repeat("0", length - string.length) + string; + } + var QUOTING_TYPE_SINGLE2 = 1; + var QUOTING_TYPE_DOUBLE2 = 2; + function State2(options2) { + this.schema = options2["schema"] || DEFAULT_SCHEMA2; + this.indent = Math.max(1, options2["indent"] || 2); + this.noArrayIndent = options2["noArrayIndent"] || false; + this.skipInvalid = options2["skipInvalid"] || false; + this.flowLevel = common2.isNothing(options2["flowLevel"]) ? -1 : options2["flowLevel"]; + this.styleMap = compileStyleMap2(this.schema, options2["styles"] || null); + this.sortKeys = options2["sortKeys"] || false; + this.lineWidth = options2["lineWidth"] || 80; + this.noRefs = options2["noRefs"] || false; + this.noCompatMode = options2["noCompatMode"] || false; + this.condenseFlow = options2["condenseFlow"] || false; + this.quotingType = options2["quotingType"] === '"' ? QUOTING_TYPE_DOUBLE2 : QUOTING_TYPE_SINGLE2; + this.forceQuotes = options2["forceQuotes"] || false; + this.replacer = typeof options2["replacer"] === "function" ? options2["replacer"] : null; + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString2(string, spaces) { + var ind = common2.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") result += ind; + result += line; } + return result; } - - this[kHeadersList][kHeadersSortedMap] = headers - - // 4. Return headers. - return headers - } - - keys () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key') + function generateNextLine2(state, level) { + return "\n" + common2.repeat(" ", state.indent * level); } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key' - ) - } - - values () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'value') + function testImplicitResolving2(state, str2) { + var index, length, type2; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type2 = state.implicitTypes[index]; + if (type2.resolve(str2)) { + return true; + } + } + return false; } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'value' - ) - } - - entries () { - webidl.brandCheck(this, Headers) - - if (this[kGuard] === 'immutable') { - const value = this[kHeadersSortedMap] - return makeIterator(() => value, 'Headers', - 'key+value') + function isWhitespace2(c) { + return c === CHAR_SPACE2 || c === CHAR_TAB2; } - - return makeIterator( - () => [...this[kHeadersSortedMap].values()], - 'Headers', - 'key+value' - ) - } - - /** - * @param {(value: string, key: string, self: Headers) => void} callbackFn - * @param {unknown} thisArg - */ - forEach (callbackFn, thisArg = globalThis) { - webidl.brandCheck(this, Headers) - - 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'." - ) + function isPrintable2(c) { + return 32 <= c && c <= 126 || 161 <= c && c <= 55295 && c !== 8232 && c !== 8233 || 57344 <= c && c <= 65533 && c !== CHAR_BOM2 || 65536 <= c && c <= 1114111; } - - for (const [key, value] of this) { - callbackFn.apply(thisArg, [value, key, this]) + function isNsCharOrWhitespace2(c) { + return isPrintable2(c) && c !== CHAR_BOM2 && c !== CHAR_CARRIAGE_RETURN2 && c !== CHAR_LINE_FEED2; } - } - - [Symbol.for('nodejs.util.inspect.custom')] () { - webidl.brandCheck(this, Headers) - - return this[kHeadersList] - } -} - -Headers.prototype[Symbol.iterator] = Headers.prototype.entries - -Object.defineProperties(Headers.prototype, { - append: kEnumerableProperty, - delete: kEnumerableProperty, - get: kEnumerableProperty, - has: kEnumerableProperty, - set: kEnumerableProperty, - getSetCookie: kEnumerableProperty, - keys: kEnumerableProperty, - values: kEnumerableProperty, - entries: kEnumerableProperty, - forEach: kEnumerableProperty, - [Symbol.iterator]: { enumerable: false }, - [Symbol.toStringTag]: { - value: 'Headers', - configurable: true - } -}) - -webidl.converters.HeadersInit = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (V[Symbol.iterator]) { - return webidl.converters['sequence>'](V) - } - - return webidl.converters['record'](V) - } - - throw webidl.errors.conversionFailed({ - prefix: 'Headers constructor', - argument: 'Argument 1', - types: ['sequence>', 'record'] - }) -} - -module.exports = { - fill, - Headers, - HeadersList -} - - -/***/ }), - -/***/ 58358: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -// https://github.com/Ethan-Arrowood/undici-fetch - - - -const { - Response, - makeNetworkError, - makeAppropriateNetworkError, - filterResponse, - makeResponse -} = __nccwpck_require__(95683) -const { Headers } = __nccwpck_require__(72908) -const { Request, makeRequest } = __nccwpck_require__(15767) -const zlib = __nccwpck_require__(43106) -const { - bytesMatch, - makePolicyContainer, - clonePolicyContainer, - requestBadPort, - TAOCheck, - appendRequestOriginHeader, - responseLocationURL, - requestCurrentURL, - setRequestReferrerPolicyOnRedirect, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - createOpaqueTimingInfo, - appendFetchMetadata, - corsCheck, - crossOriginResourcePolicyCheck, - determineRequestsReferrer, - coarsenedSharedCurrentTime, - createDeferredPromise, - isBlobLike, - sameOrigin, - isCancelled, - isAborted, - isErrorLike, - fullyReadBody, - readableStreamClose, - isomorphicEncode, - urlIsLocal, - urlIsHttpHttpsScheme, - urlHasHttpsScheme -} = __nccwpck_require__(42696) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(68323) -const assert = __nccwpck_require__(42613) -const { safelyExtractBody } = __nccwpck_require__(1380) -const { - redirectStatusSet, - nullBodyStatus, - safeMethodsSet, - requestBodyHeader, - subresourceSet, - DOMException -} = __nccwpck_require__(84135) -const { kHeadersList } = __nccwpck_require__(34856) -const EE = __nccwpck_require__(24434) -const { Readable, pipeline } = __nccwpck_require__(2203) -const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(33465) -const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(43911) -const { TransformStream } = __nccwpck_require__(63774) -const { getGlobalDispatcher } = __nccwpck_require__(17882) -const { webidl } = __nccwpck_require__(29) -const { STATUS_CODES } = __nccwpck_require__(58611) -const GET_OR_HEAD = ['GET', 'HEAD'] - -/** @type {import('buffer').resolveObjectURL} */ -let resolveObjectURL -let ReadableStream = globalThis.ReadableStream - -class Fetch extends EE { - 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/#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) - } -} - -// https://fetch.spec.whatwg.org/#fetch-method -function fetch (input, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) - - // 1. Let p be a new promise. - const p = 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 Request(input, init) - } catch (e) { - p.reject(e) - return p.promise - } - - // 3. Let request be requestObject’s request. - const request = requestObject[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. - 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. - 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: - addAbortListener( - requestObject.signal, - () => { - // 1. Set locallyAborted to true. - locallyAborted = true - - // 2. Assert: controller is non-null. - 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. - abortFetch(p, request, responseObject, requestObject.signal.reason) + function isPlainSafe2(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace2(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace2(c); + return ( + // ns-plain-safe + (inblock ? ( + // c = flow-in + cIsNsCharOrWhitespace + ) : cIsNsCharOrWhitespace && c !== CHAR_COMMA2 && c !== CHAR_LEFT_SQUARE_BRACKET2 && c !== CHAR_RIGHT_SQUARE_BRACKET2 && c !== CHAR_LEFT_CURLY_BRACKET2 && c !== CHAR_RIGHT_CURLY_BRACKET2) && c !== CHAR_SHARP2 && !(prev === CHAR_COLON2 && !cIsNsChar) || isNsCharOrWhitespace2(prev) && !isWhitespace2(prev) && c === CHAR_SHARP2 || prev === CHAR_COLON2 && cIsNsChar + ); } - ) - - // 12. Let handleFetchDone given response response be to finalize and - // report timing with response, globalObject, and "fetch". - const handleFetchDone = (response) => - 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() + function isPlainSafeFirst2(c) { + return isPrintable2(c) && c !== CHAR_BOM2 && !isWhitespace2(c) && c !== CHAR_MINUS2 && c !== CHAR_QUESTION2 && c !== CHAR_COLON2 && c !== CHAR_COMMA2 && c !== CHAR_LEFT_SQUARE_BRACKET2 && c !== CHAR_RIGHT_SQUARE_BRACKET2 && c !== CHAR_LEFT_CURLY_BRACKET2 && c !== CHAR_RIGHT_CURLY_BRACKET2 && c !== CHAR_SHARP2 && c !== CHAR_AMPERSAND2 && c !== CHAR_ASTERISK2 && c !== CHAR_EXCLAMATION2 && c !== CHAR_VERTICAL_LINE2 && c !== CHAR_EQUALS2 && c !== CHAR_GREATER_THAN2 && c !== CHAR_SINGLE_QUOTE2 && c !== CHAR_DOUBLE_QUOTE2 && c !== CHAR_PERCENT2 && c !== CHAR_COMMERCIAL_AT2 && c !== CHAR_GRAVE_ACCENT2; + } + function isPlainSafeLast2(c) { + return !isWhitespace2(c) && c !== CHAR_COLON2; + } + function codePointAt2(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 55296 && first <= 56319 && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 56320 && second <= 57343) { + return (first - 55296) * 1024 + second - 56320 + 65536; + } + } + return first; + } + function needIndentIndicator2(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + var STYLE_PLAIN2 = 1; + var STYLE_SINGLE2 = 2; + var STYLE_LITERAL2 = 3; + var STYLE_FOLDED2 = 4; + var STYLE_DOUBLE2 = 5; + function chooseScalarStyle2(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) { + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; + var plain = isPlainSafeFirst2(codePointAt2(string, 0)) && isPlainSafeLast2(codePointAt2(string, string.length - 1)); + if (singleLineOnly || forceQuotes) { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt2(string, i); + if (!isPrintable2(char)) { + return STYLE_DOUBLE2; + } + plain = plain && isPlainSafe2(char, prevChar, inblock); + prevChar = char; + } + } else { + for (i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt2(string, i); + if (char === CHAR_LINE_FEED2) { + hasLineBreak = true; + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || // Foldable line = too long, and not more-indented. + i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "; + previousLineBreak = i; + } + } else if (!isPrintable2(char)) { + return STYLE_DOUBLE2; + } + plain = plain && isPlainSafe2(char, prevChar, inblock); + prevChar = char; + } + hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " "); + } + if (!hasLineBreak && !hasFoldableLine) { + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN2; + } + return quotingType === QUOTING_TYPE_DOUBLE2 ? STYLE_DOUBLE2 : STYLE_SINGLE2; + } + if (indentPerLevel > 9 && needIndentIndicator2(string)) { + return STYLE_DOUBLE2; + } + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED2 : STYLE_LITERAL2; + } + return quotingType === QUOTING_TYPE_DOUBLE2 ? STYLE_DOUBLE2 : STYLE_SINGLE2; } - - // 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. - - abortFetch(p, request, responseObject, controller.serializedAbortReason) - return Promise.resolve() + function writeScalar2(state, string, level, iskey, inblock) { + state.dump = function() { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE2 ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX2.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX2.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE2 ? '"' + string + '"' : "'" + string + "'"; + } + } + var indent = state.indent * Math.max(1, level); + var lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + var singleLineOnly = iskey || state.flowLevel > -1 && level >= state.flowLevel; + function testAmbiguity(string2) { + return testImplicitResolving2(state, string2); + } + switch (chooseScalarStyle2( + string, + singleLineOnly, + state.indent, + lineWidth, + testAmbiguity, + state.quotingType, + state.forceQuotes && !iskey, + inblock + )) { + case STYLE_PLAIN2: + return string; + case STYLE_SINGLE2: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL2: + return "|" + blockHeader2(string, state.indent) + dropEndingNewline2(indentString2(string, indent)); + case STYLE_FOLDED2: + return ">" + blockHeader2(string, state.indent) + dropEndingNewline2(indentString2(foldString2(string, lineWidth), indent)); + case STYLE_DOUBLE2: + return '"' + escapeString2(string, lineWidth) + '"'; + default: + throw new YAMLException2("impossible error: invalid scalar style"); + } + }(); + } + function blockHeader2(string, indentPerLevel) { + var indentIndicator = needIndentIndicator2(string) ? String(indentPerLevel) : ""; + var clip = string[string.length - 1] === "\n"; + var keep = clip && (string[string.length - 2] === "\n" || string === "\n"); + var chomp = keep ? "+" : clip ? "" : "-"; + return indentIndicator + chomp + "\n"; + } + function dropEndingNewline2(string) { + return string[string.length - 1] === "\n" ? string.slice(0, -1) : string; + } + function foldString2(string, width) { + var lineRe = /(\n+)([^\n]*)/g; + var result = function() { + var nextLF = string.indexOf("\n"); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine2(string.slice(0, nextLF), width); + }(); + var prevMoreIndented = string[0] === "\n" || string[0] === " "; + var moreIndented; + var match; + while (match = lineRe.exec(string)) { + var prefix = match[1], line = match[2]; + moreIndented = line[0] === " "; + result += prefix + (!prevMoreIndented && !moreIndented && line !== "" ? "\n" : "") + foldLine2(line, width); + prevMoreIndented = moreIndented; + } + return result; } - - // 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() + function foldLine2(line, width) { + if (line === "" || line[0] === " ") return line; + var breakRe = / [^ ]/g; + var match; + var start = 0, end2, curr = 0, next = 0; + var result = ""; + while (match = breakRe.exec(line)) { + next = match.index; + if (next - start > width) { + end2 = curr > start ? curr : next; + result += "\n" + line.slice(start, end2); + start = end2 + 1; + } + curr = next; + } + result += "\n"; + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + "\n" + line.slice(curr + 1); + } else { + result += line.slice(start); + } + return result.slice(1); + } + function escapeString2(string) { + var result = ""; + var char = 0; + var escapeSeq; + for (var i = 0; i < string.length; char >= 65536 ? i += 2 : i++) { + char = codePointAt2(string, i); + escapeSeq = ESCAPE_SEQUENCES2[char]; + if (!escapeSeq && isPrintable2(char)) { + result += string[i]; + if (char >= 65536) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex2(char); + } + } + return result; } - - // 4. Set responseObject to the result of creating a Response object, - // given response, "immutable", and relevantRealm. - responseObject = new Response() - responseObject[kState] = response - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = response.headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - - // 5. Resolve p with responseObject. - p.resolve(responseObject) - } - - controller = fetching({ - request, - processResponseEndOfBody: handleFetchDone, - processResponse, - dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici - }) - - // 14. Return p. - return p.promise -} - -// https://fetch.spec.whatwg.org/#finalize-and-report-timing -function 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 (!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 = createOpaqueTimingInfo({ - startTime: timingInfo.startTime - }) - - // 2. Set cacheState to the empty string. - cacheState = '' - } - - // 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 = coarsenedSharedCurrentTime() - - // 10. Set response’s timing info to timingInfo. - response.timingInfo = timingInfo - - // 11. Mark resource timing for timingInfo, originalURL, initiatorType, - // global, and cacheState. - markResourceTiming( - timingInfo, - originalURL, - initiatorType, - globalThis, - cacheState - ) -} - -// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing -function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { - if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { - performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) - } -} - -// https://fetch.spec.whatwg.org/#abort-fetch -function 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 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 && isReadable(request.body?.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return + function writeFlowSequence2(state, level, object) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode2(state, level, value, false, false) || typeof value === "undefined" && writeNode2(state, level, null, false, false)) { + if (_result !== "") _result += "," + (!state.condenseFlow ? " " : ""); + _result += state.dump; + } } - throw err - }) - } - - // 3. If responseObject is null, then return. - if (responseObject == null) { - return - } - - // 4. Let response be responseObject’s response. - const response = responseObject[kState] - - // 5. If response’s body is not null and is readable, then error response’s - // body with error. - if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error).catch((err) => { - if (err.code === 'ERR_INVALID_STATE') { - // Node bug? - return + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence2(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length, value; + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + if (writeNode2(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode2(state, level + 1, null, true, true, false, true)) { + if (!compact || _result !== "") { + _result += generateNextLine2(state, level); + } + if (state.dump && CHAR_LINE_FEED2 === state.dump.charCodeAt(0)) { + _result += "-"; + } else { + _result += "- "; + } + _result += state.dump; + } } - throw err - }) - } -} - -// https://fetch.spec.whatwg.org/#fetching -function fetching ({ - request, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseEndOfBody, - processResponseConsumeBody, - useParallelQueue = false, - 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 - } - - // 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 currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) - const timingInfo = 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 Fetch(dispatcher), - request, - timingInfo, - processRequestBodyChunkLength, - processRequestEndOfBody, - processResponse, - processResponseConsumeBody, - processResponseEndOfBody, - taskDestination, - 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. - 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: - // 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 = clonePolicyContainer( - request.client.policyContainer - ) - } else { - // 2. Otherwise, set request’s policy container to a new policy - // container. - request.policyContainer = makePolicyContainer() - } - } - - // 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) - } - - // 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. - if (request.priority === null) { - // TODO - } - - // 15. If request is a subresource request, then: - if (subresourceSet.has(request.destination)) { - // TODO - } - - // 16. Run main fetch given fetchParams. - 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 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 && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError('local URLs only') - } - - // 4. Run report Content Security Policy violations for request. - // TODO - - // 5. Upgrade request to a potentially trustworthy URL, if appropriate. - 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 (requestBadPort(request) === 'blocked') { - response = 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 = 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 = requestCurrentURL(request) - - if ( - // - request’s current URL’s origin is same origin with request’s origin, - // and request’s response tainting is "basic" - (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 schemeFetch(fetchParams) + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping2(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (_result !== "") pairBuffer += ", "; + if (state.condenseFlow) pairBuffer += '"'; + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode2(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) pairBuffer += "? "; + pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " "); + if (!writeNode2(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; } - - // request’s mode is "same-origin" - if (request.mode === 'same-origin') { - // 1. Return a network error. - return makeNetworkError('request mode cannot be "same-origin"') + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping2(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + if (state.sortKeys === true) { + objectKeyList.sort(); + } else if (typeof state.sortKeys === "function") { + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + throw new YAMLException2("sortKeys must be a boolean or a function"); + } + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || _result !== "") { + pairBuffer += generateNextLine2(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + if (!writeNode2(state, level + 1, objectKey, true, true, true)) { + continue; + } + explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED2 === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine2(state, level); + } + if (!writeNode2(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED2 === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; } - - // 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 makeNetworkError( - 'redirect mode cannot be "follow" for "no-cors" request' - ) + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType2(state, object, explicit) { + var _result, typeList, index, length, type2, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type2 = typeList[index]; + if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) { + if (explicit) { + if (type2.multi && type2.representName) { + state.tag = type2.representName(object); + } else { + state.tag = type2.tag; + } + } else { + state.tag = "?"; + } + if (type2.represent) { + style = state.styleMap[type2.tag] || type2.defaultStyle; + if (_toString2.call(type2.represent) === "[object Function]") { + _result = type2.represent(object, style); + } else if (_hasOwnProperty2.call(type2.represent, style)) { + _result = type2.represent[style](object, style); + } else { + throw new YAMLException2("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; } - - // 2. Set request’s response tainting to "opaque". - request.responseTainting = 'opaque' - - // 3. Return the result of running scheme fetch given fetchParams. - return await schemeFetch(fetchParams) - } - - // request’s current URL’s scheme is not an HTTP(S) scheme - if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - // Return a network error. - return 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 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: - if (request.responseTainting === 'cors') { - // 1. Let headerNames be the result of extracting header list values - // given `Access-Control-Expose-Headers` and response’s header list. - // TODO - // 2. If request’s credentials mode is not "include" and headerNames - // contains `*`, then set response’s CORS-exposed header-name list to - // all unique header names in response’s header list. - // TODO - // 3. Otherwise, if headerNames is not null or failure, then set - // response’s CORS-exposed header-name list to headerNames. - // TODO - } - - // Set response to the following filtered response with response as its - // internal response, depending on request’s response tainting: - if (request.responseTainting === 'basic') { - response = filterResponse(response, 'basic') - } else if (request.responseTainting === 'cors') { - response = filterResponse(response, 'cors') - } else if (request.responseTainting === 'opaque') { - response = filterResponse(response, 'opaque') - } else { - assert(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') - ) { - response = internalResponse = 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' || - nullBodyStatus.includes(internalResponse.status)) - ) { - internalResponse.body = null - fetchParams.controller.dump = 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) => - fetchFinale(fetchParams, 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 (!bytesMatch(bytes, request.integrity)) { - processBodyError('integrity mismatch') - return - } - - // 2. Set response’s body to bytes as a body. - response.body = safelyExtractBody(bytes)[0] - - // 3. Run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } - - // 4. Fully read response’s body given processBody and processBodyError. - await fullyReadBody(response.body, processBody, processBodyError) - } else { - // 21. Otherwise, run fetch finale given fetchParams and response. - fetchFinale(fetchParams, response) - } -} - -// https://fetch.spec.whatwg.org/#concept-scheme-fetch -// given a fetch params fetchParams -function 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 (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)) - } - - // 2. Let request be fetchParams’s request. - const { request } = fetchParams - - const { protocol: scheme } = 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(makeNetworkError('about scheme is not supported')) + } + return false; } - case 'blob:': { - if (!resolveObjectURL) { - resolveObjectURL = (__nccwpck_require__(20181).resolveObjectURL) + function writeNode2(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + if (!detectType2(state, object, false)) { + detectType2(state, object, true); } - - // 1. Let blobURLEntry be request’s current URL’s blob URL entry. - const blobURLEntry = 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(makeNetworkError('NetworkError when attempting to fetch resource.')) + var type2 = _toString2.call(state.dump); + var inblock = block; + var tagStr; + if (block) { + block = state.flowLevel < 0 || state.flowLevel > level; } - - const blobURLEntryObject = 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' || !isBlobLike(blobURLEntryObject)) { - return Promise.resolve(makeNetworkError('invalid method')) + var objectOrArray = type2 === "[object Object]" || type2 === "[object Array]", duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; } - - // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. - const bodyWithType = 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 = 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 = 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 = requestCurrentURL(request) - const dataURLStruct = dataURLProcessor(currentURL) - - // 2. If dataURLStruct is failure, then return a - // network error. - if (dataURLStruct === 'failure') { - return Promise.resolve(makeNetworkError('failed to fetch the data URL')) + if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) { + compact = false; } - - // 3. Let mimeType be dataURLStruct’s MIME type, serialized. - const mimeType = 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(makeResponse({ - statusText: 'OK', - headersList: [ - ['content-type', { name: 'Content-Type', value: mimeType }] - ], - body: safelyExtractBody(dataURLStruct.body)[0] - })) + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type2 === "[object Object]") { + if (block && Object.keys(state.dump).length !== 0) { + writeBlockMapping2(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowMapping2(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type2 === "[object Array]") { + if (block && state.dump.length !== 0) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence2(state, level - 1, state.dump, compact); + } else { + writeBlockSequence2(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + state.dump; + } + } else { + writeFlowSequence2(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if (type2 === "[object String]") { + if (state.tag !== "?") { + writeScalar2(state, state.dump, level, iskey, inblock); + } + } else if (type2 === "[object Undefined]") { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException2("unacceptable kind of an object to dump " + type2); + } + if (state.tag !== null && state.tag !== "?") { + tagStr = encodeURI( + state.tag[0] === "!" ? state.tag.slice(1) : state.tag + ).replace(/!/g, "%21"); + if (state.tag[0] === "!") { + tagStr = "!" + tagStr; + } else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") { + tagStr = "!!" + tagStr.slice(18); + } else { + tagStr = "!<" + tagStr + ">"; + } + state.dump = tagStr + " " + state.dump; + } + } + return true; } - 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(makeNetworkError('not implemented... yet...')) + function getDuplicateReferences2(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode2(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); } - case 'http:': - case 'https:': { - // Return the result of running HTTP fetch given fetchParams. - - return httpFetch(fetchParams) - .catch((err) => makeNetworkError(err)) + function inspectNode2(object, objects, duplicatesIndexes) { + var objectKeyList, index, length; + if (object !== null && typeof object === "object") { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode2(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode2(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } } - default: { - return Promise.resolve(makeNetworkError('unknown scheme')) + function dump2(input, options2) { + options2 = options2 || {}; + var state = new State2(options2); + if (!state.noRefs) getDuplicateReferences2(input, state); + var value = input; + if (state.replacer) { + value = state.replacer.call({ "": value }, "", value); + } + if (writeNode2(state, 0, value, true, true)) return state.dump + "\n"; + return ""; } + module2.exports.dump = dump2; } -} - -// https://fetch.spec.whatwg.org/#finalize-response -function 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 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]] - - // 2. Set response’s timing info to the result of creating an opaque timing - // info for fetchParams’s timing info. - response.timingInfo = 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)) +// node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js +var require_js_yaml = __commonJS({ + "node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/index.js"(exports2, module2) { + "use strict"; + var loader2 = require_loader(); + var dumper2 = require_dumper(); + function renamed2(from, to) { + return function() { + throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default."); + }; } + module2.exports.Type = require_type2(); + module2.exports.Schema = require_schema(); + module2.exports.FAILSAFE_SCHEMA = require_failsafe(); + module2.exports.JSON_SCHEMA = require_json2(); + module2.exports.CORE_SCHEMA = require_core(); + module2.exports.DEFAULT_SCHEMA = require_default(); + module2.exports.load = loader2.load; + module2.exports.loadAll = loader2.loadAll; + module2.exports.dump = dumper2.dump; + module2.exports.YAMLException = require_exception(); + module2.exports.types = { + binary: require_binary(), + float: require_float(), + map: require_map(), + null: require_null(), + pairs: require_pairs(), + set: require_set(), + timestamp: require_timestamp(), + bool: require_bool(), + int: require_int(), + merge: require_merge(), + omap: require_omap(), + seq: require_seq(), + str: require_str() + }; + module2.exports.safeLoad = renamed2("safeLoad", "load"); + module2.exports.safeLoadAll = renamed2("safeLoadAll", "loadAll"); + module2.exports.safeDump = renamed2("safeDump", "dump"); } +}); - // 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) - } - - // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm - // and flushAlgorithm set to processResponseEndOfBody. - const transformStream = new TransformStream({ - start () {}, - transform: identityTransformAlgorithm, - flush: processResponseEndOfBody - }, { - size () { - return 1 +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/load-package-json.js +var require_load_package_json = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/load-package-json.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.loadPackageJson = loadPackageJson; + var node_fs_1 = __importDefault(__require("node:fs")); + var node_path_1 = __importDefault(__require("node:path")); + function loadPackageJson(filepath = node_path_1.default.join(process.cwd(), "package.json")) { + let pkgContent; + try { + pkgContent = node_fs_1.default.readFileSync(filepath, "utf8"); + } catch { + return {}; } - }, { - size () { - return 1 + try { + const pkg = pkgContent && JSON.parse(pkgContent); + if (pkg && typeof pkg === "object") { + return pkg; + } + return {}; + } catch { + return {}; } - }) - - // 4. Set response’s body to the result of piping response’s body through transformStream. - response.body = { stream: response.body.stream.pipeThrough(transformStream) } - } - - // 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 fullyReadBody(response.body, processBody, processBodyError) - } - return Promise.resolve() - } -} - -// https://fetch.spec.whatwg.org/#http-fetch -async function 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: - if (request.serviceWorkers === 'all') { - // TODO - } - - // 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 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' && - corsCheck(request, response) === 'failure' - ) { - return makeNetworkError('cors failure') - } - - // 5. If the TAO check for request and response returns failure, then set - // request’s timing allow failed flag. - if (TAOCheck(request, response) === 'failure') { - request.timingAllowFailed = true - } - } - - // 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') && - crossOriginResourcePolicyCheck( - request.origin, - request.client, - request.destination, - actualResponse - ) === 'blocked' - ) { - return makeNetworkError('blocked') - } - - // 8. If actualResponse’s status is a redirect status, then: - if (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 = 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 httpRedirectFetch(fetchParams, response) - } else { - assert(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 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 = responseLocationURL( - actualResponse, - 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(makeNetworkError(err)) - } - - // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network - // error. - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(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(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) && - !sameOrigin(request, locationURL) - ) { - return Promise.resolve(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(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(makeNetworkError()) +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/manifest-creation.js +var require_manifest_creation = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/manifest-creation.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ManifestCreation = void 0; + var node_fs_1 = __importDefault(__require("node:fs")); + var node_path_1 = __importDefault(__require("node:path")); + var js_yaml_1 = __importDefault(require_js_yaml()); + var update_dotenv_1 = __importDefault(require_update_dotenv()); + var probot_octokit_js_1 = require_probot_octokit(); + var load_package_json_js_1 = require_load_package_json(); + var ManifestCreation = class { + get pkg() { + return (0, load_package_json_js_1.loadPackageJson)(); + } + async createWebhookChannel() { + try { + const SmeeClient = (await import("smee-client")).default; + const WEBHOOK_PROXY_URL = await SmeeClient.createChannel(); + await this.updateEnv({ + WEBHOOK_PROXY_URL + }); + return WEBHOOK_PROXY_URL; + } catch (error) { + console.warn("Unable to connect to smee.io, try restarting your server."); + return void 0; + } + } + getManifest(pkg, baseUrl) { + let manifest = {}; + try { + const file = node_fs_1.default.readFileSync(node_path_1.default.join(process.cwd(), "app.yml"), "utf8"); + manifest = js_yaml_1.default.load(file); + } catch (error) { + if (error.code !== "ENOENT") { + throw error; + } + } + const generatedManifest = JSON.stringify({ + description: manifest.description || pkg.description, + hook_attributes: { + url: process.env.WEBHOOK_PROXY_URL || `${baseUrl}/` + }, + name: process.env.PROJECT_DOMAIN || manifest.name || pkg.name, + public: manifest.public || true, + redirect_url: `${baseUrl}/probot/setup`, + // TODO: add setup url + // setup_url:`${baseUrl}/probot/success`, + url: manifest.url || pkg.homepage || pkg.repository, + version: "v1", + ...manifest + }); + return generatedManifest; + } + async createAppFromCode(code, probotOptions) { + const octokit = new probot_octokit_js_1.ProbotOctokit(probotOptions); + const options2 = { + ...probotOptions, + code, + mediaType: { + previews: ["fury"] + // needed for GHES 2.20 and older + }, + ...process.env.GHE_HOST && { + baseUrl: `${process.env.GHE_PROTOCOL || "https"}://${process.env.GHE_HOST}/api/v3` + } + }; + const response = await octokit.request("POST /app-manifests/:code/conversions", options2); + const { id, client_id, client_secret, webhook_secret, pem } = response.data; + await this.updateEnv({ + APP_ID: id.toString(), + PRIVATE_KEY: `"${pem}"`, + WEBHOOK_SECRET: webhook_secret, + GITHUB_CLIENT_ID: client_id, + GITHUB_CLIENT_SECRET: client_secret + }); + return response.data.html_url; + } + async updateEnv(env) { + return (0, update_dotenv_1.default)(env); + } + get createAppUrl() { + const githubHost = process.env.GHE_HOST || `github.com`; + return `${process.env.GHE_PROTOCOL || "https"}://${githubHost}${process.env.GH_ORG ? `/organizations/${process.env.GH_ORG}` : ""}/settings/apps/new`; + } + }; + exports2.ManifestCreation = ManifestCreation; } +}); - // 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 && - !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 requestBodyHeader) { - request.headersList.delete(headerName) +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/is-production.js +var require_is_production = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/is-production.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isProduction = isProduction; + function isProduction() { + return process.env.NODE_ENV === "production"; } } +}); - // 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 (!sameOrigin(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') - } - - // 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) { - assert(request.body.source != null) - request.body = 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. - timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = - 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. - setRequestReferrerPolicyOnRedirect(request, actualResponse) - - // 20. Return the result of running main fetch given fetchParams and true. - return mainFetch(fetchParams, true) -} - -// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch -async function 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 = makeRequest(request) +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/import.js +var require_import = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/import.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.importView = importView; + function importView({ name, GH_HOST, WEBHOOK_PROXY_URL = "" }) { + return ` + - // 2. Set httpFetchParams to a copy of fetchParams. - httpFetchParams = { ...fetchParams } + + + + + Import ${name || "Your App"} | built with Probot + + + - // 3. Set httpFetchParams’s request to httpRequest. - httpFetchParams.request = httpRequest - } + +
+ Probot Logo +
+

Use existing Github App

+
- // 3. Let includeCredentials be true if one of - const includeCredentials = - request.credentials === 'include' || - (request.credentials === 'same-origin' && - request.responseTainting === 'basic') +

Step 1:

+

+ Replace your app's Webhook URL with
+ ${WEBHOOK_PROXY_URL} +

+ + You can do it here + - // 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 +
+

Step 2:

+

Fill out this form

+
+ +
- // 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 = 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) - } +
+

Need help?

+ +
+
+ + - // 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' - } +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/setup.js +var require_setup = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/setup.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setupView = setupView; + function setupView({ name, description, version, createAppUrl, manifest }) { + return ` + + + + + + + Setup ${name || "Your App"} | built with Probot + + + + +
+ Probot Logo +
+

+ Welcome to ${name || "your Probot App"} + ${version ? `v${version}` : ""} +

- // 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') - } +

${description ? description : 'This app was built using Probot, a framework for building GitHub Apps.'}

- // 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') - } +
+

Getting Started

- // 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') - } - } +

To start building a GitHub App, you'll need to register a new app on GitHub.

+
- // 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') - } +
+ + or use an existing Github App +
+
+
- // 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 (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append('accept-encoding', 'br, gzip, deflate') - } else { - httpRequest.headersList.append('accept-encoding', 'gzip, deflate') +
+

Need help?

+ +
+
+ +`; } } +}); - httpRequest.headersList.delete('host') - - // 20. If includeCredentials is true, then: - if (includeCredentials) { - // 1. If the user agent is not configured to block cookies for httpRequest - // (see section 7 of [COOKIES]), then: - // TODO: credentials - // 2. If httpRequest’s header list does not contain `Authorization`, then: - // TODO: credentials - } - - // 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' - } +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/success.js +var require_success = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/success.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.successView = successView; + function successView({ name }) { + return ` + + + + + + Setup ${name || "Your App"} | built with Probot + + + + +
+ Probot Logo +
+
+

Congrats! You have successfully installed your app! +
+ Checkout Receiving webhooks and Interacting with GitHub to learn more!

+
+
- // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", - // then: - if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { - // TODO: cache +
+

Need help?

+ +
+
+ +`; + } } +}); - // 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 makeNetworkError('only if cached') +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/apps/setup.js +var require_setup2 = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/apps/setup.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.setupAppFactory = void 0; + var node_child_process_1 = __require("node:child_process"); + var querystring_1 = __require("querystring"); + var express_1 = __importDefault(require_express2()); + var update_dotenv_1 = __importDefault(require_update_dotenv()); + var manifest_creation_js_1 = require_manifest_creation(); + var logging_middleware_js_1 = require_logging_middleware(); + var is_production_js_1 = require_is_production(); + var import_js_1 = require_import(); + var setup_js_1 = require_setup(); + var success_js_1 = require_success(); + var setupAppFactory = (host, port) => async function setupApp(app, { getRouter }) { + if (!getRouter) { + throw new Error("getRouter is required to use the setup app"); + } + const setup = new manifest_creation_js_1.ManifestCreation(); + const pkg = setup.pkg; + if (!(0, is_production_js_1.isProduction)() && !(process.env.PROJECT_DOMAIN || process.env.WEBHOOK_PROXY_URL || process.env.NO_SMEE_SETUP === "true")) { + await setup.createWebhookChannel(); + } + const route = getRouter(); + route.use((0, logging_middleware_js_1.getLoggingMiddleware)(app.log)); + printWelcomeMessage(app, host, port); + route.get("/probot", async (req, res) => { + const baseUrl = getBaseUrl(req); + const manifest = setup.getManifest(pkg, baseUrl); + const createAppUrl = setup.createAppUrl; + res.writeHead(200, { "content-type": "text/html" }).end((0, setup_js_1.setupView)({ + name: pkg.name, + version: pkg.version, + description: pkg.description, + createAppUrl, + manifest + })); + }); + route.get("/probot/setup", async (req, res) => { + var _a2; + const { code } = req.query || (0, querystring_1.parse)(((_a2 = req.url) == null ? void 0 : _a2.split("?")[1]) || ""); + if (!code || typeof code !== "string" || code.length === 0) { + res.writeHead(400, { "content-type": "text/plain" }).end("code missing or invalid"); + return; + } + const response = await setup.createAppFromCode(code, { + // @ts-expect-error + request: app.state.request + }); + if (process.env.PROJECT_DOMAIN) { + (0, node_child_process_1.exec)("refresh", (error) => { + if (error) { + app.log.error(error); + } + }); + } else { + printRestartMessage(app); + } + res.writeHead(302, { + "content-type": "text/plain", + location: `${response}/installations/new` + }).end(`Found. Redirecting to ${response}/installations/new`); + }); + const { WEBHOOK_PROXY_URL, GHE_HOST } = process.env; + const GH_HOST = `https://${GHE_HOST ?? "github.com"}`; + const importViewRendered = (0, import_js_1.importView)({ + name: pkg.name, + WEBHOOK_PROXY_URL, + GH_HOST + }); + route.get("/probot/import", (_req, res) => { + res.writeHead(200, { + "content-type": "text/html" + }).end(importViewRendered); + }); + route.post("/probot/import", express_1.default.json(), (req, res) => { + const { appId, pem, webhook_secret } = req.body; + if (!appId || !pem || !webhook_secret) { + res.writeHead(400, { + "content-type": "text/plain" + }).end("appId and/or pem and/or webhook_secret missing"); + return; + } + (0, update_dotenv_1.default)({ + APP_ID: appId, + PRIVATE_KEY: `"${pem}"`, + WEBHOOK_SECRET: webhook_secret + }); + res.end(); + printRestartMessage(app); + }); + const successViewRendered = (0, success_js_1.successView)({ name: pkg.name }); + route.get("/probot/success", (_req, res) => { + res.writeHead(200, { "content-type": "text/html" }).end(successViewRendered); + }); + route.get("/", (_req, res) => res.writeHead(302, { "content-type": "text/plain", location: `/probot` }).end(`Found. Redirecting to /probot`)); + }; + exports2.setupAppFactory = setupAppFactory; + function printWelcomeMessage(app, host, port) { + const domain2 = process.env.PROJECT_DOMAIN || `http://${host ?? "localhost"}:${port || 3e3}`; + [ + ``, + `Welcome to Probot!`, + `Probot is in setup mode, webhooks cannot be received and`, + `custom routes will not work until APP_ID and PRIVATE_KEY`, + `are configured in .env.`, + `Please follow the instructions at ${domain2} to configure .env.`, + `Once you are done, restart the server.`, + `` + ].forEach((line) => { + app.log.info(line); + }); } - - // 2. Let forwardResponse be the result of running HTTP-network fetch - // given httpFetchParams, includeCredentials, and isNewConnectionFetch. - const forwardResponse = await 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] - if ( - !safeMethodsSet.has(httpRequest.method) && - forwardResponse.status >= 200 && - forwardResponse.status <= 399 - ) { - // TODO: cache + function printRestartMessage(app) { + app.log.info(""); + app.log.info("Probot has been set up, please restart the server!"); + app.log.info(""); } - - // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, - // then: - if (revalidatingFlag && forwardResponse.status === 304) { - // TODO: cache + function getBaseUrl(req) { + var _a2; + const protocols = req.headers["x-forwarded-proto"] || // @ts-expect-error based on the functionality of express + ((_a2 = req.socket) == null ? void 0 : _a2.encrypted) ? "https" : "http"; + const protocol = typeof protocols === "string" ? protocols.split(",")[0] : protocols[0]; + const host = req.headers["x-forwarded-host"] || req.headers.host; + const baseUrl = `${protocol}://${host}`; + return baseUrl; } + } +}); - // 5. If response is null, then: - if (response == null) { - // 1. Set response to forwardResponse. - response = forwardResponse +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js +var require_error = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js"(exports2) { + var CommanderError = class extends Error { + /** + * Constructs the CommanderError class + * @param {number} exitCode suggested exit code which could be used with process.exit + * @param {string} code an id string representing the error + * @param {string} message human-readable description of the error + */ + constructor(exitCode, code, message) { + super(message); + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + this.code = code; + this.exitCode = exitCode; + this.nestedError = void 0; + } + }; + var InvalidArgumentError = class extends CommanderError { + /** + * Constructs the InvalidArgumentError class + * @param {string} [message] explanation of why argument is invalid + */ + constructor(message) { + super(1, "commander.invalidArgument", message); + Error.captureStackTrace(this, this.constructor); + this.name = this.constructor.name; + } + }; + exports2.CommanderError = CommanderError; + exports2.InvalidArgumentError = InvalidArgumentError; + } +}); - // 2. Store httpRequest and forwardResponse in httpCache, as per the - // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] - // TODO: cache +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/argument.js +var require_argument = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/argument.js"(exports2) { + var { InvalidArgumentError } = require_error(); + var Argument = class { + /** + * Initialize a new command argument with the given name and description. + * The default is that the argument is required, and you can explicitly + * indicate this with <> around the name. Put [] around the name for an optional argument. + * + * @param {string} name + * @param {string} [description] + */ + constructor(name, description) { + this.description = description || ""; + this.variadic = false; + this.parseArg = void 0; + this.defaultValue = void 0; + this.defaultValueDescription = void 0; + this.argChoices = void 0; + switch (name[0]) { + case "<": + this.required = true; + this._name = name.slice(1, -1); + break; + case "[": + this.required = false; + this._name = name.slice(1, -1); + break; + default: + this.required = true; + this._name = name; + break; + } + if (this._name.length > 3 && this._name.slice(-3) === "...") { + this.variadic = true; + this._name = this._name.slice(0, -3); + } + } + /** + * Return argument name. + * + * @return {string} + */ + name() { + return this._name; + } + /** + * @package + */ + _concatValue(value, previous) { + if (previous === this.defaultValue || !Array.isArray(previous)) { + return [value]; + } + return previous.concat(value); + } + /** + * Set the default value, and optionally supply the description to be displayed in the help. + * + * @param {*} value + * @param {string} [description] + * @return {Argument} + */ + default(value, description) { + this.defaultValue = value; + this.defaultValueDescription = description; + return this; + } + /** + * Set the custom handler for processing CLI command arguments into argument values. + * + * @param {Function} [fn] + * @return {Argument} + */ + argParser(fn) { + this.parseArg = fn; + return this; + } + /** + * Only allow argument value to be one of choices. + * + * @param {string[]} values + * @return {Argument} + */ + choices(values) { + this.argChoices = values.slice(); + this.parseArg = (arg, previous) => { + if (!this.argChoices.includes(arg)) { + throw new InvalidArgumentError( + `Allowed choices are ${this.argChoices.join(", ")}.` + ); + } + if (this.variadic) { + return this._concatValue(arg, previous); + } + return arg; + }; + return this; + } + /** + * Make argument required. + * + * @returns {Argument} + */ + argRequired() { + this.required = true; + return this; + } + /** + * Make argument optional. + * + * @returns {Argument} + */ + argOptional() { + this.required = false; + return this; + } + }; + function humanReadableArgName(arg) { + const nameOutput = arg.name() + (arg.variadic === true ? "..." : ""); + return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]"; } + exports2.Argument = Argument; + exports2.humanReadableArgName = humanReadableArgName; } +}); - // 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 +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/help.js +var require_help = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/help.js"(exports2) { + var { humanReadableArgName } = require_argument(); + var Help = class { + constructor() { + this.helpWidth = void 0; + this.sortSubcommands = false; + this.sortOptions = false; + this.showGlobalOptions = false; + } + /** + * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. + * + * @param {Command} cmd + * @returns {Command[]} + */ + visibleCommands(cmd) { + const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden); + const helpCommand = cmd._getHelpCommand(); + if (helpCommand && !helpCommand._hidden) { + visibleCommands.push(helpCommand); + } + if (this.sortSubcommands) { + visibleCommands.sort((a, b) => { + return a.name().localeCompare(b.name()); + }); + } + return visibleCommands; + } + /** + * Compare options for sort. + * + * @param {Option} a + * @param {Option} b + * @returns {number} + */ + compareOptions(a, b) { + const getSortKey = (option) => { + return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, ""); + }; + return getSortKey(a).localeCompare(getSortKey(b)); + } + /** + * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. + * + * @param {Command} cmd + * @returns {Option[]} + */ + visibleOptions(cmd) { + const visibleOptions = cmd.options.filter((option) => !option.hidden); + const helpOption = cmd._getHelpOption(); + if (helpOption && !helpOption.hidden) { + const removeShort = helpOption.short && cmd._findOption(helpOption.short); + const removeLong = helpOption.long && cmd._findOption(helpOption.long); + if (!removeShort && !removeLong) { + visibleOptions.push(helpOption); + } else if (helpOption.long && !removeLong) { + visibleOptions.push( + cmd.createOption(helpOption.long, helpOption.description) + ); + } else if (helpOption.short && !removeShort) { + visibleOptions.push( + cmd.createOption(helpOption.short, helpOption.description) + ); + } + } + if (this.sortOptions) { + visibleOptions.sort(this.compareOptions); + } + return visibleOptions; + } + /** + * Get an array of the visible global options. (Not including help.) + * + * @param {Command} cmd + * @returns {Option[]} + */ + visibleGlobalOptions(cmd) { + if (!this.showGlobalOptions) return []; + const globalOptions = []; + for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) { + const visibleOptions = ancestorCmd.options.filter( + (option) => !option.hidden + ); + globalOptions.push(...visibleOptions); + } + if (this.sortOptions) { + globalOptions.sort(this.compareOptions); + } + return globalOptions; + } + /** + * Get an array of the arguments if any have a description. + * + * @param {Command} cmd + * @returns {Argument[]} + */ + visibleArguments(cmd) { + if (cmd._argsDescription) { + cmd.registeredArguments.forEach((argument) => { + argument.description = argument.description || cmd._argsDescription[argument.name()] || ""; + }); + } + if (cmd.registeredArguments.find((argument) => argument.description)) { + return cmd.registeredArguments; + } + return []; + } + /** + * Get the command term to show in the list of subcommands. + * + * @param {Command} cmd + * @returns {string} + */ + subcommandTerm(cmd) { + const args = cmd.registeredArguments.map((arg) => humanReadableArgName(arg)).join(" "); + return cmd._name + (cmd._aliases[0] ? "|" + cmd._aliases[0] : "") + (cmd.options.length ? " [options]" : "") + // simplistic check for non-help option + (args ? " " + args : ""); + } + /** + * Get the option term to show in the list of options. + * + * @param {Option} option + * @returns {string} + */ + optionTerm(option) { + return option.flags; + } + /** + * Get the argument term to show in the list of arguments. + * + * @param {Argument} argument + * @returns {string} + */ + argumentTerm(argument) { + return argument.name(); + } + /** + * Get the longest command term length. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {number} + */ + longestSubcommandTermLength(cmd, helper) { + return helper.visibleCommands(cmd).reduce((max, command) => { + return Math.max(max, helper.subcommandTerm(command).length); + }, 0); + } + /** + * Get the longest option term length. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {number} + */ + longestOptionTermLength(cmd, helper) { + return helper.visibleOptions(cmd).reduce((max, option) => { + return Math.max(max, helper.optionTerm(option).length); + }, 0); + } + /** + * Get the longest global option term length. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {number} + */ + longestGlobalOptionTermLength(cmd, helper) { + return helper.visibleGlobalOptions(cmd).reduce((max, option) => { + return Math.max(max, helper.optionTerm(option).length); + }, 0); + } + /** + * Get the longest argument term length. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {number} + */ + longestArgumentTermLength(cmd, helper) { + return helper.visibleArguments(cmd).reduce((max, argument) => { + return Math.max(max, helper.argumentTerm(argument).length); + }, 0); + } + /** + * Get the command usage to be displayed at the top of the built-in help. + * + * @param {Command} cmd + * @returns {string} + */ + commandUsage(cmd) { + let cmdName = cmd._name; + if (cmd._aliases[0]) { + cmdName = cmdName + "|" + cmd._aliases[0]; + } + let ancestorCmdNames = ""; + for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) { + ancestorCmdNames = ancestorCmd.name() + " " + ancestorCmdNames; + } + return ancestorCmdNames + cmdName + " " + cmd.usage(); + } + /** + * Get the description for the command. + * + * @param {Command} cmd + * @returns {string} + */ + commandDescription(cmd) { + return cmd.description(); + } + /** + * Get the subcommand summary to show in the list of subcommands. + * (Fallback to description for backwards compatibility.) + * + * @param {Command} cmd + * @returns {string} + */ + subcommandDescription(cmd) { + return cmd.summary() || cmd.description(); + } + /** + * Get the option description to show in the list of options. + * + * @param {Option} option + * @return {string} + */ + optionDescription(option) { + const extraInfo = []; + if (option.argChoices) { + extraInfo.push( + // use stringify to match the display of the default value + `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}` + ); + } + if (option.defaultValue !== void 0) { + const showDefault = option.required || option.optional || option.isBoolean() && typeof option.defaultValue === "boolean"; + if (showDefault) { + extraInfo.push( + `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}` + ); + } + } + if (option.presetArg !== void 0 && option.optional) { + extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`); + } + if (option.envVar !== void 0) { + extraInfo.push(`env: ${option.envVar}`); + } + if (extraInfo.length > 0) { + return `${option.description} (${extraInfo.join(", ")})`; + } + return option.description; + } + /** + * Get the argument description to show in the list of arguments. + * + * @param {Argument} argument + * @return {string} + */ + argumentDescription(argument) { + const extraInfo = []; + if (argument.argChoices) { + extraInfo.push( + // use stringify to match the display of the default value + `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}` + ); + } + if (argument.defaultValue !== void 0) { + extraInfo.push( + `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}` + ); + } + if (extraInfo.length > 0) { + const extraDescripton = `(${extraInfo.join(", ")})`; + if (argument.description) { + return `${argument.description} ${extraDescripton}`; + } + return extraDescripton; + } + return argument.description; + } + /** + * Generate the built-in help text. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {string} + */ + formatHelp(cmd, helper) { + const termWidth = helper.padWidth(cmd, helper); + const helpWidth = helper.helpWidth || 80; + const itemIndentWidth = 2; + const itemSeparatorWidth = 2; + function formatItem(term, description) { + if (description) { + const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`; + return helper.wrap( + fullText, + helpWidth - itemIndentWidth, + termWidth + itemSeparatorWidth + ); + } + return term; + } + function formatList(textArray) { + return textArray.join("\n").replace(/^/gm, " ".repeat(itemIndentWidth)); + } + let output = [`Usage: ${helper.commandUsage(cmd)}`, ""]; + const commandDescription = helper.commandDescription(cmd); + if (commandDescription.length > 0) { + output = output.concat([ + helper.wrap(commandDescription, helpWidth, 0), + "" + ]); + } + const argumentList = helper.visibleArguments(cmd).map((argument) => { + return formatItem( + helper.argumentTerm(argument), + helper.argumentDescription(argument) + ); + }); + if (argumentList.length > 0) { + output = output.concat(["Arguments:", formatList(argumentList), ""]); + } + const optionList = helper.visibleOptions(cmd).map((option) => { + return formatItem( + helper.optionTerm(option), + helper.optionDescription(option) + ); + }); + if (optionList.length > 0) { + output = output.concat(["Options:", formatList(optionList), ""]); + } + if (this.showGlobalOptions) { + const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => { + return formatItem( + helper.optionTerm(option), + helper.optionDescription(option) + ); + }); + if (globalOptionList.length > 0) { + output = output.concat([ + "Global Options:", + formatList(globalOptionList), + "" + ]); + } + } + const commandList = helper.visibleCommands(cmd).map((cmd2) => { + return formatItem( + helper.subcommandTerm(cmd2), + helper.subcommandDescription(cmd2) + ); + }); + if (commandList.length > 0) { + output = output.concat(["Commands:", formatList(commandList), ""]); + } + return output.join("\n"); + } + /** + * Calculate the pad width from the maximum term length. + * + * @param {Command} cmd + * @param {Help} helper + * @returns {number} + */ + padWidth(cmd, helper) { + return Math.max( + helper.longestOptionTermLength(cmd, helper), + helper.longestGlobalOptionTermLength(cmd, helper), + helper.longestSubcommandTermLength(cmd, helper), + helper.longestArgumentTermLength(cmd, helper) + ); + } + /** + * Wrap the given string to width characters per line, with lines after the first indented. + * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted. + * + * @param {string} str + * @param {number} width + * @param {number} indent + * @param {number} [minColumnWidth=40] + * @return {string} + * + */ + wrap(str2, width, indent, minColumnWidth = 40) { + const indents = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF"; + const manualIndent = new RegExp(`[\\n][${indents}]+`); + if (str2.match(manualIndent)) return str2; + const columnWidth = width - indent; + if (columnWidth < minColumnWidth) return str2; + const leadingStr = str2.slice(0, indent); + const columnText = str2.slice(indent).replace("\r\n", "\n"); + const indentString2 = " ".repeat(indent); + const zeroWidthSpace = "\u200B"; + const breaks = `\\s${zeroWidthSpace}`; + const regex2 = new RegExp( + ` +|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, + "g" + ); + const lines = columnText.match(regex2) || []; + return leadingStr + lines.map((line, i) => { + if (line === "\n") return ""; + return (i > 0 ? indentString2 : "") + line.trimEnd(); + }).join("\n"); + } + }; + exports2.Help = Help; } +}); - // 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 makeNetworkError() +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/option.js +var require_option = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/option.js"(exports2) { + var { InvalidArgumentError } = require_error(); + var Option = class { + /** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {string} flags + * @param {string} [description] + */ + constructor(flags, description) { + this.flags = flags; + this.description = description || ""; + this.required = flags.includes("<"); + this.optional = flags.includes("["); + this.variadic = /\w\.\.\.[>\]]$/.test(flags); + this.mandatory = false; + const optionFlags = splitOptionFlags(flags); + this.short = optionFlags.shortFlag; + this.long = optionFlags.longFlag; + this.negate = false; + if (this.long) { + this.negate = this.long.startsWith("--no-"); + } + this.defaultValue = void 0; + this.defaultValueDescription = void 0; + this.presetArg = void 0; + this.envVar = void 0; + this.parseArg = void 0; + this.hidden = false; + this.argChoices = void 0; + this.conflictsWith = []; + this.implied = void 0; + } + /** + * Set the default value, and optionally supply the description to be displayed in the help. + * + * @param {*} value + * @param {string} [description] + * @return {Option} + */ + default(value, description) { + this.defaultValue = value; + this.defaultValueDescription = description; + return this; + } + /** + * Preset to use when option used without option-argument, especially optional but also boolean and negated. + * The custom processing (parseArg) is called. + * + * @example + * new Option('--color').default('GREYSCALE').preset('RGB'); + * new Option('--donate [amount]').preset('20').argParser(parseFloat); + * + * @param {*} arg + * @return {Option} + */ + preset(arg) { + this.presetArg = arg; + return this; + } + /** + * Add option name(s) that conflict with this option. + * An error will be displayed if conflicting options are found during parsing. + * + * @example + * new Option('--rgb').conflicts('cmyk'); + * new Option('--js').conflicts(['ts', 'jsx']); + * + * @param {(string | string[])} names + * @return {Option} + */ + conflicts(names) { + this.conflictsWith = this.conflictsWith.concat(names); + return this; + } + /** + * Specify implied option values for when this option is set and the implied options are not. + * + * The custom processing (parseArg) is not called on the implied values. + * + * @example + * program + * .addOption(new Option('--log', 'write logging information to file')) + * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' })); + * + * @param {object} impliedOptionValues + * @return {Option} + */ + implies(impliedOptionValues) { + let newImplied = impliedOptionValues; + if (typeof impliedOptionValues === "string") { + newImplied = { [impliedOptionValues]: true }; + } + this.implied = Object.assign(this.implied || {}, newImplied); + return this; + } + /** + * Set environment variable to check for option value. + * + * An environment variable is only used if when processed the current option value is + * undefined, or the source of the current value is 'default' or 'config' or 'env'. + * + * @param {string} name + * @return {Option} + */ + env(name) { + this.envVar = name; + return this; + } + /** + * Set the custom handler for processing CLI option arguments into option values. + * + * @param {Function} [fn] + * @return {Option} + */ + argParser(fn) { + this.parseArg = fn; + return this; + } + /** + * Whether the option is mandatory and must have a value after parsing. + * + * @param {boolean} [mandatory=true] + * @return {Option} + */ + makeOptionMandatory(mandatory = true) { + this.mandatory = !!mandatory; + return this; + } + /** + * Hide option in help. + * + * @param {boolean} [hide=true] + * @return {Option} + */ + hideHelp(hide = true) { + this.hidden = !!hide; + return this; + } + /** + * @package + */ + _concatValue(value, previous) { + if (previous === this.defaultValue || !Array.isArray(previous)) { + return [value]; + } + return previous.concat(value); + } + /** + * Only allow option value to be one of choices. + * + * @param {string[]} values + * @return {Option} + */ + choices(values) { + this.argChoices = values.slice(); + this.parseArg = (arg, previous) => { + if (!this.argChoices.includes(arg)) { + throw new InvalidArgumentError( + `Allowed choices are ${this.argChoices.join(", ")}.` + ); + } + if (this.variadic) { + return this._concatValue(arg, previous); + } + return arg; + }; + return this; + } + /** + * Return option name. + * + * @return {string} + */ + name() { + if (this.long) { + return this.long.replace(/^--/, ""); + } + return this.short.replace(/^-/, ""); + } + /** + * Return option name, in a camelcase format that can be used + * as a object attribute key. + * + * @return {string} + */ + attributeName() { + return camelcase(this.name().replace(/^no-/, "")); + } + /** + * Check if `arg` matches the short or long flag. + * + * @param {string} arg + * @return {boolean} + * @package + */ + is(arg) { + return this.short === arg || this.long === arg; + } + /** + * Return whether a boolean option. + * + * Options are one of boolean, negated, required argument, or optional argument. + * + * @return {boolean} + * @package + */ + isBoolean() { + return !this.required && !this.optional && !this.negate; + } + }; + var DualOptions = class { + /** + * @param {Option[]} options + */ + constructor(options2) { + this.positiveOptions = /* @__PURE__ */ new Map(); + this.negativeOptions = /* @__PURE__ */ new Map(); + this.dualOptions = /* @__PURE__ */ new Set(); + options2.forEach((option) => { + if (option.negate) { + this.negativeOptions.set(option.attributeName(), option); + } else { + this.positiveOptions.set(option.attributeName(), option); + } + }); + this.negativeOptions.forEach((value, key) => { + if (this.positiveOptions.has(key)) { + this.dualOptions.add(key); + } + }); + } + /** + * Did the value come from the option, and not from possible matching dual option? + * + * @param {*} value + * @param {Option} option + * @returns {boolean} + */ + valueFromOption(value, option) { + const optionKey = option.attributeName(); + if (!this.dualOptions.has(optionKey)) return true; + const preset = this.negativeOptions.get(optionKey).presetArg; + const negativeValue = preset !== void 0 ? preset : false; + return option.negate === (negativeValue === value); + } + }; + function camelcase(str2) { + return str2.split("-").reduce((str3, word) => { + return str3 + word[0].toUpperCase() + word.slice(1); + }); } - - // 2. ??? - - // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) + function splitOptionFlags(flags) { + let shortFlag; + let longFlag; + const flagParts = flags.split(/[ |,]+/); + if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) + shortFlag = flagParts.shift(); + longFlag = flagParts.shift(); + if (!shortFlag && /^-[^-]$/.test(longFlag)) { + shortFlag = longFlag; + longFlag = void 0; + } + return { shortFlag, longFlag }; } - - // 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 makeNetworkError('proxy authentication required') + exports2.Option = Option; + exports2.DualOptions = DualOptions; } +}); - // 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 (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams) +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js +var require_suggestSimilar = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js"(exports2) { + var maxDistance = 3; + function editDistance(a, b) { + if (Math.abs(a.length - b.length) > maxDistance) + return Math.max(a.length, b.length); + const d = []; + for (let i = 0; i <= a.length; i++) { + d[i] = [i]; + } + for (let j = 0; j <= b.length; j++) { + d[0][j] = j; + } + for (let j = 1; j <= b.length; j++) { + for (let i = 1; i <= a.length; i++) { + let cost = 1; + if (a[i - 1] === b[j - 1]) { + cost = 0; + } else { + cost = 1; + } + d[i][j] = Math.min( + d[i - 1][j] + 1, + // deletion + d[i][j - 1] + 1, + // insertion + d[i - 1][j - 1] + cost + // substitution + ); + if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { + d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1); + } + } + } + return d[a.length][b.length]; + } + function suggestSimilar(word, candidates) { + if (!candidates || candidates.length === 0) return ""; + candidates = Array.from(new Set(candidates)); + const searchingOptions = word.startsWith("--"); + if (searchingOptions) { + word = word.slice(2); + candidates = candidates.map((candidate) => candidate.slice(2)); + } + let similar = []; + let bestDistance = maxDistance; + const minSimilarity = 0.4; + candidates.forEach((candidate) => { + if (candidate.length <= 1) return; + const distance = editDistance(word, candidate); + const length = Math.max(word.length, candidate.length); + const similarity = (length - distance) / length; + if (similarity > minSimilarity) { + if (distance < bestDistance) { + bestDistance = distance; + similar = [candidate]; + } else if (distance === bestDistance) { + similar.push(candidate); + } + } + }); + similar.sort((a, b) => a.localeCompare(b)); + if (searchingOptions) { + similar = similar.map((candidate) => `--${candidate}`); + } + if (similar.length > 1) { + return ` +(Did you mean one of ${similar.join(", ")}?)`; + } + if (similar.length === 1) { + return ` +(Did you mean ${similar[0]}?)`; + } + return ""; } - - // 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 httpNetworkOrCacheFetch( - fetchParams, - isAuthenticationFetch, - true - ) + exports2.suggestSimilar = suggestSimilar; } +}); - // 17. If isAuthenticationFetch is true, then create an authentication entry - if (isAuthenticationFetch) { - // TODO - } - - // 18. Return response. - return response -} - -// https://fetch.spec.whatwg.org/#http-network-fetch -async function httpNetworkFetch ( - fetchParams, - includeCredentials = false, - forceNewConnection = false -) { - 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 DOMException('The operation was aborted.', 'AbortError')) +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js +var require_command = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js"(exports2) { + var EventEmitter = __require("node:events").EventEmitter; + var childProcess = __require("node:child_process"); + var path2 = __require("node:path"); + var fs2 = __require("node:fs"); + var process2 = __require("node:process"); + var { Argument, humanReadableArgName } = require_argument(); + var { CommanderError } = require_error(); + var { Help } = require_help(); + var { Option, DualOptions } = require_option(); + var { suggestSimilar } = require_suggestSimilar(); + var Command = class _Command extends EventEmitter { + /** + * Initialize a new `Command`. + * + * @param {string} [name] + */ + constructor(name) { + super(); + this.commands = []; + this.options = []; + this.parent = null; + this._allowUnknownOption = false; + this._allowExcessArguments = true; + this.registeredArguments = []; + this._args = this.registeredArguments; + this.args = []; + this.rawArgs = []; + this.processedArgs = []; + this._scriptPath = null; + this._name = name || ""; + this._optionValues = {}; + this._optionValueSources = {}; + this._storeOptionsAsProperties = false; + this._actionHandler = null; + this._executableHandler = false; + this._executableFile = null; + this._executableDir = null; + this._defaultCommandName = null; + this._exitCallback = null; + this._aliases = []; + this._combineFlagAndOptionalValue = true; + this._description = ""; + this._summary = ""; + this._argsDescription = void 0; + this._enablePositionalOptions = false; + this._passThroughOptions = false; + this._lifeCycleHooks = {}; + this._showHelpAfterError = false; + this._showSuggestionAfterError = true; + this._outputConfiguration = { + writeOut: (str2) => process2.stdout.write(str2), + writeErr: (str2) => process2.stderr.write(str2), + getOutHelpWidth: () => process2.stdout.isTTY ? process2.stdout.columns : void 0, + getErrHelpWidth: () => process2.stderr.isTTY ? process2.stderr.columns : void 0, + outputError: (str2, write) => write(str2) + }; + this._hidden = false; + this._helpOption = void 0; + this._addImplicitHelpCommand = void 0; + this._helpCommand = void 0; + this._helpConfiguration = {}; + } + /** + * Copy settings that are useful to have in common across root command and subcommands. + * + * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.) + * + * @param {Command} sourceCommand + * @return {Command} `this` command for chaining + */ + copyInheritedSettings(sourceCommand) { + this._outputConfiguration = sourceCommand._outputConfiguration; + this._helpOption = sourceCommand._helpOption; + this._helpCommand = sourceCommand._helpCommand; + this._helpConfiguration = sourceCommand._helpConfiguration; + this._exitCallback = sourceCommand._exitCallback; + this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties; + this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue; + this._allowExcessArguments = sourceCommand._allowExcessArguments; + this._enablePositionalOptions = sourceCommand._enablePositionalOptions; + this._showHelpAfterError = sourceCommand._showHelpAfterError; + this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError; + return this; + } + /** + * @returns {Command[]} + * @private + */ + _getCommandAndAncestors() { + const result = []; + for (let command = this; command; command = command.parent) { + result.push(command); + } + return result; + } + /** + * Define a command. + * + * There are two styles of command: pay attention to where to put the description. + * + * @example + * // Command implemented using action handler (description is supplied separately to `.command`) + * program + * .command('clone [destination]') + * .description('clone a repository into a newly created directory') + * .action((source, destination) => { + * console.log('clone command called'); + * }); + * + * // Command implemented using separate executable file (description is second parameter to `.command`) + * program + * .command('start ', 'start named service') + * .command('stop [service]', 'stop named service, or all if no name supplied'); + * + * @param {string} nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` + * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) + * @param {object} [execOpts] - configuration options (for executable) + * @return {Command} returns new command for action handler, or `this` for executable command + */ + command(nameAndArgs, actionOptsOrExecDesc, execOpts) { + let desc = actionOptsOrExecDesc; + let opts = execOpts; + if (typeof desc === "object" && desc !== null) { + opts = desc; + desc = null; + } + opts = opts || {}; + const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/); + const cmd = this.createCommand(name); + if (desc) { + cmd.description(desc); + cmd._executableHandler = true; + } + if (opts.isDefault) this._defaultCommandName = cmd._name; + cmd._hidden = !!(opts.noHelp || opts.hidden); + cmd._executableFile = opts.executableFile || null; + if (args) cmd.arguments(args); + this._registerCommand(cmd); + cmd.parent = this; + cmd.copyInheritedSettings(this); + if (desc) return this; + return cmd; + } + /** + * Factory routine to create a new unattached command. + * + * See .command() for creating an attached subcommand, which uses this routine to + * create the command. You can override createCommand to customise subcommands. + * + * @param {string} [name] + * @return {Command} new command + */ + createCommand(name) { + return new _Command(name); + } + /** + * You can customise the help with a subclass of Help by overriding createHelp, + * or by overriding Help properties using configureHelp(). + * + * @return {Help} + */ + createHelp() { + return Object.assign(new Help(), this.configureHelp()); + } + /** + * You can customise the help by overriding Help properties using configureHelp(), + * or with a subclass of Help by overriding createHelp(). + * + * @param {object} [configuration] - configuration options + * @return {(Command | object)} `this` command for chaining, or stored configuration + */ + configureHelp(configuration) { + if (configuration === void 0) return this._helpConfiguration; + this._helpConfiguration = configuration; + return this; + } + /** + * The default output goes to stdout and stderr. You can customise this for special + * applications. You can also customise the display of errors by overriding outputError. + * + * The configuration properties are all functions: + * + * // functions to change where being written, stdout and stderr + * writeOut(str) + * writeErr(str) + * // matching functions to specify width for wrapping help + * getOutHelpWidth() + * getErrHelpWidth() + * // functions based on what is being written out + * outputError(str, write) // used for displaying errors, and not used for displaying help + * + * @param {object} [configuration] - configuration options + * @return {(Command | object)} `this` command for chaining, or stored configuration + */ + configureOutput(configuration) { + if (configuration === void 0) return this._outputConfiguration; + Object.assign(this._outputConfiguration, configuration); + return this; + } + /** + * Display the help or a custom message after an error occurs. + * + * @param {(boolean|string)} [displayHelp] + * @return {Command} `this` command for chaining + */ + showHelpAfterError(displayHelp = true) { + if (typeof displayHelp !== "string") displayHelp = !!displayHelp; + this._showHelpAfterError = displayHelp; + return this; } - } - } - - // 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: - if (request.mode === 'websocket') { - // Let connection be the result of obtaining a WebSocket connection, - // given request’s current URL. - // TODO - } else { - // Let connection be the result of obtaining a connection, given - // networkPartitionKey, request’s current URL’s origin, - // includeCredentials, and forceNewConnection. - // TODO - } - - // 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 (isCancelled(fetchParams)) { - return + /** + * Display suggestion of similar commands for unknown commands, or options for unknown options. + * + * @param {boolean} [displaySuggestion] + * @return {Command} `this` command for chaining + */ + showSuggestionAfterError(displaySuggestion = true) { + this._showSuggestionAfterError = !!displaySuggestion; + return this; } - - // 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 (isCancelled(fetchParams)) { - return + /** + * Add a prepared subcommand. + * + * See .command() for creating an attached subcommand which inherits settings from its parent. + * + * @param {Command} cmd - new subcommand + * @param {object} [opts] - configuration options + * @return {Command} `this` command for chaining + */ + addCommand(cmd, opts) { + if (!cmd._name) { + throw new Error(`Command passed to .addCommand() must have a name +- specify the name in Command constructor or using .name()`); + } + opts = opts || {}; + if (opts.isDefault) this._defaultCommandName = cmd._name; + if (opts.noHelp || opts.hidden) cmd._hidden = true; + this._registerCommand(cmd); + cmd.parent = this; + cmd._checkForBrokenPassThrough(); + return this; } - - // 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() + /** + * Factory routine to create a new unattached argument. + * + * See .argument() for creating an attached argument, which uses this routine to + * create the argument. You can override createArgument to return a custom argument. + * + * @param {string} name + * @param {string} [description] + * @return {Argument} new argument + */ + createArgument(name, description) { + return new Argument(name, description); } - } - - // 3. Let processBodyError given e be these steps: - const processBodyError = (e) => { - // 1. If fetchParams is canceled, then abort these steps. - if (isCancelled(fetchParams)) { - return + /** + * Define argument syntax for command. + * + * The default is that the argument is required, and you can explicitly + * indicate this with <> around the name. Put [] around the name for an optional argument. + * + * @example + * program.argument(''); + * program.argument('[output-file]'); + * + * @param {string} name + * @param {string} [description] + * @param {(Function|*)} [fn] - custom argument processing function + * @param {*} [defaultValue] + * @return {Command} `this` command for chaining + */ + argument(name, description, fn, defaultValue) { + const argument = this.createArgument(name, description); + if (typeof fn === "function") { + argument.default(defaultValue).argParser(fn); + } else { + argument.default(fn); + } + this.addArgument(argument); + return this; } - - // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. - if (e.name === 'AbortError') { - fetchParams.controller.abort() - } else { - fetchParams.controller.terminate(e) + /** + * Define argument syntax for command, adding multiple at once (without descriptions). + * + * See also .argument(). + * + * @example + * program.arguments(' [env]'); + * + * @param {string} names + * @return {Command} `this` command for chaining + */ + arguments(names) { + names.trim().split(/ +/).forEach((detail) => { + this.argument(detail); + }); + return this; } - } - - // 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) + /** + * Define argument syntax for command, adding a prepared argument. + * + * @param {Argument} argument + * @return {Command} `this` command for chaining + */ + addArgument(argument) { + const previousArgument = this.registeredArguments.slice(-1)[0]; + if (previousArgument && previousArgument.variadic) { + throw new Error( + `only the last argument can be variadic '${previousArgument.name()}'` + ); } - processEndOfBody() - } catch (err) { - processBodyError(err) + if (argument.required && argument.defaultValue !== void 0 && argument.parseArg === void 0) { + throw new Error( + `a default value for a required argument is never used: '${argument.name()}'` + ); + } + this.registeredArguments.push(argument); + return this; } - })() - } - - try { - // socket is only provided for websockets - const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }) - - if (socket) { - response = makeResponse({ status, statusText, headersList, socket }) - } else { - const iterator = body[Symbol.asyncIterator]() - fetchParams.controller.next = () => iterator.next() - - response = makeResponse({ status, statusText, 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 makeAppropriateNetworkError(fetchParams, err) - } - - return 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 (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) - } - - const stream = new ReadableStream( - { - async start (controller) { - fetchParams.controller.controller = controller - }, - async pull (controller) { - await pullAlgorithm(controller) - }, - async cancel (reason) { - await cancelAlgorithm(reason) + /** + * Customise or override default help command. By default a help command is automatically added if your command has subcommands. + * + * @example + * program.helpCommand('help [cmd]'); + * program.helpCommand('help [cmd]', 'show help'); + * program.helpCommand(false); // suppress default help command + * program.helpCommand(true); // add help command even if no subcommands + * + * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added + * @param {string} [description] - custom description + * @return {Command} `this` command for chaining + */ + helpCommand(enableOrNameAndArgs, description) { + if (typeof enableOrNameAndArgs === "boolean") { + this._addImplicitHelpCommand = enableOrNameAndArgs; + return this; + } + enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]"; + const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/); + const helpDescription = description ?? "display help for command"; + const helpCommand = this.createCommand(helpName); + helpCommand.helpOption(false); + if (helpArgs) helpCommand.arguments(helpArgs); + if (helpDescription) helpCommand.description(helpDescription); + this._addImplicitHelpCommand = true; + this._helpCommand = helpCommand; + return this; } - }, - { - highWaterMark: 0, - size () { - return 1 + /** + * Add prepared custom help command. + * + * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()` + * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only + * @return {Command} `this` command for chaining + */ + addHelpCommand(helpCommand, deprecatedDescription) { + if (typeof helpCommand !== "object") { + this.helpCommand(helpCommand, deprecatedDescription); + return this; + } + this._addImplicitHelpCommand = true; + this._helpCommand = helpCommand; + return this; } - } - ) - - // 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 } - - // 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, value } = await fetchParams.controller.next() - - if (isAborted(fetchParams)) { - break + /** + * Lazy create help command. + * + * @return {(Command|null)} + * @package + */ + _getHelpCommand() { + const hasImplicitHelpCommand = this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help")); + if (hasImplicitHelpCommand) { + if (this._helpCommand === void 0) { + this.helpCommand(void 0, void 0); + } + return this._helpCommand; } - - bytes = done ? undefined : value - } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - // zlib doesn't like empty streams. - bytes = undefined + return null; + } + /** + * Add hook for life cycle event. + * + * @param {string} event + * @param {Function} listener + * @return {Command} `this` command for chaining + */ + hook(event, listener) { + const allowedValues = ["preSubcommand", "preAction", "postAction"]; + if (!allowedValues.includes(event)) { + throw new Error(`Unexpected value for event passed to hook : '${event}'. +Expecting one of '${allowedValues.join("', '")}'`); + } + if (this._lifeCycleHooks[event]) { + this._lifeCycleHooks[event].push(listener); } 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 + this._lifeCycleHooks[event] = [listener]; } + return this; } - - 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. - readableStreamClose(fetchParams.controller.controller) - - finalizeResponse(fetchParams, response) - - return + /** + * Register callback to use as replacement for calling process.exit. + * + * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing + * @return {Command} `this` command for chaining + */ + exitOverride(fn) { + if (fn) { + this._exitCallback = fn; + } else { + this._exitCallback = (err) => { + if (err.code !== "commander.executeSubCommandAsync") { + throw err; + } else { + } + }; + } + return this; } - - // 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 + /** + * Call process.exit, and _exitCallback if defined. + * + * @param {number} exitCode exit code for using with process.exit + * @param {string} code an id string representing the error + * @param {string} message human-readable description of the error + * @return never + * @private + */ + _exit(exitCode, code, message) { + if (this._exitCallback) { + this._exitCallback(new CommanderError(exitCode, code, message)); + } + process2.exit(exitCode); } - - // 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 (isErrored(stream)) { - fetchParams.controller.terminate() - return + /** + * Register callback `fn` for the command. + * + * @example + * program + * .command('serve') + * .description('start service') + * .action(function() { + * // do work here + * }); + * + * @param {Function} fn + * @return {Command} `this` command for chaining + */ + action(fn) { + const listener = (args) => { + const expectedArgsCount = this.registeredArguments.length; + const actionArgs = args.slice(0, expectedArgsCount); + if (this._storeOptionsAsProperties) { + actionArgs[expectedArgsCount] = this; + } else { + actionArgs[expectedArgsCount] = this.opts(); + } + actionArgs.push(this); + return fn.apply(this, actionArgs); + }; + this._actionHandler = listener; + return this; } - - // 9. If stream doesn’t need more data ask the user agent to suspend - // the ongoing fetch. - if (!fetchParams.controller.controller.desiredSize) { - return + /** + * Factory routine to create a new unattached option. + * + * See .option() for creating an attached option, which uses this routine to + * create the option. You can override createOption to return a custom option. + * + * @param {string} flags + * @param {string} [description] + * @return {Option} new option + */ + createOption(flags, description) { + return new Option(flags, description); } - } - } - - // 2. If aborted, then: - function onAborted (reason) { - // 2. If fetchParams is aborted, then: - if (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 (isReadable(stream)) { - fetchParams.controller.controller.error( - fetchParams.controller.serializedAbortReason - ) + /** + * Wrap parseArgs to catch 'commander.invalidArgument'. + * + * @param {(Option | Argument)} target + * @param {string} value + * @param {*} previous + * @param {string} invalidArgumentMessage + * @private + */ + _callParseArg(target, value, previous, invalidArgumentMessage) { + try { + return target.parseArg(value, previous); + } catch (err) { + if (err.code === "commander.invalidArgument") { + const message = `${invalidArgumentMessage} ${err.message}`; + this.error(message, { exitCode: err.exitCode, code: err.code }); + } + throw err; + } } - } else { - // 3. Otherwise, if stream is readable, error stream with a TypeError. - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError('terminated', { - cause: isErrorLike(reason) ? reason : undefined - })) + /** + * Check for option flag conflicts. + * Register option if no conflicts found, or throw on conflict. + * + * @param {Option} option + * @private + */ + _registerOption(option) { + const matchingOption = option.short && this._findOption(option.short) || option.long && this._findOption(option.long); + if (matchingOption) { + const matchingFlag = option.long && this._findOption(option.long) ? option.long : option.short; + throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}' +- already used by option '${matchingOption.flags}'`); + } + this.options.push(option); } - } - - // 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() - } - - // 20. Return response. - return response - - async function dispatch ({ body }) { - const url = 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 } = fetchParams.controller - - if (connection.destroyed) { - abort(new DOMException('The operation was aborted.', 'AbortError')) - } else { - fetchParams.controller.on('terminated', abort) - this.abort = connection.abort = abort + /** + * Check for command name and alias conflicts with existing commands. + * Register command if no conflicts found, or throw on conflict. + * + * @param {Command} command + * @private + */ + _registerCommand(command) { + const knownBy = (cmd) => { + return [cmd.name()].concat(cmd.aliases()); + }; + const alreadyUsed = knownBy(command).find( + (name) => this._findCommand(name) + ); + if (alreadyUsed) { + const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|"); + const newCmd = knownBy(command).join("|"); + throw new Error( + `cannot add command '${newCmd}' as already have command '${existingCmd}'` + ); + } + this.commands.push(command); + } + /** + * Add an option. + * + * @param {Option} option + * @return {Command} `this` command for chaining + */ + addOption(option) { + this._registerOption(option); + const oname = option.name(); + const name = option.attributeName(); + if (option.negate) { + const positiveLongFlag = option.long.replace(/^--no-/, "--"); + if (!this._findOption(positiveLongFlag)) { + this.setOptionValueWithSource( + name, + option.defaultValue === void 0 ? true : option.defaultValue, + "default" + ); } - }, - - onHeaders (status, headersList, resume, statusText) { - if (status < 200) { - return + } else if (option.defaultValue !== void 0) { + this.setOptionValueWithSource(name, option.defaultValue, "default"); + } + const handleOptionValue = (val, invalidValueMessage, valueSource) => { + if (val == null && option.presetArg !== void 0) { + val = option.presetArg; } - - let codings = [] - let location = '' - - const headers = new 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[kHeadersList].append(key, val) + const oldValue = this.getOptionValue(name); + if (val !== null && option.parseArg) { + val = this._callParseArg(option, val, oldValue, invalidValueMessage); + } else if (val !== null && option.variadic) { + val = option._concatValue(val, oldValue); + } + if (val == null) { + if (option.negate) { + val = false; + } else if (option.isBoolean() || option.optional) { + val = true; + } else { + 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[kHeadersList].append(key, val) + } + this.setOptionValueWithSource(name, val, valueSource); + }; + this.on("option:" + oname, (val) => { + const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`; + handleOptionValue(val, invalidValueMessage, "cli"); + }); + if (option.envVar) { + this.on("optionEnv:" + oname, (val) => { + const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`; + handleOptionValue(val, invalidValueMessage, "env"); + }); + } + return this; + } + /** + * Internal implementation shared by .option() and .requiredOption() + * + * @return {Command} `this` command for chaining + * @private + */ + _optionEx(config2, flags, description, fn, defaultValue) { + if (typeof flags === "object" && flags instanceof Option) { + throw new Error( + "To add an Option object use addOption() instead of option() or requiredOption()" + ); + } + const option = this.createOption(flags, description); + option.makeOptionMandatory(!!config2.mandatory); + if (typeof fn === "function") { + option.default(defaultValue).argParser(fn); + } else if (fn instanceof RegExp) { + const regex2 = fn; + fn = (val, def) => { + const m = regex2.exec(val); + return m ? m[0] : def; + }; + option.default(defaultValue).argParser(fn); + } else { + option.default(fn); + } + return this.addOption(option); + } + /** + * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both. + * + * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required + * option-argument is indicated by `<>` and an optional option-argument by `[]`. + * + * See the README for more details, and see also addOption() and requiredOption(). + * + * @example + * program + * .option('-p, --pepper', 'add pepper') + * .option('-p, --pizza-type ', 'type of pizza') // required option-argument + * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default + * .option('-t, --tip ', 'add tip to purchase cost', parseFloat) // custom parse function + * + * @param {string} flags + * @param {string} [description] + * @param {(Function|*)} [parseArg] - custom option processing function or default value + * @param {*} [defaultValue] + * @return {Command} `this` command for chaining + */ + option(flags, description, parseArg, defaultValue) { + return this._optionEx({}, flags, description, parseArg, defaultValue); + } + /** + * Add a required option which must have a value after parsing. This usually means + * the option must be specified on the command line. (Otherwise the same as .option().) + * + * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. + * + * @param {string} flags + * @param {string} [description] + * @param {(Function|*)} [parseArg] - custom option processing function or default value + * @param {*} [defaultValue] + * @return {Command} `this` command for chaining + */ + requiredOption(flags, description, parseArg, defaultValue) { + return this._optionEx( + { mandatory: true }, + flags, + description, + parseArg, + defaultValue + ); + } + /** + * Alter parsing of short flags with optional values. + * + * @example + * // for `.option('-f,--flag [value]'): + * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour + * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` + * + * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag. + * @return {Command} `this` command for chaining + */ + combineFlagAndOptionalValue(combine = true) { + this._combineFlagAndOptionalValue = !!combine; + return this; + } + /** + * Allow unknown options on the command line. + * + * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options. + * @return {Command} `this` command for chaining + */ + allowUnknownOption(allowUnknown = true) { + this._allowUnknownOption = !!allowUnknown; + return this; + } + /** + * Allow excess command-arguments on the command line. Pass false to make excess arguments an error. + * + * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments. + * @return {Command} `this` command for chaining + */ + allowExcessArguments(allowExcess = true) { + this._allowExcessArguments = !!allowExcess; + return this; + } + /** + * Enable positional options. Positional means global options are specified before subcommands which lets + * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions. + * The default behaviour is non-positional and global options may appear anywhere on the command line. + * + * @param {boolean} [positional] + * @return {Command} `this` command for chaining + */ + enablePositionalOptions(positional = true) { + this._enablePositionalOptions = !!positional; + return this; + } + /** + * Pass through options that come after command-arguments rather than treat them as command-options, + * so actual command-options come before command-arguments. Turning this on for a subcommand requires + * positional options to have been enabled on the program (parent commands). + * The default behaviour is non-positional and options may appear before or after command-arguments. + * + * @param {boolean} [passThrough] for unknown options. + * @return {Command} `this` command for chaining + */ + passThroughOptions(passThrough = true) { + this._passThroughOptions = !!passThrough; + this._checkForBrokenPassThrough(); + return this; + } + /** + * @private + */ + _checkForBrokenPassThrough() { + if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) { + throw new Error( + `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)` + ); + } + } + /** + * Whether to store option values as properties on command object, + * or store separately (specify false). In both cases the option values can be accessed using .opts(). + * + * @param {boolean} [storeAsProperties=true] + * @return {Command} `this` command for chaining + */ + storeOptionsAsProperties(storeAsProperties = true) { + if (this.options.length) { + throw new Error("call .storeOptionsAsProperties() before adding options"); + } + if (Object.keys(this._optionValues).length) { + throw new Error( + "call .storeOptionsAsProperties() before setting option values" + ); + } + this._storeOptionsAsProperties = !!storeAsProperties; + return this; + } + /** + * Retrieve option value. + * + * @param {string} key + * @return {object} value + */ + getOptionValue(key) { + if (this._storeOptionsAsProperties) { + return this[key]; + } + return this._optionValues[key]; + } + /** + * Store option value. + * + * @param {string} key + * @param {object} value + * @return {Command} `this` command for chaining + */ + setOptionValue(key, value) { + return this.setOptionValueWithSource(key, value, void 0); + } + /** + * Store option value and where the value came from. + * + * @param {string} key + * @param {object} value + * @param {string} source - expected values are default/config/env/cli/implied + * @return {Command} `this` command for chaining + */ + setOptionValueWithSource(key, value, source) { + if (this._storeOptionsAsProperties) { + this[key] = value; + } else { + this._optionValues[key] = value; + } + this._optionValueSources[key] = source; + return this; + } + /** + * Get source of option value. + * Expected values are default | config | env | cli | implied + * + * @param {string} key + * @return {string} + */ + getOptionValueSource(key) { + return this._optionValueSources[key]; + } + /** + * Get source of option value. See also .optsWithGlobals(). + * Expected values are default | config | env | cli | implied + * + * @param {string} key + * @return {string} + */ + getOptionValueSourceWithGlobals(key) { + let source; + this._getCommandAndAncestors().forEach((cmd) => { + if (cmd.getOptionValueSource(key) !== void 0) { + source = cmd.getOptionValueSource(key); + } + }); + return source; + } + /** + * Get user arguments from implied or explicit arguments. + * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches. + * + * @private + */ + _prepareUserArgs(argv, parseOptions) { + var _a2; + if (argv !== void 0 && !Array.isArray(argv)) { + throw new Error("first parameter to parse must be array or undefined"); + } + parseOptions = parseOptions || {}; + if (argv === void 0 && parseOptions.from === void 0) { + if ((_a2 = process2.versions) == null ? void 0 : _a2.electron) { + parseOptions.from = "electron"; + } + const execArgv = process2.execArgv ?? []; + if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) { + parseOptions.from = "eval"; + } + } + if (argv === void 0) { + argv = process2.argv; + } + this.rawArgs = argv.slice(); + let userArgs; + switch (parseOptions.from) { + case void 0: + case "node": + this._scriptPath = argv[1]; + userArgs = argv.slice(2); + break; + case "electron": + if (process2.defaultApp) { + this._scriptPath = argv[1]; + userArgs = argv.slice(2); + } else { + userArgs = argv.slice(1); } + break; + case "user": + userArgs = argv.slice(0); + break; + case "eval": + userArgs = argv.slice(1); + break; + default: + throw new Error( + `unexpected parse option { from: '${parseOptions.from}' }` + ); + } + if (!this._name && this._scriptPath) + this.nameFromFilename(this._scriptPath); + this._name = this._name || "program"; + return userArgs; + } + /** + * Parse `argv`, setting options and invoking commands when defined. + * + * Use parseAsync instead of parse if any of your action handlers are async. + * + * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! + * + * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`: + * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that + * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged + * - `'user'`: just user arguments + * + * @example + * program.parse(); // parse process.argv and auto-detect electron and special node flags + * program.parse(process.argv); // assume argv[0] is app and argv[1] is script + * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * + * @param {string[]} [argv] - optional, defaults to process.argv + * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron + * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron' + * @return {Command} `this` command for chaining + */ + parse(argv, parseOptions) { + const userArgs = this._prepareUserArgs(argv, parseOptions); + this._parseCommand([], userArgs); + return this; + } + /** + * Parse `argv`, setting options and invoking commands when defined. + * + * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! + * + * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`: + * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that + * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged + * - `'user'`: just user arguments + * + * @example + * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags + * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script + * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * + * @param {string[]} [argv] + * @param {object} [parseOptions] + * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron' + * @return {Promise} + */ + async parseAsync(argv, parseOptions) { + const userArgs = this._prepareUserArgs(argv, parseOptions); + await this._parseCommand([], userArgs); + return this; + } + /** + * Execute a sub-command executable. + * + * @private + */ + _executeSubCommand(subcommand, args) { + args = args.slice(); + let launchWithNode = false; + const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"]; + function findFile(baseDir, baseName) { + const localBin = path2.resolve(baseDir, baseName); + if (fs2.existsSync(localBin)) return localBin; + if (sourceExt.includes(path2.extname(baseName))) return void 0; + const foundExt = sourceExt.find( + (ext) => fs2.existsSync(`${localBin}${ext}`) + ); + if (foundExt) return `${localBin}${foundExt}`; + return void 0; + } + this._checkForMissingMandatoryOptions(); + this._checkForConflictingOptions(); + let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`; + let executableDir = this._executableDir || ""; + if (this._scriptPath) { + let resolvedScriptPath; + try { + resolvedScriptPath = fs2.realpathSync(this._scriptPath); + } catch (err) { + resolvedScriptPath = this._scriptPath; } - - this.body = new Readable({ read: resume }) - - const decoders = [] - - const willFollow = request.redirect === 'follow' && - location && - redirectStatusSet.has(status) - - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding - if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !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(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: zlib.constants.Z_SYNC_FLUSH, - finishFlush: zlib.constants.Z_SYNC_FLUSH - })) - } else if (coding === 'deflate') { - decoders.push(zlib.createInflate()) - } else if (coding === 'br') { - decoders.push(zlib.createBrotliDecompress()) - } else { - decoders.length = 0 - break - } + executableDir = path2.resolve( + path2.dirname(resolvedScriptPath), + executableDir + ); + } + if (executableDir) { + let localFile = findFile(executableDir, executableFile); + if (!localFile && !subcommand._executableFile && this._scriptPath) { + const legacyName = path2.basename( + this._scriptPath, + path2.extname(this._scriptPath) + ); + if (legacyName !== this._name) { + localFile = findFile( + executableDir, + `${legacyName}-${subcommand._name}` + ); } } - - resolve({ - status, - statusText, - headersList: headers[kHeadersList], - body: decoders.length - ? pipeline(this.body, ...decoders, () => { }) - : this.body.on('error', () => {}) - }) - - return true - }, - - onData (chunk) { - if (fetchParams.controller.dump) { - return + executableFile = localFile || executableFile; + } + launchWithNode = sourceExt.includes(path2.extname(executableFile)); + let proc; + if (process2.platform !== "win32") { + if (launchWithNode) { + args.unshift(executableFile); + args = incrementNodeInspectorPort(process2.execArgv).concat(args); + proc = childProcess.spawn(process2.argv[0], args, { stdio: "inherit" }); + } else { + proc = childProcess.spawn(executableFile, args, { stdio: "inherit" }); } - - // 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) + } else { + args.unshift(executableFile); + args = incrementNodeInspectorPort(process2.execArgv).concat(args); + proc = childProcess.spawn(process2.execPath, args, { stdio: "inherit" }); + } + if (!proc.killed) { + const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"]; + signals.forEach((signal) => { + process2.on(signal, () => { + if (proc.killed === false && proc.exitCode === null) { + proc.kill(signal); + } + }); + }); + } + const exitCallback = this._exitCallback; + proc.on("close", (code) => { + code = code ?? 1; + if (!exitCallback) { + process2.exit(code); + } else { + exitCallback( + new CommanderError( + code, + "commander.executeSubCommandAsync", + "(close)" + ) + ); } - - fetchParams.controller.ended = true - - this.body.push(null) - }, - - onError (error) { - if (this.abort) { - fetchParams.controller.off('terminated', this.abort) + }); + proc.on("error", (err) => { + if (err.code === "ENOENT") { + const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory"; + const executableMissing = `'${executableFile}' does not exist + - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead + - if the default executable name is not suitable, use the executableFile option to supply a custom name or path + - ${executableDirMessage}`; + throw new Error(executableMissing); + } else if (err.code === "EACCES") { + throw new Error(`'${executableFile}' not executable`); } - - this.body?.destroy(error) - - fetchParams.controller.terminate(error) - - reject(error) - }, - - onUpgrade (status, headersList, socket) { - if (status !== 101) { - return + if (!exitCallback) { + process2.exit(1); + } else { + const wrappedError = new CommanderError( + 1, + "commander.executeSubCommandAsync", + "(error)" + ); + wrappedError.nestedError = err; + exitCallback(wrappedError); } - - const headers = new 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[kHeadersList].append(key, val) + }); + this.runningCommand = proc; + } + /** + * @private + */ + _dispatchSubcommand(commandName, operands, unknown) { + const subCommand = this._findCommand(commandName); + if (!subCommand) this.help({ error: true }); + let promiseChain; + promiseChain = this._chainOrCallSubCommandHook( + promiseChain, + subCommand, + "preSubcommand" + ); + promiseChain = this._chainOrCall(promiseChain, () => { + if (subCommand._executableHandler) { + this._executeSubCommand(subCommand, operands.concat(unknown)); + } else { + return subCommand._parseCommand(operands, unknown); } - - resolve({ - status, - statusText: STATUS_CODES[status], - headersList: headers[kHeadersList], - socket - }) - - return true - } + }); + return promiseChain; } - )) - } -} - -module.exports = { - fetch, - Fetch, - fetching, - finalizeAndReportTiming -} - - -/***/ }), - -/***/ 15767: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* globals AbortController */ - - - -const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(1380) -const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(72908) -const { FinalizationRegistry } = __nccwpck_require__(60547)() -const util = __nccwpck_require__(33465) -const { - isValidHTTPToken, - sameOrigin, - normalizeMethod, - makePolicyContainer, - normalizeMethodRecord -} = __nccwpck_require__(42696) -const { - forbiddenMethodsSet, - corsSafeListedMethodsSet, - referrerPolicy, - requestRedirect, - requestMode, - requestCredentials, - requestCache, - requestDuplex -} = __nccwpck_require__(84135) -const { kEnumerableProperty } = util -const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(68323) -const { webidl } = __nccwpck_require__(29) -const { getGlobalOrigin } = __nccwpck_require__(59963) -const { URLSerializer } = __nccwpck_require__(43911) -const { kHeadersList, kConstruct } = __nccwpck_require__(34856) -const assert = __nccwpck_require__(42613) -const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(24434) - -let TransformStream = globalThis.TransformStream - -const kAbortController = Symbol('abortController') - -const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { - signal.removeEventListener('abort', abort) -}) - -// https://fetch.spec.whatwg.org/#request-class -class Request { - // https://fetch.spec.whatwg.org/#dom-request - constructor (input, init = {}) { - if (input === kConstruct) { - return - } - - webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) - - input = webidl.converters.RequestInfo(input) - init = webidl.converters.RequestInit(init) - - // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object - this[kRealm] = { - settingsObject: { - baseUrl: getGlobalOrigin(), - get origin () { - return this.baseUrl?.origin - }, - policyContainer: makePolicyContainer() + /** + * Invoke help directly if possible, or dispatch if necessary. + * e.g. help foo + * + * @private + */ + _dispatchHelpCommand(subcommandName) { + var _a2, _b; + if (!subcommandName) { + this.help(); + } + const subCommand = this._findCommand(subcommandName); + if (subCommand && !subCommand._executableHandler) { + subCommand.help(); + } + return this._dispatchSubcommand( + subcommandName, + [], + [((_a2 = this._getHelpOption()) == null ? void 0 : _a2.long) ?? ((_b = this._getHelpOption()) == null ? void 0 : _b.short) ?? "--help"] + ); } - } - - // 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[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 }) + /** + * Check this.args against expected this.registeredArguments. + * + * @private + */ + _checkNumberOfArguments() { + this.registeredArguments.forEach((arg, i) => { + if (arg.required && this.args[i] == null) { + this.missingArgument(arg.name()); + } + }); + if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) { + return; + } + if (this.args.length > this.registeredArguments.length) { + this._excessArguments(this.args); + } } - - // 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 - ) + /** + * Process this.args using this.registeredArguments and save as this.processedArgs! + * + * @private + */ + _processArguments() { + const myParseArg = (argument, value, previous) => { + let parsedValue = value; + if (value !== null && argument.parseArg) { + const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`; + parsedValue = this._callParseArg( + argument, + value, + previous, + invalidValueMessage + ); + } + return parsedValue; + }; + this._checkNumberOfArguments(); + const processedArgs = []; + this.registeredArguments.forEach((declaredArg, index) => { + let value = declaredArg.defaultValue; + if (declaredArg.variadic) { + if (index < this.args.length) { + value = this.args.slice(index); + if (declaredArg.parseArg) { + value = value.reduce((processed, v) => { + return myParseArg(declaredArg, v, processed); + }, declaredArg.defaultValue); + } + } else if (value === void 0) { + value = []; + } + } else if (index < this.args.length) { + value = this.args[index]; + if (declaredArg.parseArg) { + value = myParseArg(declaredArg, value, declaredArg.defaultValue); + } + } + processedArgs[index] = value; + }); + this.processedArgs = processedArgs; } - - // 4. Set request to a new request whose URL is parsedURL. - request = makeRequest({ urlList: [parsedURL] }) - - // 5. Set fallbackMode to "cors". - fallbackMode = 'cors' - } else { - // 6. Otherwise: - - // 7. Assert: input is a Request object. - assert(input instanceof Request) - - // 8. Set request to input’s request. - request = input[kState] - - // 9. Set signal to input’s signal. - signal = input[kSignal] - } - - // 7. Let origin be this’s relevant settings object’s origin. - const origin = this[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' && - 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 = 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[kRealm].settingsObject, - // 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' + /** + * Once we have a promise we chain, but call synchronously until then. + * + * @param {(Promise|undefined)} promise + * @param {Function} fn + * @return {(Promise|undefined)} + * @private + */ + _chainOrCall(promise, fn) { + if (promise && promise.then && typeof promise.then === "function") { + return promise.then(() => fn()); + } + return fn(); + } + /** + * + * @param {(Promise|undefined)} promise + * @param {string} event + * @return {(Promise|undefined)} + * @private + */ + _chainOrCallHooks(promise, event) { + let result = promise; + const hooks = []; + this._getCommandAndAncestors().reverse().filter((cmd) => cmd._lifeCycleHooks[event] !== void 0).forEach((hookedCommand) => { + hookedCommand._lifeCycleHooks[event].forEach((callback) => { + hooks.push({ hookedCommand, callback }); + }); + }); + if (event === "postAction") { + hooks.reverse(); + } + hooks.forEach((hookDetail) => { + result = this._chainOrCall(result, () => { + return hookDetail.callback(hookDetail.hookedCommand, this); + }); + }); + return result; } - - // 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 }) + /** + * + * @param {(Promise|undefined)} promise + * @param {Command} subCommand + * @param {string} event + * @return {(Promise|undefined)} + * @private + */ + _chainOrCallSubCommandHook(promise, subCommand, event) { + let result = promise; + if (this._lifeCycleHooks[event] !== void 0) { + this._lifeCycleHooks[event].forEach((hook6) => { + result = this._chainOrCall(result, () => { + return hook6(this, subCommand); + }); + }); } - - // 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 && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) - ) { - request.referrer = 'client' + return result; + } + /** + * Process arguments in context of this command. + * Returns action result, in case it is a promise. + * + * @private + */ + _parseCommand(operands, unknown) { + const parsed = this.parseOptions(unknown); + this._parseOptionsEnv(); + this._parseOptionsImplied(); + operands = operands.concat(parsed.operands); + unknown = parsed.unknown; + this.args = operands.concat(unknown); + if (operands && this._findCommand(operands[0])) { + return this._dispatchSubcommand(operands[0], operands.slice(1), unknown); + } + if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) { + return this._dispatchHelpCommand(operands[1]); + } + if (this._defaultCommandName) { + this._outputHelpIfRequested(unknown); + return this._dispatchSubcommand( + this._defaultCommandName, + operands, + unknown + ); + } + if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) { + this.help({ error: true }); + } + this._outputHelpIfRequested(parsed.unknown); + this._checkForMissingMandatoryOptions(); + this._checkForConflictingOptions(); + const checkForUnknownOptions = () => { + if (parsed.unknown.length > 0) { + this.unknownOption(parsed.unknown[0]); + } + }; + const commandEvent = `command:${this.name()}`; + if (this._actionHandler) { + checkForUnknownOptions(); + this._processArguments(); + let promiseChain; + promiseChain = this._chainOrCallHooks(promiseChain, "preAction"); + promiseChain = this._chainOrCall( + promiseChain, + () => this._actionHandler(this.processedArgs) + ); + if (this.parent) { + promiseChain = this._chainOrCall(promiseChain, () => { + this.parent.emit(commandEvent, operands, unknown); + }); + } + promiseChain = this._chainOrCallHooks(promiseChain, "postAction"); + return promiseChain; + } + if (this.parent && this.parent.listenerCount(commandEvent)) { + checkForUnknownOptions(); + this._processArguments(); + this.parent.emit(commandEvent, operands, unknown); + } else if (operands.length) { + if (this._findCommand("*")) { + return this._dispatchSubcommand("*", operands, unknown); + } + if (this.listenerCount("command:*")) { + this.emit("command:*", operands, unknown); + } else if (this.commands.length) { + this.unknownCommand(); + } else { + checkForUnknownOptions(); + this._processArguments(); + } + } else if (this.commands.length) { + checkForUnknownOptions(); + this.help({ error: true }); } else { - // 4. Otherwise, set request’s referrer to parsedReferrer. - request.referrer = parsedReferrer + checkForUnknownOptions(); + this._processArguments(); } } - } - - // 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 webidl.errors.exception({ - header: 'Request constructor', - message: 'invalid request mode navigate.' - }) - } - - // 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 (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`) + /** + * Find matching command. + * + * @private + * @return {Command | undefined} + */ + _findCommand(name) { + if (!name) return void 0; + return this.commands.find( + (cmd) => cmd._name === name || cmd._aliases.includes(name) + ); } - - if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw new TypeError(`'${method}' HTTP method is unsupported.`) + /** + * Return an option matching `arg` if any. + * + * @param {string} arg + * @return {Option} + * @package + */ + _findOption(arg) { + return this.options.find((option) => option.is(arg)); } - - // 3. Normalize method. - method = normalizeMethodRecord[method] ?? 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[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[kSignal] = ac.signal - this[kSignal][kRealm] = this[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." - ) + /** + * Display an error message if a mandatory option does not have a value. + * Called after checking for help flags in leaf subcommand. + * + * @private + */ + _checkForMissingMandatoryOptions() { + this._getCommandAndAncestors().forEach((cmd) => { + cmd.options.forEach((anOption) => { + if (anOption.mandatory && cmd.getOptionValue(anOption.attributeName()) === void 0) { + cmd.missingMandatoryOptionValue(anOption); + } + }); + }); } - - 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[kAbortController] = ac - - const acRef = new WeakRef(ac) - const abort = function () { - const ac = acRef.deref() - if (ac !== undefined) { - ac.abort(this.reason) + /** + * Display an error message if conflicting options are used together in this. + * + * @private + */ + _checkForConflictingLocalOptions() { + const definedNonDefaultOptions = this.options.filter((option) => { + const optionKey = option.attributeName(); + if (this.getOptionValue(optionKey) === void 0) { + return false; } - } - - // 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 getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(100, signal) - } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { - setMaxListeners(100, signal) + return this.getOptionValueSource(optionKey) !== "default"; + }); + const optionsWithConflicting = definedNonDefaultOptions.filter( + (option) => option.conflictsWith.length > 0 + ); + optionsWithConflicting.forEach((option) => { + const conflictingAndDefined = definedNonDefaultOptions.find( + (defined) => option.conflictsWith.includes(defined.attributeName()) + ); + if (conflictingAndDefined) { + this._conflictingOption(option, conflictingAndDefined); } - } catch {} - - util.addAbortListener(signal, abort) - requestFinalizer.register(ac, { signal, 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[kHeaders] = new Headers(kConstruct) - this[kHeaders][kHeadersList] = request.headersList - this[kHeaders][kGuard] = 'request' - this[kHeaders][kRealm] = this[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 (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError( - `'${request.method} is unsupported in no-cors mode.` - ) + /** + * Display an error message if conflicting options are used together. + * Called after checking for help flags in leaf subcommand. + * + * @private + */ + _checkForConflictingOptions() { + this._getCommandAndAncestors().forEach((cmd) => { + cmd._checkForConflictingLocalOptions(); + }); } - - // 2. Set this’s headers’s guard to "request-no-cors". - this[kHeaders][kGuard] = 'request-no-cors' - } - - // 32. If init is not empty, then: - if (initHasKey) { - /** @type {HeadersList} */ - const headersList = this[kHeaders][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 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 HeadersList) { - for (const [key, val] of headers) { - headersList.append(key, val) + /** + * Parse options from `argv` removing known options, + * and return argv split into operands and unknown arguments. + * + * Examples: + * + * argv => operands, unknown + * --known kkk op => [op], [] + * op --known kkk => [op], [] + * sub --unknown uuu op => [sub], [--unknown uuu op] + * sub -- --unknown uuu op => [sub --unknown uuu op], [] + * + * @param {string[]} argv + * @return {{operands: string[], unknown: string[]}} + */ + parseOptions(argv) { + const operands = []; + const unknown = []; + let dest = operands; + const args = argv.slice(); + function maybeOption(arg) { + return arg.length > 1 && arg[0] === "-"; + } + let activeVariadicOption = null; + while (args.length) { + const arg = args.shift(); + if (arg === "--") { + if (dest === unknown) dest.push(arg); + dest.push(...args); + break; + } + if (activeVariadicOption && !maybeOption(arg)) { + this.emit(`option:${activeVariadicOption.name()}`, arg); + continue; + } + activeVariadicOption = null; + if (maybeOption(arg)) { + const option = this._findOption(arg); + if (option) { + if (option.required) { + const value = args.shift(); + if (value === void 0) this.optionMissingArgument(option); + this.emit(`option:${option.name()}`, value); + } else if (option.optional) { + let value = null; + if (args.length > 0 && !maybeOption(args[0])) { + value = args.shift(); + } + this.emit(`option:${option.name()}`, value); + } else { + this.emit(`option:${option.name()}`); + } + activeVariadicOption = option.variadic ? option : null; + continue; + } + } + if (arg.length > 2 && arg[0] === "-" && arg[1] !== "-") { + const option = this._findOption(`-${arg[1]}`); + if (option) { + if (option.required || option.optional && this._combineFlagAndOptionalValue) { + this.emit(`option:${option.name()}`, arg.slice(2)); + } else { + this.emit(`option:${option.name()}`); + args.unshift(`-${arg.slice(2)}`); + } + continue; + } + } + if (/^--[^=]+=/.test(arg)) { + const index = arg.indexOf("="); + const option = this._findOption(arg.slice(0, index)); + if (option && (option.required || option.optional)) { + this.emit(`option:${option.name()}`, arg.slice(index + 1)); + continue; + } + } + if (maybeOption(arg)) { + dest = unknown; + } + if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) { + if (this._findCommand(arg)) { + operands.push(arg); + if (args.length > 0) unknown.push(...args); + break; + } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) { + operands.push(arg); + if (args.length > 0) operands.push(...args); + break; + } else if (this._defaultCommandName) { + unknown.push(arg); + if (args.length > 0) unknown.push(...args); + break; + } + } + if (this._passThroughOptions) { + dest.push(arg); + if (args.length > 0) dest.push(...args); + break; + } + dest.push(arg); } - // Note: Copy the `set-cookie` meta-data. - headersList.cookies = headers.cookies - } else { - // 5. Otherwise, fill this’s headers with headers. - fillHeaders(this[kHeaders], headers) + return { operands, unknown }; } - } - - // 33. Let inputBody be input’s request’s body if input is a Request - // object; otherwise null. - const inputBody = input instanceof Request ? input[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] = 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[kHeaders][kHeadersList].contains('content-type')) { - this[kHeaders].append('content-type', contentType) + /** + * Return an object containing local option values as key-value pairs. + * + * @return {object} + */ + opts() { + if (this._storeOptionsAsProperties) { + const result = {}; + const len = this.options.length; + for (let i = 0; i < len; i++) { + const key = this.options[i].attributeName(); + result[key] = key === this._versionOptionName ? this._version : this[key]; + } + return result; + } + return this._optionValues; } - } - - // 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.') + /** + * Return an object containing merged local and global option values as key-value pairs. + * + * @return {object} + */ + optsWithGlobals() { + return this._getCommandAndAncestors().reduce( + (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()), + {} + ); } - - // 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"' - ) + /** + * Display error message and exit (or call exitOverride). + * + * @param {string} message + * @param {object} [errorOptions] + * @param {string} [errorOptions.code] - an id string representing the error + * @param {number} [errorOptions.exitCode] - used with process.exit + */ + error(message, errorOptions) { + this._outputConfiguration.outputError( + `${message} +`, + this._outputConfiguration.writeErr + ); + if (typeof this._showHelpAfterError === "string") { + this._outputConfiguration.writeErr(`${this._showHelpAfterError} +`); + } else if (this._showHelpAfterError) { + this._outputConfiguration.writeErr("\n"); + this.outputHelp({ error: true }); + } + const config2 = errorOptions || {}; + const exitCode = config2.exitCode || 1; + const code = config2.code || "commander.error"; + this._exit(exitCode, code, message); } - - // 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 (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { - throw new TypeError( - 'Cannot construct a Request with a Request object that has already been used.' - ) + /** + * Apply any option related environment variables, if option does + * not have a value from cli or client code. + * + * @private + */ + _parseOptionsEnv() { + this.options.forEach((option) => { + if (option.envVar && option.envVar in process2.env) { + const optionKey = option.attributeName(); + if (this.getOptionValue(optionKey) === void 0 || ["default", "config", "env"].includes( + this.getOptionValueSource(optionKey) + )) { + if (option.required || option.optional) { + this.emit(`optionEnv:${option.name()}`, process2.env[option.envVar]); + } else { + this.emit(`optionEnv:${option.name()}`); + } + } + } + }); } - - // 2. Set finalBody to the result of creating a proxy for inputBody. - if (!TransformStream) { - TransformStream = (__nccwpck_require__(63774).TransformStream) + /** + * Apply any implied option values, if option is undefined or default value. + * + * @private + */ + _parseOptionsImplied() { + const dualHelper = new DualOptions(this.options); + const hasCustomOptionValue = (optionKey) => { + return this.getOptionValue(optionKey) !== void 0 && !["default", "implied"].includes(this.getOptionValueSource(optionKey)); + }; + this.options.filter( + (option) => option.implied !== void 0 && hasCustomOptionValue(option.attributeName()) && dualHelper.valueFromOption( + this.getOptionValue(option.attributeName()), + option + ) + ).forEach((option) => { + Object.keys(option.implied).filter((impliedKey) => !hasCustomOptionValue(impliedKey)).forEach((impliedKey) => { + this.setOptionValueWithSource( + impliedKey, + option.implied[impliedKey], + "implied" + ); + }); + }); } - - // 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 + /** + * Argument `name` is missing. + * + * @param {string} name + * @private + */ + missingArgument(name) { + const message = `error: missing required argument '${name}'`; + this.error(message, { code: "commander.missingArgument" }); } - } - - // 41. Set this’s request’s body to finalBody. - this[kState].body = finalBody - } - - // Returns request’s HTTP method, which is "GET" by default. - get method () { - webidl.brandCheck(this, Request) - - // The method getter steps are to return this’s request’s method. - return this[kState].method - } - - // Returns the URL of request as a string. - get url () { - webidl.brandCheck(this, Request) - - // The url getter steps are to return this’s request’s URL, serialized. - return URLSerializer(this[kState].url) - } - - // 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 () { - webidl.brandCheck(this, Request) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - // Returns the kind of resource requested by request, e.g., "document" - // or "script". - get destination () { - webidl.brandCheck(this, Request) - - // The destination getter are to return this’s request’s destination. - return this[kState].destination - } - - // 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 () { - webidl.brandCheck(this, Request) - - // 1. If this’s request’s referrer is "no-referrer", then return the - // empty string. - if (this[kState].referrer === 'no-referrer') { - return '' - } - - // 2. If this’s request’s referrer is "client", then return - // "about:client". - if (this[kState].referrer === 'client') { - return 'about:client' - } - - // Return this’s request’s referrer, serialized. - return this[kState].referrer.toString() - } - - // Returns the referrer policy associated with request. - // This is used during fetching to compute the value of the request’s - // referrer. - get referrerPolicy () { - webidl.brandCheck(this, Request) - - // The referrerPolicy getter steps are to return this’s request’s referrer policy. - return this[kState].referrerPolicy - } - - // 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 () { - webidl.brandCheck(this, Request) - - // The mode getter steps are to return this’s request’s mode. - return this[kState].mode - } - - // 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[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 () { - webidl.brandCheck(this, Request) - - // The cache getter steps are to return this’s request’s cache mode. - return this[kState].cache - } - - // 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 () { - webidl.brandCheck(this, Request) - - // The redirect getter steps are to return this’s request’s redirect mode. - return this[kState].redirect - } - - // 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 () { - webidl.brandCheck(this, Request) - - // The integrity getter steps are to return this’s request’s integrity - // metadata. - return this[kState].integrity - } - - // Returns a boolean indicating whether or not request can outlive the - // global in which it was created. - get keepalive () { - webidl.brandCheck(this, Request) - - // The keepalive getter steps are to return this’s request’s keepalive. - return this[kState].keepalive - } - - // Returns a boolean indicating whether or not request is for a reload - // navigation. - get isReloadNavigation () { - webidl.brandCheck(this, Request) - - // The isReloadNavigation getter steps are to return true if this’s - // request’s reload-navigation flag is set; otherwise false. - return this[kState].reloadNavigation - } - - // Returns a boolean indicating whether or not request is for a history - // navigation (a.k.a. back-foward navigation). - get isHistoryNavigation () { - webidl.brandCheck(this, Request) - - // The isHistoryNavigation getter steps are to return true if this’s request’s - // history-navigation flag is set; otherwise false. - return this[kState].historyNavigation - } - - // 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 () { - webidl.brandCheck(this, Request) - - // The signal getter steps are to return this’s signal. - return this[kSignal] - } - - get body () { - webidl.brandCheck(this, Request) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Request) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - get duplex () { - webidl.brandCheck(this, Request) - - return 'half' - } - - // Returns a clone of request. - clone () { - webidl.brandCheck(this, 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 = cloneRequest(this[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 Request(kConstruct) - clonedRequestObject[kState] = clonedRequest - clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers(kConstruct) - clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList - clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] - - // 4. Make clonedRequestObject’s signal follow this’s signal. - const ac = new AbortController() - if (this.signal.aborted) { - ac.abort(this.signal.reason) - } else { - util.addAbortListener( - this.signal, - () => { - ac.abort(this.signal.reason) - } - ) - } - clonedRequestObject[kSignal] = ac.signal - - // 4. Return clonedRequestObject. - return clonedRequestObject - } -} - -mixinBody(Request) - -function 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 HeadersList(init.headersList) - : new HeadersList() - } - request.url = request.urlList[0] - return request -} - -// https://fetch.spec.whatwg.org/#concept-request-clone -function cloneRequest (request) { - // To clone a request request, run these steps: - - // 1. Let newRequest be a copy of request, except for its body. - const newRequest = 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 = cloneBody(request.body) - } - - // 3. Return newRequest. - return newRequest -} - -Object.defineProperties(Request.prototype, { - method: kEnumerableProperty, - url: kEnumerableProperty, - headers: kEnumerableProperty, - redirect: kEnumerableProperty, - clone: kEnumerableProperty, - signal: kEnumerableProperty, - duplex: kEnumerableProperty, - destination: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - isHistoryNavigation: kEnumerableProperty, - isReloadNavigation: kEnumerableProperty, - keepalive: kEnumerableProperty, - integrity: kEnumerableProperty, - cache: kEnumerableProperty, - credentials: kEnumerableProperty, - attribute: kEnumerableProperty, - referrerPolicy: kEnumerableProperty, - referrer: kEnumerableProperty, - mode: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Request', - configurable: true - } -}) - -webidl.converters.Request = webidl.interfaceConverter( - Request -) - -// https://fetch.spec.whatwg.org/#requestinfo -webidl.converters.RequestInfo = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } - - if (V instanceof Request) { - return webidl.converters.Request(V) - } - - return webidl.converters.USVString(V) -} - -webidl.converters.AbortSignal = webidl.interfaceConverter( - AbortSignal -) - -// https://fetch.spec.whatwg.org/#requestinit -webidl.converters.RequestInit = webidl.dictionaryConverter([ - { - key: 'method', - converter: webidl.converters.ByteString - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - }, - { - key: 'body', - converter: webidl.nullableConverter( - webidl.converters.BodyInit - ) - }, - { - key: 'referrer', - converter: webidl.converters.USVString - }, - { - key: 'referrerPolicy', - converter: webidl.converters.DOMString, - // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy - allowedValues: referrerPolicy - }, - { - key: 'mode', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#concept-request-mode - allowedValues: requestMode - }, - { - key: 'credentials', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcredentials - allowedValues: requestCredentials - }, - { - key: 'cache', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestcache - allowedValues: requestCache - }, - { - key: 'redirect', - converter: webidl.converters.DOMString, - // https://fetch.spec.whatwg.org/#requestredirect - allowedValues: requestRedirect - }, - { - key: 'integrity', - converter: webidl.converters.DOMString - }, - { - key: 'keepalive', - converter: webidl.converters.boolean - }, - { - key: 'signal', - converter: webidl.nullableConverter( - (signal) => webidl.converters.AbortSignal( - signal, - { strict: false } - ) - ) - }, - { - key: 'window', - converter: webidl.converters.any - }, - { - key: 'duplex', - converter: webidl.converters.DOMString, - allowedValues: requestDuplex - } -]) - -module.exports = { Request, makeRequest } - - -/***/ }), - -/***/ 95683: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Headers, HeadersList, fill } = __nccwpck_require__(72908) -const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(1380) -const util = __nccwpck_require__(33465) -const { kEnumerableProperty } = util -const { - isValidReasonPhrase, - isCancelled, - isAborted, - isBlobLike, - serializeJavascriptValueToJSONString, - isErrorLike, - isomorphicEncode -} = __nccwpck_require__(42696) -const { - redirectStatusSet, - nullBodyStatus, - DOMException -} = __nccwpck_require__(84135) -const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(68323) -const { webidl } = __nccwpck_require__(29) -const { FormData } = __nccwpck_require__(12894) -const { getGlobalOrigin } = __nccwpck_require__(59963) -const { URLSerializer } = __nccwpck_require__(43911) -const { kHeadersList, kConstruct } = __nccwpck_require__(34856) -const assert = __nccwpck_require__(42613) -const { types } = __nccwpck_require__(39023) - -const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(63774).ReadableStream) -const textEncoder = new TextEncoder('utf-8') - -// https://fetch.spec.whatwg.org/#response-class -class 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 Response() - responseObject[kState] = makeNetworkError() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response-json - static json (data, init = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) - - if (init !== null) { - init = webidl.converters.ResponseInit(init) - } - - // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. - const bytes = textEncoder.encode( - serializeJavascriptValueToJSONString(data) - ) - - // 2. Let body be the result of extracting bytes. - const body = 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 Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'response' - responseObject[kHeaders][kRealm] = relevantRealm - - // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). - initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) - - // 5. Return responseObject. - return responseObject - } - - // Creates a redirect Response that redirects to url with status status. - static redirect (url, status = 302) { - const relevantRealm = { settingsObject: {} } - - webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) - - url = webidl.converters.USVString(url) - status = 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, getGlobalOrigin()) - } catch (err) { - throw Object.assign(new TypeError('Failed to parse URL from ' + url), { - cause: err - }) - } - - // 3. If status is not a redirect status, then throw a RangeError. - if (!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 Response() - responseObject[kRealm] = relevantRealm - responseObject[kHeaders][kGuard] = 'immutable' - responseObject[kHeaders][kRealm] = relevantRealm - - // 5. Set responseObject’s response’s status to status. - responseObject[kState].status = status - - // 6. Let value be parsedURL, serialized and isomorphic encoded. - const value = isomorphicEncode(URLSerializer(parsedURL)) - - // 7. Append `Location`/value to responseObject’s response’s header list. - responseObject[kState].headersList.append('location', value) - - // 8. Return responseObject. - return responseObject - } - - // https://fetch.spec.whatwg.org/#dom-response - constructor (body = null, init = {}) { - if (body !== null) { - body = webidl.converters.BodyInit(body) - } - - init = webidl.converters.ResponseInit(init) - - // TODO - this[kRealm] = { settingsObject: {} } - - // 1. Set this’s response to a new response. - this[kState] = 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[kHeaders] = new Headers(kConstruct) - this[kHeaders][kGuard] = 'response' - this[kHeaders][kHeadersList] = this[kState].headersList - this[kHeaders][kRealm] = this[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] = extractBody(body) - bodyWithType = { body: extractedBody, type } - } - - // 5. Perform initialize a response given this, init, and bodyWithType. - initializeResponse(this, init, bodyWithType) - } - - // Returns response’s type, e.g., "cors". - get type () { - webidl.brandCheck(this, Response) - - // The type getter steps are to return this’s response’s type. - return this[kState].type - } - - // Returns response’s URL, if it has one; otherwise the empty string. - get url () { - webidl.brandCheck(this, Response) - - const urlList = this[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 URLSerializer(url, true) - } - - // Returns whether response was obtained through a redirect. - get redirected () { - webidl.brandCheck(this, 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[kState].urlList.length > 1 - } - - // Returns response’s status. - get status () { - webidl.brandCheck(this, Response) - - // The status getter steps are to return this’s response’s status. - return this[kState].status - } - - // Returns whether response’s status is an ok status. - get ok () { - webidl.brandCheck(this, Response) - - // The ok getter steps are to return true if this’s response’s status is an - // ok status; otherwise false. - return this[kState].status >= 200 && this[kState].status <= 299 - } - - // Returns response’s status message. - get statusText () { - webidl.brandCheck(this, Response) - - // The statusText getter steps are to return this’s response’s status - // message. - return this[kState].statusText - } - - // Returns response’s headers as Headers. - get headers () { - webidl.brandCheck(this, Response) - - // The headers getter steps are to return this’s headers. - return this[kHeaders] - } - - get body () { - webidl.brandCheck(this, Response) - - return this[kState].body ? this[kState].body.stream : null - } - - get bodyUsed () { - webidl.brandCheck(this, Response) - - return !!this[kState].body && util.isDisturbed(this[kState].body.stream) - } - - // Returns a clone of response. - clone () { - webidl.brandCheck(this, Response) - - // 1. If this is unusable, then throw a TypeError. - if (this.bodyUsed || (this.body && this.body.locked)) { - throw 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 = cloneResponse(this[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 Response() - clonedResponseObject[kState] = clonedResponse - clonedResponseObject[kRealm] = this[kRealm] - clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList - clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] - clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] - - return clonedResponseObject - } -} - -mixinBody(Response) - -Object.defineProperties(Response.prototype, { - type: kEnumerableProperty, - url: kEnumerableProperty, - status: kEnumerableProperty, - ok: kEnumerableProperty, - redirected: kEnumerableProperty, - statusText: kEnumerableProperty, - headers: kEnumerableProperty, - clone: kEnumerableProperty, - body: kEnumerableProperty, - bodyUsed: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'Response', - configurable: true - } -}) - -Object.defineProperties(Response, { - json: kEnumerableProperty, - redirect: kEnumerableProperty, - error: kEnumerableProperty -}) - -// https://fetch.spec.whatwg.org/#concept-response-clone -function 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 filterResponse( - cloneResponse(response.internalResponse), - response.type - ) - } - - // 2. Let newResponse be a copy of response, except for its body. - const newResponse = 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 = cloneBody(response.body) - } - - // 4. Return newResponse. - return newResponse -} - -function makeResponse (init) { - return { - aborted: false, - rangeRequested: false, - timingAllowPassed: false, - requestIncludesCredentials: false, - type: 'default', - status: 200, - timingInfo: null, - cacheState: '', - statusText: '', - ...init, - headersList: init.headersList - ? new HeadersList(init.headersList) - : new HeadersList(), - urlList: init.urlList ? [...init.urlList] : [] - } -} - -function makeNetworkError (reason) { - const isError = isErrorLike(reason) - return makeResponse({ - type: 'error', - status: 0, - error: isError - ? reason - : new Error(reason ? String(reason) : reason), - aborted: reason && reason.name === 'AbortError' - }) -} - -function 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) { - assert(!(p in state)) - target[p] = value - return true - } - }) -} - -// https://fetch.spec.whatwg.org/#concept-filtered-response -function 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 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 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 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 makeFilteredResponse(response, { - type: 'opaqueredirect', - status: 0, - statusText: '', - headersList: [], - body: null - }) - } else { - assert(false) - } -} - -// https://fetch.spec.whatwg.org/#appropriate-network-error -function makeAppropriateNetworkError (fetchParams, err = null) { - // 1. Assert: fetchParams is canceled. - assert(isCancelled(fetchParams)) - - // 2. Return an aborted network error if fetchParams is aborted; - // otherwise return a network error. - return isAborted(fetchParams) - ? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err })) - : makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err })) -} - -// https://whatpr.org/fetch/1392.html#initialize-a-response -function 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 (!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[kState].status = init.status - } - - // 4. Set response’s response’s status message to init["statusText"]. - if ('statusText' in init && init.statusText != null) { - response[kState].statusText = init.statusText - } - - // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. - if ('headers' in init && init.headers != null) { - fill(response[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 (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: 'Response constructor', - message: 'Invalid response status code ' + response.status - }) - } - - // 2. Set response's body to body's body. - response[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[kState].headersList.contains('Content-Type')) { - response[kState].headersList.append('content-type', body.type) - } - } -} - -webidl.converters.ReadableStream = webidl.interfaceConverter( - ReadableStream -) - -webidl.converters.FormData = webidl.interfaceConverter( - FormData -) - -webidl.converters.URLSearchParams = webidl.interfaceConverter( - URLSearchParams -) - -// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit -webidl.converters.XMLHttpRequestBodyInit = function (V) { - if (typeof V === 'string') { - return webidl.converters.USVString(V) - } - - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) - } - - if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { - return webidl.converters.BufferSource(V) - } - - if (util.isFormDataLike(V)) { - return webidl.converters.FormData(V, { strict: false }) - } - - if (V instanceof URLSearchParams) { - return webidl.converters.URLSearchParams(V) - } - - return webidl.converters.DOMString(V) -} - -// https://fetch.spec.whatwg.org/#bodyinit -webidl.converters.BodyInit = function (V) { - if (V instanceof ReadableStream) { - return webidl.converters.ReadableStream(V) - } - - // Note: the spec doesn't include async iterables, - // this is an undici extension. - if (V?.[Symbol.asyncIterator]) { - return V - } - - return webidl.converters.XMLHttpRequestBodyInit(V) -} - -webidl.converters.ResponseInit = webidl.dictionaryConverter([ - { - key: 'status', - converter: webidl.converters['unsigned short'], - defaultValue: 200 - }, - { - key: 'statusText', - converter: webidl.converters.ByteString, - defaultValue: '' - }, - { - key: 'headers', - converter: webidl.converters.HeadersInit - } -]) - -module.exports = { - makeNetworkError, - makeResponse, - makeAppropriateNetworkError, - filterResponse, - Response, - cloneResponse -} - - -/***/ }), - -/***/ 68323: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - kUrl: Symbol('url'), - kHeaders: Symbol('headers'), - kSignal: Symbol('signal'), - kState: Symbol('state'), - kGuard: Symbol('guard'), - kRealm: Symbol('realm') -} - - -/***/ }), - -/***/ 42696: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(84135) -const { getGlobalOrigin } = __nccwpck_require__(59963) -const { performance } = __nccwpck_require__(82987) -const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(33465) -const assert = __nccwpck_require__(42613) -const { isUint8Array } = __nccwpck_require__(98253) - -let supportedHashes = [] - -// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable -/** @type {import('crypto')|undefined} */ -let crypto - -try { - crypto = __nccwpck_require__(76982) - const possibleRelevantHashes = ['sha256', 'sha384', 'sha512'] - supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)) -/* c8 ignore next 3 */ -} catch { -} - -function 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 responseLocationURL (response, requestFragment) { - // 1. If response’s status is not a redirect status, then return null. - if (!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 && isValidHeaderValue(location)) { - location = new URL(location, 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 requestCurrentURL (request) { - return request.urlList[request.urlList.length - 1] -} - -function requestBadPort (request) { - // 1. Let url be request’s current URL. - const url = requestCurrentURL(request) - - // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, - // then return blocked. - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return 'blocked' - } - - // 3. Return allowed. - return 'allowed' -} - -function 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 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 - } - } - return true -} - -/** - * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 - * @param {number} c - */ -function 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 - } -} - -/** - * @param {string} characters - */ -function isValidHTTPToken (characters) { - if (characters.length === 0) { - return false - } - for (let i = 0; i < characters.length; ++i) { - if (!isTokenCharCode(characters.charCodeAt(i))) { - return false - } - } - return true -} - -/** - * @see https://fetch.spec.whatwg.org/#header-name - * @param {string} potentialValue - */ -function isValidHeaderName (potentialValue) { - return isValidHTTPToken(potentialValue) -} - -/** - * @see https://fetch.spec.whatwg.org/#header-value - * @param {string} potentialValue - */ -function isValidHeaderValue (potentialValue) { - // - Has no leading or trailing HTTP tab or space bytes. - // - Contains no 0x00 (NUL) or HTTP newline bytes. - if ( - potentialValue.startsWith('\t') || - potentialValue.startsWith(' ') || - potentialValue.endsWith('\t') || - potentialValue.endsWith(' ') - ) { - return false - } - - if ( - potentialValue.includes('\0') || - potentialValue.includes('\r') || - potentialValue.includes('\n') - ) { - return false - } - - return true -} - -// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect -function 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 } = 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 (referrerPolicyTokens.has(token)) { - policy = token - break + /** + * `Option` is missing an argument. + * + * @param {Option} option + * @private + */ + optionMissingArgument(option) { + const message = `error: option '${option.flags}' argument missing`; + this.error(message, { code: "commander.optionMissingArgument" }); } - } - } - - // 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 crossOriginResourcePolicyCheck () { - // TODO - return 'allowed' -} - -// https://fetch.spec.whatwg.org/#concept-cors-check -function corsCheck () { - // TODO - return 'success' -} - -// https://fetch.spec.whatwg.org/#concept-tao-check -function TAOCheck () { - // TODO - return 'success' -} - -function 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 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) - } - - // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: - } 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 && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(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 (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null + /** + * `Option` does not have a value, and is a mandatory option. + * + * @param {Option} option + * @private + */ + missingMandatoryOptionValue(option) { + const message = `error: required option '${option.flags}' not specified`; + this.error(message, { code: "commander.missingMandatoryOptionValue" }); + } + /** + * `Option` conflicts with another option. + * + * @param {Option} option + * @param {Option} conflictingOption + * @private + */ + _conflictingOption(option, conflictingOption) { + const findBestOptionFromValue = (option2) => { + const optionKey = option2.attributeName(); + const optionValue = this.getOptionValue(optionKey); + const negativeOption = this.options.find( + (target) => target.negate && optionKey === target.attributeName() + ); + const positiveOption = this.options.find( + (target) => !target.negate && optionKey === target.attributeName() + ); + if (negativeOption && (negativeOption.presetArg === void 0 && optionValue === false || negativeOption.presetArg !== void 0 && optionValue === negativeOption.presetArg)) { + return negativeOption; + } + return positiveOption || option2; + }; + const getErrorMessage = (option2) => { + const bestOption = findBestOptionFromValue(option2); + const optionKey = bestOption.attributeName(); + const source = this.getOptionValueSource(optionKey); + if (source === "env") { + return `environment variable '${bestOption.envVar}'`; + } + return `option '${bestOption.flags}'`; + }; + const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`; + this.error(message, { code: "commander.conflictingOption" }); + } + /** + * Unknown option `flag`. + * + * @param {string} flag + * @private + */ + unknownOption(flag) { + if (this._allowUnknownOption) return; + let suggestion = ""; + if (flag.startsWith("--") && this._showSuggestionAfterError) { + let candidateFlags = []; + let command = this; + do { + const moreFlags = command.createHelp().visibleOptions(command).filter((option) => option.long).map((option) => option.long); + candidateFlags = candidateFlags.concat(moreFlags); + command = command.parent; + } while (command && !command._enablePositionalOptions); + suggestion = suggestSimilar(flag, candidateFlags); + } + const message = `error: unknown option '${flag}'${suggestion}`; + this.error(message, { code: "commander.unknownOption" }); + } + /** + * Excess arguments, more than expected. + * + * @param {string[]} receivedArgs + * @private + */ + _excessArguments(receivedArgs) { + if (this._allowExcessArguments) return; + const expected = this.registeredArguments.length; + const s = expected === 1 ? "" : "s"; + const forSubcommand = this.parent ? ` for '${this.name()}'` : ""; + const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`; + this.error(message, { code: "commander.excessArguments" }); + } + /** + * Unknown command. + * + * @private + */ + unknownCommand() { + const unknownName = this.args[0]; + let suggestion = ""; + if (this._showSuggestionAfterError) { + const candidateNames = []; + this.createHelp().visibleCommands(this).forEach((command) => { + candidateNames.push(command.name()); + if (command.alias()) candidateNames.push(command.alias()); + }); + suggestion = suggestSimilar(unknownName, candidateNames); } - break - default: - // Do nothing. - } - - if (serializedOrigin) { - // 2. Append (`Origin`, serializedOrigin) to request’s header list. - request.headersList.append('origin', serializedOrigin) - } - } -} - -function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { - // TODO - return performance.now() -} - -// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info -function 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 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 clonePolicyContainer (policyContainer) { - return { - referrerPolicy: policyContainer.referrerPolicy - } -} - -// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer -function 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. - 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 = 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 = 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 = 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 = sameOrigin(request, referrerURL) - const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && - !isURLPotentiallyTrustworthy(request.url) - - // 8. Execute the switch statements corresponding to the value of policy: - switch (policy) { - case 'origin': return referrerOrigin != null ? referrerOrigin : 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 = requestCurrentURL(request) - - // 1. If the origin of referrerURL and the origin of request’s current - // URL are the same, then return referrerURL. - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL + const message = `error: unknown command '${unknownName}'${suggestion}`; + this.error(message, { code: "commander.unknownCommand" }); } - - // 2. If referrerURL is a potentially trustworthy URL and request’s - // current URL is not a potentially trustworthy URL, then return no - // referrer. - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return 'no-referrer' + /** + * Get or set the program version. + * + * This method auto-registers the "-V, --version" option which will print the version number. + * + * You can optionally supply the flags and description to override the defaults. + * + * @param {string} [str] + * @param {string} [flags] + * @param {string} [description] + * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments + */ + version(str2, flags, description) { + if (str2 === void 0) return this._version; + this._version = str2; + flags = flags || "-V, --version"; + description = description || "output the version number"; + const versionOption = this.createOption(flags, description); + this._versionOptionName = versionOption.attributeName(); + this._registerOption(versionOption); + this.on("option:" + versionOption.name(), () => { + this._outputConfiguration.writeOut(`${str2} +`); + this._exit(0, "commander.version", str2); + }); + return this; } - - // 3. Return referrerOrigin. - return referrerOrigin - } - case 'strict-origin': // eslint-disable-line /** - * 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': // eslint-disable-line + * Set the description. + * + * @param {string} [str] + * @param {object} [argsDescription] + * @return {(string|Command)} + */ + description(str2, argsDescription) { + if (str2 === void 0 && argsDescription === void 0) + return this._description; + this._description = str2; + if (argsDescription) { + this._argsDescription = argsDescription; + } + return this; + } /** - * 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: // eslint-disable-line - return isNonPotentiallyTrustWorthy ? 'no-referrer' : referrerOrigin - } -} - -/** - * @see https://w3c.github.io/webappsec-referrer-policy/#strip-url - * @param {URL} url - * @param {boolean|undefined} originOnly - */ -function stripURLForReferrer (url, originOnly) { - // 1. Assert: url is a URL. - 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 = '' - } - - // 7. Return url. - return url -} - -function 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 - } -} - -/** - * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist - * @param {Uint8Array} bytes - * @param {string} metadataList - */ -function 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 (crypto === undefined) { - return true - } - - // 1. Let parsedMetadata be the result of parsing metadataList. - const parsedMetadata = 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 = getStrongestMetadata(parsedMetadata) - const metadata = 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 = 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) + * Set the summary. Used when listed as subcommand of parent. + * + * @param {string} [str] + * @return {(string|Command)} + */ + summary(str2) { + if (str2 === void 0) return this._summary; + this._summary = str2; + return this; } - } - - // 4. If actualValue is a case-sensitive match for expectedValue, - // return true. - if (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 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 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 = parseHashWithOptions.exec(token) - - // 3. If token does not parse, continue to the next token. - if ( - parsedToken === null || - parsedToken.groups === undefined || - parsedToken.groups.algo === undefined - ) { - // Note: Chromium blocks the request at this point, but Firefox - // gives a warning that an invalid integrity was given. The - // correct behavior is to ignore these, and subsequently not - // check the integrity of the resource. - 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 (supportedHashes.includes(algorithm)) { - result.push(parsedToken.groups) - } - } - - // 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 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 - // algorithm is sha256, check if algorithm is sha384 and if so, set it as - // the strongest - } else if (metadata.algo[3] === '3') { - algorithm = 'sha384' - } - } - return algorithm -} - -function 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 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 + /** + * Set an alias for the command. + * + * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help. + * + * @param {string} [alias] + * @return {(string|Command)} + */ + alias(alias) { + var _a2; + if (alias === void 0) return this._aliases[0]; + let command = this; + if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) { + command = this.commands[this.commands.length - 1]; + } + if (alias === command._name) + throw new Error("Command alias can't be the same as its name"); + const matchingCommand = (_a2 = this.parent) == null ? void 0 : _a2._findCommand(alias); + if (matchingCommand) { + const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|"); + throw new Error( + `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'` + ); + } + command._aliases.push(alias); + return this; } - return false - } - } - - return true -} - -// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request -function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { - // TODO -} - -/** - * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} - * @param {URL} A - * @param {URL} B - */ -function 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 createDeferredPromise () { - let res - let rej - const promise = new Promise((resolve, reject) => { - res = resolve - rej = reject - }) - - return { promise, resolve: res, reject: rej } -} - -function isAborted (fetchParams) { - return fetchParams.controller.state === 'aborted' -} - -function isCancelled (fetchParams) { - return fetchParams.controller.state === 'aborted' || - fetchParams.controller.state === 'terminated' -} - -const 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(normalizeMethodRecord, null) - -/** - * @see https://fetch.spec.whatwg.org/#concept-method-normalize - * @param {string} method - */ -function normalizeMethod (method) { - return normalizeMethodRecord[method.toLowerCase()] ?? method -} - -// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string -function 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. - assert(typeof result === 'string') - - // 4. Return result. - return result -} - -// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object -const 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 makeIterator (iterator, name, kind) { - const object = { - index: 0, - 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.` - ) + /** + * Set aliases for the command. + * + * Only the first alias is shown in the auto-generated help. + * + * @param {string[]} [aliases] + * @return {(string[]|Command)} + */ + aliases(aliases) { + if (aliases === void 0) return this._aliases; + aliases.forEach((alias) => this.alias(alias)); + return this; } - - // 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, kind, 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 } + /** + * Set / get the command usage `str`. + * + * @param {string} [str] + * @return {(string|Command)} + */ + usage(str2) { + if (str2 === void 0) { + if (this._usage) return this._usage; + const args = this.registeredArguments.map((arg) => { + return humanReadableArgName(arg); + }); + return [].concat( + this.options.length || this._helpOption !== null ? "[options]" : [], + this.commands.length ? "[command]" : [], + this.registeredArguments.length ? args : [] + ).join(" "); + } + this._usage = str2; + return this; } - - // 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 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, 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 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 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 readAllBytes(reader) - successSteps(result) - } catch (e) { - errorSteps(e) - } -} - -/** @type {ReadableStream} */ -let ReadableStream = globalThis.ReadableStream - -function isReadableStreamLike (stream) { - if (!ReadableStream) { - ReadableStream = (__nccwpck_require__(63774).ReadableStream) - } - - return stream instanceof ReadableStream || ( - stream[Symbol.toStringTag] === 'ReadableStream' && - typeof stream.tee === 'function' - ) -} - -const MAXIMUM_ARGUMENT_LENGTH = 65535 - -/** - * @see https://infra.spec.whatwg.org/#isomorphic-decode - * @param {number[]|Uint8Array} input - */ -function 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 < MAXIMUM_ARGUMENT_LENGTH) { - return String.fromCharCode(...input) - } - - return input.reduce((previous, current) => previous + String.fromCharCode(current), '') -} - -/** - * @param {ReadableStreamController} controller - */ -function readableStreamClose (controller) { - try { - controller.close() - } 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 isomorphicEncode (input) { - // 1. Assert: input contains no code points greater than U+00FF. - for (let i = 0; i < input.length; i++) { - 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 readAllBytes (reader) { - const bytes = [] - let byteLength = 0 - - while (true) { - const { 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 (!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. - } -} - -/** - * @see https://fetch.spec.whatwg.org/#is-local - * @param {URL} url - */ -function urlIsLocal (url) { - 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 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 urlIsHttpHttpsScheme (url) { - 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 hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) - -module.exports = { - isAborted, - isCancelled, - createDeferredPromise, - ReadableStreamFrom, - toUSVString, - tryUpgradeRequestToAPotentiallyTrustworthyURL, - coarsenedSharedCurrentTime, - determineRequestsReferrer, - makePolicyContainer, - clonePolicyContainer, - appendFetchMetadata, - appendRequestOriginHeader, - TAOCheck, - corsCheck, - crossOriginResourcePolicyCheck, - createOpaqueTimingInfo, - setRequestReferrerPolicyOnRedirect, - isValidHTTPToken, - requestBadPort, - requestCurrentURL, - responseURL, - responseLocationURL, - isBlobLike, - isURLPotentiallyTrustworthy, - isValidReasonPhrase, - sameOrigin, - normalizeMethod, - serializeJavascriptValueToJSONString, - makeIterator, - isValidHeaderName, - isValidHeaderValue, - hasOwn, - isErrorLike, - fullyReadBody, - bytesMatch, - isReadableStreamLike, - readableStreamClose, - isomorphicEncode, - isomorphicDecode, - urlIsLocal, - urlHasHttpsScheme, - urlIsHttpHttpsScheme, - readAllBytes, - normalizeMethodRecord, - parseMetadata -} - - -/***/ }), - -/***/ 29: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { types } = __nccwpck_require__(39023) -const { hasOwn, toUSVString } = __nccwpck_require__(42696) - -/** @type {import('../../types/webidl').Webidl} */ -const webidl = {} -webidl.converters = {} -webidl.util = {} -webidl.errors = {} - -webidl.errors.exception = function (message) { - return new TypeError(`${message.header}: ${message.message}`) -} - -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 webidl.errors.exception({ - header: context.prefix, - message - }) -} - -webidl.errors.invalidArgument = function (context) { - return webidl.errors.exception({ - header: context.prefix, - message: `"${context.value}" is an invalid ${context.type}.` - }) -} - -// https://webidl.spec.whatwg.org/#implements -webidl.brandCheck = function (V, I, opts = undefined) { - if (opts?.strict !== false && !(V instanceof I)) { - throw new TypeError('Illegal invocation') - } else { - return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] - } -} - -webidl.argumentLengthCheck = function ({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? 's' : ''} required, ` + - `but${length ? ' only' : ''} ${length} found.`, - ...ctx - }) - } -} - -webidl.illegalConstructor = function () { - throw webidl.errors.exception({ - header: 'TypeError', - message: 'Illegal constructor' - }) -} - -// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values -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' + /** + * Get or set the name of the command. + * + * @param {string} [str] + * @return {(string|Command)} + */ + name(str2) { + if (str2 === void 0) return this._name; + this._name = str2; + return this; } - - return 'Object' - } - } -} - -// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint -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 - } - - // 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 webidl.errors.exception({ - header: 'Integer conversion', - message: `Could not convert ${V} to an integer.` - }) - } - - // 2. Set x to IntegerPart(x). - x = webidl.util.IntegerPart(x) - - // 3. If x < lowerBound or x > upperBound, then - // throw a TypeError. - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: 'Integer conversion', - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }) - } - - // 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 - } - - // 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 = 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 -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 -webidl.sequenceConverter = function (converter) { - return (V) => { - // 1. If Type(V) is not Object, throw a TypeError. - if (webidl.util.Type(V) !== 'Object') { - throw webidl.errors.exception({ - header: 'Sequence', - message: `Value of type ${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 webidl.errors.exception({ - header: 'Sequence', - message: 'Object is not an iterator.' - }) - } - - // https://webidl.spec.whatwg.org/#create-sequence-from-iterable - while (true) { - const { done, value } = method.next() - - if (done) { - break + /** + * Set the name of the command from script filename, such as process.argv[1], + * or require.main.filename, or __filename. + * + * (Used internally and public although not documented in README.) + * + * @example + * program.nameFromFilename(require.main.filename); + * + * @param {string} filename + * @return {Command} + */ + nameFromFilename(filename) { + this._name = path2.basename(filename, path2.extname(filename)); + return this; } - - seq.push(converter(value)) - } - - return seq - } -} - -// https://webidl.spec.whatwg.org/#es-to-record -webidl.recordConverter = function (keyConverter, valueConverter) { - return (O) => { - // 1. If Type(O) is not Object, throw a TypeError. - if (webidl.util.Type(O) !== 'Object') { - throw webidl.errors.exception({ - header: 'Record', - message: `Value of type ${webidl.util.Type(O)} is not an Object.` - }) - } - - // 2. Let result be a new empty instance of record. - const result = {} - - if (!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 + /** + * Get or set the directory for searching for executable subcommands of this command. + * + * @example + * program.executableDir(__dirname); + * // or + * program.executableDir('subcommands'); + * + * @param {string} [path] + * @return {(string|null|Command)} + */ + executableDir(path3) { + if (path3 === void 0) return this._executableDir; + this._executableDir = path3; + return this; } - - // 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 + /** + * Return program help documentation. + * + * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout + * @return {string} + */ + helpInformation(contextOptions) { + const helper = this.createHelp(); + if (helper.helpWidth === void 0) { + helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth(); + } + return helper.formatHelp(this, helper); } - } - - // 5. Return result. - return result - } -} - -webidl.interfaceConverter = function (i) { - return (V, opts = {}) => { - if (opts.strict !== false && !(V instanceof i)) { - throw webidl.errors.exception({ - header: i.name, - message: `Expected ${V} to be an instance of ${i.name}.` - }) - } - - return V - } -} - -webidl.dictionaryConverter = function (converters) { - return (dictionary) => { - const type = webidl.util.Type(dictionary) - const dict = {} - - if (type === 'Null' || type === 'Undefined') { - return dict - } else if (type !== 'Object') { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }) - } - - for (const options of converters) { - const { key, defaultValue, required, converter } = options - - if (required === true) { - if (!hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: 'Dictionary', - message: `Missing required key "${key}".` - }) + /** + * @private + */ + _getHelpContext(contextOptions) { + contextOptions = contextOptions || {}; + const context = { error: !!contextOptions.error }; + let write; + if (context.error) { + write = (arg) => this._outputConfiguration.writeErr(arg); + } else { + write = (arg) => this._outputConfiguration.writeOut(arg); } + context.write = contextOptions.write || write; + context.command = this; + return context; } - - let value = dictionary[key] - const hasDefault = hasOwn(options, 'defaultValue') - - // Only use defaultValue if value is undefined and - // a defaultValue options was provided. - if (hasDefault && value !== null) { - value = value ?? defaultValue + /** + * Output help information for this command. + * + * Outputs built-in help, and custom text added using `.addHelpText()`. + * + * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout + */ + outputHelp(contextOptions) { + var _a2; + let deprecatedCallback; + if (typeof contextOptions === "function") { + deprecatedCallback = contextOptions; + contextOptions = void 0; + } + const context = this._getHelpContext(contextOptions); + this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context)); + this.emit("beforeHelp", context); + let helpInformation = this.helpInformation(context); + if (deprecatedCallback) { + helpInformation = deprecatedCallback(helpInformation); + if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) { + throw new Error("outputHelp callback must return a string or a Buffer"); + } + } + context.write(helpInformation); + if ((_a2 = this._getHelpOption()) == null ? void 0 : _a2.long) { + this.emit(this._getHelpOption().long); + } + this.emit("afterHelp", context); + this._getCommandAndAncestors().forEach( + (command) => command.emit("afterAllHelp", context) + ); } - - // 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 webidl.errors.exception({ - header: 'Dictionary', - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` - }) + /** + * You can pass in flags and a description to customise the built-in help option. + * Pass in false to disable the built-in help option. + * + * @example + * program.helpOption('-?, --help' 'show help'); // customise + * program.helpOption(false); // disable + * + * @param {(string | boolean)} flags + * @param {string} [description] + * @return {Command} `this` command for chaining + */ + helpOption(flags, description) { + if (typeof flags === "boolean") { + if (flags) { + this._helpOption = this._helpOption ?? void 0; + } else { + this._helpOption = null; + } + return this; } - - dict[key] = value + flags = flags ?? "-h, --help"; + description = description ?? "display help for command"; + this._helpOption = this.createOption(flags, description); + return this; } + /** + * Lazy create help option. + * Returns null if has been disabled with .helpOption(false). + * + * @returns {(Option | null)} the help option + * @package + */ + _getHelpOption() { + if (this._helpOption === void 0) { + this.helpOption(void 0, void 0); + } + return this._helpOption; + } + /** + * Supply your own option to use for the built-in help option. + * This is an alternative to using helpOption() to customise the flags and description etc. + * + * @param {Option} option + * @return {Command} `this` command for chaining + */ + addHelpOption(option) { + this._helpOption = option; + return this; + } + /** + * Output help information and exit. + * + * Outputs built-in help, and custom text added using `.addHelpText()`. + * + * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout + */ + help(contextOptions) { + this.outputHelp(contextOptions); + let exitCode = process2.exitCode || 0; + if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) { + exitCode = 1; + } + this._exit(exitCode, "commander.help", "(outputHelp)"); + } + /** + * Add additional text to be displayed with the built-in help. + * + * Position is 'before' or 'after' to affect just this command, + * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands. + * + * @param {string} position - before or after built-in help + * @param {(string | Function)} text - string to add, or a function returning a string + * @return {Command} `this` command for chaining + */ + addHelpText(position, text) { + const allowedValues = ["beforeAll", "before", "after", "afterAll"]; + if (!allowedValues.includes(position)) { + throw new Error(`Unexpected value for position to addHelpText. +Expecting one of '${allowedValues.join("', '")}'`); + } + const helpEvent = `${position}Help`; + this.on(helpEvent, (context) => { + let helpStr; + if (typeof text === "function") { + helpStr = text({ error: context.error, command: context.command }); + } else { + helpStr = text; + } + if (helpStr) { + context.write(`${helpStr} +`); + } + }); + return this; + } + /** + * Output help information if help flags specified + * + * @param {Array} args - array of options to search for help flags + * @private + */ + _outputHelpIfRequested(args) { + const helpOption = this._getHelpOption(); + const helpRequested = helpOption && args.find((arg) => helpOption.is(arg)); + if (helpRequested) { + this.outputHelp(); + this._exit(0, "commander.helpDisplayed", "(outputHelp)"); + } + } + }; + function incrementNodeInspectorPort(args) { + return args.map((arg) => { + if (!arg.startsWith("--inspect")) { + return arg; + } + let debugOption; + let debugHost = "127.0.0.1"; + let debugPort = "9229"; + let match; + if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) { + debugOption = match[1]; + } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) { + debugOption = match[1]; + if (/^\d+$/.test(match[3])) { + debugPort = match[3]; + } else { + debugHost = match[3]; + } + } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) { + debugOption = match[1]; + debugHost = match[3]; + debugPort = match[4]; + } + if (debugOption && debugPort !== "0") { + return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`; + } + return arg; + }); } - - return dict - } -} - -webidl.nullableConverter = function (converter) { - return (V) => { - if (V === null) { - return V - } - - return converter(V) - } -} - -// https://webidl.spec.whatwg.org/#es-DOMString -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 -webidl.converters.ByteString = function (V) { - // 1. Let x be ? ToString(V). - // Note: DOMString converter perform ? ToString(V) - const x = 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.` - ) - } - } - - // 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 -webidl.converters.USVString = toUSVString - -// https://webidl.spec.whatwg.org/#es-boolean -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 -webidl.converters.any = function (V) { - return V -} - -// https://webidl.spec.whatwg.org/#es-long-long -webidl.converters['long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "signed"). - const x = 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 -webidl.converters['unsigned long long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). - const x = 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 -webidl.converters['unsigned long'] = function (V) { - // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). - const x = 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 -webidl.converters['unsigned short'] = function (V, opts) { - // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). - const x = 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 -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 ( - webidl.util.Type(V) !== 'Object' || - !types.isAnyArrayBuffer(V) - ) { - throw webidl.errors.conversionFailed({ - prefix: `${V}`, - argument: `${V}`, - types: ['ArrayBuffer'] - }) - } - - // 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 && types.isSharedArrayBuffer(V)) { - throw 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. - // 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 -} - -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 ( - webidl.util.Type(V) !== 'Object' || - !types.isTypedArray(V) || - V.constructor.name !== T.name - ) { - throw webidl.errors.conversionFailed({ - prefix: `${T.name}`, - argument: `${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 && types.isSharedArrayBuffer(V.buffer)) { - throw 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. - // 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 -} - -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 (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { - throw webidl.errors.exception({ - header: 'DataView', - message: 'Object 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 && types.isSharedArrayBuffer(V.buffer)) { - throw 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. - // 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 -} - -// https://webidl.spec.whatwg.org/#BufferSource -webidl.converters.BufferSource = function (V, opts = {}) { - if (types.isAnyArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, opts) - } - - if (types.isTypedArray(V)) { - return webidl.converters.TypedArray(V, V.constructor) - } - - if (types.isDataView(V)) { - return webidl.converters.DataView(V, opts) - } - - throw new TypeError(`Could not convert ${V} to a BufferSource.`) -} - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.ByteString -) - -webidl.converters['sequence>'] = webidl.sequenceConverter( - webidl.converters['sequence'] -) - -webidl.converters['record'] = webidl.recordConverter( - webidl.converters.ByteString, - webidl.converters.ByteString -) - -module.exports = { - webidl -} - - -/***/ }), - -/***/ 2951: -/***/ ((module) => { - -"use strict"; - - -/** - * @see https://encoding.spec.whatwg.org/#concept-encoding-get - * @param {string|undefined} label - */ -function 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' - } -} - -module.exports = { - getEncoding -} - - -/***/ }), - -/***/ 62171: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - staticPropertyDescriptors, - readOperation, - fireAProgressEvent -} = __nccwpck_require__(43170) -const { - kState, - kError, - kResult, - kEvents, - kAborted -} = __nccwpck_require__(78057) -const { webidl } = __nccwpck_require__(29) -const { kEnumerableProperty } = __nccwpck_require__(33465) - -class FileReader extends EventTarget { - constructor () { - super() - - this[kState] = 'empty' - this[kResult] = null - this[kError] = null - this[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) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsArrayBuffer' }) - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsArrayBuffer(blob) method, when invoked, - // must initiate a read operation for blob with ArrayBuffer. - readOperation(this, blob, 'ArrayBuffer') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsBinaryString - * @param {import('buffer').Blob} blob - */ - readAsBinaryString (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsBinaryString' }) - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsBinaryString(blob) method, when invoked, - // must initiate a read operation for blob with BinaryString. - readOperation(this, blob, 'BinaryString') - } - - /** - * @see https://w3c.github.io/FileAPI/#readAsDataText - * @param {import('buffer').Blob} blob - * @param {string?} encoding - */ - readAsText (blob, encoding = undefined) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) - - blob = webidl.converters.Blob(blob, { strict: false }) - - if (encoding !== undefined) { - encoding = webidl.converters.DOMString(encoding) - } - - // The readAsText(blob, encoding) method, when invoked, - // must initiate a read operation for blob with Text and encoding. - readOperation(this, blob, 'Text', encoding) + exports2.Command = Command; } +}); - /** - * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL - * @param {import('buffer').Blob} blob - */ - readAsDataURL (blob) { - webidl.brandCheck(this, FileReader) - - webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsDataURL' }) - - blob = webidl.converters.Blob(blob, { strict: false }) - - // The readAsDataURL(blob) method, when invoked, must - // initiate a read operation for blob with DataURL. - readOperation(this, blob, 'DataURL') +// node_modules/.pnpm/commander@12.1.0/node_modules/commander/index.js +var require_commander = __commonJS({ + "node_modules/.pnpm/commander@12.1.0/node_modules/commander/index.js"(exports2) { + var { Argument } = require_argument(); + var { Command } = require_command(); + var { CommanderError, InvalidArgumentError } = require_error(); + var { Help } = require_help(); + var { Option } = require_option(); + exports2.program = new Command(); + exports2.createCommand = (name) => new Command(name); + exports2.createOption = (flags, description) => new Option(flags, description); + exports2.createArgument = (name, description) => new Argument(name, description); + exports2.Command = Command; + exports2.Option = Option; + exports2.Argument = Argument; + exports2.Help = Help; + exports2.CommanderError = CommanderError; + exports2.InvalidArgumentError = InvalidArgumentError; + exports2.InvalidOptionArgumentError = InvalidArgumentError; } +}); - /** - * @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[kState] === 'empty' || this[kState] === 'done') { - this[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[kState] === 'loading') { - this[kState] = 'done' - this[kResult] = null +// node_modules/.pnpm/@probot+get-private-key@1.1.2/node_modules/@probot/get-private-key/dist-web/index.js +var dist_web_exports7 = {}; +__export(dist_web_exports7, { + getPrivateKey: () => getPrivateKey +}); +import { resolve as resolve3 } from "path"; +import { existsSync as existsSync3, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "fs"; +function getPrivateKey(options2 = {}) { + const env = options2.env || process.env; + const cwd = options2.cwd || process.cwd(); + if (options2.filepath) { + return readFileSync2(resolve3(cwd, options2.filepath), "utf-8"); + } + if (env.PRIVATE_KEY) { + let privateKey = env.PRIVATE_KEY; + if (isBase64(privateKey)) { + privateKey = Buffer.from(privateKey, "base64").toString(); } - - // 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[kAborted] = true - - // 4. Terminate the algorithm for the read method being processed. - // TODO - - // 5. Fire a progress event called abort at this. - fireAProgressEvent('abort', this) - - // 6. If this's state is not "loading", fire a progress - // event called loadend at this. - if (this[kState] !== 'loading') { - fireAProgressEvent('loadend', this) + if (privateKey.includes(begin) && privateKey.includes(end)) { + if (privateKey.indexOf("\\n") !== -1) { + privateKey = privateKey.replace(/\\n/g, "\n"); + } + if (privateKey.indexOf("\n") === -1) { + privateKey = addNewlines(privateKey); + } + return privateKey; } + throw new Error( + `[@probot/get-private-key] The contents of "env.PRIVATE_KEY" could not be validated. Please check to ensure you have copied the contents of the .pem file correctly.` + ); } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate - */ - get readyState () { - webidl.brandCheck(this, FileReader) - - switch (this[kState]) { - case 'empty': return this.EMPTY - case 'loading': return this.LOADING - case 'done': return this.DONE + if (env.PRIVATE_KEY_PATH) { + const filepath = resolve3(cwd, env.PRIVATE_KEY_PATH); + if (existsSync3(filepath)) { + return readFileSync2(filepath, "utf-8"); + } else { + throw new Error( + `[@probot/get-private-key] Private key does not exists at path: "${env.PRIVATE_KEY_PATH}". Please check to ensure that "env.PRIVATE_KEY_PATH" is correct.` + ); } } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-result - */ - get result () { - webidl.brandCheck(this, FileReader) - - // The result attribute’s getter, when invoked, must return - // this's result. - return this[kResult] - } - - /** - * @see https://w3c.github.io/FileAPI/#dom-filereader-error - */ - get error () { - webidl.brandCheck(this, FileReader) - - // The error attribute’s getter, when invoked, must return - // this's error. - return this[kError] + const pemFiles = readdirSync2(cwd).filter((path2) => path2.endsWith(".pem")); + if (pemFiles.length > 1) { + const paths = pemFiles.join(", "); + throw new Error( + `[@probot/get-private-key] More than one file found: "${paths}". Set { filepath } option or set one of the environment variables: PRIVATE_KEY, PRIVATE_KEY_PATH` + ); + } else if (pemFiles[0]) { + return getPrivateKey({ filepath: pemFiles[0], cwd }); } - - get onloadend () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadend + return null; +} +function isBase64(str2) { + return Buffer.from(str2, "base64").toString("base64") === str2; +} +function addNewlines(privateKey) { + const middleLength = privateKey.length - begin.length - end.length - 2; + const middle = privateKey.substr(begin.length + 1, middleLength); + return `${begin} +${middle.trim().replace(/\s+/g, "\n")} +${end}`; +} +var VERSION16, begin, end; +var init_dist_web9 = __esm({ + "node_modules/.pnpm/@probot+get-private-key@1.1.2/node_modules/@probot/get-private-key/dist-web/index.js"() { + VERSION16 = "1.1.2"; + begin = "-----BEGIN RSA PRIVATE KEY-----"; + end = "-----END RSA PRIVATE KEY-----"; + getPrivateKey.VERSION = VERSION16; } +}); - set onloadend (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].loadend) { - this.removeEventListener('loadend', this[kEvents].loadend) - } - - if (typeof fn === 'function') { - this[kEvents].loadend = fn - this.addEventListener('loadend', fn) - } else { - this[kEvents].loadend = null +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/bin/read-cli-options.js +var require_read_cli_options = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/bin/read-cli-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readCliOptions = readCliOptions; + var commander_1 = require_commander(); + var get_private_key_1 = (init_dist_web9(), __toCommonJS(dist_web_exports7)); + function readCliOptions(argv) { + commander_1.program.usage("[options] ").option("-p, --port ", "Port to start the server on", String(process.env.PORT || 3e3)).option("-H --host ", "Host to start the server on", process.env.HOST).option("-W, --webhook-proxy ", "URL of the webhook proxy service.`", process.env.WEBHOOK_PROXY_URL).option("-w, --webhook-path ", "URL path which receives webhooks. Ex: `/webhook`", process.env.WEBHOOK_PATH).option("-a, --app ", "ID of the GitHub App", process.env.APP_ID).option("-s, --secret ", "Webhook secret of the GitHub App", process.env.WEBHOOK_SECRET).option("-P, --private-key ", "Path to private key file (.pem) for the GitHub App", process.env.PRIVATE_KEY_PATH).option("-L, --log-level ", 'One of: "trace" | "debug" | "info" | "warn" | "error" | "fatal"', process.env.LOG_LEVEL || "info").option("--log-format ", 'One of: "pretty", "json"', process.env.LOG_FORMAT).option("--log-level-in-string", "Set to log levels (trace, debug, info, ...) as words instead of numbers (10, 20, 30, ...)", process.env.LOG_LEVEL_IN_STRING === "true").option("--sentry-dsn ", 'Set to your Sentry DSN, e.g. "https://1234abcd@sentry.io/12345"', process.env.SENTRY_DSN).option("--redis-url ", 'Set to a "redis://" url in order to enable cluster support for request throttling. Example: "redis://:secret@redis-123.redislabs.com:12345/0"', process.env.REDIS_URL).option("--base-url ", 'GitHub API base URL. If you use GitHub Enterprise Server, and your hostname is "https://github.acme-inc.com", then the root URL is "https://github.acme-inc.com/api/v3"', process.env.GHE_HOST ? `${process.env.GHE_PROTOCOL || "https"}://${process.env.GHE_HOST}/api/v3` : "https://api.github.com").parse(argv); + const { app: appId, privateKey: privateKeyPath, redisUrl, ...options2 } = commander_1.program.opts(); + return { + privateKey: (0, get_private_key_1.getPrivateKey)({ filepath: privateKeyPath }) || void 0, + appId, + redisConfig: redisUrl, + args: commander_1.program.args, + ...options2 + }; } } +}); - get onerror () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].error - } - - set onerror (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].error) { - this.removeEventListener('error', this[kEvents].error) - } - - if (typeof fn === 'function') { - this[kEvents].error = fn - this.addEventListener('error', fn) - } else { - this[kEvents].error = null +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/bin/read-env-options.js +var require_read_env_options = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/bin/read-env-options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readEnvOptions = readEnvOptions; + var get_private_key_1 = (init_dist_web9(), __toCommonJS(dist_web_exports7)); + function readEnvOptions(env = process.env) { + const privateKey = (0, get_private_key_1.getPrivateKey)({ env }); + const logFormat = env.LOG_FORMAT && env.LOG_FORMAT.length !== 0 ? env.LOG_FORMAT === "pretty" ? "pretty" : "json" : env.NODE_ENV === "production" ? "json" : "pretty"; + return { + args: [], + privateKey: privateKey && privateKey.toString() || void 0, + appId: Number(env.APP_ID), + port: Number(env.PORT) || 3e3, + host: env.HOST, + secret: env.WEBHOOK_SECRET, + webhookPath: env.WEBHOOK_PATH, + webhookProxy: env.WEBHOOK_PROXY_URL, + logLevel: env.LOG_LEVEL, + logFormat, + logLevelInString: env.LOG_LEVEL_IN_STRING === "true", + logMessageKey: env.LOG_MESSAGE_KEY, + sentryDsn: env.SENTRY_DSN, + redisConfig: env.REDIS_URL, + baseUrl: env.GHE_HOST ? `${env.GHE_PROTOCOL || "https"}://${env.GHE_HOST}/api/v3` : "https://api.github.com" + }; } } +}); - get onloadstart () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].loadstart - } - - set onloadstart (fn) { - webidl.brandCheck(this, FileReader) +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/probot.js +var require_probot2 = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/views/probot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.probotView = probotView; + function probotView({ name, description, version }) { + return ` + + + + + + ${name || "Your App"} | built with Probot + + + + +
+ Probot Logo +
+

+ Welcome to ${name || "your Probot App"} +${version ? ` v${version} +` : ""}

- if (this[kEvents].loadstart) { - this.removeEventListener('loadstart', this[kEvents].loadstart) - } +

${description ? description : 'This bot was built using Probot, a framework for building GitHub Apps.'}

+
- if (typeof fn === 'function') { - this[kEvents].loadstart = fn - this.addEventListener('loadstart', fn) - } else { - this[kEvents].loadstart = null +
+

Need help?

+ +
+
+ +`; } } +}); - get onprogress () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].progress - } - - set onprogress (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].progress) { - this.removeEventListener('progress', this[kEvents].progress) - } - - if (typeof fn === 'function') { - this[kEvents].progress = fn - this.addEventListener('progress', fn) - } else { - this[kEvents].progress = null +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/apps/default.js +var require_default2 = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/apps/default.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultApp = defaultApp; + var node_path_1 = __require("node:path"); + var load_package_json_js_1 = require_load_package_json(); + var probot_js_1 = require_probot2(); + function defaultApp(_app, { getRouter, cwd = process.cwd() }) { + if (!getRouter) { + throw new Error("getRouter() is required for defaultApp"); + } + const pkg = (0, load_package_json_js_1.loadPackageJson)((0, node_path_1.resolve)(cwd, "package.json")); + const probotViewRendered = (0, probot_js_1.probotView)({ + name: pkg.name, + version: pkg.version, + description: pkg.description + }); + const router = getRouter(); + router.get("/probot", (_req, res) => { + res.send(probotViewRendered); + }); + router.get("/", (_req, res) => res.redirect("/probot")); } } +}); - get onload () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].load +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/resolve-app-function.js +var require_resolve_app_function = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/helpers/resolve-app-function.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveAppFunction = void 0; + var resolveAppFunction = async (appFnId, opts = {}) => { + const basedir = process.cwd(); + const resolver = opts.resolver || __require.resolve; + const appFnPath = resolver(appFnId, { paths: [basedir] }); + const appFnPathWithFileProtocol = appFnPath.replace(/^([a-zA-Z]:)/, "file://$1"); + const { default: mod } = await import(appFnPathWithFileProtocol); + return mod.__esModule && mod.default ? mod.default : mod; + }; + exports2.resolveAppFunction = resolveAppFunction; } +}); - set onload (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].load) { - this.removeEventListener('load', this[kEvents].load) - } - - if (typeof fn === 'function') { - this[kEvents].load = fn - this.addEventListener('load', fn) - } else { - this[kEvents].load = null +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/run.js +var require_run = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/run.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.run = run2; + var pkg_conf_1 = __importDefault(require_pkg_conf()); + var index_js_1 = require_lib6(); + var setup_js_1 = require_setup2(); + var get_log_js_1 = require_get_log(); + var read_cli_options_js_1 = require_read_cli_options(); + var read_env_options_js_1 = require_read_env_options(); + var server_js_1 = require_server(); + var default_js_1 = require_default2(); + var resolve_app_function_js_1 = require_resolve_app_function(); + var is_production_js_1 = require_is_production(); + var dotenv_1 = require_main(); + async function run2(appFnOrArgv, additionalOptions) { + (0, dotenv_1.config)(); + const envOptions = (0, read_env_options_js_1.readEnvOptions)(additionalOptions == null ? void 0 : additionalOptions.env); + const cliOptions = Array.isArray(appFnOrArgv) ? (0, read_cli_options_js_1.readCliOptions)(appFnOrArgv) : {}; + const { + // log options + logLevel: level, + logFormat, + logLevelInString, + logMessageKey, + sentryDsn, + // server options + host, + port, + webhookPath, + webhookProxy, + // probot options + appId, + privateKey, + redisConfig, + secret, + baseUrl, + // others + args + } = { ...envOptions, ...cliOptions }; + const log2 = (0, get_log_js_1.getLog)({ + level, + logFormat, + logLevelInString, + logMessageKey, + sentryDsn + }); + const probotOptions = { + appId, + privateKey, + redisConfig, + secret, + baseUrl, + log: (additionalOptions == null ? void 0 : additionalOptions.log) || log2.child({ name: "probot" }), + Octokit: (additionalOptions == null ? void 0 : additionalOptions.Octokit) || void 0 + }; + const serverOptions = { + host, + port, + webhookPath, + webhookProxy, + log: log2.child({ name: "server" }), + Probot: index_js_1.Probot.defaults(probotOptions) + }; + let server; + if (!appId || !privateKey) { + if ((0, is_production_js_1.isProduction)()) { + if (!appId) { + throw new Error("App ID is missing, and is required to run in production mode. To resolve, ensure the APP_ID environment variable is set."); + } else if (!privateKey) { + throw new Error("Certificate is missing, and is required to run in production mode. To resolve, ensure either the PRIVATE_KEY or PRIVATE_KEY_PATH environment variable is set and contains a valid certificate"); + } + } + server = new server_js_1.Server({ + ...serverOptions, + Probot: index_js_1.Probot.defaults({ + ...probotOptions, + appId: 1, + privateKey: "dummy value for setup, see #1512" + }) + }); + await server.load((0, setup_js_1.setupAppFactory)(host, port)); + await server.start(); + return server; + } + if (Array.isArray(appFnOrArgv)) { + const pkg = await (0, pkg_conf_1.default)("probot"); + const combinedApps = async (_app) => { + await server.load(default_js_1.defaultApp); + if (Array.isArray(pkg.apps)) { + for (const appPath2 of pkg.apps) { + const appFn2 = await (0, resolve_app_function_js_1.resolveAppFunction)(appPath2); + await server.load(appFn2); + } + } + const [appPath] = args; + const appFn = await (0, resolve_app_function_js_1.resolveAppFunction)(appPath); + await server.load(appFn); + }; + server = new server_js_1.Server(serverOptions); + await server.load(combinedApps); + await server.start(); + return server; + } + server = new server_js_1.Server(serverOptions); + await server.load(appFnOrArgv); + await server.start(); + return server; } } +}); - get onabort () { - webidl.brandCheck(this, FileReader) - - return this[kEvents].abort - } - - set onabort (fn) { - webidl.brandCheck(this, FileReader) - - if (this[kEvents].abort) { - this.removeEventListener('abort', this[kEvents].abort) - } - - if (typeof fn === 'function') { - this[kEvents].abort = fn - this.addEventListener('abort', fn) - } else { - this[kEvents].abort = null +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/create-probot.js +var require_create_probot = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/create-probot.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createProbot = createProbot2; + var get_private_key_1 = (init_dist_web9(), __toCommonJS(dist_web_exports7)); + var get_log_js_1 = require_get_log(); + var probot_js_1 = require_probot(); + var server_js_1 = require_server(); + var DEFAULTS2 = { + APP_ID: "", + WEBHOOK_SECRET: "", + WEBHOOK_PATH: server_js_1.defaultWebhooksPath, + GHE_HOST: "", + GHE_PROTOCOL: "https", + LOG_FORMAT: void 0, + LOG_LEVEL: "warn", + LOG_LEVEL_IN_STRING: "false", + LOG_MESSAGE_KEY: "msg", + REDIS_URL: "", + SENTRY_DSN: "" + }; + function createProbot2({ overrides = {}, defaults = {}, env = process.env } = {}) { + const privateKey = (0, get_private_key_1.getPrivateKey)({ env }); + const envWithDefaults = { ...DEFAULTS2, ...env }; + const envOptions = { + logLevel: envWithDefaults.LOG_LEVEL, + appId: Number(envWithDefaults.APP_ID), + privateKey: privateKey && privateKey.toString() || void 0, + secret: envWithDefaults.WEBHOOK_SECRET, + redisConfig: envWithDefaults.REDIS_URL, + webhookPath: envWithDefaults.WEBHOOK_PATH, + baseUrl: envWithDefaults.GHE_HOST ? `${envWithDefaults.GHE_PROTOCOL || "https"}://${envWithDefaults.GHE_HOST}/api/v3` : "https://api.github.com" + }; + const probotOptions = { + ...defaults, + ...envOptions, + ...overrides + }; + const log2 = (0, get_log_js_1.getLog)({ + level: probotOptions.logLevel, + logFormat: envWithDefaults.LOG_FORMAT, + logLevelInString: envWithDefaults.LOG_LEVEL_IN_STRING === "true", + logMessageKey: envWithDefaults.LOG_MESSAGE_KEY, + sentryDsn: envWithDefaults.SENTRY_DSN + }).child({ name: "server" }); + return new probot_js_1.Probot({ + log: log2.child({ name: "probot" }), + ...probotOptions + }); } } -} - -// https://w3c.github.io/FileAPI/#dom-filereader-empty -FileReader.EMPTY = FileReader.prototype.EMPTY = 0 -// https://w3c.github.io/FileAPI/#dom-filereader-loading -FileReader.LOADING = FileReader.prototype.LOADING = 1 -// https://w3c.github.io/FileAPI/#dom-filereader-done -FileReader.DONE = FileReader.prototype.DONE = 2 - -Object.defineProperties(FileReader.prototype, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors, - readAsArrayBuffer: kEnumerableProperty, - readAsBinaryString: kEnumerableProperty, - readAsText: kEnumerableProperty, - readAsDataURL: kEnumerableProperty, - abort: kEnumerableProperty, - readyState: kEnumerableProperty, - result: kEnumerableProperty, - error: kEnumerableProperty, - onloadstart: kEnumerableProperty, - onprogress: kEnumerableProperty, - onload: kEnumerableProperty, - onabort: kEnumerableProperty, - onerror: kEnumerableProperty, - onloadend: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'FileReader', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(FileReader, { - EMPTY: staticPropertyDescriptors, - LOADING: staticPropertyDescriptors, - DONE: staticPropertyDescriptors -}) - -module.exports = { - FileReader -} - - -/***/ }), - -/***/ 8389: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(29) - -const kState = Symbol('ProgressEvent state') - -/** - * @see https://xhr.spec.whatwg.org/#progressevent - */ -class ProgressEvent extends Event { - constructor (type, eventInitDict = {}) { - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}) - - super(type, eventInitDict) +}); - this[kState] = { - lengthComputable: eventInitDict.lengthComputable, - loaded: eventInitDict.loaded, - total: eventInitDict.total +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/create-node-middleware.js +var require_create_node_middleware = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/create-node-middleware.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createNodeMiddleware = createNodeMiddleware2; + var webhooks_1 = (init_dist_src5(), __toCommonJS(dist_src_exports3)); + var server_js_1 = require_server(); + var create_probot_js_1 = require_create_probot(); + function createNodeMiddleware2(appFn, { probot = (0, create_probot_js_1.createProbot)(), webhooksPath } = {}) { + probot.load(appFn); + return (0, webhooks_1.createNodeMiddleware)(probot.webhooks, { + path: webhooksPath || probot.webhookPath || server_js_1.defaultWebhooksPath + }); } } +}); - get lengthComputable () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].lengthComputable - } - - get loaded () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].loaded - } - - get total () { - webidl.brandCheck(this, ProgressEvent) - - return this[kState].total +// node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/index.js +var require_lib6 = __commonJS({ + "node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createProbot = exports2.createNodeMiddleware = exports2.run = exports2.ProbotOctokit = exports2.Server = exports2.Probot = exports2.Context = void 0; + var context_js_1 = require_context(); + Object.defineProperty(exports2, "Context", { enumerable: true, get: function() { + return context_js_1.Context; + } }); + var probot_js_1 = require_probot(); + Object.defineProperty(exports2, "Probot", { enumerable: true, get: function() { + return probot_js_1.Probot; + } }); + var server_js_1 = require_server(); + Object.defineProperty(exports2, "Server", { enumerable: true, get: function() { + return server_js_1.Server; + } }); + var probot_octokit_js_1 = require_probot_octokit(); + Object.defineProperty(exports2, "ProbotOctokit", { enumerable: true, get: function() { + return probot_octokit_js_1.ProbotOctokit; + } }); + var run_js_1 = require_run(); + Object.defineProperty(exports2, "run", { enumerable: true, get: function() { + return run_js_1.run; + } }); + var create_node_middleware_js_1 = require_create_node_middleware(); + Object.defineProperty(exports2, "createNodeMiddleware", { enumerable: true, get: function() { + return create_node_middleware_js_1.createNodeMiddleware; + } }); + var create_probot_js_1 = require_create_probot(); + Object.defineProperty(exports2, "createProbot", { enumerable: true, get: function() { + return create_probot_js_1.createProbot; + } }); } -} +}); -webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ - { - key: 'lengthComputable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'loaded', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'total', - converter: webidl.converters['unsigned long long'], - defaultValue: 0 - }, - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-helpers.js +var require_err_helpers2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-helpers.js"(exports2, module2) { + "use strict"; + var isErrorLike = (err) => { + return err && typeof err.message === "string"; + }; + var getErrorCause = (err) => { + if (!err) return; + const cause = err.cause; + if (typeof cause === "function") { + const causeResult = err.cause(); + return isErrorLike(causeResult) ? causeResult : void 0; + } else { + return isErrorLike(cause) ? cause : void 0; + } + }; + var _stackWithCauses = (err, seen) => { + if (!isErrorLike(err)) return ""; + const stack = err.stack || ""; + if (seen.has(err)) { + return stack + "\ncauses have become circular..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + return stack + "\ncaused by: " + _stackWithCauses(cause, seen); + } else { + return stack; + } + }; + var stackWithCauses = (err) => _stackWithCauses(err, /* @__PURE__ */ new Set()); + var _messageWithCauses = (err, seen, skip) => { + if (!isErrorLike(err)) return ""; + const message = skip ? "" : err.message || ""; + if (seen.has(err)) { + return message + ": ..."; + } + const cause = getErrorCause(err); + if (cause) { + seen.add(err); + const skipIfVErrorStyleCause = typeof err.cause === "function"; + return message + (skipIfVErrorStyleCause ? "" : ": ") + _messageWithCauses(cause, seen, skipIfVErrorStyleCause); + } else { + return message; + } + }; + var messageWithCauses = (err) => _messageWithCauses(err, /* @__PURE__ */ new Set()); + module2.exports = { + isErrorLike, + getErrorCause, + stackWithCauses, + messageWithCauses + }; } -]) - -module.exports = { - ProgressEvent -} - - -/***/ }), - -/***/ 78057: -/***/ ((module) => { - -"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') -} - - -/***/ }), - -/***/ 43170: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - kState, - kError, - kResult, - kAborted, - kLastProgressEventFired -} = __nccwpck_require__(78057) -const { ProgressEvent } = __nccwpck_require__(8389) -const { getEncoding } = __nccwpck_require__(2951) -const { DOMException } = __nccwpck_require__(84135) -const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(43911) -const { types } = __nccwpck_require__(39023) -const { StringDecoder } = __nccwpck_require__(13193) -const { btoa } = __nccwpck_require__(20181) - -/** @type {PropertyDescriptor} */ -const 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 readOperation (fr, blob, type, encodingName) { - // 1. If fr’s state is "loading", throw an InvalidStateError - // DOMException. - if (fr[kState] === 'loading') { - throw new DOMException('Invalid state', 'InvalidStateError') - } - - // 2. Set fr’s state to "loading". - fr[kState] = 'loading' - - // 3. Set fr’s result to null. - fr[kResult] = null - - // 4. Set fr’s error to null. - fr[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 - - // 10. In parallel, while true: - // Note: "In parallel" just means non-blocking - // Note 2: readOperation itself cannot be async as double - // reading the body would then reject the promise, instead - // of throwing an error. - ;(async () => { - while (!fr[kAborted]) { - // 1. Wait for chunkPromise to be fulfilled or rejected. - try { - const { done, 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[kAborted]) { - queueMicrotask(() => { - fireAProgressEvent('loadstart', fr) - }) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-proto.js +var require_err_proto2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-proto.js"(exports2, module2) { + "use strict"; + var seen = Symbol("circular-ref-tag"); + var rawSymbol = Symbol("pino-raw-err-ref"); + var pinoErrProto = Object.create({}, { + type: { + enumerable: true, + writable: true, + value: void 0 + }, + message: { + enumerable: true, + writable: true, + value: void 0 + }, + stack: { + enumerable: true, + writable: true, + value: void 0 + }, + aggregateErrors: { + enumerable: true, + writable: true, + value: void 0 + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; } + } + }); + Object.defineProperty(pinoErrProto, rawSymbol, { + writable: true, + value: {} + }); + module2.exports = { + pinoErrProto, + pinoErrorSymbols: { + seen, + rawSymbol + } + }; + } +}); - // 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 && 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[kLastProgressEventFired] === undefined || - Date.now() - fr[kLastProgressEventFired] >= 50 - ) && - !fr[kAborted] - ) { - fr[kLastProgressEventFired] = Date.now() - queueMicrotask(() => { - 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[kState] = 'done' - - // 2. Let result be the result of package data given - // bytes, type, blob’s type, and encodingName. - try { - const result = packageData(bytes, type, blob.type, encodingName) - - // 4. Else: - - if (fr[kAborted]) { - return - } - - // 1. Set fr’s result to result. - fr[kResult] = result - - // 2. Fire a progress event called load at the fr. - fireAProgressEvent('load', fr) - } catch (error) { - // 3. If package data threw an exception error: - - // 1. Set fr’s error to error. - fr[kError] = error - - // 2. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - } - - // 5. If fr’s state is not "loading", fire a progress - // event called loadend at the fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err.js +var require_err2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err.js"(exports2, module2) { + "use strict"; + module2.exports = errSerializer; + var { messageWithCauses, stackWithCauses, isErrorLike } = require_err_helpers2(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto2(); + var { seen } = pinoErrorSymbols; + var { toString: toString2 } = Object.prototype; + function errSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString2.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = messageWithCauses(err); + _err.stack = stackWithCauses(err); + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errSerializer(err2)); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (key !== "cause" && !Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errSerializer(val); } - }) - - break - } - } catch (error) { - if (fr[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[kState] = 'done' - - // 2. Set fr’s error to error. - fr[kError] = error - - // 3. Fire a progress event called error at fr. - fireAProgressEvent('error', fr) - - // 4. If fr’s state is not "loading", fire a progress - // event called loadend at fr. - if (fr[kState] !== 'loading') { - fireAProgressEvent('loadend', fr) + } else { + _err[key] = val; } - }) - - break + } } + delete err[seen]; + _err.raw = err; + return _err; } - })() -} - -/** - * @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 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 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 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 = parseMIMEType(mimeType || 'application/octet-stream') - - if (parsed !== 'failure') { - dataURL += serializeAMimeType(parsed) - } - - dataURL += ';base64,' - - const decoder = new StringDecoder('latin1') + } +}); - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-with-cause.js +var require_err_with_cause2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/err-with-cause.js"(exports2, module2) { + "use strict"; + module2.exports = errWithCauseSerializer; + var { isErrorLike } = require_err_helpers2(); + var { pinoErrProto, pinoErrorSymbols } = require_err_proto2(); + var { seen } = pinoErrorSymbols; + var { toString: toString2 } = Object.prototype; + function errWithCauseSerializer(err) { + if (!isErrorLike(err)) { + return err; + } + err[seen] = void 0; + const _err = Object.create(pinoErrProto); + _err.type = toString2.call(err.constructor) === "[object Function]" ? err.constructor.name : err.name; + _err.message = err.message; + _err.stack = err.stack; + if (Array.isArray(err.errors)) { + _err.aggregateErrors = err.errors.map((err2) => errWithCauseSerializer(err2)); + } + if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) { + _err.cause = errWithCauseSerializer(err.cause); + } + for (const key in err) { + if (_err[key] === void 0) { + const val = err[key]; + if (isErrorLike(val)) { + if (!Object.prototype.hasOwnProperty.call(val, seen)) { + _err[key] = errWithCauseSerializer(val); + } + } else { + _err[key] = val; + } + } } - - dataURL += btoa(decoder.end()) - - return dataURL + delete err[seen]; + _err.raw = err; + return _err; } - 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 = 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 = 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 = getEncoding(type.parameters.get('charset')) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/req.js +var require_req2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/req.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpRequest, + reqSerializer + }; + var rawSymbol = Symbol("pino-raw-req-ref"); + var pinoReqProto = Object.create({}, { + id: { + enumerable: true, + writable: true, + value: "" + }, + method: { + enumerable: true, + writable: true, + value: "" + }, + url: { + enumerable: true, + writable: true, + value: "" + }, + query: { + enumerable: true, + writable: true, + value: "" + }, + params: { + enumerable: true, + writable: true, + value: "" + }, + headers: { + enumerable: true, + writable: true, + value: {} + }, + remoteAddress: { + enumerable: true, + writable: true, + value: "" + }, + remotePort: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; } } - - // 4. If encoding is failure, then set encoding to UTF-8. - if (encoding === 'failure') { - encoding = 'UTF-8' + }); + Object.defineProperty(pinoReqProto, rawSymbol, { + writable: true, + value: {} + }); + function reqSerializer(req) { + const connection = req.info || req.socket; + const _req = Object.create(pinoReqProto); + _req.id = typeof req.id === "function" ? req.id() : req.id || (req.info ? req.info.id : void 0); + _req.method = req.method; + if (req.originalUrl) { + _req.url = req.originalUrl; + } else { + const path2 = req.path; + _req.url = typeof path2 === "string" ? path2 : req.url ? req.url.path || req.url : void 0; } - - // 5. Decode bytes using fallback encoding encoding, and - // return the result. - return decode(bytes, encoding) - } - case 'ArrayBuffer': { - // Return a new ArrayBuffer whose contents are bytes. - const sequence = 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 StringDecoder('latin1') - - for (const chunk of bytes) { - binaryString += decoder.write(chunk) + if (req.query) { + _req.query = req.query; } - - binaryString += decoder.end() - - return binaryString + if (req.params) { + _req.params = req.params; + } + _req.headers = req.headers; + _req.remoteAddress = connection && connection.remoteAddress; + _req.remotePort = connection && connection.remotePort; + _req.raw = req.raw || req; + return _req; + } + function mapHttpRequest(req) { + return { + req: reqSerializer(req) + }; } } -} - -/** - * @see https://encoding.spec.whatwg.org/#decode - * @param {Uint8Array[]} ioQueue - * @param {string} encoding - */ -function decode (ioQueue, encoding) { - const bytes = combineByteSequences(ioQueue) - - // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. - const BOMEncoding = 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) -} - -/** - * @see https://encoding.spec.whatwg.org/#bom-sniff - * @param {Uint8Array} ioQueue - */ -function 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 -} - -/** - * @param {Uint8Array[]} sequences - */ -function 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, - readOperation, - fireAProgressEvent -} - - -/***/ }), - -/***/ 17882: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"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 globalDispatcher = Symbol.for('undici.globalDispatcher.1') -const { InvalidArgumentError } = __nccwpck_require__(33862) -const Agent = __nccwpck_require__(69072) - -if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()) -} - -function setGlobalDispatcher (agent) { - if (!agent || typeof agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument agent must implement Agent') - } - Object.defineProperty(globalThis, globalDispatcher, { - value: agent, - writable: true, - enumerable: false, - configurable: false - }) -} - -function getGlobalDispatcher () { - return globalThis[globalDispatcher] -} - -module.exports = { - setGlobalDispatcher, - getGlobalDispatcher -} - - -/***/ }), - -/***/ 28975: -/***/ ((module) => { - -"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) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/res.js +var require_res2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/lib/res.js"(exports2, module2) { + "use strict"; + module2.exports = { + mapHttpResponse, + resSerializer + }; + var rawSymbol = Symbol("pino-raw-res-ref"); + var pinoResProto = Object.create({}, { + statusCode: { + enumerable: true, + writable: true, + value: 0 + }, + headers: { + enumerable: true, + writable: true, + value: "" + }, + raw: { + enumerable: false, + get: function() { + return this[rawSymbol]; + }, + set: function(val) { + this[rawSymbol] = val; + } + } + }); + Object.defineProperty(pinoResProto, rawSymbol, { + writable: true, + value: {} + }); + function resSerializer(res) { + const _res = Object.create(pinoResProto); + _res.statusCode = res.headersSent ? res.statusCode : null; + _res.headers = res.getHeaders ? res.getHeaders() : res._headers; + _res.raw = res; + return _res; + } + function mapHttpResponse(res) { + return { + res: resSerializer(res) + }; + } } +}); - onBodySent (...args) { - return this.handler.onBodySent(...args) +// node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/index.js +var require_pino_std_serializers2 = __commonJS({ + "node_modules/.pnpm/pino-std-serializers@6.2.2/node_modules/pino-std-serializers/index.js"(exports2, module2) { + "use strict"; + var errSerializer = require_err2(); + var errWithCauseSerializer = require_err_with_cause2(); + var reqSerializers = require_req2(); + var resSerializers = require_res2(); + module2.exports = { + err: errSerializer, + errWithCause: errWithCauseSerializer, + mapHttpRequest: reqSerializers.mapHttpRequest, + mapHttpResponse: resSerializers.mapHttpResponse, + req: reqSerializers.reqSerializer, + res: resSerializers.resSerializer, + wrapErrorSerializer: function wrapErrorSerializer(customSerializer) { + if (customSerializer === errSerializer) return customSerializer; + return function wrapErrSerializer(err) { + return customSerializer(errSerializer(err)); + }; + }, + wrapRequestSerializer: function wrapRequestSerializer(customSerializer) { + if (customSerializer === reqSerializers.reqSerializer) return customSerializer; + return function wrappedReqSerializer(req) { + return customSerializer(reqSerializers.reqSerializer(req)); + }; + }, + wrapResponseSerializer: function wrapResponseSerializer(customSerializer) { + if (customSerializer === resSerializers.resSerializer) return customSerializer; + return function wrappedResSerializer(res) { + return customSerializer(resSerializers.resSerializer(res)); + }; + } + }; } -} - - -/***/ }), - -/***/ 90238: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const util = __nccwpck_require__(33465) -const { kBodyUsed } = __nccwpck_require__(34856) -const assert = __nccwpck_require__(42613) -const { InvalidArgumentError } = __nccwpck_require__(33862) -const EE = __nccwpck_require__(24434) - -const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] - -const kBody = Symbol('body') +}); -class BodyAsyncIterable { - constructor (body) { - this[kBody] = body - this[kBodyUsed] = false +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/caller.js +var require_caller2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/caller.js"(exports2, module2) { + "use strict"; + function noOpPrepareStackTrace(_, stack) { + return stack; + } + module2.exports = function getCallers() { + const originalPrepare = Error.prepareStackTrace; + Error.prepareStackTrace = noOpPrepareStackTrace; + const stack = new Error().stack; + Error.prepareStackTrace = originalPrepare; + if (!Array.isArray(stack)) { + return void 0; + } + const entries = stack.slice(2); + const fileNames = []; + for (const entry of entries) { + if (!entry) { + continue; + } + fileNames.push(entry.getFileName()); + } + return fileNames; + }; } +}); - async * [Symbol.asyncIterator] () { - assert(!this[kBodyUsed], 'disturbed') - this[kBodyUsed] = true - yield * this[kBody] +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/symbols.js +var require_symbols2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/symbols.js"(exports2, module2) { + "use strict"; + var setLevelSym = Symbol("pino.setLevel"); + var getLevelSym = Symbol("pino.getLevel"); + var levelValSym = Symbol("pino.levelVal"); + var levelCompSym = Symbol("pino.levelComp"); + var useLevelLabelsSym = Symbol("pino.useLevelLabels"); + var useOnlyCustomLevelsSym = Symbol("pino.useOnlyCustomLevels"); + var mixinSym = Symbol("pino.mixin"); + var lsCacheSym = Symbol("pino.lsCache"); + var chindingsSym = Symbol("pino.chindings"); + var asJsonSym = Symbol("pino.asJson"); + var writeSym = Symbol("pino.write"); + var redactFmtSym = Symbol("pino.redactFmt"); + var timeSym = Symbol("pino.time"); + var timeSliceIndexSym = Symbol("pino.timeSliceIndex"); + var streamSym = Symbol("pino.stream"); + var stringifySym = Symbol("pino.stringify"); + var stringifySafeSym = Symbol("pino.stringifySafe"); + var stringifiersSym = Symbol("pino.stringifiers"); + var endSym = Symbol("pino.end"); + var formatOptsSym = Symbol("pino.formatOpts"); + var messageKeySym = Symbol("pino.messageKey"); + var errorKeySym = Symbol("pino.errorKey"); + var nestedKeySym = Symbol("pino.nestedKey"); + var nestedKeyStrSym = Symbol("pino.nestedKeyStr"); + var mixinMergeStrategySym = Symbol("pino.mixinMergeStrategy"); + var msgPrefixSym = Symbol("pino.msgPrefix"); + var wildcardFirstSym = Symbol("pino.wildcardFirst"); + var serializersSym = Symbol.for("pino.serializers"); + var formattersSym = Symbol.for("pino.formatters"); + var hooksSym = Symbol.for("pino.hooks"); + var needsMetadataGsym = Symbol.for("pino.metadata"); + module2.exports = { + setLevelSym, + getLevelSym, + levelValSym, + levelCompSym, + useLevelLabelsSym, + mixinSym, + lsCacheSym, + chindingsSym, + asJsonSym, + writeSym, + serializersSym, + redactFmtSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + wildcardFirstSym, + needsMetadataGsym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + }; } -} +}); -class RedirectHandler { - constructor (dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError('maxRedirections must be a positive number') +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/redaction.js +var require_redaction2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/redaction.js"(exports2, module2) { + "use strict"; + var fastRedact = require_fast_redact(); + var { redactFmtSym, wildcardFirstSym } = require_symbols2(); + var { rx, validator } = fastRedact; + var validate = validator({ + ERR_PATHS_MUST_BE_STRINGS: () => "pino \u2013 redacted paths must be strings", + ERR_INVALID_PATH: (s) => `pino \u2013 redact paths array contains an invalid path (${s})` + }); + var CENSOR = "[Redacted]"; + var strict = false; + function redaction(opts, serialize) { + const { paths, censor } = handle(opts); + const shape = paths.reduce((o, str2) => { + rx.lastIndex = 0; + const first = rx.exec(str2); + const next = rx.exec(str2); + let ns = first[1] !== void 0 ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, "$1") : first[0]; + if (ns === "*") { + ns = wildcardFirstSym; + } + if (next === null) { + o[ns] = null; + return o; + } + if (o[ns] === null) { + return o; + } + const { index } = next; + const nextPath = `${str2.substr(index, str2.length - 1)}`; + o[ns] = o[ns] || []; + if (ns !== wildcardFirstSym && o[ns].length === 0) { + o[ns].push(...o[wildcardFirstSym] || []); + } + if (ns === wildcardFirstSym) { + Object.keys(o).forEach(function(k) { + if (o[k]) { + o[k].push(nextPath); + } + }); + } + o[ns].push(nextPath); + return o; + }, {}); + const result = { + [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) + }; + const topCensor = (...args) => { + return typeof censor === "function" ? serialize(censor(...args)) : serialize(censor); + }; + return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { + if (shape[k] === null) { + o[k] = (value) => topCensor(value, [k]); + } else { + const wrappedCensor = typeof censor === "function" ? (value, path2) => { + return censor(value, [k, ...path2]); + } : censor; + o[k] = fastRedact({ + paths: shape[k], + censor: wrappedCensor, + serialize, + strict + }); + } + return o; + }, result); } - - util.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 (util.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 (util.bodyLength(this.opts.body) === 0) { - this.opts.body - .on('data', function () { - assert(false) - }) + function handle(opts) { + if (Array.isArray(opts)) { + opts = { paths: opts, censor: CENSOR }; + validate(opts); + return opts; } - - if (typeof this.opts.body.readableDidRead !== 'boolean') { - this.opts.body[kBodyUsed] = false - EE.prototype.on.call(this.opts.body, 'data', function () { - this[kBodyUsed] = true - }) + let { paths, censor = CENSOR, remove } = opts; + if (Array.isArray(paths) === false) { + throw Error("pino \u2013 redact must contain an array of strings"); } - } 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 BodyAsyncIterable(this.opts.body) - } else if ( - this.opts.body && - typeof this.opts.body !== 'string' && - !ArrayBuffer.isView(this.opts.body) && - util.isIterable(this.opts.body) - ) { - // TODO: Should we allow re-using iterable if !this.opts.idempotent - // or through some other flag? - this.opts.body = new BodyAsyncIterable(this.opts.body) + if (remove === true) censor = void 0; + validate({ paths, censor }); + return { paths, censor }; } + module2.exports = redaction; } +}); - 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) +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/time.js +var require_time2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/time.js"(exports2, module2) { + "use strict"; + var nullTime = () => ""; + var epochTime = () => `,"time":${Date.now()}`; + var unixTime = () => `,"time":${Math.round(Date.now() / 1e3)}`; + var isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"`; + module2.exports = { nullTime, epochTime, unixTime, isoTime }; } +}); - onHeaders (statusCode, headers, resume, statusText) { - this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) - ? null - : parseLocation(statusCode, headers) - - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)) +// node_modules/.pnpm/sonic-boom@3.8.1/node_modules/sonic-boom/index.js +var require_sonic_boom2 = __commonJS({ + "node_modules/.pnpm/sonic-boom@3.8.1/node_modules/sonic-boom/index.js"(exports2, module2) { + "use strict"; + var fs2 = __require("fs"); + var EventEmitter = __require("events"); + var inherits = __require("util").inherits; + var path2 = __require("path"); + var sleep = require_atomic_sleep(); + var BUSY_WRITE_TIMEOUT = 100; + var kEmptyBuffer = Buffer.allocUnsafe(0); + var MAX_WRITE = 16 * 1024; + var kContentModeBuffer = "buffer"; + var kContentModeUtf8 = "utf8"; + function openFile(file, sonic) { + sonic._opening = true; + sonic._writing = true; + sonic._asyncDrainScheduled = false; + function fileOpened(err, fd) { + if (err) { + sonic._reopening = false; + sonic._writing = false; + sonic._opening = false; + if (sonic.sync) { + process.nextTick(() => { + if (sonic.listenerCount("error") > 0) { + sonic.emit("error", err); + } + }); + } else { + sonic.emit("error", err); + } + return; + } + const reopening = sonic._reopening; + sonic.fd = fd; + sonic.file = file; + sonic._reopening = false; + sonic._opening = false; + sonic._writing = false; + if (sonic.sync) { + process.nextTick(() => sonic.emit("ready")); + } else { + sonic.emit("ready"); + } + if (sonic.destroyed) { + return; + } + if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) { + sonic._actualWrite(); + } else if (reopening) { + process.nextTick(() => sonic.emit("drain")); + } + } + const flags = sonic.append ? "a" : "w"; + const mode = sonic.mode; + if (sonic.sync) { + try { + if (sonic.mkdir) fs2.mkdirSync(path2.dirname(file), { recursive: true }); + const fd = fs2.openSync(file, flags, mode); + fileOpened(null, fd); + } catch (err) { + fileOpened(err); + throw err; + } + } else if (sonic.mkdir) { + fs2.mkdir(path2.dirname(file), { recursive: true }, (err) => { + if (err) return fileOpened(err); + fs2.open(file, flags, mode, fileOpened); + }); + } else { + fs2.open(file, flags, mode, fileOpened); + } + } + function SonicBoom(opts) { + if (!(this instanceof SonicBoom)) { + return new SonicBoom(opts); + } + let { fd, dest, minLength, maxLength, maxWrite, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {}; + fd = fd || dest; + this._len = 0; + this.fd = -1; + this._bufs = []; + this._lens = []; + this._writing = false; + this._ending = false; + this._reopening = false; + this._asyncDrainScheduled = false; + this._flushPending = false; + this._hwm = Math.max(minLength || 0, 16387); + this.file = null; + this.destroyed = false; + this.minLength = minLength || 0; + this.maxLength = maxLength || 0; + this.maxWrite = maxWrite || MAX_WRITE; + this.sync = sync || false; + this.writable = true; + this._fsync = fsync || false; + this.append = append || false; + this.mode = mode; + this.retryEAGAIN = retryEAGAIN || (() => true); + this.mkdir = mkdir || false; + let fsWriteSync; + let fsWrite; + if (contentMode === kContentModeBuffer) { + this._writingBuf = kEmptyBuffer; + this.write = writeBuffer; + this.flush = flushBuffer; + this.flushSync = flushBufferSync; + this._actualWrite = actualWriteBuffer; + fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf); + fsWrite = () => fs2.write(this.fd, this._writingBuf, this.release); + } else if (contentMode === void 0 || contentMode === kContentModeUtf8) { + this._writingBuf = ""; + this.write = write; + this.flush = flush2; + this.flushSync = flushSync; + this._actualWrite = actualWrite; + fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf, "utf8"); + fsWrite = () => fs2.write(this.fd, this._writingBuf, "utf8", this.release); + } else { + throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`); + } + if (typeof fd === "number") { + this.fd = fd; + process.nextTick(() => this.emit("ready")); + } else if (typeof fd === "string") { + openFile(fd, this); + } else { + throw new Error("SonicBoom supports only file descriptors and files"); + } + if (this.minLength >= this.maxWrite) { + throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`); + } + this.release = (err, n) => { + if (err) { + if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { + if (this.sync) { + try { + sleep(BUSY_WRITE_TIMEOUT); + this.release(void 0, 0); + } catch (err2) { + this.release(err2); + } + } else { + setTimeout(fsWrite, BUSY_WRITE_TIMEOUT); + } + } else { + this._writing = false; + this.emit("error", err); + } + return; + } + this.emit("write", n); + const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n); + this._len = releasedBufObj.len; + this._writingBuf = releasedBufObj.writingBuf; + if (this._writingBuf.length) { + if (!this.sync) { + fsWrite(); + return; + } + try { + do { + const n2 = fsWriteSync(); + const releasedBufObj2 = releaseWritingBuf(this._writingBuf, this._len, n2); + this._len = releasedBufObj2.len; + this._writingBuf = releasedBufObj2.writingBuf; + } while (this._writingBuf.length); + } catch (err2) { + this.release(err2); + return; + } + } + if (this._fsync) { + fs2.fsyncSync(this.fd); + } + const len = this._len; + if (this._reopening) { + this._writing = false; + this._reopening = false; + this.reopen(); + } else if (len > this.minLength) { + this._actualWrite(); + } else if (this._ending) { + if (len > 0) { + this._actualWrite(); + } else { + this._writing = false; + actualClose(this); + } + } else { + this._writing = false; + if (this.sync) { + if (!this._asyncDrainScheduled) { + this._asyncDrainScheduled = true; + process.nextTick(emitDrain, this); + } + } else { + this.emit("drain"); + } + } + }; + this.on("newListener", function(name) { + if (name === "drain") { + this._asyncDrainScheduled = false; + } + }); } - - if (!this.location) { - return this.handler.onHeaders(statusCode, headers, resume, statusText) + function releaseWritingBuf(writingBuf, len, n) { + if (typeof writingBuf === "string" && Buffer.byteLength(writingBuf) !== n) { + n = Buffer.from(writingBuf).subarray(0, n).toString().length; + } + len = Math.max(len - n, 0); + writingBuf = writingBuf.slice(n); + return { writingBuf, len }; } - - const { origin, pathname, search } = util.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 = 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 + function emitDrain(sonic) { + const hasListeners = sonic.listenerCount("drain") > 0; + if (!hasListeners) return; + sonic._asyncDrainScheduled = false; + sonic.emit("drain"); } - } - - onData (chunk) { - if (this.location) { - /* - https://tools.ietf.org/html/rfc7231#section-6.4 - - TLDR: undici always ignores 3xx response bodies. - - Redirection is used to serve the requested resource from another URL, so it is assumes that - no body is generated (and thus can be ignored). Even though generating a body is not prohibited. - - For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually - (which means it's optional and not mandated) contain just an hyperlink to the value of - the Location response header, so the body can be ignored safely. - - For status 300, which is "Multiple Choices", the spec mentions both generating a Location - response header AND a response body with the other possible location to follow. - Since the spec explicitily chooses not to specify a format for such body and leave it to - servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. - */ - } else { - return this.handler.onData(chunk) + inherits(SonicBoom, EventEmitter); + function mergeBuf(bufs, len) { + if (bufs.length === 0) { + return kEmptyBuffer; + } + if (bufs.length === 1) { + return bufs[0]; + } + return Buffer.concat(bufs, len); } - } - - 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) + function write(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || bufs[bufs.length - 1].length + data.length > this.maxWrite) { + bufs.push("" + data); + } else { + bufs[bufs.length - 1] += data; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; } - } - - onBodySent (chunk) { - if (this.handler.onBodySent) { - this.handler.onBodySent(chunk) + function writeBuffer(data) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + const len = this._len + data.length; + const bufs = this._bufs; + const lens = this._lens; + if (this.maxLength && len > this.maxLength) { + this.emit("drop", data); + return this._len < this._hwm; + } + if (bufs.length === 0 || lens[lens.length - 1] + data.length > this.maxWrite) { + bufs.push([data]); + lens.push(data.length); + } else { + bufs[bufs.length - 1].push(data); + lens[lens.length - 1] += data.length; + } + this._len = len; + if (!this._writing && this._len >= this.minLength) { + this._actualWrite(); + } + return this._len < this._hwm; + } + function callFlushCallbackOnDrain(cb) { + this._flushPending = true; + const onDrain = () => { + if (!this._fsync) { + fs2.fsync(this.fd, (err) => { + this._flushPending = false; + cb(err); + }); + } else { + this._flushPending = false; + cb(); + } + this.off("error", onError); + }; + const onError = (err) => { + this._flushPending = false; + cb(err); + this.off("drain", onDrain); + }; + this.once("drain", onDrain); + this.once("error", onError); } - } -} - -function parseLocation (statusCode, headers) { - if (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] + function flush2(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; + } + throw error; + } + if (this.minLength <= 0) { + cb == null ? void 0 : cb(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push(""); + } + this._actualWrite(); } - } -} - -// https://tools.ietf.org/html/rfc7231#section-6.4.4 -function shouldRemoveHeader (header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === 'host' - } - if (removeContent && util.headerNameToString(header).startsWith('content-')) { - return true - } - if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { - const name = util.headerNameToString(header) - return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization' - } - return false -} - -// https://tools.ietf.org/html/rfc7231#section-6.4 -function cleanRequestHeaders (headers, removeContent, unknownOrigin) { - const ret = [] - if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]) + function flushBuffer(cb) { + if (cb != null && typeof cb !== "function") { + throw new Error("flush cb must be a function"); + } + if (this.destroyed) { + const error = new Error("SonicBoom destroyed"); + if (cb) { + cb(error); + return; + } + throw error; + } + if (this.minLength <= 0) { + cb == null ? void 0 : cb(); + return; + } + if (cb) { + callFlushCallbackOnDrain.call(this, cb); + } + if (this._writing) { + return; + } + if (this._bufs.length === 0) { + this._bufs.push([]); + this._lens.push(0); + } + this._actualWrite(); + } + SonicBoom.prototype.reopen = function(file) { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.reopen(file); + }); + return; + } + if (this._ending) { + return; + } + if (!this.file) { + throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom"); + } + if (file) { + this.file = file; + } + this._reopening = true; + if (this._writing) { + return; + } + const fd = this.fd; + this.once("ready", () => { + if (fd !== this.fd) { + fs2.close(fd, (err) => { + if (err) { + return this.emit("error", err); + } + }); + } + }); + openFile(this.file, this); + }; + SonicBoom.prototype.end = function() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this._opening) { + this.once("ready", () => { + this.end(); + }); + return; + } + if (this._ending) { + return; + } + this._ending = true; + if (this._writing) { + return; + } + if (this._len > 0 && this.fd >= 0) { + this._actualWrite(); + } else { + actualClose(this); + } + }; + function flushSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift(this._writingBuf); + this._writingBuf = ""; + } + let buf = ""; + while (this._bufs.length || buf) { + if (buf.length <= 0) { + buf = this._bufs[0]; + } + try { + const n = fs2.writeSync(this.fd, buf, "utf8"); + const releasedBufObj = releaseWritingBuf(buf, this._len, n); + buf = releasedBufObj.writingBuf; + this._len = releasedBufObj.len; + if (buf.length <= 0) { + this._bufs.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); + } + } + try { + fs2.fsyncSync(this.fd); + } catch { } } - } else if (headers && typeof headers === 'object') { - for (const key of Object.keys(headers)) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, headers[key]) + function flushBufferSync() { + if (this.destroyed) { + throw new Error("SonicBoom destroyed"); + } + if (this.fd < 0) { + throw new Error("sonic boom is not ready yet"); + } + if (!this._writing && this._writingBuf.length > 0) { + this._bufs.unshift([this._writingBuf]); + this._writingBuf = kEmptyBuffer; + } + let buf = kEmptyBuffer; + while (this._bufs.length || buf.length) { + if (buf.length <= 0) { + buf = mergeBuf(this._bufs[0], this._lens[0]); + } + try { + const n = fs2.writeSync(this.fd, buf); + buf = buf.subarray(n); + this._len = Math.max(this._len - n, 0); + if (buf.length <= 0) { + this._bufs.shift(); + this._lens.shift(); + } + } catch (err) { + const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; + if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { + throw err; + } + sleep(BUSY_WRITE_TIMEOUT); + } } } - } else { - assert(headers == null, 'headers must be an object or an array') - } - return ret -} - -module.exports = RedirectHandler - - -/***/ }), - -/***/ 33966: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const assert = __nccwpck_require__(42613) - -const { kRetryHandlerDefaultRetry } = __nccwpck_require__(34856) -const { RequestRetryError } = __nccwpck_require__(33862) -const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(33465) - -function calculateRetryAfterHeader (retryAfter) { - const current = Date.now() - const diff = new Date(retryAfter).getTime() - current - - return diff -} - -class RetryHandler { - constructor (opts, handlers) { - const { retryOptions, ...dispatchOpts } = opts - const { - // Retry scoped - retry: retryFn, - maxRetries, - maxTimeout, - minTimeout, - timeoutFactor, - // Response scoped - methods, - errorCodes, - retryAfter, - statusCodes - } = retryOptions ?? {} - - this.dispatch = handlers.dispatch - this.handler = handlers.handler - this.opts = dispatchOpts - this.abort = null - this.aborted = false - this.retryOpts = { - retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], - retryAfter: retryAfter ?? true, - maxTimeout: maxTimeout ?? 30 * 1000, // 30s, - timeout: minTimeout ?? 500, // .5s - 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' - ] + SonicBoom.prototype.destroy = function() { + if (this.destroyed) { + return; + } + actualClose(this); + }; + function actualWrite() { + const release2 = this.release; + this._writing = true; + this._writingBuf = this._writingBuf || this._bufs.shift() || ""; + if (this.sync) { + try { + const written = fs2.writeSync(this.fd, this._writingBuf, "utf8"); + release2(null, written); + } catch (err) { + release2(err); + } + } else { + fs2.write(this.fd, this._writingBuf, "utf8", release2); + } } - - 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) + function actualWriteBuffer() { + const release2 = this.release; + this._writing = true; + this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()); + if (this.sync) { + try { + const written = fs2.writeSync(this.fd, this._writingBuf); + release2(null, written); + } catch (err) { + release2(err); + } } else { - this.reason = reason + fs2.write(this.fd, this._writingBuf, release2); + } + } + function actualClose(sonic) { + if (sonic.fd === -1) { + sonic.once("ready", actualClose.bind(null, sonic)); + return; + } + sonic.destroyed = true; + sonic._bufs = []; + sonic._lens = []; + fs2.fsync(sonic.fd, closeWrapped); + function closeWrapped() { + if (sonic.fd !== 1 && sonic.fd !== 2) { + fs2.close(sonic.fd, done); + } else { + done(); + } + } + function done(err) { + if (err) { + sonic.emit("error", err); + return; + } + if (sonic._ending && !sonic._writing) { + sonic.emit("finish"); + } + sonic.emit("close"); } - }) - } - - onRequestSent () { - if (this.handler.onRequestSent) { - this.handler.onRequestSent() } + SonicBoom.SonicBoom = SonicBoom; + SonicBoom.default = SonicBoom; + module2.exports = SonicBoom; } +}); - onUpgrade (statusCode, headers, socket) { - if (this.handler.onUpgrade) { - this.handler.onUpgrade(statusCode, headers, socket) - } +// node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/package.json +var require_package3 = __commonJS({ + "node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/package.json"(exports2, module2) { + module2.exports = { + name: "thread-stream", + version: "2.7.0", + description: "A streaming way to send data to a Node.js Worker Thread", + main: "index.js", + types: "index.d.ts", + dependencies: { + "real-require": "^0.2.0" + }, + devDependencies: { + "@types/node": "^20.1.0", + "@types/tap": "^15.0.0", + "@yao-pkg/pkg": "^5.11.5", + desm: "^1.3.0", + fastbench: "^1.0.1", + husky: "^9.0.6", + "pino-elasticsearch": "^8.0.0", + "sonic-boom": "^3.0.0", + standard: "^17.0.0", + tap: "^16.2.0", + "ts-node": "^10.8.0", + typescript: "^5.3.2", + "why-is-node-running": "^2.2.2" + }, + scripts: { + test: 'standard && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts', + "test:ci": "standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts", + "test:ci:js": 'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"', + "test:ci:ts": 'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"', + "test:yarn": 'npm run transpile && tap "test/**/*.test.js" --no-check-coverage', + transpile: "sh ./test/ts/transpile.sh", + prepare: "husky install" + }, + standard: { + ignore: [ + "test/ts/**/*" + ] + }, + repository: { + type: "git", + url: "git+https://github.com/mcollina/thread-stream.git" + }, + keywords: [ + "worker", + "thread", + "threads", + "stream" + ], + author: "Matteo Collina ", + license: "MIT", + bugs: { + url: "https://github.com/mcollina/thread-stream/issues" + }, + homepage: "https://github.com/mcollina/thread-stream#readme" + }; } +}); - onConnect (abort) { - if (this.aborted) { - abort(this.reason) - } else { - this.abort = abort +// node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/lib/wait.js +var require_wait2 = __commonJS({ + "node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/lib/wait.js"(exports2, module2) { + "use strict"; + var MAX_TIMEOUT = 1e3; + function wait2(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current === expected) { + done(null, "ok"); + return; + } + let prior = current; + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + prior = current; + current = Atomics.load(state, index); + if (current === prior) { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } else { + if (current === expected) done(null, "ok"); + else done(null, "not-equal"); + } + }, backoff); + } + }; + check(1); + } + function waitDiff(state, index, expected, timeout, done) { + const max = Date.now() + timeout; + let current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + return; + } + const check = (backoff) => { + if (Date.now() > max) { + done(null, "timed-out"); + } else { + setTimeout(() => { + current = Atomics.load(state, index); + if (current !== expected) { + done(null, "ok"); + } else { + check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2); + } + }, backoff); + } + }; + check(1); } + module2.exports = { wait: wait2, waitDiff }; } +}); - onBodySent (chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk) +// node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/lib/indexes.js +var require_indexes2 = __commonJS({ + "node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/lib/indexes.js"(exports2, module2) { + "use strict"; + var WRITE_INDEX = 4; + var READ_INDEX = 8; + module2.exports = { + WRITE_INDEX, + READ_INDEX + }; } +}); - static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { - const { statusCode, code, headers } = err - const { method, retryOptions } = opts - const { - maxRetries, - timeout, - maxTimeout, - timeoutFactor, - statusCodes, - errorCodes, - methods - } = retryOptions - let { counter, 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 +// node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/index.js +var require_thread_stream2 = __commonJS({ + "node_modules/.pnpm/thread-stream@2.7.0/node_modules/thread-stream/index.js"(exports2, module2) { + "use strict"; + var { version } = require_package3(); + var { EventEmitter } = __require("events"); + var { Worker } = __require("worker_threads"); + var { join: join5 } = __require("path"); + var { pathToFileURL } = __require("url"); + var { wait: wait2 } = require_wait2(); + var { + WRITE_INDEX, + READ_INDEX + } = require_indexes2(); + var buffer = __require("buffer"); + var assert = __require("assert"); + var kImpl = Symbol("kImpl"); + var MAX_STRING = buffer.constants.MAX_STRING_LENGTH; + var FakeWeakRef = class { + constructor(value) { + this._value = value; + } + deref() { + return this._value; + } + }; + var FakeFinalizationRegistry = class { + register() { + } + unregister() { + } + }; + var FinalizationRegistry2 = process.env.NODE_V8_COVERAGE ? FakeFinalizationRegistry : global.FinalizationRegistry || FakeFinalizationRegistry; + var WeakRef2 = process.env.NODE_V8_COVERAGE ? FakeWeakRef : global.WeakRef || FakeWeakRef; + var registry = new FinalizationRegistry2((worker) => { + if (worker.exited) { + return; + } + worker.terminate(); + }); + function createWorker(stream, opts) { + const { filename, workerData } = opts; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + const toExecute = bundlerOverrides["thread-stream-worker"] || join5(__dirname, "lib", "worker.js"); + const worker = new Worker(toExecute, { + ...opts.workerOpts, + trackUnmanagedFds: false, + workerData: { + filename: filename.indexOf("file://") === 0 ? filename : pathToFileURL(filename).href, + dataBuf: stream[kImpl].dataBuf, + stateBuf: stream[kImpl].stateBuf, + workerData: { + $context: { + threadStreamVersion: version + }, + ...workerData + } + } + }); + worker.stream = new FakeWeakRef(stream); + worker.on("message", onWorkerMessage); + worker.on("exit", onWorkerExit); + registry.register(stream, worker); + return worker; + } + function drain(stream) { + assert(!stream[kImpl].sync); + if (stream[kImpl].needDrain) { + stream[kImpl].needDrain = false; + stream.emit("drain"); + } + } + function nextFlush(stream) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover > 0) { + if (stream[kImpl].buf.length === 0) { + stream[kImpl].flushing = false; + if (stream[kImpl].ending) { + end2(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + return; + } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + } else { + stream.flush(() => { + if (stream.destroyed) { + return; + } + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].data.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, nextFlush.bind(null, stream)); + }); + } + } else if (leftover === 0) { + if (writeIndex === 0 && stream[kImpl].buf.length === 0) { + return; + } + stream.flush(() => { + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + nextFlush(stream); + }); + } else { + destroy(stream, new Error("overwritten")); + } } - - // 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 + function onWorkerMessage(msg) { + const stream = this.stream.deref(); + if (stream === void 0) { + this.exited = true; + this.terminate(); + return; + } + switch (msg.code) { + case "READY": + this.stream = new WeakRef2(stream); + stream.flush(() => { + stream[kImpl].ready = true; + stream.emit("ready"); + }); + break; + case "ERROR": + destroy(stream, msg.err); + break; + case "EVENT": + if (Array.isArray(msg.args)) { + stream.emit(msg.name, ...msg.args); + } else { + stream.emit(msg.name, msg.args); + } + break; + case "WARNING": + process.emitWarning(msg.err); + break; + default: + destroy(stream, new Error("this should not happen: " + msg.code)); + } } - - // 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 + function onWorkerExit(code) { + const stream = this.stream.deref(); + if (stream === void 0) { + return; + } + registry.unregister(stream); + stream.worker.exited = true; + stream.worker.off("exit", onWorkerExit); + destroy(stream, code !== 0 ? new Error("the worker thread exited") : null); } - - // If we reached the max number of retries - if (counter > maxRetries) { - cb(err) - return + var ThreadStream = class extends EventEmitter { + constructor(opts = {}) { + super(); + if (opts.bufferSize < 4) { + throw new Error("bufferSize must at least fit a 4-byte utf-8 char"); + } + this[kImpl] = {}; + this[kImpl].stateBuf = new SharedArrayBuffer(128); + this[kImpl].state = new Int32Array(this[kImpl].stateBuf); + this[kImpl].dataBuf = new SharedArrayBuffer(opts.bufferSize || 4 * 1024 * 1024); + this[kImpl].data = Buffer.from(this[kImpl].dataBuf); + this[kImpl].sync = opts.sync || false; + this[kImpl].ending = false; + this[kImpl].ended = false; + this[kImpl].needDrain = false; + this[kImpl].destroyed = false; + this[kImpl].flushing = false; + this[kImpl].ready = false; + this[kImpl].finished = false; + this[kImpl].errored = null; + this[kImpl].closed = false; + this[kImpl].buf = ""; + this.worker = createWorker(this, opts); + this.on("message", (message, transferList) => { + this.worker.postMessage(message, transferList); + }); + } + write(data) { + if (this[kImpl].destroyed) { + error(this, new Error("the worker has exited")); + return false; + } + if (this[kImpl].ending) { + error(this, new Error("the worker is ending")); + return false; + } + if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) { + try { + writeSync(this); + this[kImpl].flushing = true; + } catch (err) { + destroy(this, err); + return false; + } + } + this[kImpl].buf += data; + if (this[kImpl].sync) { + try { + writeSync(this); + return true; + } catch (err) { + destroy(this, err); + return false; + } + } + if (!this[kImpl].flushing) { + this[kImpl].flushing = true; + setImmediate(nextFlush, this); + } + this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0; + return !this[kImpl].needDrain; + } + end() { + if (this[kImpl].destroyed) { + return; + } + this[kImpl].ending = true; + end2(this); + } + flush(cb) { + if (this[kImpl].destroyed) { + if (typeof cb === "function") { + process.nextTick(cb, new Error("the worker has exited")); + } + return; + } + const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX); + wait2(this[kImpl].state, READ_INDEX, writeIndex, Infinity, (err, res) => { + if (err) { + destroy(this, err); + process.nextTick(cb, err); + return; + } + if (res === "not-equal") { + this.flush(cb); + return; + } + process.nextTick(cb); + }); + } + flushSync() { + if (this[kImpl].destroyed) { + return; + } + writeSync(this); + flushSync(this); + } + unref() { + this.worker.unref(); + } + ref() { + this.worker.ref(); + } + get ready() { + return this[kImpl].ready; + } + get destroyed() { + return this[kImpl].destroyed; + } + get closed() { + return this[kImpl].closed; + } + get writable() { + return !this[kImpl].destroyed && !this[kImpl].ending; + } + get writableEnded() { + return this[kImpl].ending; + } + get writableFinished() { + return this[kImpl].finished; + } + get writableNeedDrain() { + return this[kImpl].needDrain; + } + get writableObjectMode() { + return false; + } + get writableErrored() { + return this[kImpl].errored; + } + }; + function error(stream, err) { + setImmediate(() => { + stream.emit("error", err); + }); } - - let retryAfterHeader = headers != null && headers['retry-after'] - if (retryAfterHeader) { - retryAfterHeader = Number(retryAfterHeader) - retryAfterHeader = isNaN(retryAfterHeader) - ? calculateRetryAfterHeader(retryAfterHeader) - : retryAfterHeader * 1e3 // Retry-After is in seconds + function destroy(stream, err) { + if (stream[kImpl].destroyed) { + return; + } + stream[kImpl].destroyed = true; + if (err) { + stream[kImpl].errored = err; + error(stream, err); + } + if (!stream.worker.exited) { + stream.worker.terminate().catch(() => { + }).then(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } else { + setImmediate(() => { + stream[kImpl].closed = true; + stream.emit("close"); + }); + } } - - const retryTimeout = - retryAfterHeader > 0 - ? Math.min(retryAfterHeader, maxTimeout) - : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) - - state.currentTimeout = retryTimeout - - setTimeout(() => cb(null), retryTimeout) + function write(stream, data, cb) { + const current = Atomics.load(stream[kImpl].state, WRITE_INDEX); + const length = Buffer.byteLength(data); + stream[kImpl].data.write(data, current); + Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + cb(); + return true; + } + function end2(stream) { + if (stream[kImpl].ended || !stream[kImpl].ending || stream[kImpl].flushing) { + return; + } + stream[kImpl].ended = true; + try { + stream.flushSync(); + let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + Atomics.store(stream[kImpl].state, WRITE_INDEX, -1); + Atomics.notify(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (readIndex !== -1) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + destroy(stream, new Error("end() failed")); + return; + } + if (++spins === 10) { + destroy(stream, new Error("end() took too long (10s)")); + return; + } + } + process.nextTick(() => { + stream[kImpl].finished = true; + stream.emit("finish"); + }); + } catch (err) { + destroy(stream, err); + } + } + function writeSync(stream) { + const cb = () => { + if (stream[kImpl].ending) { + end2(stream); + } else if (stream[kImpl].needDrain) { + process.nextTick(drain, stream); + } + }; + stream[kImpl].flushing = false; + while (stream[kImpl].buf.length !== 0) { + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let leftover = stream[kImpl].data.length - writeIndex; + if (leftover === 0) { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + continue; + } else if (leftover < 0) { + throw new Error("overwritten"); + } + let toWrite = stream[kImpl].buf.slice(0, leftover); + let toWriteBytes = Buffer.byteLength(toWrite); + if (toWriteBytes <= leftover) { + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } else { + flushSync(stream); + Atomics.store(stream[kImpl].state, READ_INDEX, 0); + Atomics.store(stream[kImpl].state, WRITE_INDEX, 0); + while (toWriteBytes > stream[kImpl].buf.length) { + leftover = leftover / 2; + toWrite = stream[kImpl].buf.slice(0, leftover); + toWriteBytes = Buffer.byteLength(toWrite); + } + stream[kImpl].buf = stream[kImpl].buf.slice(leftover); + write(stream, toWrite, cb); + } + } + } + function flushSync(stream) { + if (stream[kImpl].flushing) { + throw new Error("unable to flush while flushing"); + } + const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX); + let spins = 0; + while (true) { + const readIndex = Atomics.load(stream[kImpl].state, READ_INDEX); + if (readIndex === -2) { + throw Error("_flushSync failed"); + } + if (readIndex !== writeIndex) { + Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1e3); + } else { + break; + } + if (++spins === 10) { + throw new Error("_flushSync took too long (10s)"); + } + } + } + module2.exports = ThreadStream; } +}); - onHeaders (statusCode, rawHeaders, resume, statusMessage) { - const headers = parseHeaders(rawHeaders) - - this.retryCount += 1 - - if (statusCode >= 300) { - this.abort( - new RequestRetryError('Request failed', statusCode, { - headers, - count: this.retryCount - }) - ) - return false +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/transport.js +var require_transport2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/transport.js"(exports2, module2) { + "use strict"; + var { createRequire } = __require("module"); + var getCallers = require_caller2(); + var { join: join5, isAbsolute: isAbsolute2, sep: sep2 } = __require("path"); + var sleep = require_atomic_sleep(); + var onExit = require_on_exit_leak_free(); + var ThreadStream = require_thread_stream2(); + function setupOnExit(stream) { + onExit.register(stream, autoEnd); + onExit.registerBeforeExit(stream, flush2); + stream.on("close", function() { + onExit.unregister(stream); + }); } - - // Checkpoint for resume from where we left it - if (this.resume != null) { - this.resume = null - - if (statusCode !== 206) { - return true + function buildStream(filename, workerData, workerOpts) { + const stream = new ThreadStream({ + filename, + workerData, + workerOpts + }); + stream.on("ready", onReady); + stream.on("close", function() { + process.removeListener("exit", onExit2); + }); + process.on("exit", onExit2); + function onReady() { + process.removeListener("exit", onExit2); + stream.unref(); + if (workerOpts.autoEnd !== false) { + setupOnExit(stream); + } } - - const contentRange = parseRangeHeader(headers['content-range']) - // If no content range - if (!contentRange) { - this.abort( - new RequestRetryError('Content-Range mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false + function onExit2() { + if (stream.closed) { + return; + } + stream.flushSync(); + sleep(100); + stream.end(); } - - // Let's start with a weak etag check - if (this.etag != null && this.etag !== headers.etag) { - this.abort( - new RequestRetryError('ETag mismatch', statusCode, { - headers, - count: this.retryCount - }) - ) - return false + return stream; + } + function autoEnd(stream) { + stream.ref(); + stream.flushSync(); + stream.end(); + stream.once("close", function() { + stream.unref(); + }); + } + function flush2(stream) { + stream.flushSync(); + } + function transport2(fullOptions) { + const { pipeline, targets, levels, dedupe, options: options2 = {}, worker = {}, caller = getCallers() } = fullOptions; + const callers = typeof caller === "string" ? [caller] : caller; + const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {}; + let target = fullOptions.target; + if (target && targets) { + throw new Error("only one of target or targets can be specified"); + } + if (targets) { + target = bundlerOverrides["pino-worker"] || join5(__dirname, "worker.js"); + options2.targets = targets.map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + }); + } else if (pipeline) { + target = bundlerOverrides["pino-pipeline-worker"] || join5(__dirname, "worker-pipeline.js"); + options2.targets = pipeline.map((dest) => { + return { + ...dest, + target: fixTarget(dest.target) + }; + }); + } + if (levels) { + options2.levels = levels; + } + if (dedupe) { + options2.dedupe = dedupe; + } + options2.pinoWillSendConfig = true; + return buildStream(fixTarget(target), options2, worker); + function fixTarget(origin) { + origin = bundlerOverrides[origin] || origin; + if (isAbsolute2(origin) || origin.indexOf("file://") === 0) { + return origin; + } + if (origin === "pino/file") { + return join5(__dirname, "..", "file.js"); + } + let fixTarget2; + for (const filePath of callers) { + try { + const context = filePath === "node:repl" ? process.cwd() + sep2 : filePath; + fixTarget2 = createRequire(context).resolve(origin); + break; + } catch (err) { + continue; + } + } + if (!fixTarget2) { + throw new Error(`unable to determine transport target for "${origin}"`); + } + return fixTarget2; } - - const { start, size, end = size } = contentRange - - assert(this.start === start, 'content-range mismatch') - assert(this.end == null || this.end === end, 'content-range mismatch') - - this.resume = resume - return true } + module2.exports = transport2; + } +}); - if (this.end == null) { - if (statusCode === 206) { - // First time we receive 206 - const range = parseRangeHeader(headers['content-range']) - - if (range == null) { - return this.handler.onHeaders( - statusCode, - rawHeaders, - resume, - statusMessage - ) +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/tools.js +var require_tools2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/tools.js"(exports2, module2) { + "use strict"; + var format2 = require_quick_format_unescaped(); + var { mapHttpRequest, mapHttpResponse } = require_pino_std_serializers2(); + var SonicBoom = require_sonic_boom2(); + var onExit = require_on_exit_leak_free(); + var { + lsCacheSym, + chindingsSym, + writeSym, + serializersSym, + formatOptsSym, + endSym, + stringifiersSym, + stringifySym, + stringifySafeSym, + wildcardFirstSym, + nestedKeySym, + formattersSym, + messageKeySym, + errorKeySym, + nestedKeyStrSym, + msgPrefixSym + } = require_symbols2(); + var { isMainThread } = __require("worker_threads"); + var transport2 = require_transport2(); + function noop3() { + } + function genLog(level, hook6) { + if (!hook6) return LOG; + return function hookWrappedLog(...args) { + hook6.call(this, args, LOG, level); + }; + function LOG(o, ...n) { + if (typeof o === "object") { + let msg = o; + if (o !== null) { + if (o.method && o.headers && o.socket) { + o = mapHttpRequest(o); + } else if (typeof o.setHeader === "function") { + o = mapHttpResponse(o); + } + } + let formatParams; + if (msg === null && n.length === 0) { + formatParams = [null]; + } else { + msg = n.shift(); + formatParams = n; + } + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](o, format2(msg, formatParams, this[formatOptsSym]), level); + } else { + let msg = o === void 0 ? n.shift() : o; + if (typeof this[msgPrefixSym] === "string" && msg !== void 0 && msg !== null) { + msg = this[msgPrefixSym] + msg; + } + this[writeSym](null, format2(msg, n, this[formatOptsSym]), level); + } + } + } + function asString(str2) { + let result = ""; + let last = 0; + let found = false; + let point = 255; + const l = str2.length; + if (l > 100) { + return JSON.stringify(str2); + } + for (var i = 0; i < l && point >= 32; i++) { + point = str2.charCodeAt(i); + if (point === 34 || point === 92) { + result += str2.slice(last, i) + "\\"; + last = i; + found = true; + } + } + if (!found) { + result = str2; + } else { + result += str2.slice(last); + } + return point < 32 ? JSON.stringify(str2) : '"' + result + '"'; + } + function asJson(obj, msg, num, time) { + const stringify2 = this[stringifySym]; + const stringifySafe = this[stringifySafeSym]; + const stringifiers = this[stringifiersSym]; + const end2 = this[endSym]; + const chindings = this[chindingsSym]; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const messageKey = this[messageKeySym]; + const errorKey = this[errorKeySym]; + let data = this[lsCacheSym][num] + time; + data = data + chindings; + let value; + if (formatters.log) { + obj = formatters.log(obj); + } + const wildcardStringifier = stringifiers[wildcardFirstSym]; + let propStr = ""; + for (const key in obj) { + value = obj[key]; + if (Object.prototype.hasOwnProperty.call(obj, key) && value !== void 0) { + if (serializers[key]) { + value = serializers[key](value); + } else if (key === errorKey && serializers.err) { + value = serializers.err(value); + } + const stringifier = stringifiers[key] || wildcardStringifier; + switch (typeof value) { + case "undefined": + case "function": + continue; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + break; + case "string": + value = (stringifier || asString)(value); + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + } + if (value === void 0) continue; + const strKey = asString(key); + propStr += "," + strKey + ":" + value; + } + } + let msgStr = ""; + if (msg !== void 0) { + value = serializers[messageKey] ? serializers[messageKey](msg) : msg; + const stringifier = stringifiers[messageKey] || wildcardStringifier; + switch (typeof value) { + case "function": + break; + case "number": + if (Number.isFinite(value) === false) { + value = null; + } + // this case explicitly falls through to the next one + case "boolean": + if (stringifier) value = stringifier(value); + msgStr = ',"' + messageKey + '":' + value; + break; + case "string": + value = (stringifier || asString)(value); + msgStr = ',"' + messageKey + '":' + value; + break; + default: + value = (stringifier || stringify2)(value, stringifySafe); + msgStr = ',"' + messageKey + '":' + value; } - - const { start, size, end = size } = range - - assert( - start != null && Number.isFinite(start) && this.start !== start, - 'content-range mismatch' - ) - assert(Number.isFinite(start)) - assert( - end != null && Number.isFinite(end) && this.end !== 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) : null + if (this[nestedKeySym] && propStr) { + return data + this[nestedKeyStrSym] + propStr.slice(1) + "}" + msgStr + end2; + } else { + return data + propStr + msgStr + end2; + } + } + function asChindings(instance, bindings) { + let value; + let data = instance[chindingsSym]; + const stringify2 = instance[stringifySym]; + const stringifySafe = instance[stringifySafeSym]; + const stringifiers = instance[stringifiersSym]; + const wildcardStringifier = stringifiers[wildcardFirstSym]; + const serializers = instance[serializersSym]; + const formatter = instance[formattersSym].bindings; + bindings = formatter(bindings); + for (const key in bindings) { + value = bindings[key]; + const valid = key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels" && bindings.hasOwnProperty(key) && value !== void 0; + if (valid === true) { + value = serializers[key] ? serializers[key](value) : value; + value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe); + if (value === void 0) continue; + data += ',"' + key + '":' + value; + } } - - assert(Number.isFinite(this.start)) - 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 - ) + return data; } - - const err = new RequestRetryError('Request failed', statusCode, { - 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) - } - - onError (err) { - if (this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) + function hasBeenTampered(stream) { + return stream.write !== stream.constructor.prototype.write; + } + var hasNodeCodeCoverage = process.env.NODE_V8_COVERAGE || process.env.V8_COVERAGE; + function buildSafeSonicBoom(opts) { + const stream = new SonicBoom(opts); + stream.on("error", filterBrokenPipe); + if (!hasNodeCodeCoverage && !opts.sync && isMainThread) { + onExit.register(stream, autoEnd); + stream.on("close", function() { + onExit.unregister(stream); + }); + } + return stream; + function filterBrokenPipe(err) { + if (err.code === "EPIPE") { + stream.write = noop3; + stream.end = noop3; + stream.flushSync = noop3; + stream.destroy = noop3; + return; + } + stream.removeListener("error", filterBrokenPipe); + stream.emit("error", err); + } } - - this.retryOpts.retry( - err, - { - state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, - opts: { retryOptions: this.retryOpts, ...this.opts } - }, - onRetry.bind(this) - ) - - function onRetry (err) { - if (err != null || this.aborted || isDisturbed(this.opts.body)) { - return this.handler.onError(err) + function autoEnd(stream, eventName) { + if (stream.destroyed) { + return; } - - if (this.start !== 0) { - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - range: `bytes=${this.start}-${this.end ?? ''}` + if (eventName === "beforeExit") { + stream.flush(); + stream.on("drain", function() { + stream.end(); + }); + } else { + stream.flushSync(); + } + } + function createArgsNormalizer(defaultOptions) { + return function normalizeArgs(instance, caller, opts = {}, stream) { + if (typeof opts === "string") { + stream = buildSafeSonicBoom({ dest: opts }); + opts = {}; + } else if (typeof stream === "string") { + if (opts && opts.transport) { + throw Error("only one of option.transport or stream can be specified"); + } + stream = buildSafeSonicBoom({ dest: stream }); + } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { + stream = opts; + opts = {}; + } else if (opts.transport) { + if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) { + throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)"); + } + if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === "function") { + throw Error("option.transport.targets do not allow custom level formatters"); + } + let customLevels; + if (opts.customLevels) { + customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels); + } + stream = transport2({ caller, ...opts.transport, levels: customLevels }); + } + opts = Object.assign({}, defaultOptions, opts); + opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers); + opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters); + if (opts.prettyPrint) { + throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)"); + } + const { enabled, onChild } = opts; + if (enabled === false) opts.level = "silent"; + if (!onChild) opts.onChild = noop3; + if (!stream) { + if (!hasBeenTampered(process.stdout)) { + stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 }); + } else { + stream = process.stdout; } } - } - + return { opts, stream }; + }; + } + function stringify(obj, stringifySafeFn) { try { - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onError(err) - } - } - } -} - -module.exports = RetryHandler - - -/***/ }), - -/***/ 92130: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const RedirectHandler = __nccwpck_require__(90238) - -function createRedirectInterceptor ({ maxRedirections: defaultMaxRedirections }) { - return (dispatch) => { - return function Intercept (opts, handler) { - const { maxRedirections = defaultMaxRedirections } = opts - - if (!maxRedirections) { - return dispatch(opts, handler) - } - - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler) - opts = { ...opts, maxRedirections: 0 } // Stop sub dispatcher from also redirecting. - return dispatch(opts, redirectHandler) - } - } -} - -module.exports = createRedirectInterceptor - - -/***/ }), - -/***/ 10307: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SPECIAL_HEADERS = exports.HEADER_STATE = exports.MINOR = exports.MAJOR = exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS = exports.TOKEN = exports.STRICT_TOKEN = exports.HEX = exports.URL_CHAR = exports.STRICT_URL_CHAR = exports.USERINFO_CHARS = exports.MARK = exports.ALPHANUM = exports.NUM = exports.HEX_MAP = exports.NUM_MAP = exports.ALPHA = exports.FINISH = exports.H_METHOD_MAP = exports.METHOD_MAP = exports.METHODS_RTSP = exports.METHODS_ICE = exports.METHODS_HTTP = exports.METHODS = exports.LENIENT_FLAGS = exports.FLAGS = exports.TYPE = exports.ERROR = void 0; -const utils_1 = __nccwpck_require__(9619); -// C headers -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"; -})(ERROR = exports.ERROR || (exports.ERROR = {})); -var TYPE; -(function (TYPE) { - TYPE[TYPE["BOTH"] = 0] = "BOTH"; - TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; - TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; -})(TYPE = exports.TYPE || (exports.TYPE = {})); -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"; -})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); -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"; -})(LENIENT_FLAGS = exports.LENIENT_FLAGS || (exports.LENIENT_FLAGS = {})); -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"; -})(METHODS = exports.METHODS || (exports.METHODS = {})); -exports.METHODS_HTTP = [ - METHODS.DELETE, - METHODS.GET, - METHODS.HEAD, - METHODS.POST, - METHODS.PUT, - METHODS.CONNECT, - METHODS.OPTIONS, - METHODS.TRACE, - METHODS.COPY, - METHODS.LOCK, - METHODS.MKCOL, - METHODS.MOVE, - METHODS.PROPFIND, - METHODS.PROPPATCH, - METHODS.SEARCH, - METHODS.UNLOCK, - METHODS.BIND, - METHODS.REBIND, - METHODS.UNBIND, - METHODS.ACL, - METHODS.REPORT, - METHODS.MKACTIVITY, - METHODS.CHECKOUT, - METHODS.MERGE, - METHODS['M-SEARCH'], - METHODS.NOTIFY, - METHODS.SUBSCRIBE, - METHODS.UNSUBSCRIBE, - METHODS.PATCH, - METHODS.PURGE, - METHODS.MKCALENDAR, - METHODS.LINK, - METHODS.UNLINK, - METHODS.PRI, - // TODO(indutny): should we allow it with HTTP? - METHODS.SOURCE, -]; -exports.METHODS_ICE = [ - METHODS.SOURCE, -]; -exports.METHODS_RTSP = [ - METHODS.OPTIONS, - METHODS.DESCRIBE, - METHODS.ANNOUNCE, - METHODS.SETUP, - METHODS.PLAY, - METHODS.PAUSE, - METHODS.TEARDOWN, - METHODS.GET_PARAMETER, - METHODS.SET_PARAMETER, - METHODS.REDIRECT, - METHODS.RECORD, - METHODS.FLUSH, - // For AirPlay - METHODS.GET, - METHODS.POST, -]; -exports.METHOD_MAP = utils_1.enumToMap(METHODS); -exports.H_METHOD_MAP = {}; -Object.keys(exports.METHOD_MAP).forEach((key) => { - if (/^H/.test(key)) { - exports.H_METHOD_MAP[key] = exports.METHOD_MAP[key]; - } -}); -var FINISH; -(function (FINISH) { - FINISH[FINISH["SAFE"] = 0] = "SAFE"; - FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; - FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; -})(FINISH = exports.FINISH || (exports.FINISH = {})); -exports.ALPHA = []; -for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { - // Upper case - exports.ALPHA.push(String.fromCharCode(i)); - // Lower case - exports.ALPHA.push(String.fromCharCode(i + 0x20)); -} -exports.NUM_MAP = { - 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, - 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, -}; -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, -}; -exports.NUM = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', -]; -exports.ALPHANUM = exports.ALPHA.concat(exports.NUM); -exports.MARK = ['-', '_', '.', '!', '~', '*', '\'', '(', ')']; -exports.USERINFO_CHARS = exports.ALPHANUM - .concat(exports.MARK) - .concat(['%', ';', ':', '&', '=', '+', '$', ',']); -// TODO(indutny): use RFC -exports.STRICT_URL_CHAR = [ - '!', '"', '$', '%', '&', '\'', - '(', ')', '*', '+', ',', '-', '.', '/', - ':', ';', '<', '=', '>', - '@', '[', '\\', ']', '^', '_', - '`', - '{', '|', '}', '~', -].concat(exports.ALPHANUM); -exports.URL_CHAR = exports.STRICT_URL_CHAR - .concat(['\t', '\f']); -// All characters with 0x80 bit set to 1 -for (let i = 0x80; i <= 0xff; i++) { - exports.URL_CHAR.push(i); -} -exports.HEX = 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 - */ -exports.STRICT_TOKEN = [ - '!', '#', '$', '%', '&', '\'', - '*', '+', '-', '.', - '^', '_', '`', - '|', '~', -].concat(exports.ALPHANUM); -exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); -/* - * Verify that a char is a valid visible (printable) US-ASCII - * character or %x80-FF - */ -exports.HEADER_CHARS = ['\t']; -for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } -} -// ',' = \x44 -exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); -exports.MAJOR = exports.NUM_MAP; -exports.MINOR = exports.MAJOR; -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"; -})(HEADER_STATE = exports.HEADER_STATE || (exports.HEADER_STATE = {})); -exports.SPECIAL_HEADERS = { - 'connection': HEADER_STATE.CONNECTION, - 'content-length': HEADER_STATE.CONTENT_LENGTH, - 'proxy-connection': HEADER_STATE.CONNECTION, - 'transfer-encoding': HEADER_STATE.TRANSFER_ENCODING, - 'upgrade': HEADER_STATE.UPGRADE, -}; -//# sourceMappingURL=constants.js.map - -/***/ }), - -/***/ 79741: -/***/ ((module) => { - -module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodH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QZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8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GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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IAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCA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AAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAA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INgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIA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DCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' - - -/***/ }), - -/***/ 9619: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.enumToMap = void 0; -function enumToMap(obj) { - const res = {}; - Object.keys(obj).forEach((key) => { - const value = obj[key]; - if (typeof value === 'number') { - res[key] = value; + return JSON.stringify(obj); + } catch (_) { + try { + const stringify2 = stringifySafeFn || this[stringifySafeSym]; + return stringify2(obj); + } catch (_2) { + return '"[unable to serialize, circular reference is too complex to analyze]"'; } - }); - return res; -} -exports.enumToMap = enumToMap; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 35332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kClients } = __nccwpck_require__(34856) -const Agent = __nccwpck_require__(69072) -const { - kAgent, - kMockAgentSet, - kMockAgentGet, - kDispatches, - kIsMockActive, - kNetConnect, - kGetNetConnect, - kOptions, - kFactory -} = __nccwpck_require__(48592) -const MockClient = __nccwpck_require__(70962) -const MockPool = __nccwpck_require__(52975) -const { matchValue, buildMockOptions } = __nccwpck_require__(42020) -const { InvalidArgumentError, UndiciError } = __nccwpck_require__(33862) -const Dispatcher = __nccwpck_require__(59724) -const Pluralizer = __nccwpck_require__(77012) -const PendingInterceptorsFormatter = __nccwpck_require__(95507) - -class FakeWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value - } -} - -class MockAgent extends Dispatcher { - constructor (opts) { - super(opts) - - this[kNetConnect] = true - this[kIsMockActive] = true - - // Instantiate Agent and encapsulate - if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } } - const agent = opts && opts.agent ? opts.agent : new Agent(opts) - this[kAgent] = agent - - this[kClients] = agent[kClients] - this[kOptions] = buildMockOptions(opts) - } - - get (origin) { - let dispatcher = this[kMockAgentGet](origin) - - if (!dispatcher) { - dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) + function buildFormatters(level, bindings, log2) { + return { + level, + bindings, + log: log2 + }; } - return dispatcher - } - - dispatch (opts, handler) { - // Call MockAgent.get to perform additional setup before dispatching as normal - this.get(opts.origin) - return this[kAgent].dispatch(opts, handler) - } - - async close () { - await this[kAgent].close() - this[kClients].clear() - } - - deactivate () { - this[kIsMockActive] = false + function normalizeDestFileDescriptor(destination) { + const fd = Number(destination); + if (typeof destination === "string" && Number.isFinite(fd)) { + return fd; + } + if (destination === void 0) { + return 1; + } + return destination; + } + module2.exports = { + noop: noop3, + buildSafeSonicBoom, + asChindings, + asJson, + genLog, + createArgsNormalizer, + stringify, + buildFormatters, + normalizeDestFileDescriptor + }; } +}); - activate () { - this[kIsMockActive] = true +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/constants.js +var require_constants3 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/constants.js"(exports2, module2) { + var DEFAULT_LEVELS = { + trace: 10, + debug: 20, + info: 30, + warn: 40, + error: 50, + fatal: 60 + }; + var SORTING_ORDER = { + ASC: "ASC", + DESC: "DESC" + }; + module2.exports = { + DEFAULT_LEVELS, + SORTING_ORDER + }; } +}); - enableNetConnect (matcher) { - if (typeof matcher === 'string' || typeof matcher === 'function' || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher) - } else { - this[kNetConnect] = [matcher] +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/levels.js +var require_levels2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/levels.js"(exports2, module2) { + "use strict"; + var { + lsCacheSym, + levelValSym, + useOnlyCustomLevelsSym, + streamSym, + formattersSym, + hooksSym, + levelCompSym + } = require_symbols2(); + var { noop: noop3, genLog } = require_tools2(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants3(); + var levelMethods = { + fatal: (hook6) => { + const logFatal = genLog(DEFAULT_LEVELS.fatal, hook6); + return function(...args) { + const stream = this[streamSym]; + logFatal.call(this, ...args); + if (typeof stream.flushSync === "function") { + try { + stream.flushSync(); + } catch (e) { + } + } + }; + }, + error: (hook6) => genLog(DEFAULT_LEVELS.error, hook6), + warn: (hook6) => genLog(DEFAULT_LEVELS.warn, hook6), + info: (hook6) => genLog(DEFAULT_LEVELS.info, hook6), + debug: (hook6) => genLog(DEFAULT_LEVELS.debug, hook6), + trace: (hook6) => genLog(DEFAULT_LEVELS.trace, hook6) + }; + var nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => { + o[DEFAULT_LEVELS[k]] = k; + return o; + }, {}); + var initialLsCache = Object.keys(nums).reduce((o, k) => { + o[k] = '{"level":' + Number(k); + return o; + }, {}); + function genLsCache(instance) { + const formatter = instance[formattersSym].level; + const { labels } = instance.levels; + const cache = {}; + for (const label in labels) { + const level = formatter(labels[label], Number(label)); + cache[label] = JSON.stringify(level).slice(0, -1); + } + instance[lsCacheSym] = cache; + return instance; + } + function isStandardLevel(level, useOnlyCustomLevels) { + if (useOnlyCustomLevels) { + return false; + } + switch (level) { + case "fatal": + case "error": + case "warn": + case "info": + case "debug": + case "trace": + return true; + default: + return false; } - } else if (typeof matcher === 'undefined') { - this[kNetConnect] = true - } else { - throw new InvalidArgumentError('Unsupported matcher. Must be one of String|Function|RegExp.') } - } - - disableNetConnect () { - this[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[kIsMockActive] - } - - [kMockAgentSet] (origin, dispatcher) { - this[kClients].set(origin, new FakeWeakRef(dispatcher)) - } - - [kFactory] (origin) { - const mockOptions = Object.assign({ agent: this }, this[kOptions]) - return this[kOptions] && this[kOptions].connections === 1 - ? new MockClient(origin, mockOptions) - : new MockPool(origin, mockOptions) - } - - [kMockAgentGet] (origin) { - // First check if we can immediately find it - const ref = this[kClients].get(origin) - if (ref) { - return ref.deref() + function setLevel(level) { + const { labels, values } = this.levels; + if (typeof level === "number") { + if (labels[level] === void 0) throw Error("unknown level value" + level); + level = labels[level]; + } + if (values[level] === void 0) throw Error("unknown level " + level); + const preLevelVal = this[levelValSym]; + const levelVal = this[levelValSym] = values[level]; + const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym]; + const levelComparison = this[levelCompSym]; + const hook6 = this[hooksSym].logMethod; + for (const key in values) { + if (levelComparison(values[key], levelVal) === false) { + this[key] = noop3; + continue; + } + this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook6) : genLog(values[key], hook6); + } + this.emit( + "level-change", + level, + levelVal, + labels[preLevelVal], + preLevelVal, + this + ); } - - // If the origin is not a string create a dummy parent pool and return to user - if (typeof origin !== 'string') { - const dispatcher = this[kFactory]('http://localhost:9999') - this[kMockAgentSet](origin, dispatcher) - return dispatcher + function getLevel(level) { + const { levels, levelVal } = this; + return levels && levels.labels ? levels.labels[levelVal] : ""; } - - // If we match, create a pool and assign the same dispatches - for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { - const nonExplicitDispatcher = nonExplicitRef.deref() - if (nonExplicitDispatcher && typeof keyMatcher !== 'string' && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin) - this[kMockAgentSet](origin, dispatcher) - dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches] - return dispatcher + function isLevelEnabled(logLevel) { + const { values } = this.levels; + const logLevelVal = values[logLevel]; + return logLevelVal !== void 0 && this[levelCompSym](logLevelVal, this[levelValSym]); + } + function compareLevel(direction, current, expected) { + if (direction === SORTING_ORDER.DESC) { + return current <= expected; } + return current >= expected; } - } - - [kGetNetConnect] () { - return this[kNetConnect] - } - - pendingInterceptors () { - const mockAgentClients = this[kClients] - - return Array.from(mockAgentClients.entries()) - .flatMap(([origin, scope]) => scope.deref()[kDispatches].map(dispatch => ({ ...dispatch, origin }))) - .filter(({ pending }) => pending) - } - - assertNoPendingInterceptors ({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { - const pending = this.pendingInterceptors() - - if (pending.length === 0) { - return + function genLevelComparison(levelComparison) { + if (typeof levelComparison === "string") { + return compareLevel.bind(null, levelComparison); + } + return levelComparison; } - - const pluralizer = new Pluralizer('interceptor', 'interceptors').pluralize(pending.length) - - throw new UndiciError(` -${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - -${pendingInterceptorsFormatter.format(pending)} -`.trim()) - } -} - -module.exports = MockAgent - - -/***/ }), - -/***/ 70962: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { promisify } = __nccwpck_require__(39023) -const Client = __nccwpck_require__(76646) -const { buildMockDispatch } = __nccwpck_require__(42020) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(48592) -const { MockInterceptor } = __nccwpck_require__(31470) -const Symbols = __nccwpck_require__(34856) -const { InvalidArgumentError } = __nccwpck_require__(33862) - -/** - * MockClient provides an API that extends the Client to influence the mockDispatches. - */ -class MockClient extends Client { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') + function mappings(customLevels = null, useOnlyCustomLevels = false) { + const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => { + o[customLevels[k]] = k; + return o; + }, {}) : null; + const labels = Object.assign( + Object.create(Object.prototype, { Infinity: { value: "silent" } }), + useOnlyCustomLevels ? null : nums, + customNums + ); + const values = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + return { labels, values }; + } + function assertDefaultLevelFound(defaultLevel, customLevels, useOnlyCustomLevels) { + if (typeof defaultLevel === "number") { + const values = [].concat( + Object.keys(customLevels || {}).map((key) => customLevels[key]), + useOnlyCustomLevels ? [] : Object.keys(nums).map((level) => +level), + Infinity + ); + if (!values.includes(defaultLevel)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } + return; + } + const labels = Object.assign( + Object.create(Object.prototype, { silent: { value: Infinity } }), + useOnlyCustomLevels ? null : DEFAULT_LEVELS, + customLevels + ); + if (!(defaultLevel in labels)) { + throw Error(`default level:${defaultLevel} must be included in custom levels`); + } } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockClient - - -/***/ }), - -/***/ 14222: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { UndiciError } = __nccwpck_require__(33862) - -class MockNotMatchedError extends UndiciError { - constructor (message) { - super(message) - Error.captureStackTrace(this, MockNotMatchedError) - this.name = 'MockNotMatchedError' - this.message = message || 'The request does not match any registered mock dispatches' - this.code = 'UND_MOCK_ERR_MOCK_NOT_MATCHED' - } -} - -module.exports = { - MockNotMatchedError -} - - -/***/ }), - -/***/ 31470: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(42020) -const { - kDispatches, - kDispatchKey, - kDefaultHeaders, - kDefaultTrailers, - kContentLength, - kMockDispatch -} = __nccwpck_require__(48592) -const { InvalidArgumentError } = __nccwpck_require__(33862) -const { buildURL } = __nccwpck_require__(33465) - -/** - * Defines the scope API for an interceptor reply - */ -class MockScope { - constructor (mockDispatch) { - this[kMockDispatch] = mockDispatch - } - - /** - * Delay a reply by a set amount in ms. - */ - delay (waitInMs) { - if (typeof waitInMs !== 'number' || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError('waitInMs must be a valid integer > 0') + function assertNoLevelCollisions(levels, customLevels) { + const { labels, values } = levels; + for (const k in customLevels) { + if (k in values) { + throw Error("levels cannot be overridden"); + } + if (customLevels[k] in labels) { + throw Error("pre-existing level values cannot be used for new levels"); + } + } } - - this[kMockDispatch].delay = waitInMs - return this + function assertLevelComparison(levelComparison) { + if (typeof levelComparison === "function") { + return; + } + if (typeof levelComparison === "string" && Object.values(SORTING_ORDER).includes(levelComparison)) { + return; + } + throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type'); + } + module2.exports = { + initialLsCache, + genLsCache, + levelMethods, + getLevel, + setLevel, + isLevelEnabled, + mappings, + assertNoLevelCollisions, + assertDefaultLevelFound, + genLevelComparison, + assertLevelComparison + }; } +}); - /** - * For a defined reply, never mark as consumed. - */ - persist () { - this[kMockDispatch].persist = true - return this +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/meta.js +var require_meta2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/meta.js"(exports2, module2) { + "use strict"; + module2.exports = { version: "8.21.0" }; } +}); - /** - * 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 InvalidArgumentError('repeatTimes must be a valid integer > 0') +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/proto.js +var require_proto2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/proto.js"(exports2, module2) { + "use strict"; + var { EventEmitter } = __require("events"); + var { + lsCacheSym, + levelValSym, + setLevelSym, + getLevelSym, + chindingsSym, + parsedChindingsSym, + mixinSym, + asJsonSym, + writeSym, + mixinMergeStrategySym, + timeSym, + timeSliceIndexSym, + streamSym, + serializersSym, + formattersSym, + errorKeySym, + messageKeySym, + useOnlyCustomLevelsSym, + needsMetadataGsym, + redactFmtSym, + stringifySym, + formatOptsSym, + stringifiersSym, + msgPrefixSym + } = require_symbols2(); + var { + getLevel, + setLevel, + isLevelEnabled, + mappings, + initialLsCache, + genLsCache, + assertNoLevelCollisions + } = require_levels2(); + var { + asChindings, + asJson, + buildFormatters, + stringify + } = require_tools2(); + var { + version + } = require_meta2(); + var redaction = require_redaction2(); + var constructor = class Pino { + }; + var prototype = { + constructor, + child, + bindings, + setBindings, + flush: flush2, + isLevelEnabled, + version, + get level() { + return this[getLevelSym](); + }, + set level(lvl) { + this[setLevelSym](lvl); + }, + get levelVal() { + return this[levelValSym]; + }, + set levelVal(n) { + throw Error("levelVal is read-only"); + }, + [lsCacheSym]: initialLsCache, + [writeSym]: write, + [asJsonSym]: asJson, + [getLevelSym]: getLevel, + [setLevelSym]: setLevel + }; + Object.setPrototypeOf(prototype, EventEmitter.prototype); + module2.exports = function() { + return Object.create(prototype); + }; + var resetChildingsFormatter = (bindings2) => bindings2; + function child(bindings2, options2) { + if (!bindings2) { + throw Error("missing bindings for child Pino"); + } + options2 = options2 || {}; + const serializers = this[serializersSym]; + const formatters = this[formattersSym]; + const instance = Object.create(this); + if (options2.hasOwnProperty("serializers") === true) { + instance[serializersSym] = /* @__PURE__ */ Object.create(null); + for (const k in serializers) { + instance[serializersSym][k] = serializers[k]; + } + const parentSymbols = Object.getOwnPropertySymbols(serializers); + for (var i = 0; i < parentSymbols.length; i++) { + const ks = parentSymbols[i]; + instance[serializersSym][ks] = serializers[ks]; + } + for (const bk in options2.serializers) { + instance[serializersSym][bk] = options2.serializers[bk]; + } + const bindingsSymbols = Object.getOwnPropertySymbols(options2.serializers); + for (var bi = 0; bi < bindingsSymbols.length; bi++) { + const bks = bindingsSymbols[bi]; + instance[serializersSym][bks] = options2.serializers[bks]; + } + } else instance[serializersSym] = serializers; + if (options2.hasOwnProperty("formatters")) { + const { level, bindings: chindings, log: log2 } = options2.formatters; + instance[formattersSym] = buildFormatters( + level || formatters.level, + chindings || resetChildingsFormatter, + log2 || formatters.log + ); + } else { + instance[formattersSym] = buildFormatters( + formatters.level, + resetChildingsFormatter, + formatters.log + ); + } + if (options2.hasOwnProperty("customLevels") === true) { + assertNoLevelCollisions(this.levels, options2.customLevels); + instance.levels = mappings(options2.customLevels, instance[useOnlyCustomLevelsSym]); + genLsCache(instance); + } + if (typeof options2.redact === "object" && options2.redact !== null || Array.isArray(options2.redact)) { + instance.redact = options2.redact; + const stringifiers = redaction(instance.redact, stringify); + const formatOpts = { stringify: stringifiers[redactFmtSym] }; + instance[stringifySym] = stringify; + instance[stringifiersSym] = stringifiers; + instance[formatOptsSym] = formatOpts; + } + if (typeof options2.msgPrefix === "string") { + instance[msgPrefixSym] = (this[msgPrefixSym] || "") + options2.msgPrefix; + } + instance[chindingsSym] = asChindings(instance, bindings2); + const childLevel = options2.level || this.level; + instance[setLevelSym](childLevel); + this.onChild(instance); + return instance; + } + function bindings() { + const chindings = this[chindingsSym]; + const chindingsJson = `{${chindings.substr(1)}}`; + const bindingsFromJson = JSON.parse(chindingsJson); + delete bindingsFromJson.pid; + delete bindingsFromJson.hostname; + return bindingsFromJson; + } + function setBindings(newBindings) { + const chindings = asChindings(this, newBindings); + this[chindingsSym] = chindings; + delete this[parsedChindingsSym]; + } + function defaultMixinMergeStrategy(mergeObject, mixinObject) { + return Object.assign(mixinObject, mergeObject); + } + function write(_obj, msg, num) { + const t = this[timeSym](); + const mixin = this[mixinSym]; + const errorKey = this[errorKeySym]; + const messageKey = this[messageKeySym]; + const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy; + let obj; + if (_obj === void 0 || _obj === null) { + obj = {}; + } else if (_obj instanceof Error) { + obj = { [errorKey]: _obj }; + if (msg === void 0) { + msg = _obj.message; + } + } else { + obj = _obj; + if (msg === void 0 && _obj[messageKey] === void 0 && _obj[errorKey]) { + msg = _obj[errorKey].message; + } + } + if (mixin) { + obj = mixinMergeStrategy(obj, mixin(obj, num, this)); + } + const s = this[asJsonSym](obj, msg, num, t); + const stream = this[streamSym]; + if (stream[needsMetadataGsym] === true) { + stream.lastLevel = num; + stream.lastObj = obj; + stream.lastMsg = msg; + stream.lastTime = t.slice(this[timeSliceIndexSym]); + stream.lastLogger = this; + } + stream.write(s); + } + function noop3() { + } + function flush2(cb) { + if (cb != null && typeof cb !== "function") { + throw Error("callback must be a function"); + } + const stream = this[streamSym]; + if (typeof stream.flush === "function") { + stream.flush(cb || noop3); + } else if (cb) cb(); } - - this[kMockDispatch].times = repeatTimes - return this } -} +}); -/** - * Defines an interceptor for a Mock - */ -class MockInterceptor { - constructor (opts, mockDispatches) { - if (typeof opts !== 'object') { - throw new InvalidArgumentError('opts must be an object') +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/multistream.js +var require_multistream2 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/lib/multistream.js"(exports2, module2) { + "use strict"; + var metadata = Symbol.for("pino.metadata"); + var { DEFAULT_LEVELS } = require_constants3(); + var DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info; + function multistream(streamsArray, opts) { + let counter = 0; + streamsArray = streamsArray || []; + opts = opts || { dedupe: false }; + const streamLevels = Object.create(DEFAULT_LEVELS); + streamLevels.silent = Infinity; + if (opts.levels && typeof opts.levels === "object") { + Object.keys(opts.levels).forEach((i) => { + streamLevels[i] = opts.levels[i]; + }); + } + const res = { + write, + add, + emit, + flushSync, + end: end2, + minLevel: 0, + streams: [], + clone, + [metadata]: true, + streamLevels + }; + if (Array.isArray(streamsArray)) { + streamsArray.forEach(add, res); + } else { + add.call(res, streamsArray); + } + streamsArray = null; + return res; + function write(data) { + let dest; + const level = this.lastLevel; + const { streams } = this; + let recordedLevel = 0; + let stream; + for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) { + dest = streams[i]; + if (dest.level <= level) { + if (recordedLevel !== 0 && recordedLevel !== dest.level) { + break; + } + stream = dest.stream; + if (stream[metadata]) { + const { lastTime, lastMsg, lastObj, lastLogger } = this; + stream.lastLevel = level; + stream.lastTime = lastTime; + stream.lastMsg = lastMsg; + stream.lastObj = lastObj; + stream.lastLogger = lastLogger; + } + stream.write(data); + if (opts.dedupe) { + recordedLevel = dest.level; + } + } else if (!opts.dedupe) { + break; + } + } + } + function emit(...args) { + for (const { stream } of this.streams) { + if (typeof stream.emit === "function") { + stream.emit(...args); + } + } + } + function flushSync() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + } + } + function add(dest) { + if (!dest) { + return res; + } + const isStream = typeof dest.write === "function" || dest.stream; + const stream_ = dest.write ? dest : dest.stream; + if (!isStream) { + throw Error("stream object needs to implement either StreamEntry or DestinationStream interface"); + } + const { streams, streamLevels: streamLevels2 } = this; + let level; + if (typeof dest.levelVal === "number") { + level = dest.levelVal; + } else if (typeof dest.level === "string") { + level = streamLevels2[dest.level]; + } else if (typeof dest.level === "number") { + level = dest.level; + } else { + level = DEFAULT_INFO_LEVEL; + } + const dest_ = { + stream: stream_, + level, + levelVal: void 0, + id: counter++ + }; + streams.unshift(dest_); + streams.sort(compareByLevel); + this.minLevel = streams[0].level; + return res; + } + function end2() { + for (const { stream } of this.streams) { + if (typeof stream.flushSync === "function") { + stream.flushSync(); + } + stream.end(); + } + } + function clone(level) { + const streams = new Array(this.streams.length); + for (let i = 0; i < streams.length; i++) { + streams[i] = { + level, + stream: this.streams[i].stream + }; + } + return { + write, + add, + minLevel: level, + streams, + clone, + emit, + flushSync, + [metadata]: true + }; + } } - if (typeof opts.path === 'undefined') { - throw new InvalidArgumentError('opts.path must be defined') + function compareByLevel(a, b) { + return a.level - b.level; } - if (typeof opts.method === 'undefined') { - opts.method = 'GET' + function initLoopVar(length, dedupe) { + return dedupe ? length - 1 : 0; } - // 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 = 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 - } + function adjustLoopVar(i, dedupe) { + return dedupe ? i - 1 : i + 1; } - if (typeof opts.method === 'string') { - opts.method = opts.method.toUpperCase() + function checkLoopVar(i, length, dedupe) { + return dedupe ? i >= 0 : i < length; } - - this[kDispatchKey] = buildKey(opts) - this[kDispatches] = mockDispatches - this[kDefaultHeaders] = {} - this[kDefaultTrailers] = {} - this[kContentLength] = false + module2.exports = multistream; } +}); - createMockScopeDispatchData (statusCode, data, responseOptions = {}) { - const responseData = getResponseData(data) - const contentLength = this[kContentLength] ? { 'content-length': responseData.length } : {} - const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers } - const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers } - - return { statusCode, data, headers, trailers } +// node_modules/.pnpm/pino@8.21.0/node_modules/pino/pino.js +var require_pino3 = __commonJS({ + "node_modules/.pnpm/pino@8.21.0/node_modules/pino/pino.js"(exports2, module2) { + "use strict"; + var os3 = __require("os"); + var stdSerializers = require_pino_std_serializers2(); + var caller = require_caller2(); + var redaction = require_redaction2(); + var time = require_time2(); + var proto = require_proto2(); + var symbols = require_symbols2(); + var { configure } = require_safe_stable_stringify(); + var { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = require_levels2(); + var { DEFAULT_LEVELS, SORTING_ORDER } = require_constants3(); + var { + createArgsNormalizer, + asChindings, + buildSafeSonicBoom, + buildFormatters, + stringify, + normalizeDestFileDescriptor, + noop: noop3 + } = require_tools2(); + var { version } = require_meta2(); + var { + chindingsSym, + redactFmtSym, + serializersSym, + timeSym, + timeSliceIndexSym, + streamSym, + stringifySym, + stringifySafeSym, + stringifiersSym, + setLevelSym, + endSym, + formatOptsSym, + messageKeySym, + errorKeySym, + nestedKeySym, + mixinSym, + levelCompSym, + useOnlyCustomLevelsSym, + formattersSym, + hooksSym, + nestedKeyStrSym, + mixinMergeStrategySym, + msgPrefixSym + } = symbols; + var { epochTime, nullTime } = time; + var { pid } = process; + var hostname2 = os3.hostname(); + var defaultErrorSerializer = stdSerializers.err; + var defaultOptions = { + level: "info", + levelComparison: SORTING_ORDER.ASC, + levels: DEFAULT_LEVELS, + messageKey: "msg", + errorKey: "err", + nestedKey: null, + enabled: true, + base: { pid, hostname: hostname2 }, + serializers: Object.assign(/* @__PURE__ */ Object.create(null), { + err: defaultErrorSerializer + }), + formatters: Object.assign(/* @__PURE__ */ Object.create(null), { + bindings(bindings) { + return bindings; + }, + level(label, number) { + return { level: number }; + } + }), + hooks: { + logMethod: void 0 + }, + timestamp: epochTime, + name: void 0, + redact: null, + customLevels: null, + useOnlyCustomLevels: false, + depthLimit: 5, + edgeLimit: 100 + }; + var normalize2 = createArgsNormalizer(defaultOptions); + var serializers = Object.assign(/* @__PURE__ */ Object.create(null), stdSerializers); + function pino3(...args) { + const instance = {}; + const { opts, stream } = normalize2(instance, caller(), ...args); + const { + redact, + crlf, + serializers: serializers2, + timestamp: timestamp2, + messageKey, + errorKey, + nestedKey, + base, + name, + level, + customLevels, + levelComparison, + mixin, + mixinMergeStrategy, + useOnlyCustomLevels, + formatters, + hooks, + depthLimit, + edgeLimit, + onChild, + msgPrefix + } = opts; + const stringifySafe = configure({ + maximumDepth: depthLimit, + maximumBreadth: edgeLimit + }); + const allFormatters = buildFormatters( + formatters.level, + formatters.bindings, + formatters.log + ); + const stringifyFn = stringify.bind({ + [stringifySafeSym]: stringifySafe + }); + const stringifiers = redact ? redaction(redact, stringifyFn) : {}; + const formatOpts = redact ? { stringify: stringifiers[redactFmtSym] } : { stringify: stringifyFn }; + const end2 = "}" + (crlf ? "\r\n" : "\n"); + const coreChindings = asChindings.bind(null, { + [chindingsSym]: "", + [serializersSym]: serializers2, + [stringifiersSym]: stringifiers, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [formattersSym]: allFormatters + }); + let chindings = ""; + if (base !== null) { + if (name === void 0) { + chindings = coreChindings(base); + } else { + chindings = coreChindings(Object.assign({}, base, { name })); + } + } + const time2 = timestamp2 instanceof Function ? timestamp2 : timestamp2 ? epochTime : nullTime; + const timeSliceIndex = time2().indexOf(":") + 1; + if (useOnlyCustomLevels && !customLevels) throw Error("customLevels is required if useOnlyCustomLevels is set true"); + if (mixin && typeof mixin !== "function") throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`); + if (msgPrefix && typeof msgPrefix !== "string") throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`); + assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels); + const levels = mappings(customLevels, useOnlyCustomLevels); + if (typeof stream.emit === "function") { + stream.emit("message", { code: "PINO_CONFIG", config: { levels, messageKey, errorKey } }); + } + assertLevelComparison(levelComparison); + const levelCompFunc = genLevelComparison(levelComparison); + Object.assign(instance, { + levels, + [levelCompSym]: levelCompFunc, + [useOnlyCustomLevelsSym]: useOnlyCustomLevels, + [streamSym]: stream, + [timeSym]: time2, + [timeSliceIndexSym]: timeSliceIndex, + [stringifySym]: stringify, + [stringifySafeSym]: stringifySafe, + [stringifiersSym]: stringifiers, + [endSym]: end2, + [formatOptsSym]: formatOpts, + [messageKeySym]: messageKey, + [errorKeySym]: errorKey, + [nestedKeySym]: nestedKey, + // protect against injection + [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : "", + [serializersSym]: serializers2, + [mixinSym]: mixin, + [mixinMergeStrategySym]: mixinMergeStrategy, + [chindingsSym]: chindings, + [formattersSym]: allFormatters, + [hooksSym]: hooks, + silent: noop3, + onChild, + [msgPrefixSym]: msgPrefix + }); + Object.setPrototypeOf(instance, proto()); + genLsCache(instance); + instance[setLevelSym](level); + return instance; + } + module2.exports = pino3; + module2.exports.destination = (dest = process.stdout.fd) => { + if (typeof dest === "object") { + dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd); + return buildSafeSonicBoom(dest); + } else { + return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 }); + } + }; + module2.exports.transport = require_transport2(); + module2.exports.multistream = require_multistream2(); + module2.exports.levels = mappings(); + module2.exports.stdSerializers = serializers; + module2.exports.stdTimeFunctions = Object.assign({}, time); + module2.exports.symbols = symbols; + module2.exports.version = version; + module2.exports.default = pino3; + module2.exports.pino = pino3; } +}); - validateReplyParameters (statusCode, data, responseOptions) { - if (typeof statusCode === 'undefined') { - throw new InvalidArgumentError('statusCode must be defined') - } - if (typeof data === 'undefined') { - throw new InvalidArgumentError('data must be defined') +// node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js +var require_through2 = __commonJS({ + "node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js"(exports2, module2) { + var { Transform } = require_readable(); + function inherits(fn, sup) { + fn.super_ = sup; + fn.prototype = Object.create(sup.prototype, { + constructor: { value: fn, enumerable: false, writable: true, configurable: true } + }); } - if (typeof responseOptions !== 'object') { - throw new InvalidArgumentError('responseOptions must be an object') + function through2(construct) { + return (options2, transform, flush2) => { + if (typeof options2 === "function") { + flush2 = transform; + transform = options2; + options2 = {}; + } + if (typeof transform !== "function") { + transform = (chunk, enc, cb) => cb(null, chunk); + } + if (typeof flush2 !== "function") { + flush2 = null; + } + return construct(options2, transform, flush2); + }; } - } - - /** - * 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 InvalidArgumentError('reply options callback must return an object') + var make = through2((options2, transform, flush2) => { + const t2 = new Transform(options2); + t2._transform = transform; + if (flush2) { + t2._flush = flush2; + } + return t2; + }); + var ctor = through2((options2, transform, flush2) => { + function Through2(override) { + if (!(this instanceof Through2)) { + return new Through2(override); } - - const { statusCode, data = '', 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) + this.options = Object.assign({}, options2, override); + Transform.call(this, this.options); + this._transform = transform; + if (flush2) { + this._flush = flush2; } } - - // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) - return new 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 = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) - return new MockScope(newMockDispatch) + inherits(Through2, Transform); + return Through2; + }); + var obj = through2(function(options2, transform, flush2) { + const t2 = new Transform(Object.assign({ objectMode: true, highWaterMark: 16 }, options2)); + t2._transform = transform; + if (flush2) { + t2._flush = flush2; + } + return t2; + }); + module2.exports = make; + module2.exports.ctor = ctor; + module2.exports.obj = obj; } +}); - /** - * Mock an undici request with a defined error. - */ - replyWithError (error) { - if (typeof error === 'undefined') { - throw new InvalidArgumentError('error must be defined') +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js +var require_utils6 = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toCommandProperties = exports2.toCommandValue = void 0; + function toCommandValue(input) { + if (input === null || input === void 0) { + return ""; + } else if (typeof input === "string" || input instanceof String) { + return input; + } + return JSON.stringify(input); } - - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) - return new MockScope(newMockDispatch) - } - - /** - * Set default reply headers on the interceptor for subsequent replies - */ - defaultReplyHeaders (headers) { - if (typeof headers === 'undefined') { - throw new InvalidArgumentError('headers must be defined') + exports2.toCommandValue = toCommandValue; + function 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 + }; } - - this[kDefaultHeaders] = headers - return this + exports2.toCommandProperties = toCommandProperties; } +}); - /** - * Set default reply trailers on the interceptor for subsequent replies - */ - defaultReplyTrailers (trailers) { - if (typeof trailers === 'undefined') { - throw new InvalidArgumentError('trailers must be defined') +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js +var require_command2 = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/command.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.issue = exports2.issueCommand = void 0; + var os3 = __importStar(__require("os")); + var utils_1 = require_utils6(); + function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os3.EOL); + } + exports2.issueCommand = issueCommand; + function issue(name, message = "") { + issueCommand(name, {}, message); + } + exports2.issue = issue; + var CMD_STRING = "::"; + var Command = class { + constructor(command, properties, message) { + if (!command) { + command = "missing.command"; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = 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}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } + }; + function escapeData(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); } - - this[kDefaultTrailers] = trailers - return this - } - - /** - * Set reply content length header for replies on the interceptor - */ - replyContentLength () { - this[kContentLength] = true - return this - } -} - -module.exports.MockInterceptor = MockInterceptor -module.exports.MockScope = MockScope - - -/***/ }), - -/***/ 52975: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { promisify } = __nccwpck_require__(39023) -const Pool = __nccwpck_require__(17787) -const { buildMockDispatch } = __nccwpck_require__(42020) -const { - kDispatches, - kMockAgent, - kClose, - kOriginalClose, - kOrigin, - kOriginalDispatch, - kConnected -} = __nccwpck_require__(48592) -const { MockInterceptor } = __nccwpck_require__(31470) -const Symbols = __nccwpck_require__(34856) -const { InvalidArgumentError } = __nccwpck_require__(33862) - -/** - * MockPool provides an API that extends the Pool to influence the mockDispatches. - */ -class MockPool extends Pool { - constructor (origin, opts) { - super(origin, opts) - - if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') { - throw new InvalidArgumentError('Argument opts.agent must implement Agent') + function escapeProperty(s) { + return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } - - this[kMockAgent] = opts.agent - this[kOrigin] = origin - this[kDispatches] = [] - this[kConnected] = 1 - this[kOriginalDispatch] = this.dispatch - this[kOriginalClose] = this.close.bind(this) - - this.dispatch = buildMockDispatch.call(this) - this.close = this[kClose] - } - - get [Symbols.kConnected] () { - return this[kConnected] - } - - /** - * Sets up the base interceptor for mocking replies from undici. - */ - intercept (opts) { - return new MockInterceptor(opts, this[kDispatches]) - } - - async [kClose] () { - await promisify(this[kOriginalClose])() - this[kConnected] = 0 - this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) - } -} - -module.exports = MockPool - - -/***/ }), - -/***/ 48592: -/***/ ((module) => { - -"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') -} - - -/***/ }), - -/***/ 42020: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { MockNotMatchedError } = __nccwpck_require__(14222) -const { - kDispatches, - kMockAgent, - kOriginalDispatch, - kOrigin, - kGetNetConnect -} = __nccwpck_require__(48592) -const { buildURL, nop } = __nccwpck_require__(33465) -const { STATUS_CODES } = __nccwpck_require__(58611) -const { - types: { - isPromise - } -} = __nccwpck_require__(39023) - -function 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 lowerCaseEntries (headers) { - return Object.fromEntries( - Object.entries(headers).map(([headerName, headerValue]) => { - return [headerName.toLocaleLowerCase(), headerValue] - }) - ) -} +}); -/** - * @param {import('../../index').Headers|string[]|Record} headers - * @param {string} key - */ -function 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] +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js +var require_file_command = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/file-command.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; + var crypto2 = __importStar(__require("crypto")); + var fs2 = __importStar(__require("fs")); + var os3 = __importStar(__require("os")); + var utils_1 = require_utils6(); + function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs2.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); } + fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + encoding: "utf8" + }); } - - return undefined - } else if (typeof headers.get === 'function') { - return headers.get(key) - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()] - } -} - -/** @param {string[]} headers */ -function buildHeadersFromArray (headers) { // fetch HeadersList - 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 matchHeaders (mockDispatch, headers) { - if (typeof mockDispatch.headers === 'function') { - if (Array.isArray(headers)) { // fetch HeadersList - headers = buildHeadersFromArray(headers) + exports2.issueFileCommand = issueFileCommand; + function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = (0, utils_1.toCommandValue)(value); + 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}${os3.EOL}${convertedValue}${os3.EOL}${delimiter}`; } - return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}) - } - if (typeof mockDispatch.headers === 'undefined') { - return true + exports2.prepareKeyValueMessage = prepareKeyValueMessage; } - if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') { - return false - } - - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName) +}); - if (!matchValue(matchHeaderValue, headerValue)) { - return false +// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js +var require_proxy = __commonJS({ + "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/proxy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.checkBypass = exports2.getProxyUrl = void 0; + function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === "https:"; + if (checkBypass(reqUrl)) { + return void 0; + } + 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 DecodedURL(proxyVar); + } catch (_a2) { + if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) + return new DecodedURL(`http://${proxyVar}`); + } + } else { + return void 0; + } } - } - return true -} - -function 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 matchKey (mockDispatch, { path, method, body, headers }) { - const pathMatch = matchValue(mockDispatch.path, path) - const methodMatch = matchValue(mockDispatch.method, method) - const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true - const headersMatch = matchHeaders(mockDispatch, headers) - return pathMatch && methodMatch && bodyMatch && headersMatch -} - -function getResponseData (data) { - if (Buffer.isBuffer(data)) { - return data - } else if (typeof data === 'object') { - return JSON.stringify(data) - } else { - return data.toString() - } -} - -function getMockDispatch (mockDispatches, key) { - const basePath = key.query ? buildURL(key.path, key.query) : key.path - const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath - - // Match path - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path }) => matchValue(safeUrl(path), resolvedPath)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`) - } - - // Match method - matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) - } - - // Match body - matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`) - } - - // Match headers - matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)) - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers}'`) - } - - return matchedMockDispatches[0] -} - -function 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 deleteMockDispatch (mockDispatches, key) { - const index = mockDispatches.findIndex(dispatch => { - if (!dispatch.consumed) { - return false + exports2.getProxyUrl = getProxyUrl; + function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } + const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; + if (!noProxy) { + return false; + } + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } else if (reqUrl.protocol === "http:") { + reqPort = 80; + } else if (reqUrl.protocol === "https:") { + reqPort = 443; + } + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === "number") { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + 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; + } + } + return false; } - return matchKey(dispatch, key) - }) - if (index !== -1) { - mockDispatches.splice(index, 1) - } -} - -function buildKey (opts) { - const { path, method, body, headers, query } = opts - return { - path, - method, - body, - headers, - query - } -} - -function 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}`) - ], []) -} - -/** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status - * @param {number} statusCode - */ -function getStatusText (statusCode) { - return STATUS_CODES[statusCode] || 'unknown' -} - -async function 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 mockDispatch (opts, handler) { - // Get mock dispatch from built key - const key = buildKey(opts) - const mockDispatch = getMockDispatch(this[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, data, headers, trailers, error }, delay, persist } = mockDispatch - const { timesInvoked, 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) { - deleteMockDispatch(this[kDispatches], key) - handler.onError(error) - return true - } - - // Handle the request with a delay if necessary - if (typeof delay === 'number' && delay > 0) { - setTimeout(() => { - handleReply(this[kDispatches]) - }, delay) - } else { - handleReply(this[kDispatches]) - } - - function handleReply (mockDispatches, _data = data) { - // fetch's HeadersList is a 1D string array - const optsHeaders = Array.isArray(opts.headers) - ? buildHeadersFromArray(opts.headers) - : opts.headers - const body = typeof _data === 'function' - ? _data({ ...opts, headers: optsHeaders }) - : _data - - // util.types.isPromise is likely needed for jest. - if (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 + exports2.checkBypass = checkBypass; + function isLoopbackAddress(host) { + const hostLower = host.toLowerCase(); + return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } - - const responseData = getResponseData(body) - const responseHeaders = generateKeyValues(headers) - const responseTrailers = generateKeyValues(trailers) - - handler.abort = nop - handler.onHeaders(statusCode, responseHeaders, resume, getStatusText(statusCode)) - handler.onData(Buffer.from(responseData)) - handler.onComplete(responseTrailers) - deleteMockDispatch(mockDispatches, key) + var DecodedURL = class 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; + } + }; } +}); - function resume () {} - - return true -} - -function buildMockDispatch () { - const agent = this[kMockAgent] - const origin = this[kOrigin] - const originalDispatch = this[kOriginalDispatch] - - return function dispatch (opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler) - } catch (error) { - if (error instanceof MockNotMatchedError) { - const netConnect = agent[kGetNetConnect]() - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`) +// node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js +var require_tunnel = __commonJS({ + "node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js"(exports2) { + "use strict"; + var net2 = __require("net"); + var tls2 = __require("tls"); + var http4 = __require("http"); + var https2 = __require("https"); + var events = __require("events"); + var assert = __require("assert"); + var util2 = __require("util"); + exports2.httpOverHttp = httpOverHttp; + exports2.httpsOverHttp = httpsOverHttp; + exports2.httpOverHttps = httpOverHttps; + exports2.httpsOverHttps = httpsOverHttps; + function httpOverHttp(options2) { + var agent = new TunnelingAgent(options2); + agent.request = http4.request; + return agent; + } + function httpsOverHttp(options2) { + var agent = new TunnelingAgent(options2); + agent.request = http4.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function httpOverHttps(options2) { + var agent = new TunnelingAgent(options2); + agent.request = https2.request; + return agent; + } + function httpsOverHttps(options2) { + var agent = new TunnelingAgent(options2); + agent.request = https2.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; + } + function TunnelingAgent(options2) { + var self2 = this; + self2.options = options2 || {}; + self2.proxyOptions = self2.options.proxy || {}; + self2.maxSockets = self2.options.maxSockets || http4.Agent.defaultMaxSockets; + self2.requests = []; + self2.sockets = []; + self2.on("free", function onFree(socket, host, port, localAddress) { + var options3 = toOptions(host, port, localAddress); + for (var i = 0, len = self2.requests.length; i < len; ++i) { + var pending = self2.requests[i]; + if (pending.host === options3.host && pending.port === options3.port) { + self2.requests.splice(i, 1); + pending.request.onSocket(socket); + return; } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler) - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`) + } + socket.destroy(); + self2.removeSocket(socket); + }); + } + util2.inherits(TunnelingAgent, events.EventEmitter); + TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self2 = this; + var options2 = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); + if (self2.sockets.length >= this.maxSockets) { + self2.requests.push(options2); + return; + } + self2.createSocket(options2, function(socket) { + socket.on("free", onFree); + socket.on("close", onCloseOrRemove); + socket.on("agentRemove", onCloseOrRemove); + req.onSocket(socket); + function onFree() { + self2.emit("free", socket, options2); + } + function onCloseOrRemove(err) { + self2.removeSocket(socket); + socket.removeListener("free", onFree); + socket.removeListener("close", onCloseOrRemove); + socket.removeListener("agentRemove", onCloseOrRemove); + } + }); + }; + TunnelingAgent.prototype.createSocket = function createSocket(options2, cb) { + var self2 = this; + var placeholder = {}; + self2.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self2.proxyOptions, { + method: "CONNECT", + path: options2.host + ":" + options2.port, + agent: false, + headers: { + host: options2.host + ":" + options2.port + } + }); + if (options2.localAddress) { + connectOptions.localAddress = options2.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); + } + debug3("making CONNECT request"); + var connectReq = self2.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; + connectReq.once("response", onResponse); + connectReq.once("upgrade", onUpgrade); + connectReq.once("connect", onConnect); + connectReq.once("error", onError); + connectReq.end(); + function onResponse(res) { + res.upgrade = true; + } + function onUpgrade(res, socket, head) { + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + if (res.statusCode !== 200) { + debug3( + "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"; + options2.request.emit("error", error); + self2.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug3("got illegal response body from proxy"); + socket.destroy(); + var error = new Error("got illegal response body from proxy"); + error.code = "ECONNRESET"; + options2.request.emit("error", error); + self2.removeSocket(placeholder); + return; + } + debug3("tunneling connection has established"); + self2.sockets[self2.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + function onError(cause) { + connectReq.removeAllListeners(); + debug3( + "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"; + options2.request.emit("error", error); + self2.removeSocket(placeholder); + } + }; + 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) { + this.createSocket(pending, function(socket2) { + pending.request.onSocket(socket2); + }); + } + }; + function createSecureSocket(options2, cb) { + var self2 = this; + TunnelingAgent.prototype.createSocket.call(self2, options2, function(socket) { + var hostHeader = options2.request.getHeader("host"); + var tlsOptions = mergeOptions({}, self2.options, { + socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options2.host + }); + var secureSocket = tls2.connect(0, tlsOptions); + self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); + } + function toOptions(host, port, localAddress) { + if (typeof host === "string") { + return { + host, + port, + localAddress + }; + } + return host; + } + function 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] !== void 0) { + target[k] = overrides[k]; + } } - } else { - throw error } } + return target; + } + var debug3; + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug3 = 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 { - originalDispatch.call(this, opts, handler) + debug3 = function() { + }; } + exports2.debug = debug3; } -} +}); -function checkNetConnect (netConnect, origin) { - const url = new URL(origin) - if (netConnect === true) { - return true - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true +// node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js +var require_tunnel2 = __commonJS({ + "node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js"(exports2, module2) { + module2.exports = require_tunnel(); } - return false -} +}); -function buildMockOptions (opts) { - if (opts) { - const { agent, ...mockOptions } = opts - return mockOptions +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/symbols.js +var require_symbols3 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/symbols.js"(exports2, module2) { + module2.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") + }; } -} - -module.exports = { - getResponseData, - getMockDispatch, - addMockDispatch, - deleteMockDispatch, - buildKey, - generateKeyValues, - matchValue, - getResponse, - getStatusText, - mockDispatch, - buildMockDispatch, - checkNetConnect, - buildMockOptions, - getHeaderByName -} - - -/***/ }), - -/***/ 95507: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Transform } = __nccwpck_require__(2203) -const { Console } = __nccwpck_require__(64236) +}); -/** - * Gets the output of `console.table(…)` as a string. - */ -module.exports = class PendingInterceptorsFormatter { - constructor ({ disableColors } = {}) { - this.transform = new Transform({ - transform (chunk, _enc, cb) { - cb(null, chunk) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/errors.js +var require_errors3 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/errors.js"(exports2, module2) { + "use strict"; + var UndiciError = class extends Error { + constructor(message) { + super(message); + this.name = "UndiciError"; + this.code = "UND_ERR"; } - }) - - this.logger = new Console({ - stdout: this.transform, - inspectOptions: { - colors: !disableColors && !process.env.CI + }; + var ConnectTimeoutError = class _ConnectTimeoutError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _ConnectTimeoutError); + this.name = "ConnectTimeoutError"; + this.message = message || "Connect Timeout Error"; + this.code = "UND_ERR_CONNECT_TIMEOUT"; } - }) - } - - format (pendingInterceptors) { - const withPrettyHeaders = pendingInterceptors.map( - ({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ - Method: method, - Origin: origin, - Path: path, - 'Status code': statusCode, - Persistent: persist ? '✅' : '❌', - Invocations: timesInvoked, - Remaining: persist ? Infinity : times - timesInvoked - })) - - this.logger.table(withPrettyHeaders) - return this.transform.read().toString() - } -} - - -/***/ }), - -/***/ 77012: -/***/ ((module) => { - -"use strict"; - - -const singulars = { - pronoun: 'it', - is: 'is', - was: 'was', - this: 'this' -} - -const 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 ? singulars : plurals - const noun = one ? this.singular : this.plural - return { ...keys, count, noun } - } -} - - -/***/ }), - -/***/ 79414: -/***/ ((module) => { - -"use strict"; -/* eslint-disable */ - - - -// 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 kSize = 2048; -const kMask = 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 FixedCircularBuffer { - constructor() { - this.bottom = 0; - this.top = 0; - this.list = new Array(kSize); - this.next = null; - } - - isEmpty() { - return this.top === this.bottom; - } - - isFull() { - return ((this.top + 1) & kMask) === this.bottom; - } - - push(data) { - this.list[this.top] = data; - this.top = (this.top + 1) & kMask; - } - - shift() { - const nextItem = this.list[this.bottom]; - if (nextItem === undefined) - return null; - this.list[this.bottom] = undefined; - this.bottom = (this.bottom + 1) & kMask; - return nextItem; - } -} - -module.exports = class FixedQueue { - constructor() { - this.head = this.tail = new FixedCircularBuffer(); + }; + var HeadersTimeoutError = class _HeadersTimeoutError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _HeadersTimeoutError); + this.name = "HeadersTimeoutError"; + this.message = message || "Headers Timeout Error"; + this.code = "UND_ERR_HEADERS_TIMEOUT"; + } + }; + var HeadersOverflowError = class _HeadersOverflowError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _HeadersOverflowError); + this.name = "HeadersOverflowError"; + this.message = message || "Headers Overflow Error"; + this.code = "UND_ERR_HEADERS_OVERFLOW"; + } + }; + var BodyTimeoutError = class _BodyTimeoutError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _BodyTimeoutError); + this.name = "BodyTimeoutError"; + this.message = message || "Body Timeout Error"; + this.code = "UND_ERR_BODY_TIMEOUT"; + } + }; + var ResponseStatusCodeError = class _ResponseStatusCodeError extends UndiciError { + constructor(message, statusCode, headers, body) { + super(message); + Error.captureStackTrace(this, _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; + } + }; + var InvalidArgumentError = class _InvalidArgumentError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _InvalidArgumentError); + this.name = "InvalidArgumentError"; + this.message = message || "Invalid Argument Error"; + this.code = "UND_ERR_INVALID_ARG"; + } + }; + var InvalidReturnValueError = class _InvalidReturnValueError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _InvalidReturnValueError); + this.name = "InvalidReturnValueError"; + this.message = message || "Invalid Return Value Error"; + this.code = "UND_ERR_INVALID_RETURN_VALUE"; + } + }; + var RequestAbortedError = class _RequestAbortedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _RequestAbortedError); + this.name = "AbortError"; + this.message = message || "Request aborted"; + this.code = "UND_ERR_ABORTED"; + } + }; + var InformationalError = class _InformationalError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _InformationalError); + this.name = "InformationalError"; + this.message = message || "Request information"; + this.code = "UND_ERR_INFO"; + } + }; + var RequestContentLengthMismatchError = class _RequestContentLengthMismatchError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _RequestContentLengthMismatchError); + this.name = "RequestContentLengthMismatchError"; + this.message = message || "Request body length does not match content-length header"; + this.code = "UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"; + } + }; + var ResponseContentLengthMismatchError = class _ResponseContentLengthMismatchError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _ResponseContentLengthMismatchError); + this.name = "ResponseContentLengthMismatchError"; + this.message = message || "Response body length does not match content-length header"; + this.code = "UND_ERR_RES_CONTENT_LENGTH_MISMATCH"; + } + }; + var ClientDestroyedError = class _ClientDestroyedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _ClientDestroyedError); + this.name = "ClientDestroyedError"; + this.message = message || "The client is destroyed"; + this.code = "UND_ERR_DESTROYED"; + } + }; + var ClientClosedError = class _ClientClosedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _ClientClosedError); + this.name = "ClientClosedError"; + this.message = message || "The client is closed"; + this.code = "UND_ERR_CLOSED"; + } + }; + var SocketError = class _SocketError extends UndiciError { + constructor(message, socket) { + super(message); + Error.captureStackTrace(this, _SocketError); + this.name = "SocketError"; + this.message = message || "Socket error"; + this.code = "UND_ERR_SOCKET"; + this.socket = socket; + } + }; + var NotSupportedError = class _NotSupportedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _NotSupportedError); + this.name = "NotSupportedError"; + this.message = message || "Not supported error"; + this.code = "UND_ERR_NOT_SUPPORTED"; + } + }; + var BalancedPoolMissingUpstreamError = class extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, NotSupportedError); + this.name = "MissingUpstreamError"; + this.message = message || "No upstream has been added to the BalancedPool"; + this.code = "UND_ERR_BPL_MISSING_UPSTREAM"; + } + }; + var HTTPParserError = class _HTTPParserError extends Error { + constructor(message, code, data) { + super(message); + Error.captureStackTrace(this, _HTTPParserError); + this.name = "HTTPParserError"; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; + } + }; + var ResponseExceededMaxSizeError = class _ResponseExceededMaxSizeError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _ResponseExceededMaxSizeError); + this.name = "ResponseExceededMaxSizeError"; + this.message = message || "Response content exceeded max size"; + this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; + } + }; + var RequestRetryError = class _RequestRetryError extends UndiciError { + constructor(message, code, { headers, data }) { + super(message); + Error.captureStackTrace(this, _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; + } + }; + module2.exports = { + HTTPParserError, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError + }; } +}); - isEmpty() { - return this.head.isEmpty(); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/constants.js +var require_constants4 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/constants.js"(exports2, module2) { + "use strict"; + var headerNameLowerCasedRecord = {}; + 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 < wellknownHeaderNames.length; ++i) { + const key = wellknownHeaderNames[i]; + const lowerCasedKey = key.toLowerCase(); + headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] = lowerCasedKey; + } + Object.setPrototypeOf(headerNameLowerCasedRecord, null); + module2.exports = { + wellknownHeaderNames, + headerNameLowerCasedRecord + }; } +}); - 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 FixedCircularBuffer(); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/util.js +var require_util2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/util.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var { kDestroyed, kBodyUsed } = require_symbols3(); + var { IncomingMessage } = __require("http"); + var stream = __require("stream"); + var net2 = __require("net"); + var { InvalidArgumentError } = require_errors3(); + var { Blob: Blob2 } = __require("buffer"); + var nodeUtil = __require("util"); + var { stringify } = __require("querystring"); + var { headerNameLowerCasedRecord } = require_constants4(); + var [nodeMajor, nodeMinor] = process.versions.node.split(".").map((v) => Number(v)); + function nop() { } - 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; + function isStream(obj) { + return obj && typeof obj === "object" && typeof obj.pipe === "function" && typeof obj.on === "function"; } - return next; - } -}; - - -/***/ }), - -/***/ 89769: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const DispatcherBase = __nccwpck_require__(9368) -const FixedQueue = __nccwpck_require__(79414) -const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(34856) -const PoolStats = __nccwpck_require__(39721) - -const kClients = Symbol('clients') -const kNeedDrain = Symbol('needDrain') -const kQueue = Symbol('queue') -const kClosedResolve = Symbol('closed resolve') -const kOnDrain = Symbol('onDrain') -const kOnConnect = Symbol('onConnect') -const kOnDisconnect = Symbol('onDisconnect') -const kOnConnectionError = Symbol('onConnectionError') -const kGetDispatcher = Symbol('get dispatcher') -const kAddClient = Symbol('add client') -const kRemoveClient = Symbol('remove client') -const kStats = Symbol('stats') - -class PoolBase extends DispatcherBase { - constructor () { - super() - - this[kQueue] = new FixedQueue() - this[kClients] = [] - this[kQueued] = 0 - - const pool = this - - this[kOnDrain] = function onDrain (origin, targets) { - const queue = pool[kQueue] - - let needDrain = false - - while (!needDrain) { - const item = queue.shift() - if (!item) { - break + function isBlobLike(object) { + return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); + } + function buildURL(url, queryParams) { + if (url.includes("?") || url.includes("#")) { + throw new Error('Query params cannot be passed when url already contains "?" or "#".'); + } + const stringified = stringify(queryParams); + if (stringified) { + url += "?" + stringified; + } + return url; + } + function parseURL(url) { + if (typeof url === "string") { + url = new URL(url); + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - pool[kQueued]-- - needDrain = !this.dispatch(item.opts, item.handler) + return url; } - - this[kNeedDrain] = needDrain - - if (!this[kNeedDrain] && pool[kNeedDrain]) { - pool[kNeedDrain] = false - pool.emit('drain', origin, [pool, ...targets]) + if (!url || typeof url !== "object") { + throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - - if (pool[kClosedResolve] && queue.isEmpty()) { - Promise - .all(pool[kClients].map(c => c.close())) - .then(pool[kClosedResolve]) + if (!/^https?:/.test(url.origin || url.protocol)) { + throw new 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 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 InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + } + if (url.pathname != null && typeof url.pathname !== "string") { + throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + } + if (url.hostname != null && typeof url.hostname !== "string") { + throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + } + if (url.origin != null && typeof url.origin !== "string") { + throw new 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 path2 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + if (origin.endsWith("/")) { + origin = origin.substring(0, origin.length - 1); + } + if (path2 && !path2.startsWith("/")) { + path2 = `/${path2}`; + } + url = new URL(origin + path2); } + return url; } - - this[kOnConnect] = (origin, targets) => { - pool.emit('connect', origin, [pool, ...targets]) + function parseOrigin(url) { + url = parseURL(url); + if (url.pathname !== "/" || url.search || url.hash) { + throw new InvalidArgumentError("invalid url"); + } + return url; } - - this[kOnDisconnect] = (origin, targets, err) => { - pool.emit('disconnect', origin, [pool, ...targets], err) + function getHostname(host) { + if (host[0] === "[") { + const idx2 = host.indexOf("]"); + assert(idx2 !== -1); + return host.substring(1, idx2); + } + const idx = host.indexOf(":"); + if (idx === -1) return host; + return host.substring(0, idx); } - - this[kOnConnectionError] = (origin, targets, err) => { - pool.emit('connectionError', origin, [pool, ...targets], err) + function getServerName(host) { + if (!host) { + return null; + } + assert.strictEqual(typeof host, "string"); + const servername = getHostname(host); + if (net2.isIP(servername)) { + return ""; + } + return servername; } - - this[kStats] = new PoolStats(this) - } - - get [kBusy] () { - return this[kNeedDrain] - } - - get [kConnected] () { - return this[kClients].filter(client => client[kConnected]).length - } - - get [kFree] () { - return this[kClients].filter(client => client[kConnected] && !client[kNeedDrain]).length - } - - get [kPending] () { - let ret = this[kQueued] - for (const { [kPending]: pending } of this[kClients]) { - ret += pending + function deepClone(obj) { + return JSON.parse(JSON.stringify(obj)); } - return ret - } - - get [kRunning] () { - let ret = 0 - for (const { [kRunning]: running } of this[kClients]) { - ret += running + function isAsyncIterable(obj) { + return !!(obj != null && typeof obj[Symbol.asyncIterator] === "function"); } - return ret - } - - get [kSize] () { - let ret = this[kQueued] - for (const { [kSize]: size } of this[kClients]) { - ret += size + function isIterable(obj) { + return !!(obj != null && (typeof obj[Symbol.iterator] === "function" || typeof obj[Symbol.asyncIterator] === "function")); } - return ret - } - - get stats () { - return this[kStats] - } - - async [kClose] () { - if (this[kQueue].isEmpty()) { - return Promise.all(this[kClients].map(c => c.close())) - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve - }) + function bodyLength(body) { + if (body == null) { + return 0; + } else if (isStream(body)) { + const state = body._readableState; + return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; + } else if (isBlobLike(body)) { + return body.size != null ? body.size : null; + } else if (isBuffer(body)) { + return body.byteLength; + } + return null; } - } - - async [kDestroy] (err) { - while (true) { - const item = this[kQueue].shift() - if (!item) { - break + function isDestroyed(stream2) { + return !stream2 || !!(stream2.destroyed || stream2[kDestroyed]); + } + function isReadableAborted(stream2) { + const state = stream2 && stream2._readableState; + return isDestroyed(stream2) && state && !state.endEmitted; + } + function destroy(stream2, err) { + if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { + return; + } + if (typeof stream2.destroy === "function") { + if (Object.getPrototypeOf(stream2).constructor === IncomingMessage) { + stream2.socket = null; + } + stream2.destroy(err); + } else if (err) { + process.nextTick((stream3, err2) => { + stream3.emit("error", err2); + }, stream2, err); + } + if (stream2.destroyed !== true) { + stream2[kDestroyed] = true; } - item.handler.onError(err) } - - return Promise.all(this[kClients].map(c => c.destroy(err))) - } - - [kDispatch] (opts, handler) { - const dispatcher = this[kGetDispatcher]() - - if (!dispatcher) { - this[kNeedDrain] = true - this[kQueue].push({ opts, handler }) - this[kQueued]++ - } else if (!dispatcher.dispatch(opts, handler)) { - dispatcher[kNeedDrain] = true - this[kNeedDrain] = !this[kGetDispatcher]() + var KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; + function parseKeepAliveTimeout(val) { + const m = val.toString().match(KEEPALIVE_TIMEOUT_EXPR); + return m ? parseInt(m[1], 10) * 1e3 : null; } - - return !this[kNeedDrain] - } - - [kAddClient] (client) { - client - .on('drain', this[kOnDrain]) - .on('connect', this[kOnConnect]) - .on('disconnect', this[kOnDisconnect]) - .on('connectionError', this[kOnConnectionError]) - - this[kClients].push(client) - - if (this[kNeedDrain]) { - process.nextTick(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client[kUrl], [this, client]) + function headerNameToString(value) { + return headerNameLowerCasedRecord[value] || value.toLowerCase(); + } + function parseHeaders(headers, obj = {}) { + 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")); + } + } + if ("content-length" in obj && "content-disposition" in obj) { + obj["content-disposition"] = Buffer.from(obj["content-disposition"]).toString("latin1"); + } + return obj; + } + function 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); } - }) + } + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString("latin1"); + } + return ret; } - - return this - } - - [kRemoveClient] (client) { - client.close(() => { - const idx = this[kClients].indexOf(client) - if (idx !== -1) { - this[kClients].splice(idx, 1) + function isBuffer(buffer) { + return buffer instanceof Uint8Array || Buffer.isBuffer(buffer); + } + function validateHandler(handler2, method, upgrade) { + if (!handler2 || typeof handler2 !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + if (typeof handler2.onConnect !== "function") { + throw new InvalidArgumentError("invalid onConnect method"); + } + if (typeof handler2.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + if (typeof handler2.onBodySent !== "function" && handler2.onBodySent !== void 0) { + throw new InvalidArgumentError("invalid onBodySent method"); + } + if (upgrade || method === "CONNECT") { + if (typeof handler2.onUpgrade !== "function") { + throw new InvalidArgumentError("invalid onUpgrade method"); + } + } else { + if (typeof handler2.onHeaders !== "function") { + throw new InvalidArgumentError("invalid onHeaders method"); + } + if (typeof handler2.onData !== "function") { + throw new InvalidArgumentError("invalid onData method"); + } + if (typeof handler2.onComplete !== "function") { + throw new InvalidArgumentError("invalid onComplete method"); + } } - }) - - this[kNeedDrain] = this[kClients].some(dispatcher => ( - !dispatcher[kNeedDrain] && - dispatcher.closed !== true && - dispatcher.destroyed !== true - )) - } -} - -module.exports = { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kRemoveClient, - kGetDispatcher -} - - -/***/ }), - -/***/ 39721: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(34856) -const kPool = Symbol('pool') - -class PoolStats { - constructor (pool) { - this[kPool] = pool - } - - get connected () { - return this[kPool][kConnected] - } - - get free () { - return this[kPool][kFree] - } - - get pending () { - return this[kPool][kPending] - } - - get queued () { - return this[kPool][kQueued] - } - - get running () { - return this[kPool][kRunning] - } - - get size () { - return this[kPool][kSize] - } -} - -module.exports = PoolStats - - -/***/ }), - -/***/ 17787: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - PoolBase, - kClients, - kNeedDrain, - kAddClient, - kGetDispatcher -} = __nccwpck_require__(89769) -const Client = __nccwpck_require__(76646) -const { - InvalidArgumentError -} = __nccwpck_require__(33862) -const util = __nccwpck_require__(33465) -const { kUrl, kInterceptors } = __nccwpck_require__(34856) -const buildConnector = __nccwpck_require__(2559) - -const kOptions = Symbol('options') -const kConnections = Symbol('connections') -const kFactory = Symbol('factory') - -function defaultFactory (origin, opts) { - return new Client(origin, opts) -} - -class Pool extends PoolBase { - constructor (origin, { - connections, - factory = defaultFactory, - connect, - connectTimeout, - tls, - maxCachedSessions, - socketPath, - autoSelectFamily, - autoSelectFamilyAttemptTimeout, - allowH2, - ...options - } = {}) { - super() - - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError('invalid connections') } - - if (typeof factory !== 'function') { - throw new InvalidArgumentError('factory must be a function.') + function isDisturbed(body) { + return !!(body && (stream.isDisturbed ? stream.isDisturbed(body) || body[kBodyUsed] : body[kBodyUsed] || body.readableDidRead || body._readableState && body._readableState.dataEmitted || isReadableAborted(body))); } - - if (connect != null && typeof connect !== 'function' && typeof connect !== 'object') { - throw new InvalidArgumentError('connect must be a function or an object') + function isErrored(body) { + return !!(body && (stream.isErrored ? stream.isErrored(body) : /state: 'errored'/.test( + nodeUtil.inspect(body) + ))); } - - if (typeof connect !== 'function') { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), - ...connect - }) + function isReadable(body) { + return !!(body && (stream.isReadable ? stream.isReadable(body) : /state: 'readable'/.test( + nodeUtil.inspect(body) + ))); } - - this[kInterceptors] = options.interceptors && options.interceptors.Pool && Array.isArray(options.interceptors.Pool) - ? options.interceptors.Pool - : [] - this[kConnections] = connections || null - this[kUrl] = util.parseOrigin(origin) - this[kOptions] = { ...util.deepClone(options), connect, allowH2 } - this[kOptions].interceptors = options.interceptors - ? { ...options.interceptors } - : undefined - this[kFactory] = factory + function 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 + }; + } + async function* convertIterableToBuffer(iterable) { + for await (const chunk of iterable) { + yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); + } + } + var ReadableStream; + function ReadableStreamFrom(iterable) { + if (!ReadableStream) { + ReadableStream = __require("stream/web").ReadableStream; + } + if (ReadableStream.from) { + return ReadableStream.from(convertIterableToBuffer(iterable)); + } + let iterator2; + return new ReadableStream( + { + async start() { + iterator2 = iterable[Symbol.asyncIterator](); + }, + async pull(controller) { + const { done, value } = await iterator2.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + }); + } else { + const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); + controller.enqueue(new Uint8Array(buf)); + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator2.return(); + } + }, + 0 + ); + } + function isFormDataLike(object) { + return object && typeof object === "object" && typeof object.append === "function" && typeof object.delete === "function" && typeof object.get === "function" && typeof object.getAll === "function" && typeof object.has === "function" && typeof object.set === "function" && object[Symbol.toStringTag] === "FormData"; + } + function throwIfAborted(signal) { + if (!signal) { + return; + } + if (typeof signal.throwIfAborted === "function") { + signal.throwIfAborted(); + } else { + if (signal.aborted) { + const err = new Error("The operation was aborted"); + err.name = "AbortError"; + throw err; + } + } + } + function addAbortListener(signal, listener) { + if ("addEventListener" in signal) { + signal.addEventListener("abort", listener, { once: true }); + return () => signal.removeEventListener("abort", listener); + } + signal.addListener("abort", listener); + return () => signal.removeListener("abort", listener); + } + var hasToWellFormed = !!String.prototype.toWellFormed; + function toUSVString(val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed(); + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val); + } + return `${val}`; + } + function 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; + } + var kEnumerableProperty = /* @__PURE__ */ Object.create(null); + kEnumerableProperty.enumerable = true; + module2.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isReadableAborted, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + headerNameToString, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 13, + safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"] + }; } +}); - [kGetDispatcher] () { - let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) - - if (dispatcher) { - return dispatcher +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/timers.js +var require_timers = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/timers.js"(exports2, module2) { + "use strict"; + var fastNow = Date.now(); + var fastNowTimeout; + var fastTimers = []; + function onTimeout() { + fastNow = Date.now(); + let len = fastTimers.length; + let idx = 0; + while (idx < len) { + const timer = fastTimers[idx]; + if (timer.state === 0) { + timer.state = fastNow + timer.delay; + } else if (timer.state > 0 && fastNow >= timer.state) { + timer.state = -1; + timer.callback(timer.opaque); + } + if (timer.state === -1) { + timer.state = -2; + if (idx !== len - 1) { + fastTimers[idx] = fastTimers.pop(); + } else { + fastTimers.pop(); + } + len -= 1; + } else { + idx += 1; + } + } + if (fastTimers.length > 0) { + refreshTimeout(); + } } - - if (!this[kConnections] || this[kClients].length < this[kConnections]) { - dispatcher = this[kFactory](this[kUrl], this[kOptions]) - this[kAddClient](dispatcher) + function refreshTimeout() { + if (fastNowTimeout && fastNowTimeout.refresh) { + fastNowTimeout.refresh(); + } else { + clearTimeout(fastNowTimeout); + fastNowTimeout = setTimeout(onTimeout, 1e3); + if (fastNowTimeout.unref) { + fastNowTimeout.unref(); + } + } } - - return dispatcher + var Timeout = class { + constructor(callback, delay, opaque) { + this.callback = callback; + this.delay = delay; + this.opaque = opaque; + this.state = -2; + this.refresh(); + } + refresh() { + if (this.state === -2) { + fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) { + refreshTimeout(); + } + } + this.state = 0; + } + clear() { + this.state = -1; + } + }; + module2.exports = { + setTimeout(callback, delay, opaque) { + return delay < 1e3 ? setTimeout(callback, delay, opaque) : new Timeout(callback, delay, opaque); + }, + clearTimeout(timeout) { + if (timeout instanceof Timeout) { + timeout.clear(); + } else { + clearTimeout(timeout); + } + } + }; } -} - -module.exports = Pool - - -/***/ }), - -/***/ 82145: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(34856) -const { URL } = __nccwpck_require__(87016) -const Agent = __nccwpck_require__(69072) -const Pool = __nccwpck_require__(17787) -const DispatcherBase = __nccwpck_require__(9368) -const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(33862) -const buildConnector = __nccwpck_require__(2559) - -const kAgent = Symbol('proxy agent') -const kClient = Symbol('proxy client') -const kProxyHeaders = Symbol('proxy headers') -const kRequestTls = Symbol('request tls settings') -const kProxyTls = Symbol('proxy tls settings') -const kConnectEndpoint = Symbol('connect endpoint function') - -function defaultProtocolPort (protocol) { - return protocol === 'https:' ? 443 : 80 -} +}); -function buildProxyOptions (opts) { - if (typeof opts === 'string') { - opts = { uri: opts } +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js +var require_sbmh = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/streamsearch/sbmh.js"(exports2, module2) { + "use strict"; + var EventEmitter = __require("node:events").EventEmitter; + var inherits = __require("node:util").inherits; + function 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); + this._lookbehind_size = 0; + this._needle = needle; + this._bufpos = 0; + this._lookbehind = Buffer.alloc(needleLength); + for (var i = 0; i < needleLength - 1; ++i) { + this._occ[needle[i]] = needleLength - 1 - i; + } + } + inherits(SBMH, EventEmitter); + SBMH.prototype.reset = function() { + this._lookbehind_size = 0; + this.matches = 0; + this._bufpos = 0; + }; + 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; + }; + SBMH.prototype._sbmh_feed = function(data) { + const len = data.length; + const needle = this._needle; + const needleLength = needle.length; + const lastNeedleChar = needle[needleLength - 1]; + let pos = -this._lookbehind_size; + let ch; + if (pos < 0) { + 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]; + } + if (pos < 0) { + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { + ++pos; + } + } + if (pos >= 0) { + this.emit("info", false, this._lookbehind, 0, this._lookbehind_size); + this._lookbehind_size = 0; + } else { + const bytesToCutOff = this._lookbehind_size + pos; + if (bytesToCutOff > 0) { + 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; + 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; + } + 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; + } + if (pos > 0) { + this.emit("info", false, data, this._bufpos, pos < len ? pos : len); + } + this._bufpos = len; + return len; + }; + SBMH.prototype._sbmh_lookup_char = function(data, pos) { + return pos < 0 ? this._lookbehind[this._lookbehind_size + pos] : data[pos]; + }; + 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; + }; + module2.exports = SBMH; } +}); - if (!opts || !opts.uri) { - throw new InvalidArgumentError('Proxy opts.uri is mandatory') +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js +var require_PartStream = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/PartStream.js"(exports2, module2) { + "use strict"; + var inherits = __require("node:util").inherits; + var ReadableStream = __require("node:stream").Readable; + function PartStream(opts) { + ReadableStream.call(this, opts); + } + inherits(PartStream, ReadableStream); + PartStream.prototype._read = function(n) { + }; + module2.exports = PartStream; } +}); - return { - uri: opts.uri, - protocol: opts.protocol || 'https' +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js +var require_getLimit = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/getLimit.js"(exports2, module2) { + "use strict"; + module2.exports = function getLimit(limits, name, defaultLimit) { + if (!limits || limits[name] === void 0 || 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]; + }; } -} - -function defaultFactory (origin, opts) { - return new Pool(origin, opts) -} - -class ProxyAgent extends DispatcherBase { - constructor (opts) { - super(opts) - this[kProxy] = buildProxyOptions(opts) - this[kAgent] = new Agent(opts) - this[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 InvalidArgumentError('Proxy opts.uri is mandatory') - } - - const { clientFactory = defaultFactory } = opts +}); - if (typeof clientFactory !== 'function') { - throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js +var require_HeaderParser = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/HeaderParser.js"(exports2, module2) { + "use strict"; + var EventEmitter = __require("node:events").EventEmitter; + var inherits = __require("node:util").inherits; + var getLimit = require_getLimit(); + var StreamSearch = require_sbmh(); + var B_DCRLF = Buffer.from("\r\n\r\n"); + var RE_CRLF = /\r\n/g; + var RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/; + function HeaderParser(cfg) { + EventEmitter.call(this); + cfg = cfg || {}; + const self2 = this; + this.nread = 0; + this.maxed = false; + this.npairs = 0; + this.maxHeaderPairs = getLimit(cfg, "maxHeaderPairs", 2e3); + this.maxHeaderSize = getLimit(cfg, "maxHeaderSize", 80 * 1024); + this.buffer = ""; + this.header = {}; + this.finished = false; + this.ss = new StreamSearch(B_DCRLF); + this.ss.on("info", function(isMatch, data, start, end2) { + if (data && !self2.maxed) { + if (self2.nread + end2 - start >= self2.maxHeaderSize) { + end2 = self2.maxHeaderSize - self2.nread + start; + self2.nread = self2.maxHeaderSize; + self2.maxed = true; + } else { + self2.nread += end2 - start; + } + self2.buffer += data.toString("binary", start, end2); + } + if (isMatch) { + self2._finish(); + } + }); } + inherits(HeaderParser, EventEmitter); + HeaderParser.prototype.push = function(data) { + const r = this.ss.push(data); + if (this.finished) { + return r; + } + }; + HeaderParser.prototype.reset = function() { + this.finished = false; + this.buffer = ""; + this.header = {}; + this.ss.reset(); + }; + 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); + }; + HeaderParser.prototype._parseHeader = function() { + if (this.npairs === this.maxHeaderPairs) { + return; + } + const lines = this.buffer.split(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] === " ") { + if (h) { + this.header[h][this.header[h].length - 1] += lines[i]; + continue; + } + } + const posColon = lines[i].indexOf(":"); + if (posColon === -1 || posColon === 0) { + return; + } + m = 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; + } + } + }; + module2.exports = HeaderParser; + } +}); - this[kRequestTls] = opts.requestTls - this[kProxyTls] = opts.proxyTls - this[kProxyHeaders] = opts.headers || {} - - const resolvedUrl = new URL(opts.uri) - const { origin, port, host, username, password } = resolvedUrl - - if (opts.auth && opts.token) { - throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') - } else if (opts.auth) { - /* @deprecated in favour of opts.token */ - this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` - } else if (opts.token) { - this[kProxyHeaders]['proxy-authorization'] = opts.token - } else if (username && password) { - this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js +var require_Dicer = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/deps/dicer/lib/Dicer.js"(exports2, module2) { + "use strict"; + var WritableStream = __require("node:stream").Writable; + var inherits = __require("node:util").inherits; + var StreamSearch = require_sbmh(); + var PartStream = require_PartStream(); + var HeaderParser = require_HeaderParser(); + var DASH = 45; + var B_ONEDASH = Buffer.from("-"); + var B_CRLF = Buffer.from("\r\n"); + var EMPTY_FN = function() { + }; + function Dicer(cfg) { + if (!(this instanceof Dicer)) { + return new Dicer(cfg); + } + 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 = void 0; + } + 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 = void 0; + this._cb = void 0; + this._ignoreData = false; + this._partOpts = { highWaterMark: cfg.partHwm }; + this._pause = false; + const self2 = this; + this._hparser = new HeaderParser(cfg); + this._hparser.on("header", function(header) { + self2._inHeader = false; + self2._part.emit("header", header); + }); } - - const connect = buildConnector({ ...opts.proxyTls }) - this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) - this[kClient] = clientFactory(resolvedUrl, { connect }) - this[kAgent] = new Agent({ - ...opts, - connect: async (opts, callback) => { - let requestedHost = opts.host - if (!opts.port) { - requestedHost += `:${defaultProtocolPort(opts.protocol)}` + inherits(Dicer, WritableStream); + Dicer.prototype.emit = function(ev) { + if (ev === "finish" && !this._realFinish) { + if (!this._finished) { + const self2 = this; + process.nextTick(function() { + self2.emit("error", new Error("Unexpected end of multipart data")); + if (self2._part && !self2._ignoreData) { + const type2 = self2._isPreamble ? "Preamble" : "Part"; + self2._part.emit("error", new Error(type2 + " terminated early due to unexpected end of multipart data")); + self2._part.push(null); + process.nextTick(function() { + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; + }); + return; + } + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; + }); + } + } else { + WritableStream.prototype.emit.apply(this, arguments); + } + }; + Dicer.prototype._write = function(data, encoding, cb) { + if (!this._hparser && !this._bparser) { + return cb(); + } + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(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 !== void 0 && r < data.length) { + data = data.slice(r); + } else { + return cb(); + } + } + if (this._firstWrite) { + this._bparser.push(B_CRLF); + this._firstWrite = false; + } + this._bparser.push(data); + if (this._pause) { + this._cb = cb; + } else { + cb(); + } + }; + Dicer.prototype.reset = function() { + this._part = void 0; + this._bparser = void 0; + this._hparser = void 0; + }; + Dicer.prototype.setBoundary = function(boundary) { + const self2 = this; + this._bparser = new StreamSearch("\r\n--" + boundary); + this._bparser.on("info", function(isMatch, data, start, end2) { + self2._oninfo(isMatch, data, start, end2); + }); + }; + Dicer.prototype._ignore = function() { + if (this._part && !this._ignoreData) { + this._ignoreData = true; + this._part.on("error", EMPTY_FN); + this._part.resume(); + } + }; + Dicer.prototype._oninfo = function(isMatch, data, start, end2) { + let buf; + const self2 = this; + let i = 0; + let r; + let shouldWriteMore = true; + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && start + i < end2) { + if (data[start + i] === DASH) { + ++i; + ++this._dashes; + } else { + if (this._dashes) { + buf = B_ONEDASH; + } + this._dashes = 0; + break; + } + } + if (this._dashes === 2) { + if (start + i < end2 && this.listenerCount("trailer") !== 0) { + this.emit("trailer", data.slice(start + i, end2)); + } + this.reset(); + this._finished = true; + if (self2._parts === 0) { + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; + } + } + if (this._dashes) { + return; + } + } + if (this._justMatched) { + this._justMatched = false; + } + if (!this._part) { + this._part = new PartStream(this._partOpts); + this._part._read = function(n) { + self2._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(); } - try { - const { socket, statusCode } = await this[kClient].connect({ - origin, - port, - path: requestedHost, - signal: opts.signal, - headers: { - ...this[kProxyHeaders], - host - } - }) - if (statusCode !== 200) { - socket.on('error', () => {}).destroy() - callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) + if (!this._isPreamble) { + this._inHeader = true; + } + } + if (data && start < end2 && !this._ignoreData) { + if (this._isPreamble || !this._inHeader) { + if (buf) { + shouldWriteMore = this._part.push(buf); } - if (opts.protocol !== 'https:') { - callback(null, socket) - return + shouldWriteMore = this._part.push(data.slice(start, end2)); + if (!shouldWriteMore) { + this._pause = true; } - let servername - if (this[kRequestTls]) { - servername = this[kRequestTls].servername - } else { - servername = opts.servername + } else if (!this._isPreamble && this._inHeader) { + if (buf) { + this._hparser.push(buf); + } + r = this._hparser.push(data.slice(start, end2)); + if (!this._inHeader && r !== void 0 && r < end2) { + this._oninfo(false, data, start + r, end2); } - this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback) - } catch (err) { - callback(err) } } - }) + if (isMatch) { + this._hparser.reset(); + if (this._isPreamble) { + this._isPreamble = false; + } else { + if (start !== end2) { + ++this._parts; + this._part.on("end", function() { + if (--self2._parts === 0) { + if (self2._finished) { + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; + } else { + self2._unpause(); + } + } + }); + } + } + this._part.push(null); + this._part = void 0; + this._ignoreData = false; + this._justMatched = true; + this._dashes = 0; + } + }; + Dicer.prototype._unpause = function() { + if (!this._pause) { + return; + } + this._pause = false; + if (this._cb) { + const cb = this._cb; + this._cb = void 0; + cb(); + } + }; + module2.exports = Dicer; } +}); - dispatch (opts, handler) { - const { host } = new URL(opts.origin) - const headers = buildHeaders(opts.headers) - throwIfProxyAuthIsSent(headers) - return this[kAgent].dispatch( - { - ...opts, - headers: { - ...headers, - host +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js +var require_decodeText = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/decodeText.js"(exports2, module2) { + "use strict"; + var utf8Decoder = new TextDecoder("utf-8"); + var textDecoders = /* @__PURE__ */ new Map([ + ["utf-8", utf8Decoder], + ["utf8", utf8Decoder] + ]); + function getDecoder(charset) { + let lc; + while (true) { + switch (charset) { + case "utf-8": + case "utf8": + return decoders.utf8; + case "latin1": + case "ascii": + // TODO: Make these a separate, strict decoder? + 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 decoders.latin1; + case "utf16le": + case "utf-16le": + case "ucs2": + case "ucs-2": + return decoders.utf16le; + case "base64": + return decoders.base64; + default: + if (lc === void 0) { + lc = true; + charset = charset.toLowerCase(); + continue; + } + return decoders.other.bind(charset); + } + } + } + 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); }, - handler - ) - } - - async [kClose] () { - await this[kAgent].close() - await this[kClient].close() - } - - async [kDestroy] () { - await this[kAgent].destroy() - await this[kClient].destroy() - } -} - -/** - * @param {string[] | Record} headers - * @returns {Record} - */ -function 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] + 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 (textDecoders.has(exports2.toString())) { + try { + return textDecoders.get(exports2).decode(data); + } catch { + } + } + return typeof data === "string" ? data : data.toString(); + } + }; + function decodeText(text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding); + } + return text; } - - 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 throwIfProxyAuthIsSent (headers) { - const existProxyAuth = headers && Object.keys(headers) - .find((key) => key.toLowerCase() === 'proxy-authorization') - if (existProxyAuth) { - throw new InvalidArgumentError('Proxy-Authorization should be sent in ProxyAgent constructor') + module2.exports = decodeText; } -} - -module.exports = ProxyAgent - - -/***/ }), - -/***/ 82907: -/***/ ((module) => { - -"use strict"; - - -let fastNow = Date.now() -let fastNowTimeout - -const fastTimers = [] - -function onTimeout () { - fastNow = Date.now() - - let len = fastTimers.length - let idx = 0 - while (idx < len) { - const timer = fastTimers[idx] - - if (timer.state === 0) { - timer.state = fastNow + timer.delay - } else if (timer.state > 0 && fastNow >= timer.state) { - timer.state = -1 - timer.callback(timer.opaque) - } +}); - if (timer.state === -1) { - timer.state = -2 - if (idx !== len - 1) { - fastTimers[idx] = fastTimers.pop() +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js +var require_parseParams = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports2, module2) { + "use strict"; + var decodeText = require_decodeText(); + var RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; + var EncodedLookup = { + "%00": "\0", + "%01": "", + "%02": "", + "%03": "", + "%04": "", + "%05": "", + "%06": "", + "%07": "\x07", + "%08": "\b", + "%09": " ", + "%0a": "\n", + "%0A": "\n", + "%0b": "\v", + "%0B": "\v", + "%0c": "\f", + "%0C": "\f", + "%0d": "\r", + "%0D": "\r", + "%0e": "", + "%0E": "", + "%0f": "", + "%0F": "", + "%10": "", + "%11": "", + "%12": "", + "%13": "", + "%14": "", + "%15": "", + "%16": "", + "%17": "", + "%18": "", + "%19": "", + "%1a": "", + "%1A": "", + "%1b": "\x1B", + "%1B": "\x1B", + "%1c": "", + "%1C": "", + "%1d": "", + "%1D": "", + "%1e": "", + "%1E": "", + "%1f": "", + "%1F": "", + "%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 encodedReplacer(match) { + return EncodedLookup[match]; + } + var STATE_KEY = 0; + var STATE_VALUE = 1; + var STATE_CHARSET = 2; + var STATE_LANG = 3; + function parseParams(str2) { + const res = []; + let state = STATE_KEY; + let charset = ""; + let inquote = false; + let escaping = false; + let p = 0; + let tmp = ""; + const len = str2.length; + for (var i = 0; i < len; ++i) { + const char = str2[i]; + if (char === "\\" && inquote) { + if (escaping) { + escaping = false; + } else { + escaping = true; + continue; + } + } else if (char === '"') { + if (!escaping) { + if (inquote) { + inquote = false; + state = STATE_KEY; + } else { + inquote = true; + } + continue; + } else { + escaping = false; + } + } else { + if (escaping && inquote) { + tmp += "\\"; + } + escaping = false; + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG; + charset = tmp.substring(1); + } else { + state = STATE_VALUE; + } + tmp = ""; + continue; + } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { + state = char === "*" ? STATE_CHARSET : STATE_VALUE; + res[p] = [tmp, void 0]; + tmp = ""; + continue; + } else if (!inquote && char === ";") { + state = STATE_KEY; + if (charset) { + if (tmp.length) { + tmp = decodeText( + tmp.replace(RE_ENCODED, encodedReplacer), + "binary", + charset + ); + } + charset = ""; + } else if (tmp.length) { + tmp = decodeText(tmp, "binary", "utf8"); + } + if (res[p] === void 0) { + res[p] = tmp; + } else { + res[p][1] = tmp; + } + tmp = ""; + ++p; + continue; + } else if (!inquote && (char === " " || char === " ")) { + continue; + } + } + tmp += char; + } + if (charset && tmp.length) { + tmp = decodeText( + tmp.replace(RE_ENCODED, encodedReplacer), + "binary", + charset + ); + } else if (tmp) { + tmp = decodeText(tmp, "binary", "utf8"); + } + if (res[p] === void 0) { + if (tmp) { + res[p] = tmp; + } } else { - fastTimers.pop() + res[p][1] = tmp; } - len -= 1 - } else { - idx += 1 - } - } - - if (fastTimers.length > 0) { - refreshTimeout() - } -} - -function refreshTimeout () { - if (fastNowTimeout && fastNowTimeout.refresh) { - fastNowTimeout.refresh() - } else { - clearTimeout(fastNowTimeout) - fastNowTimeout = setTimeout(onTimeout, 1e3) - if (fastNowTimeout.unref) { - fastNowTimeout.unref() + return res; } + module2.exports = parseParams; } -} - -class 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) { - fastTimers.push(this) - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout() +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js +var require_basename = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { + "use strict"; + module2.exports = function basename2(path2) { + if (typeof path2 !== "string") { + return ""; } - } - - this.state = 0 - } - - clear () { - this.state = -1 - } -} - -module.exports = { - setTimeout (callback, delay, opaque) { - return delay < 1e3 - ? setTimeout(callback, delay, opaque) - : new Timeout(callback, delay, opaque) - }, - clearTimeout (timeout) { - if (timeout instanceof Timeout) { - timeout.clear() - } else { - clearTimeout(timeout) - } - } -} - - -/***/ }), - -/***/ 63097: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const diagnosticsChannel = __nccwpck_require__(31637) -const { uid, states } = __nccwpck_require__(63464) -const { - kReadyState, - kSentClose, - kByteParser, - kReceivedClose -} = __nccwpck_require__(35832) -const { fireEvent, failWebsocketConnection } = __nccwpck_require__(33385) -const { CloseEvent } = __nccwpck_require__(33164) -const { makeRequest } = __nccwpck_require__(15767) -const { fetching } = __nccwpck_require__(58358) -const { Headers } = __nccwpck_require__(72908) -const { getGlobalDispatcher } = __nccwpck_require__(17882) -const { kHeadersList } = __nccwpck_require__(34856) - -const channels = {} -channels.open = diagnosticsChannel.channel('undici:websocket:open') -channels.close = diagnosticsChannel.channel('undici:websocket:close') -channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(76982) -} 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) => void} onEstablish - * @param {Partial} options - */ -function establishWebSocketConnection (url, protocols, 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 = makeRequest({ - urlList: [requestURL], - 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 = new Headers(options.headers)[kHeadersList] - - request.headersList = headersList - } - - // 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 = 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 - // TODO: enable once permessage-deflate is supported - const permessageDeflate = '' // 'permessage-deflate; 15' - - // 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 = fetching({ - request, - useParallelQueue: true, - dispatcher: options.dispatcher ?? getGlobalDispatcher(), - 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) { - 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')) { - 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') { - 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') { - 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 = crypto.createHash('sha1').update(keyValue + uid).digest('base64') - if (secWSAccept !== digest) { - 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') - - if (secExtension !== null && secExtension !== permessageDeflate) { - failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') - 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 && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { - failWebsocketConnection(ws, 'Protocol was not set in the opening handshake.') - return - } - - response.socket.on('data', onSocketData) - response.socket.on('close', onSocketClose) - response.socket.on('error', onSocketError) - - if (channels.open.hasSubscribers) { - channels.open.publish({ - address: response.socket.address(), - protocol: secProtocol, - extensions: secExtension - }) + for (var i = path2.length - 1; i >= 0; --i) { + switch (path2.charCodeAt(i)) { + case 47: + // '/' + case 92: + path2 = path2.slice(i + 1); + return path2 === ".." || path2 === "." ? "" : path2; + } } - - onEstablish(response) - } - }) - - return controller -} - -/** - * @param {Buffer} chunk - */ -function onSocketData (chunk) { - if (!this.ws[kByteParser].write(chunk)) { - this.pause() - } -} - -/** - * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4 - */ -function onSocketClose () { - const { ws } = this - - // 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[kSentClose] && ws[kReceivedClose] - - let code = 1005 - let reason = '' - - const result = ws[kByteParser].closingInfo - - if (result) { - code = result.code ?? 1005 - reason = result.reason - } else if (!ws[kSentClose]) { - // 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[kReadyState] = 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. - fireEvent('close', ws, CloseEvent, { - wasClean, code, reason - }) - - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: ws, - code, - reason - }) - } -} - -function onSocketError (error) { - const { ws } = this - - ws[kReadyState] = states.CLOSING - - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error) - } - - this.destroy() -} - -module.exports = { - establishWebSocketConnection -} - - -/***/ }), - -/***/ 63464: -/***/ ((module) => { - -"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 uid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11' - -/** @type {PropertyDescriptor} */ -const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false -} - -const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 -} - -const opcodes = { - CONTINUATION: 0x0, - TEXT: 0x1, - BINARY: 0x2, - CLOSE: 0x8, - PING: 0x9, - PONG: 0xA -} - -const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 - -const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 -} - -const emptyBuffer = Buffer.allocUnsafe(0) - -module.exports = { - uid, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer -} - - -/***/ }), - -/***/ 33164: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(29) -const { kEnumerableProperty } = __nccwpck_require__(33465) -const { MessagePort } = __nccwpck_require__(28167) - -/** - * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent - */ -class MessageEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.MessageEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get data () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.data - } - - get origin () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.origin - } - - get lastEventId () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.lastEventId - } - - get source () { - webidl.brandCheck(this, MessageEvent) - - return this.#eventInit.source - } - - get ports () { - webidl.brandCheck(this, 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 = [] - ) { - webidl.brandCheck(this, MessageEvent) - - webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent.initMessageEvent' }) - - return new MessageEvent(type, { - bubbles, cancelable, data, origin, lastEventId, source, ports - }) - } -} - -/** - * @see https://websockets.spec.whatwg.org/#the-closeevent-interface - */ -class CloseEvent extends Event { - #eventInit - - constructor (type, eventInitDict = {}) { - webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.CloseEventInit(eventInitDict) - - super(type, eventInitDict) - - this.#eventInit = eventInitDict - } - - get wasClean () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.wasClean - } - - get code () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.code - } - - get reason () { - webidl.brandCheck(this, CloseEvent) - - return this.#eventInit.reason - } -} - -// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface -class ErrorEvent extends Event { - #eventInit - - constructor (type, eventInitDict) { - webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) - - super(type, eventInitDict) - - type = webidl.converters.DOMString(type) - eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}) - - this.#eventInit = eventInitDict - } - - get message () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.message - } - - get filename () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.filename - } - - get lineno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.lineno - } - - get colno () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.colno - } - - get error () { - webidl.brandCheck(this, ErrorEvent) - - return this.#eventInit.error - } -} - -Object.defineProperties(MessageEvent.prototype, { - [Symbol.toStringTag]: { - value: 'MessageEvent', - configurable: true - }, - data: kEnumerableProperty, - origin: kEnumerableProperty, - lastEventId: kEnumerableProperty, - source: kEnumerableProperty, - ports: kEnumerableProperty, - initMessageEvent: kEnumerableProperty -}) - -Object.defineProperties(CloseEvent.prototype, { - [Symbol.toStringTag]: { - value: 'CloseEvent', - configurable: true - }, - reason: kEnumerableProperty, - code: kEnumerableProperty, - wasClean: kEnumerableProperty -}) - -Object.defineProperties(ErrorEvent.prototype, { - [Symbol.toStringTag]: { - value: 'ErrorEvent', - configurable: true - }, - message: kEnumerableProperty, - filename: kEnumerableProperty, - lineno: kEnumerableProperty, - colno: kEnumerableProperty, - error: kEnumerableProperty -}) - -webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.MessagePort -) - -const eventInit = [ - { - key: 'bubbles', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'cancelable', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'composed', - converter: webidl.converters.boolean, - defaultValue: false - } -] - -webidl.converters.MessageEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'data', - converter: webidl.converters.any, - defaultValue: null - }, - { - key: 'origin', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lastEventId', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'source', - // Node doesn't implement WindowProxy or ServiceWorker, so the only - // valid value for source is a MessagePort. - converter: webidl.nullableConverter(webidl.converters.MessagePort), - defaultValue: null - }, - { - key: 'ports', - converter: webidl.converters['sequence'], - get defaultValue () { - return [] - } - } -]) - -webidl.converters.CloseEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'wasClean', - converter: webidl.converters.boolean, - defaultValue: false - }, - { - key: 'code', - converter: webidl.converters['unsigned short'], - defaultValue: 0 - }, - { - key: 'reason', - converter: webidl.converters.USVString, - defaultValue: '' - } -]) - -webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ - ...eventInit, - { - key: 'message', - converter: webidl.converters.DOMString, - defaultValue: '' - }, - { - key: 'filename', - converter: webidl.converters.USVString, - defaultValue: '' - }, - { - key: 'lineno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'colno', - converter: webidl.converters['unsigned long'], - defaultValue: 0 - }, - { - key: 'error', - converter: webidl.converters.any - } -]) - -module.exports = { - MessageEvent, - CloseEvent, - ErrorEvent -} - - -/***/ }), - -/***/ 23272: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { maxUnsigned16Bit } = __nccwpck_require__(63464) - -/** @type {import('crypto')} */ -let crypto -try { - crypto = __nccwpck_require__(76982) -} catch { - -} - -class WebsocketFrameSend { - /** - * @param {Buffer|undefined} data - */ - constructor (data) { - this.frameData = data - this.maskKey = crypto.randomBytes(4) + return path2 === ".." || path2 === "." ? "" : path2; + }; } +}); - createFrame (opcode) { - const bodyLength = this.frameData?.byteLength ?? 0 - - /** @type {number} */ - let payloadLength = bodyLength // 0-125 - let offset = 6 - - if (bodyLength > 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 +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js +var require_multipart = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/multipart.js"(exports2, module2) { + "use strict"; + var { Readable: Readable2 } = __require("node:stream"); + var { inherits } = __require("node:util"); + var Dicer = require_Dicer(); + var parseParams = require_parseParams(); + var decodeText = require_decodeText(); + var basename2 = require_basename(); + var getLimit = require_getLimit(); + var RE_BOUNDARY = /^boundary$/i; + var RE_FIELD = /^form-data$/i; + var RE_CHARSET = /^charset$/i; + var RE_FILENAME = /^filename$/i; + var RE_NAME = /^name$/i; + Multipart.detect = /^multipart\/form-data/i; + function Multipart(boy, cfg) { + let i; + let len; + const self2 = this; + let boundary; + const limits = cfg.limits; + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); + 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]) && RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1]; + break; + } + } + function checkFinished() { + if (nends === 0 && finished && !boy._done) { + finished = false; + self2.end(); + } + } + if (typeof boundary !== "string") { + throw new Error("Multipart: Boundary not found"); + } + const fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); + const fileSizeLimit = getLimit(limits, "fileSize", Infinity); + const filesLimit = getLimit(limits, "files", Infinity); + const fieldsLimit = getLimit(limits, "fields", Infinity); + const partsLimit = getLimit(limits, "parts", Infinity); + const headerPairsLimit = getLimit(limits, "headerPairs", 2e3); + const headerSizeLimit = getLimit(limits, "headerSize", 80 * 1024); + let nfiles = 0; + let nfields = 0; + let nends = 0; + let curFile; + let curField; + let finished = false; + this._needDrain = false; + this._pause = false; + this._cb = void 0; + this._nparts = 0; + this._boy = boy; + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + }; + this.parser = new Dicer(parserCfg); + this.parser.on("drain", function() { + self2._needDrain = false; + if (self2._cb && !self2._pause) { + const cb = self2._cb; + self2._cb = void 0; + cb(); + } + }).on("part", function onPart(part) { + if (++self2._nparts > partsLimit) { + self2.parser.removeListener("part", onPart); + self2.parser.on("part", skipPart); + boy.hitPartsLimit = true; + boy.emit("partsLimit"); + return skipPart(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 = parseParams(header["content-type"][0]); + if (parsed[0]) { + contype = parsed[0].toLowerCase(); + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase(); + break; + } + } + } + } + if (contype === void 0) { + contype = "text/plain"; + } + if (charset === void 0) { + charset = defCharset; + } + if (header["content-disposition"]) { + parsed = parseParams(header["content-disposition"][0]); + if (!RE_FIELD.test(parsed[0])) { + return skipPart(part); + } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1]; + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][1]; + if (!preservePath) { + filename = basename2(filename); + } + } + } + } else { + return 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)) { + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true; + boy.emit("filesLimit"); + } + return skipPart(part); + } + ++nfiles; + if (boy.listenerCount("file") === 0) { + self2.parser._ignore(); + return; + } + ++nends; + const file = new FileStream(fileOpts); + curFile = file; + file.on("end", function() { + --nends; + self2._pause = false; + checkFinished(); + if (self2._cb && !self2._needDrain) { + const cb = self2._cb; + self2._cb = void 0; + cb(); + } + }); + file._read = function(n) { + if (!self2._pause) { + return; + } + self2._pause = false; + if (self2._cb && !self2._needDrain) { + const cb = self2._cb; + self2._cb = void 0; + 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)) { + self2._pause = true; + } + file.bytesRead = nsize; + }; + onEnd = function() { + curFile = void 0; + file.push(null); + }; + } else { + if (nfields === fieldsLimit) { + if (!boy.hitFieldsLimit) { + boy.hitFieldsLimit = true; + boy.emit("fieldsLimit"); + } + return 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 = void 0; + if (buffer.length) { + buffer = decodeText(buffer, "binary", charset); + } + boy.emit("field", fieldname, buffer, false, truncated, encoding, contype); + --nends; + checkFinished(); + }; + } + 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(); + }); } - - 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] = this.maskKey[0] - buffer[offset - 3] = this.maskKey[1] - buffer[offset - 2] = this.maskKey[2] - buffer[offset - 1] = this.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) + Multipart.prototype.write = function(chunk, cb) { + const r = this.parser.write(chunk); + if (r && !this._pause) { + cb(); + } else { + this._needDrain = !r; + this._cb = cb; + } + }; + Multipart.prototype.end = function() { + const self2 = this; + if (self2.parser.writable) { + self2.parser.end(); + } else if (!self2._boy._done) { + process.nextTick(function() { + self2._boy._done = true; + self2._boy.emit("finish"); + }); + } + }; + function skipPart(part) { + part.resume(); } - - buffer[1] |= 0x80 // MASK - - // mask body - for (let i = 0; i < bodyLength; i++) { - buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + function FileStream(opts) { + Readable2.call(this, opts); + this.bytesRead = 0; + this.truncated = false; } - - return buffer - } -} - -module.exports = { - WebsocketFrameSend -} - - -/***/ }), - -/***/ 51084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { Writable } = __nccwpck_require__(2203) -const diagnosticsChannel = __nccwpck_require__(31637) -const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(63464) -const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(35832) -const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(33385) -const { WebsocketFrameSend } = __nccwpck_require__(23272) - -// 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 - -const channels = {} -channels.ping = diagnosticsChannel.channel('undici:websocket:ping') -channels.pong = diagnosticsChannel.channel('undici:websocket:pong') - -class ByteParser extends Writable { - #buffers = [] - #byteOffset = 0 - - #state = parserStates.INFO - - #info = {} - #fragments = [] - - constructor (ws) { - super() - - this.ws = ws + inherits(FileStream, Readable2); + FileStream.prototype._read = function(n) { + }; + module2.exports = Multipart; } +}); - /** - * @param {Buffer} chunk - * @param {() => void} callback - */ - _write (chunk, _, callback) { - this.#buffers.push(chunk) - this.#byteOffset += chunk.length - - this.run(callback) +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js +var require_Decoder = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/Decoder.js"(exports2, module2) { + "use strict"; + var RE_PLUS = /\+/g; + 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 Decoder() { + this.buffer = void 0; + } + Decoder.prototype.write = function(str2) { + str2 = str2.replace(RE_PLUS, " "); + let res = ""; + let i = 0; + let p = 0; + const len = str2.length; + for (; i < len; ++i) { + if (this.buffer !== void 0) { + if (!HEX[str2.charCodeAt(i)]) { + res += "%" + this.buffer; + this.buffer = void 0; + --i; + } else { + this.buffer += str2[i]; + ++p; + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)); + this.buffer = void 0; + } + } + } else if (str2[i] === "%") { + if (i > p) { + res += str2.substring(p, i); + p = i; + } + this.buffer = ""; + ++p; + } + } + if (p < len && this.buffer === void 0) { + res += str2.substring(p); + } + return res; + }; + Decoder.prototype.reset = function() { + this.buffer = void 0; + }; + module2.exports = Decoder; } +}); - /** - * 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 (true) { - if (this.#state === parserStates.INFO) { - // If there aren't enough bytes to parse the payload length, etc. - if (this.#byteOffset < 2) { - return callback() +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js +var require_urlencoded2 = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/types/urlencoded.js"(exports2, module2) { + "use strict"; + var Decoder = require_Decoder(); + var decodeText = require_decodeText(); + var getLimit = require_getLimit(); + var RE_CHARSET = /^charset$/i; + UrlEncoded.detect = /^application\/x-www-form-urlencoded/i; + function UrlEncoded(boy, cfg) { + const limits = cfg.limits; + const parsedConType = cfg.parsedConType; + this.boy = boy; + this.fieldSizeLimit = getLimit(limits, "fieldSize", 1 * 1024 * 1024); + this.fieldNameSizeLimit = getLimit(limits, "fieldNameSize", 100); + this.fieldsLimit = getLimit(limits, "fields", Infinity); + let charset; + for (var i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase(); + break; } - - const buffer = this.consume(2) - - this.#info.fin = (buffer[0] & 0x80) !== 0 - this.#info.opcode = buffer[0] & 0x0F - - // If we receive a fragmented message, we use the type of the first - // frame to parse the full message as binary/text, when it's terminated - this.#info.originalOpcode ??= this.#info.opcode - - this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION - - if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { - // Only text and binary frames can be fragmented - failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') - return + } + if (charset === void 0) { + charset = cfg.defCharset || "utf8"; + } + this.decoder = new Decoder(); + 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; + } + UrlEncoded.prototype.write = function(data, cb) { + if (this._fields === this.fieldsLimit) { + if (!this.boy.hitFieldsLimit) { + this.boy.hitFieldsLimit = true; + this.boy.emit("fieldsLimit"); } - - const payloadLength = buffer[1] & 0x7F - - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength - this.#state = parserStates.READ_DATA - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16 - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64 - } - - if (this.#info.fragmented && payloadLength > 125) { - // A fragmented frame can't be fragmented itself - failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') - return - } else if ( - (this.#info.opcode === opcodes.PING || - this.#info.opcode === opcodes.PONG || - this.#info.opcode === opcodes.CLOSE) && - payloadLength > 125 - ) { - // Control frames can have a payload length of 125 bytes MAX - failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') - return - } else if (this.#info.opcode === opcodes.CLOSE) { - if (payloadLength === 1) { - failWebsocketConnection(this.ws, 'Received close frame with a 1-byte body.') - return - } - - const body = this.consume(payloadLength) - - this.#info.closeInfo = this.parseCloseBody(false, body) - - if (!this.ws[kSentClose]) { - // 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.) - const body = Buffer.allocUnsafe(2) - body.writeUInt16BE(this.#info.closeInfo.code, 0) - const closeFrame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write( - closeFrame.createFrame(opcodes.CLOSE), - (err) => { - if (!err) { - this.ws[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.ws[kReadyState] = states.CLOSING - this.ws[kReceivedClose] = true - - this.end() - - return - } else if (this.#info.opcode === 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" - - const body = this.consume(payloadLength) - - if (!this.ws[kReceivedClose]) { - const frame = new WebsocketFrameSend(body) - - this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)) - - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body - }) + return cb(); + } + let idxeq; + let idxamp; + let i; + let p = 0; + const len = data.length; + while (p < len) { + if (this._state === "key") { + idxeq = idxamp = void 0; + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { + ++p; + } + if (data[i] === 61) { + idxeq = i; + break; + } else if (data[i] === 38) { + idxamp = i; + break; + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) { + ++this._bytesKey; } } - - this.#state = parserStates.INFO - - if (this.#byteOffset > 0) { - continue + if (idxeq !== void 0) { + 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 !== void 0) { + ++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", + decodeText(key, "binary", this.charset), + "", + keyTrunc, + false + ); + } + p = idxamp + 1; + if (this._fields === this.fieldsLimit) { + return cb(); + } + } else if (this._hitLimit) { + if (i > p) { + this._key += this.decoder.write(data.toString("binary", p, i)); + } + p = i; + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + this._checkingBytes = false; + this._keyTrunc = true; + } } else { - callback() - return + if (p < len) { + this._key += this.decoder.write(data.toString("binary", p)); + } + p = len; } - } else if (this.#info.opcode === 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. - - const body = this.consume(payloadLength) - - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body - }) + } else { + idxamp = void 0; + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { + ++p; + } + if (data[i] === 38) { + idxamp = i; + break; + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true; + break; + } else if (this._checkingBytes) { + ++this._bytesVal; + } } - - if (this.#byteOffset > 0) { - continue + if (idxamp !== void 0) { + ++this._fields; + if (idxamp > p) { + this._val += this.decoder.write(data.toString("binary", p, idxamp)); + } + this.boy.emit( + "field", + decodeText(this._key, "binary", this.charset), + decodeText(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) { + 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) { + this._checkingBytes = false; + this._valTrunc = true; + } } else { - callback() - return + if (p < len) { + this._val += this.decoder.write(data.toString("binary", p)); + } + p = len; } } - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback() - } - - const buffer = this.consume(2) - - this.#info.payloadLength = buffer.readUInt16BE(0) - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback() - } - - const buffer = this.consume(8) - const upper = buffer.readUInt32BE(0) + } + cb(); + }; + UrlEncoded.prototype.end = function() { + if (this.boy._done) { + return; + } + if (this._state === "key" && this._key.length > 0) { + this.boy.emit( + "field", + decodeText(this._key, "binary", this.charset), + "", + this._keyTrunc, + false + ); + } else if (this._state === "val") { + this.boy.emit( + "field", + decodeText(this._key, "binary", this.charset), + decodeText(this._val, "binary", this.charset), + this._keyTrunc, + this._valTrunc + ); + } + this.boy._done = true; + this.boy.emit("finish"); + }; + module2.exports = UrlEncoded; + } +}); - // 2^31 is the maxinimum 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 > 2 ** 31 - 1) { - failWebsocketConnection(this.ws, 'Received payload length > 2^31 bytes.') - return +// node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +var require_main2 = __commonJS({ + "node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js"(exports2, module2) { + "use strict"; + var WritableStream = __require("node:stream").Writable; + var { inherits } = __require("node:util"); + var Dicer = require_Dicer(); + var MultipartParser = require_multipart(); + var UrlencodedParser = require_urlencoded2(); + var parseParams = require_parseParams(); + function Busboy(opts) { + if (!(this instanceof Busboy)) { + return new 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, + ...streamOptions + } = opts; + this.opts = { + autoDestroy: false, + ...streamOptions + }; + WritableStream.call(this, this.opts); + this._done = false; + this._parser = this.getParserByHeaders(headers); + this._finished = false; + } + inherits(Busboy, WritableStream); + Busboy.prototype.emit = function(ev) { + var _a2; + if (ev === "finish") { + if (!this._done) { + (_a2 = this._parser) == null ? void 0 : _a2.end(); + return; + } else if (this._finished) { + return; } + this._finished = true; + } + WritableStream.prototype.emit.apply(this, arguments); + }; + Busboy.prototype.getParserByHeaders = function(headers) { + const parsed = parseParams(headers["content-type"]); + const cfg = { + defCharset: this.opts.defCharset, + fileHwm: this.opts.fileHwm, + headers, + highWaterMark: this.opts.highWaterMark, + isPartAFile: this.opts.isPartAFile, + limits: this.opts.limits, + parsedConType: parsed, + preservePath: this.opts.preservePath + }; + if (MultipartParser.detect.test(parsed[0])) { + return new MultipartParser(this, cfg); + } + if (UrlencodedParser.detect.test(parsed[0])) { + return new UrlencodedParser(this, cfg); + } + throw new Error("Unsupported Content-Type."); + }; + Busboy.prototype._write = function(chunk, encoding, cb) { + this._parser.write(chunk, cb); + }; + module2.exports = Busboy; + module2.exports.default = Busboy; + module2.exports.Busboy = Busboy; + module2.exports.Dicer = Dicer; + } +}); - const lower = buffer.readUInt32BE(4) - - this.#info.payloadLength = (upper << 8) + lower - this.#state = parserStates.READ_DATA - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - // If there is still more data in this chunk that needs to be read - return callback() - } else if (this.#byteOffset >= this.#info.payloadLength) { - // If the server sent multiple frames in a single chunk - - const body = this.consume(this.#info.payloadLength) - - this.#fragments.push(body) - - // If the frame is unfragmented, or a fragmented frame was terminated, - // a message was received - if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.CONTINUATION)) { - const fullMessage = Buffer.concat(this.#fragments) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/constants.js +var require_constants5 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/constants.js"(exports2, module2) { + "use strict"; + var { MessageChannel, receiveMessageOnPort } = __require("worker_threads"); + var corsSafeListedMethods = ["GET", "HEAD", "POST"]; + var corsSafeListedMethodsSet = new Set(corsSafeListedMethods); + var nullBodyStatus = [101, 204, 205, 304]; + var redirectStatus = [301, 302, 303, 307, 308]; + var redirectStatusSet = new Set(redirectStatus); + 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" + ]; + var badPortsSet = new Set(badPorts); + var referrerPolicy = [ + "", + "no-referrer", + "no-referrer-when-downgrade", + "same-origin", + "origin", + "strict-origin", + "origin-when-cross-origin", + "strict-origin-when-cross-origin", + "unsafe-url" + ]; + var referrerPolicySet = new Set(referrerPolicy); + var requestRedirect = ["follow", "manual", "error"]; + var safeMethods = ["GET", "HEAD", "OPTIONS", "TRACE"]; + var safeMethodsSet = new Set(safeMethods); + var requestMode = ["navigate", "same-origin", "no-cors", "cors"]; + var requestCredentials = ["omit", "same-origin", "include"]; + var requestCache = [ + "default", + "no-store", + "reload", + "no-cache", + "force-cache", + "only-if-cached" + ]; + 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" + ]; + var requestDuplex = [ + "half" + ]; + var forbiddenMethods = ["CONNECT", "TRACE", "TRACK"]; + var forbiddenMethodsSet = new Set(forbiddenMethods); + var subresource = [ + "audio", + "audioworklet", + "font", + "image", + "manifest", + "paintworklet", + "script", + "style", + "track", + "video", + "xslt", + "" + ]; + var subresourceSet = new Set(subresource); + var DOMException2 = globalThis.DOMException ?? (() => { + try { + atob("~"); + } catch (err) { + return Object.getPrototypeOf(err).constructor; + } + })(); + var channel; + var structuredClone = globalThis.structuredClone ?? // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone2(value, options2 = void 0) { + if (arguments.length === 0) { + throw new TypeError("missing argument"); + } + if (!channel) { + channel = new MessageChannel(); + } + channel.port1.unref(); + channel.port2.unref(); + channel.port1.postMessage(value, options2 == null ? void 0 : options2.transfer); + return receiveMessageOnPort(channel.port2).message; + }; + module2.exports = { + DOMException: DOMException2, + structuredClone, + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet + }; + } +}); - websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/global.js +var require_global = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/global.js"(exports2, module2) { + "use strict"; + var globalOrigin = Symbol.for("undici.globalOrigin.1"); + function getGlobalOrigin() { + return globalThis[globalOrigin]; + } + function setGlobalOrigin(newOrigin) { + if (newOrigin === void 0) { + Object.defineProperty(globalThis, globalOrigin, { + value: void 0, + 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, globalOrigin, { + value: parsedURL, + writable: true, + enumerable: false, + configurable: false + }); + } + module2.exports = { + getGlobalOrigin, + setGlobalOrigin + }; + } +}); - this.#info = {} - this.#fragments.length = 0 +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/util.js +var require_util3 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/util.js"(exports2, module2) { + "use strict"; + var { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = require_constants5(); + var { getGlobalOrigin } = require_global(); + var { performance: performance2 } = __require("perf_hooks"); + var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util2(); + var assert = __require("assert"); + var { isUint8Array } = __require("util/types"); + var supportedHashes = []; + var crypto2; + try { + crypto2 = __require("crypto"); + const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; + supportedHashes = crypto2.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + } catch { + } + function responseURL(response) { + const urlList = response.urlList; + const length = urlList.length; + return length === 0 ? null : urlList[length - 1].toString(); + } + function responseLocationURL(response, requestFragment) { + if (!redirectStatusSet.has(response.status)) { + return null; + } + let location = response.headersList.get("location"); + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)); + } + if (location && !location.hash) { + location.hash = requestFragment; + } + return location; + } + function requestCurrentURL(request2) { + return request2.urlList[request2.urlList.length - 1]; + } + function requestBadPort(request2) { + const url = requestCurrentURL(request2); + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return "blocked"; + } + return "allowed"; + } + function isErrorLike(object) { + var _a2, _b; + return object instanceof Error || (((_a2 = object == null ? void 0 : object.constructor) == null ? void 0 : _a2.name) === "Error" || ((_b = object == null ? void 0 : object.constructor) == null ? void 0 : _b.name) === "DOMException"); + } + function isValidReasonPhrase(statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i); + if (!(c === 9 || // HTAB + c >= 32 && c <= 126 || // SP / VCHAR + c >= 128 && c <= 255)) { + return false; + } + } + return true; + } + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: + return false; + default: + return c >= 33 && c <= 126; + } + } + function isValidHTTPToken(characters) { + if (characters.length === 0) { + return false; + } + for (let i = 0; i < characters.length; ++i) { + if (!isTokenCharCode(characters.charCodeAt(i))) { + return false; + } + } + return true; + } + function isValidHeaderName(potentialValue) { + return isValidHTTPToken(potentialValue); + } + function isValidHeaderValue(potentialValue) { + 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; + } + function setRequestReferrerPolicyOnRedirect(request2, actualResponse) { + const { headersList } = actualResponse; + const policyHeader = (headersList.get("referrer-policy") ?? "").split(","); + let policy = ""; + if (policyHeader.length > 0) { + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; } - - this.#state = parserStates.INFO } } - - if (this.#byteOffset > 0) { - continue - } else { - callback() - break + if (policy !== "") { + request2.referrerPolicy = policy; } } - } - - /** - * Take n bytes from the buffered Buffers - * @param {number} n - * @returns {Buffer|null} - */ - consume (n) { - if (n > this.#byteOffset) { - return null - } else if (n === 0) { - return emptyBuffer + function crossOriginResourcePolicyCheck() { + return "allowed"; } - - if (this.#buffers[0].length === n) { - this.#byteOffset -= this.#buffers[0].length - return this.#buffers.shift() + function corsCheck() { + return "success"; } - - const buffer = Buffer.allocUnsafe(n) - let offset = 0 - - while (offset !== n) { - const next = this.#buffers[0] - const { 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 - } + function TAOCheck() { + return "success"; } - - this.#byteOffset -= n - - return buffer - } - - parseCloseBody (onlyCode, data) { - // 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) + function appendFetchMetadata(httpRequest) { + let header = null; + header = httpRequest.mode; + httpRequest.headersList.set("sec-fetch-mode", header); } - - if (onlyCode) { - if (!isValidStatusCode(code)) { - return null + function appendRequestOriginHeader(request2) { + let serializedOrigin = request2.origin; + if (request2.responseTainting === "cors" || request2.mode === "websocket") { + if (serializedOrigin) { + request2.headersList.append("origin", serializedOrigin); + } + } else if (request2.method !== "GET" && request2.method !== "HEAD") { + switch (request2.referrerPolicy) { + case "no-referrer": + serializedOrigin = null; + break; + case "no-referrer-when-downgrade": + case "strict-origin": + case "strict-origin-when-cross-origin": + if (request2.origin && urlHasHttpsScheme(request2.origin) && !urlHasHttpsScheme(requestCurrentURL(request2))) { + serializedOrigin = null; + } + break; + case "same-origin": + if (!sameOrigin(request2, requestCurrentURL(request2))) { + serializedOrigin = null; + } + break; + default: + } + if (serializedOrigin) { + request2.headersList.append("origin", serializedOrigin); + } } - - return { code } } - - // 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) + function coarsenedSharedCurrentTime(crossOriginIsolatedCapability) { + return performance2.now(); } - - if (code !== undefined && !isValidStatusCode(code)) { - return null + function 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 + }; } - - try { - // TODO: optimize this - reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) - } catch { - return null + function makePolicyContainer() { + return { + referrerPolicy: "strict-origin-when-cross-origin" + }; } - - return { code, reason } - } - - get closingInfo () { - return this.#info.closeInfo - } -} - -module.exports = { - ByteParser -} - - -/***/ }), - -/***/ 35832: -/***/ ((module) => { - -"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') -} - - -/***/ }), - -/***/ 33385: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(35832) -const { states, opcodes } = __nccwpck_require__(63464) -const { MessageEvent, ErrorEvent } = __nccwpck_require__(33164) - -/* globals Blob */ - -/** - * @param {import('./websocket').WebSocket} ws - */ -function 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[kReadyState] === states.OPEN -} - -/** - * @param {import('./websocket').WebSocket} ws - */ -function 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[kReadyState] === states.CLOSING -} - -/** - * @param {import('./websocket').WebSocket} ws - */ -function isClosed (ws) { - return ws[kReadyState] === states.CLOSED -} - -/** - * @see https://dom.spec.whatwg.org/#concept-event-fire - * @param {string} e - * @param {EventTarget} target - * @param {EventInit | undefined} eventInitDict - */ -function 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 - - // 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 websocketMessageReceived (ws, type, data) { - // 1. If ready state is not OPEN (1), then return. - if (ws[kReadyState] !== states.OPEN) { - return - } - - // 2. Let dataForEvent be determined by switching on type and binary type: - let dataForEvent - - if (type === 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 { - failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') - return - } - } else if (type === opcodes.BINARY) { - if (ws[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 - } - } - - // 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. - fireEvent('message', ws, MessageEvent, { - origin: ws[kWebSocketURL].origin, - data: dataForEvent - }) -} - -/** - * @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 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 (const char of protocol) { - const code = char.charCodeAt(0) - - if ( - code < 0x21 || - code > 0x7E || - char === '(' || - char === ')' || - char === '<' || - char === '>' || - char === '@' || - char === ',' || - char === ';' || - char === ':' || - char === '\\' || - char === '"' || - char === '/' || - char === '[' || - char === ']' || - char === '?' || - char === '=' || - char === '{' || - char === '}' || - code === 32 || // SP - code === 9 // HT - ) { - return false - } - } - - return true -} - -/** - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 - * @param {number} code - */ -function 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 -} - -/** - * @param {import('./websocket').WebSocket} ws - * @param {string|undefined} reason - */ -function failWebsocketConnection (ws, reason) { - const { [kController]: controller, [kResponse]: response } = ws - - controller.abort() - - if (response?.socket && !response.socket.destroyed) { - response.socket.destroy() - } - - if (reason) { - fireEvent('error', ws, ErrorEvent, { - error: new Error(reason) - }) - } -} - -module.exports = { - isEstablished, - isClosing, - isClosed, - fireEvent, - isValidSubprotocol, - isValidStatusCode, - failWebsocketConnection, - websocketMessageReceived -} - - -/***/ }), - -/***/ 66102: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { webidl } = __nccwpck_require__(29) -const { DOMException } = __nccwpck_require__(84135) -const { URLSerializer } = __nccwpck_require__(43911) -const { getGlobalOrigin } = __nccwpck_require__(59963) -const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(63464) -const { - kWebSocketURL, - kReadyState, - kController, - kBinaryType, - kResponse, - kSentClose, - kByteParser -} = __nccwpck_require__(35832) -const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(33385) -const { establishWebSocketConnection } = __nccwpck_require__(63097) -const { WebsocketFrameSend } = __nccwpck_require__(23272) -const { ByteParser } = __nccwpck_require__(51084) -const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(33465) -const { getGlobalDispatcher } = __nccwpck_require__(17882) -const { types } = __nccwpck_require__(39023) - -let experimentalWarned = false - -// https://websockets.spec.whatwg.org/#interface-definition -class 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() - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket constructor' }) - - if (!experimentalWarned) { - experimentalWarned = true - process.emitWarning('WebSockets are experimental, expect them to change at any time.', { - code: 'UNDICI-WS' - }) + function clonePolicyContainer(policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + }; } - - const options = webidl.converters['DOMString or sequence or WebSocketInit'](protocols) - - url = webidl.converters.USVString(url) - protocols = options.protocols - - // 1. Let baseURL be this's relevant settings object's API base URL. - const baseURL = getGlobalOrigin() - - // 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') + function determineRequestsReferrer(request2) { + const policy = request2.referrerPolicy; + assert(policy); + let referrerSource = null; + if (request2.referrer === "client") { + const globalOrigin = getGlobalOrigin(); + if (!globalOrigin || globalOrigin.origin === "null") { + return "no-referrer"; + } + referrerSource = new URL(globalOrigin); + } else if (request2.referrer instanceof URL) { + referrerSource = request2.referrer; + } + let referrerURL = stripURLForReferrer(referrerSource); + const referrerOrigin = stripURLForReferrer(referrerSource, true); + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin; + } + const areSameOrigin = sameOrigin(request2, referrerURL); + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(request2.url); + switch (policy) { + case "origin": + return referrerOrigin != null ? referrerOrigin : 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 = requestCurrentURL(request2); + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL; + } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return "no-referrer"; + } + return referrerOrigin; + } + case "strict-origin": + // eslint-disable-line + /** + * 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": + // eslint-disable-line + /** + * 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; + } } - - // 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:' + function stripURLForReferrer(url, originOnly) { + assert(url instanceof URL); + if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + return "no-referrer"; + } + url.username = ""; + url.password = ""; + url.hash = ""; + if (originOnly) { + url.pathname = ""; + url.search = ""; + } + return url; } - - // 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' - ) + function isURLPotentiallyTrustworthy(url) { + if (!(url instanceof URL)) { + return false; + } + if (url.href === "about:blank" || url.href === "about:srcdoc") { + return true; + } + if (url.protocol === "data:") return true; + if (url.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url.origin); + function isOriginPotentiallyTrustworthy(origin) { + if (origin == null || origin === "null") return false; + const originAsURL = new URL(origin); + if (originAsURL.protocol === "https:" || originAsURL.protocol === "wss:") { + 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; + } + return false; + } } - - // 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') + function bytesMatch(bytes, metadataList) { + if (crypto2 === void 0) { + return true; + } + const parsedMetadata = parseMetadata(metadataList); + if (parsedMetadata === "no metadata") { + return true; + } + if (parsedMetadata.length === 0) { + return true; + } + const strongest = getStrongestMetadata(parsedMetadata); + const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest); + for (const item of metadata) { + const algorithm = item.algo; + const expectedValue = item.hash; + let actualValue = crypto2.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); + } + } + if (compareBase64Mixed(actualValue, expectedValue)) { + return true; + } + } + return false; } - - // 8. If protocols is a string, set protocols to a sequence consisting - // of just that string. - if (typeof protocols === 'string') { - protocols = [protocols] + var parseHashWithOptions = /(?sha256|sha384|sha512)-((?[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i; + function parseMetadata(metadata) { + const result = []; + let empty = true; + for (const token of metadata.split(" ")) { + empty = false; + const parsedToken = parseHashWithOptions.exec(token); + if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) { + continue; + } + const algorithm = parsedToken.groups.algo.toLowerCase(); + if (supportedHashes.includes(algorithm)) { + result.push(parsedToken.groups); + } + } + if (empty === true) { + return "no metadata"; + } + return result; } - - // 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') + function getStrongestMetadata(metadataList) { + let algorithm = metadataList[0].algo; + if (algorithm[3] === "5") { + return algorithm; + } + for (let i = 1; i < metadataList.length; ++i) { + const metadata = metadataList[i]; + if (metadata.algo[3] === "5") { + algorithm = "sha512"; + break; + } else if (algorithm[3] === "3") { + continue; + } else if (metadata.algo[3] === "3") { + algorithm = "sha384"; + } + } + return algorithm; } - - if (protocols.length > 0 && !protocols.every(p => isValidSubprotocol(p))) { - throw new DOMException('Invalid Sec-WebSocket-Protocol value', 'SyntaxError') + function 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; } - - // 10. Set this's url to urlRecord. - this[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[kController] = 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[kReadyState] = 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[kBinaryType] = 'blob' - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-close - * @param {number|undefined} code - * @param {string|undefined} reason - */ - close (code = undefined, reason = undefined) { - webidl.brandCheck(this, WebSocket) - - if (code !== undefined) { - code = webidl.converters['unsigned short'](code, { clamp: true }) + function 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; + } + } + return true; } - - if (reason !== undefined) { - reason = webidl.converters.USVString(reason) + function tryUpgradeRequestToAPotentiallyTrustworthyURL(request2) { } - - // 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') + function sameOrigin(A, B) { + if (A.origin === B.origin && A.origin === "null") { + return true; } - } - - 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' - ) + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true; } + return false; } - - // 3. Run the first matching steps from the following list: - if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { - // If this's ready state is CLOSING (2) or CLOSED (3) - // Do nothing. - } else if (!isEstablished(this)) { - // If the WebSocket connection is not yet established - // Fail the WebSocket connection and set this's ready state - // to CLOSING (2). - failWebsocketConnection(this, 'Connection was closed before it was established.') - this[kReadyState] = WebSocket.CLOSING - } else if (!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 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 = emptyBuffer + function createDeferredPromise() { + let res; + let rej; + const promise = new Promise((resolve4, reject) => { + res = resolve4; + rej = reject; + }); + return { promise, resolve: res, reject: rej }; + } + function isAborted(fetchParams) { + return fetchParams.controller.state === "aborted"; + } + function isCancelled(fetchParams) { + return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; + } + 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" + }; + Object.setPrototypeOf(normalizeMethodRecord, null); + function normalizeMethod(method) { + return normalizeMethodRecord[method.toLowerCase()] ?? method; + } + function serializeJavascriptValueToJSONString(value) { + const result = JSON.stringify(value); + if (result === void 0) { + throw new TypeError("Value is not JSON serializable"); } - - /** @type {import('stream').Duplex} */ - const socket = this[kResponse].socket - - socket.write(frame.createFrame(opcodes.CLOSE), (err) => { - if (!err) { - this[kSentClose] = true + assert(typeof result === "string"); + return result; + } + var esIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())); + function makeIterator(iterator2, name, kind) { + const object = { + index: 0, + kind, + target: iterator2 + }; + const i = { + next() { + if (Object.getPrototypeOf(this) !== i) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ); + } + const { index, kind: kind2, target } = object; + const values = target(); + const len = values.length; + if (index >= len) { + return { value: void 0, done: true }; + } + const pair = values[index]; + object.index = index + 1; + return iteratorResult(pair, kind2); + }, + // 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` + }; + Object.setPrototypeOf(i, esIteratorPrototype); + return Object.setPrototypeOf({}, i); + } + function iteratorResult(pair, kind) { + let result; + switch (kind) { + case "key": { + result = pair[0]; + break; } - }) - - // 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[kReadyState] = states.CLOSING - } else { - // Otherwise - // Set this's ready state to CLOSING (2). - this[kReadyState] = WebSocket.CLOSING + case "value": { + result = pair[1]; + break; + } + case "key+value": { + result = pair; + break; + } + } + return { value: result, done: false }; } - } - - /** - * @see https://websockets.spec.whatwg.org/#dom-websocket-send - * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data - */ - send (data) { - webidl.brandCheck(this, WebSocket) - - webidl.argumentLengthCheck(arguments, 1, { header: 'WebSocket.send' }) - - data = webidl.converters.WebSocketSendData(data) - - // 1. If this's ready state is CONNECTING, then throw an - // "InvalidStateError" DOMException. - if (this[kReadyState] === WebSocket.CONNECTING) { - throw new DOMException('Sent before connected.', 'InvalidStateError') + async function fullyReadBody(body, processBody, processBodyError) { + const successSteps = processBody; + const errorSteps = processBodyError; + let reader; + try { + reader = body.stream.getReader(); + } catch (e) { + errorSteps(e); + return; + } + try { + const result = await readAllBytes(reader); + successSteps(result); + } catch (e) { + errorSteps(e); + } } - - // 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 (!isEstablished(this) || isClosing(this)) { - return + var ReadableStream = globalThis.ReadableStream; + function isReadableStreamLike(stream) { + if (!ReadableStream) { + ReadableStream = __require("stream/web").ReadableStream; + } + return stream instanceof ReadableStream || stream[Symbol.toStringTag] === "ReadableStream" && typeof stream.tee === "function"; } - - /** @type {import('stream').Duplex} */ - const socket = this[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 WebsocketFrameSend(value) - const buffer = frame.createFrame(opcodes.TEXT) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - } else if (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 WebsocketFrameSend(value) - const buffer = frame.createFrame(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 WebsocketFrameSend(ab) - const buffer = frame.createFrame(opcodes.BINARY) - - this.#bufferedAmount += ab.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= ab.byteLength - }) - } else if (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 WebsocketFrameSend() - - data.arrayBuffer().then((ab) => { - const value = Buffer.from(ab) - frame.frameData = value - const buffer = frame.createFrame(opcodes.BINARY) - - this.#bufferedAmount += value.byteLength - socket.write(buffer, () => { - this.#bufferedAmount -= value.byteLength - }) - }) + var MAXIMUM_ARGUMENT_LENGTH = 65535; + function isomorphicDecode(input) { + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input); + } + return input.reduce((previous, current) => previous + String.fromCharCode(current), ""); } + function readableStreamClose(controller) { + try { + controller.close(); + } catch (err) { + if (!err.message.includes("Controller is already closed")) { + throw err; + } + } + } + function isomorphicEncode(input) { + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 255); + } + return input; + } + async function readAllBytes(reader) { + const bytes = []; + let byteLength = 0; + while (true) { + const { done, value: chunk } = await reader.read(); + if (done) { + return Buffer.concat(bytes, byteLength); + } + if (!isUint8Array(chunk)) { + throw new TypeError("Received non-Uint8Array chunk"); + } + bytes.push(chunk); + byteLength += chunk.length; + } + } + function urlIsLocal(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "about:" || protocol === "blob:" || protocol === "data:"; + } + function urlHasHttpsScheme(url) { + if (typeof url === "string") { + return url.startsWith("https:"); + } + return url.protocol === "https:"; + } + function urlIsHttpHttpsScheme(url) { + assert("protocol" in url); + const protocol = url.protocol; + return protocol === "http:" || protocol === "https:"; + } + var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); + module2.exports = { + isAborted, + isCancelled, + createDeferredPromise, + ReadableStreamFrom, + toUSVString, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + makeIterator, + isValidHeaderName, + isValidHeaderValue, + hasOwn, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord, + parseMetadata + }; } +}); - get readyState () { - webidl.brandCheck(this, WebSocket) - - // The readyState getter steps are to return this's ready state. - return this[kReadyState] - } - - get bufferedAmount () { - webidl.brandCheck(this, WebSocket) - - return this.#bufferedAmount - } - - get url () { - webidl.brandCheck(this, WebSocket) - - // The url getter steps are to return this's url, serialized. - return URLSerializer(this[kWebSocketURL]) - } - - get extensions () { - webidl.brandCheck(this, WebSocket) - - return this.#extensions - } - - get protocol () { - webidl.brandCheck(this, WebSocket) - - return this.#protocol +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/symbols.js +var require_symbols4 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kUrl: Symbol("url"), + kHeaders: Symbol("headers"), + kSignal: Symbol("signal"), + kState: Symbol("state"), + kGuard: Symbol("guard"), + kRealm: Symbol("realm") + }; } +}); - get onopen () { - webidl.brandCheck(this, WebSocket) - - return this.#events.open +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/webidl.js +var require_webidl = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/webidl.js"(exports2, module2) { + "use strict"; + var { types: types2 } = __require("util"); + var { hasOwn, toUSVString } = require_util3(); + var webidl = {}; + webidl.converters = {}; + webidl.util = {}; + webidl.errors = {}; + webidl.errors.exception = function(message) { + return new TypeError(`${message.header}: ${message.message}`); + }; + 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 webidl.errors.exception({ + header: context.prefix, + message + }); + }; + webidl.errors.invalidArgument = function(context) { + return webidl.errors.exception({ + header: context.prefix, + message: `"${context.value}" is an invalid ${context.type}.` + }); + }; + webidl.brandCheck = function(V, I, opts = void 0) { + if ((opts == null ? void 0 : opts.strict) !== false && !(V instanceof I)) { + throw new TypeError("Illegal invocation"); + } else { + return (V == null ? void 0 : V[Symbol.toStringTag]) === I.prototype[Symbol.toStringTag]; + } + }; + webidl.argumentLengthCheck = function({ length }, min, ctx) { + if (length < min) { + throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + ...ctx + }); + } + }; + webidl.illegalConstructor = function() { + throw webidl.errors.exception({ + header: "TypeError", + message: "Illegal constructor" + }); + }; + 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"; + } + } + }; + webidl.util.ConvertToInt = function(V, bitLength, signedness, opts = {}) { + let upperBound; + let lowerBound; + if (bitLength === 64) { + upperBound = Math.pow(2, 53) - 1; + if (signedness === "unsigned") { + lowerBound = 0; + } else { + lowerBound = Math.pow(-2, 53) + 1; + } + } else if (signedness === "unsigned") { + lowerBound = 0; + upperBound = Math.pow(2, bitLength) - 1; + } else { + lowerBound = Math.pow(-2, bitLength) - 1; + upperBound = Math.pow(2, bitLength - 1) - 1; + } + let x = Number(V); + if (x === 0) { + x = 0; + } + if (opts.enforceRange === true) { + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${V} to an integer.` + }); + } + x = webidl.util.IntegerPart(x); + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); + } + return x; + } + if (!Number.isNaN(x) && opts.clamp === true) { + x = Math.min(Math.max(x, lowerBound), upperBound); + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x); + } else { + x = Math.ceil(x); + } + return x; + } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { + return 0; + } + x = webidl.util.IntegerPart(x); + x = x % Math.pow(2, bitLength); + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength); + } + return x; + }; + webidl.util.IntegerPart = function(n) { + const r = Math.floor(Math.abs(n)); + if (n < 0) { + return -1 * r; + } + return r; + }; + webidl.sequenceConverter = function(converter) { + return (V) => { + var _a2; + if (webidl.util.Type(V) !== "Object") { + throw webidl.errors.exception({ + header: "Sequence", + message: `Value of type ${webidl.util.Type(V)} is not an Object.` + }); + } + const method = (_a2 = V == null ? void 0 : V[Symbol.iterator]) == null ? void 0 : _a2.call(V); + const seq2 = []; + if (method === void 0 || typeof method.next !== "function") { + throw webidl.errors.exception({ + header: "Sequence", + message: "Object is not an iterator." + }); + } + while (true) { + const { done, value } = method.next(); + if (done) { + break; + } + seq2.push(converter(value)); + } + return seq2; + }; + }; + webidl.recordConverter = function(keyConverter, valueConverter) { + return (O) => { + if (webidl.util.Type(O) !== "Object") { + throw webidl.errors.exception({ + header: "Record", + message: `Value of type ${webidl.util.Type(O)} is not an Object.` + }); + } + const result = {}; + if (!types2.isProxy(O)) { + const keys2 = Object.keys(O); + for (const key of keys2) { + const typedKey = keyConverter(key); + const typedValue = valueConverter(O[key]); + result[typedKey] = typedValue; + } + return result; + } + const keys = Reflect.ownKeys(O); + for (const key of keys) { + const desc = Reflect.getOwnPropertyDescriptor(O, key); + if (desc == null ? void 0 : desc.enumerable) { + const typedKey = keyConverter(key); + const typedValue = valueConverter(O[key]); + result[typedKey] = typedValue; + } + } + return result; + }; + }; + webidl.interfaceConverter = function(i) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: i.name, + message: `Expected ${V} to be an instance of ${i.name}.` + }); + } + return V; + }; + }; + webidl.dictionaryConverter = function(converters) { + return (dictionary) => { + const type2 = webidl.util.Type(dictionary); + const dict = {}; + if (type2 === "Null" || type2 === "Undefined") { + return dict; + } else if (type2 !== "Object") { + throw webidl.errors.exception({ + header: "Dictionary", + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); + } + for (const options2 of converters) { + const { key, defaultValue, required, converter } = options2; + if (required === true) { + if (!hasOwn(dictionary, key)) { + throw webidl.errors.exception({ + header: "Dictionary", + message: `Missing required key "${key}".` + }); + } + } + let value = dictionary[key]; + const hasDefault = hasOwn(options2, "defaultValue"); + if (hasDefault && value !== null) { + value = value ?? defaultValue; + } + if (required || hasDefault || value !== void 0) { + value = converter(value); + if (options2.allowedValues && !options2.allowedValues.includes(value)) { + throw webidl.errors.exception({ + header: "Dictionary", + message: `${value} is not an accepted type. Expected one of ${options2.allowedValues.join(", ")}.` + }); + } + dict[key] = value; + } + } + return dict; + }; + }; + webidl.nullableConverter = function(converter) { + return (V) => { + if (V === null) { + return V; + } + return converter(V); + }; + }; + webidl.converters.DOMString = function(V, opts = {}) { + if (V === null && opts.legacyNullToEmptyString) { + return ""; + } + if (typeof V === "symbol") { + throw new TypeError("Could not convert argument of type symbol to string."); + } + return String(V); + }; + webidl.converters.ByteString = function(V) { + const x = webidl.converters.DOMString(V); + 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.` + ); + } + } + return x; + }; + webidl.converters.USVString = toUSVString; + webidl.converters.boolean = function(V) { + const x = Boolean(V); + return x; + }; + webidl.converters.any = function(V) { + return V; + }; + webidl.converters["long long"] = function(V) { + const x = webidl.util.ConvertToInt(V, 64, "signed"); + return x; + }; + webidl.converters["unsigned long long"] = function(V) { + const x = webidl.util.ConvertToInt(V, 64, "unsigned"); + return x; + }; + webidl.converters["unsigned long"] = function(V) { + const x = webidl.util.ConvertToInt(V, 32, "unsigned"); + return x; + }; + webidl.converters["unsigned short"] = function(V, opts) { + const x = webidl.util.ConvertToInt(V, 16, "unsigned", opts); + return x; + }; + webidl.converters.ArrayBuffer = function(V, opts = {}) { + if (webidl.util.Type(V) !== "Object" || !types2.isAnyArrayBuffer(V)) { + throw webidl.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ["ArrayBuffer"] + }); + } + if (opts.allowShared === false && types2.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + return V; + }; + webidl.converters.TypedArray = function(V, T, opts = {}) { + if (webidl.util.Type(V) !== "Object" || !types2.isTypedArray(V) || V.constructor.name !== T.name) { + throw webidl.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] + }); + } + if (opts.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + return V; + }; + webidl.converters.DataView = function(V, opts = {}) { + if (webidl.util.Type(V) !== "Object" || !types2.isDataView(V)) { + throw webidl.errors.exception({ + header: "DataView", + message: "Object is not a DataView." + }); + } + if (opts.allowShared === false && types2.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: "ArrayBuffer", + message: "SharedArrayBuffer is not allowed." + }); + } + return V; + }; + webidl.converters.BufferSource = function(V, opts = {}) { + if (types2.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, opts); + } + if (types2.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor); + } + if (types2.isDataView(V)) { + return webidl.converters.DataView(V, opts); + } + throw new TypeError(`Could not convert ${V} to a BufferSource.`); + }; + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.ByteString + ); + webidl.converters["sequence>"] = webidl.sequenceConverter( + webidl.converters["sequence"] + ); + webidl.converters["record"] = webidl.recordConverter( + webidl.converters.ByteString, + webidl.converters.ByteString + ); + module2.exports = { + webidl + }; } +}); - set onopen (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.open) { - this.removeEventListener('open', this.#events.open) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/dataURL.js +var require_dataURL = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/dataURL.js"(exports2, module2) { + var assert = __require("assert"); + var { atob: atob2 } = __require("buffer"); + var { isomorphicDecode } = require_util3(); + var encoder = new TextEncoder(); + var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; + var HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; + var HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; + function dataURLProcessor(dataURL) { + assert(dataURL.protocol === "data:"); + let input = URLSerializer(dataURL, true); + input = input.slice(5); + const position = { position: 0 }; + let mimeType = collectASequenceOfCodePointsFast( + ",", + input, + position + ); + const mimeTypeLength = mimeType.length; + mimeType = removeASCIIWhitespace(mimeType, true, true); + if (position.position >= input.length) { + return "failure"; + } + position.position++; + const encodedBody = input.slice(mimeTypeLength + 1); + let body = stringPercentDecode(encodedBody); + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + const stringBody = isomorphicDecode(body); + body = forgivingBase64(stringBody); + if (body === "failure") { + return "failure"; + } + mimeType = mimeType.slice(0, -6); + mimeType = mimeType.replace(/(\u0020)+$/, ""); + mimeType = mimeType.slice(0, -1); + } + if (mimeType.startsWith(";")) { + mimeType = "text/plain" + mimeType; + } + let mimeTypeRecord = parseMIMEType(mimeType); + if (mimeTypeRecord === "failure") { + mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); + } + return { mimeType: mimeTypeRecord, body }; } - - if (typeof fn === 'function') { - this.#events.open = fn - this.addEventListener('open', fn) - } else { - this.#events.open = null + function 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); } - } - - get onerror () { - webidl.brandCheck(this, WebSocket) - - return this.#events.error - } - - set onerror (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.error) { - this.removeEventListener('error', this.#events.error) + function collectASequenceOfCodePoints(condition, input, position) { + let result = ""; + while (position.position < input.length && condition(input[position.position])) { + result += input[position.position]; + position.position++; + } + return result; } - - if (typeof fn === 'function') { - this.#events.error = fn - this.addEventListener('error', fn) - } else { - this.#events.error = null + function 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 stringPercentDecode(input) { + const bytes = encoder.encode(input); + return percentDecode(bytes); + } + function percentDecode(input) { + const output = []; + for (let i = 0; i < input.length; i++) { + const byte = input[i]; + if (byte !== 37) { + output.push(byte); + } else if (byte === 37 && !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2]))) { + output.push(37); + } else { + const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]); + const bytePoint = Number.parseInt(nextTwoBytes, 16); + output.push(bytePoint); + i += 2; + } + } + return Uint8Array.from(output); } - } - - get onclose () { - webidl.brandCheck(this, WebSocket) - - return this.#events.close - } - - set onclose (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.close) { - this.removeEventListener('close', this.#events.close) + function parseMIMEType(input) { + input = removeHTTPWhitespace(input, true, true); + const position = { position: 0 }; + const type2 = collectASequenceOfCodePointsFast( + "/", + input, + position + ); + if (type2.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type2)) { + return "failure"; + } + if (position.position > input.length) { + return "failure"; + } + position.position++; + let subtype = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + subtype = removeHTTPWhitespace(subtype, false, true); + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return "failure"; + } + const typeLowercase = type2.toLowerCase(); + const subtypeLowercase = subtype.toLowerCase(); + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: /* @__PURE__ */ new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + }; + while (position.position < input.length) { + position.position++; + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + (char) => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ); + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ";" && char !== "=", + input, + position + ); + parameterName = parameterName.toLowerCase(); + if (position.position < input.length) { + if (input[position.position] === ";") { + continue; + } + position.position++; + } + if (position.position > input.length) { + break; + } + let parameterValue = null; + if (input[position.position] === '"') { + parameterValue = collectAnHTTPQuotedString(input, position, true); + collectASequenceOfCodePointsFast( + ";", + input, + position + ); + } else { + parameterValue = collectASequenceOfCodePointsFast( + ";", + input, + position + ); + parameterValue = removeHTTPWhitespace(parameterValue, false, true); + if (parameterValue.length === 0) { + continue; + } + } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { + mimeType.parameters.set(parameterName, parameterValue); + } + } + return mimeType; + } + function forgivingBase64(data) { + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, ""); + if (data.length % 4 === 0) { + data = data.replace(/=?=$/, ""); + } + if (data.length % 4 === 1) { + return "failure"; + } + if (/[^+/0-9A-Za-z]/.test(data)) { + return "failure"; + } + const binary2 = atob2(data); + const bytes = new Uint8Array(binary2.length); + for (let byte = 0; byte < binary2.length; byte++) { + bytes[byte] = binary2.charCodeAt(byte); + } + return bytes; } + function collectAnHTTPQuotedString(input, position, extractValue) { + const positionStart = position.position; + let value = ""; + assert(input[position.position] === '"'); + position.position++; + while (true) { + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== "\\", + input, + position + ); + if (position.position >= input.length) { + break; + } + const quoteOrBackslash = input[position.position]; + position.position++; + if (quoteOrBackslash === "\\") { + if (position.position >= input.length) { + value += "\\"; + break; + } + value += input[position.position]; + position.position++; + } else { + assert(quoteOrBackslash === '"'); + break; + } + } + if (extractValue) { + return value; + } + return input.slice(positionStart, position.position); + } + function serializeAMimeType(mimeType) { + assert(mimeType !== "failure"); + const { parameters, essence } = mimeType; + let serialization = essence; + for (let [name, value] of parameters.entries()) { + serialization += ";"; + serialization += name; + serialization += "="; + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + value = value.replace(/(\\|")/g, "\\$1"); + value = '"' + value; + value += '"'; + } + serialization += value; + } + return serialization; + } + function isHTTPWhiteSpace(char) { + return char === "\r" || char === "\n" || char === " " || char === " "; + } + function removeHTTPWhitespace(str2, leading = true, trailing = true) { + let lead = 0; + let trail = str2.length - 1; + if (leading) { + for (; lead < str2.length && isHTTPWhiteSpace(str2[lead]); lead++) ; + } + if (trailing) { + for (; trail > 0 && isHTTPWhiteSpace(str2[trail]); trail--) ; + } + return str2.slice(lead, trail + 1); + } + function isASCIIWhitespace(char) { + return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; + } + function removeASCIIWhitespace(str2, leading = true, trailing = true) { + let lead = 0; + let trail = str2.length - 1; + if (leading) { + for (; lead < str2.length && isASCIIWhitespace(str2[lead]); lead++) ; + } + if (trailing) { + for (; trail > 0 && isASCIIWhitespace(str2[trail]); trail--) ; + } + return str2.slice(lead, trail + 1); + } + module2.exports = { + dataURLProcessor, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType + }; + } +}); - if (typeof fn === 'function') { - this.#events.close = fn - this.addEventListener('close', fn) - } else { - this.#events.close = null +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/file.js +var require_file = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/file.js"(exports2, module2) { + "use strict"; + var { Blob: Blob2, File: NativeFile } = __require("buffer"); + var { types: types2 } = __require("util"); + var { kState } = require_symbols4(); + var { isBlobLike } = require_util3(); + var { webidl } = require_webidl(); + var { parseMIMEType, serializeAMimeType } = require_dataURL(); + var { kEnumerableProperty } = require_util2(); + var encoder = new TextEncoder(); + var File = class _File extends Blob2 { + constructor(fileBits, fileName, options2 = {}) { + webidl.argumentLengthCheck(arguments, 2, { header: "File constructor" }); + fileBits = webidl.converters["sequence"](fileBits); + fileName = webidl.converters.USVString(fileName); + options2 = webidl.converters.FilePropertyBag(options2); + const n = fileName; + let t = options2.type; + let d; + substep: { + if (t) { + t = parseMIMEType(t); + if (t === "failure") { + t = ""; + break substep; + } + t = serializeAMimeType(t).toLowerCase(); + } + d = options2.lastModified; + } + super(processBlobParts(fileBits, options2), { type: t }); + this[kState] = { + name: n, + lastModified: d, + type: t + }; + } + get name() { + webidl.brandCheck(this, _File); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, _File); + return this[kState].lastModified; + } + get type() { + webidl.brandCheck(this, _File); + return this[kState].type; + } + }; + var FileLike = class _FileLike { + constructor(blobLike, fileName, options2 = {}) { + const n = fileName; + const t = options2.type; + const d = options2.lastModified ?? Date.now(); + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + }; + } + stream(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.stream(...args); + } + arrayBuffer(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.arrayBuffer(...args); + } + slice(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.slice(...args); + } + text(...args) { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.text(...args); + } + get size() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.size; + } + get type() { + webidl.brandCheck(this, _FileLike); + return this[kState].blobLike.type; + } + get name() { + webidl.brandCheck(this, _FileLike); + return this[kState].name; + } + get lastModified() { + webidl.brandCheck(this, _FileLike); + return this[kState].lastModified; + } + get [Symbol.toStringTag]() { + return "File"; + } + }; + Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: "File", + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty + }); + webidl.converters.Blob = webidl.interfaceConverter(Blob2); + webidl.converters.BlobPart = function(V, opts) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }); + } + if (ArrayBuffer.isView(V) || types2.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V, opts); + } + } + return webidl.converters.USVString(V, opts); + }; + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.BlobPart + ); + webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ + { + key: "lastModified", + converter: webidl.converters["long long"], + get defaultValue() { + return Date.now(); + } + }, + { + key: "type", + converter: webidl.converters.DOMString, + defaultValue: "" + }, + { + key: "endings", + converter: (value) => { + value = webidl.converters.DOMString(value); + value = value.toLowerCase(); + if (value !== "native") { + value = "transparent"; + } + return value; + }, + defaultValue: "transparent" + } + ]); + function processBlobParts(parts, options2) { + const bytes = []; + for (const element of parts) { + if (typeof element === "string") { + let s = element; + if (options2.endings === "native") { + s = convertLineEndingsNative(s); + } + bytes.push(encoder.encode(s)); + } else if (types2.isAnyArrayBuffer(element) || types2.isTypedArray(element)) { + if (!element.buffer) { + bytes.push(new Uint8Array(element)); + } else { + bytes.push( + new Uint8Array(element.buffer, element.byteOffset, element.byteLength) + ); + } + } else if (isBlobLike(element)) { + bytes.push(element); + } + } + return bytes; } - } - - get onmessage () { - webidl.brandCheck(this, WebSocket) - - return this.#events.message - } - - set onmessage (fn) { - webidl.brandCheck(this, WebSocket) - - if (this.#events.message) { - this.removeEventListener('message', this.#events.message) + function convertLineEndingsNative(s) { + let nativeLineEnding = "\n"; + if (process.platform === "win32") { + nativeLineEnding = "\r\n"; + } + return s.replace(/\r?\n/g, nativeLineEnding); } - - if (typeof fn === 'function') { - this.#events.message = fn - this.addEventListener('message', fn) - } else { - this.#events.message = null + function isFileLike(object) { + return NativeFile && object instanceof NativeFile || object instanceof File || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File"; } + module2.exports = { File, FileLike, isFileLike }; } +}); - get binaryType () { - webidl.brandCheck(this, WebSocket) - - return this[kBinaryType] - } - - set binaryType (type) { - webidl.brandCheck(this, WebSocket) - - if (type !== 'blob' && type !== 'arraybuffer') { - this[kBinaryType] = 'blob' - } else { - this[kBinaryType] = type +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/formdata.js +var require_formdata = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/formdata.js"(exports2, module2) { + "use strict"; + var { isBlobLike, toUSVString, makeIterator } = require_util3(); + var { kState } = require_symbols4(); + var { File: UndiciFile, FileLike, isFileLike } = require_file(); + var { webidl } = require_webidl(); + var { Blob: Blob2, File: NativeFile } = __require("buffer"); + var File = NativeFile ?? UndiciFile; + var FormData = class _FormData { + constructor(form) { + if (form !== void 0) { + throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); + } + this[kState] = []; + } + append(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 2, { header: "FormData.append" }); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name = webidl.converters.USVString(name); + value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); + filename = arguments.length === 3 ? webidl.converters.USVString(filename) : void 0; + const entry = makeEntry(name, value, filename); + this[kState].push(entry); + } + delete(name) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 1, { header: "FormData.delete" }); + name = webidl.converters.USVString(name); + this[kState] = this[kState].filter((entry) => entry.name !== name); + } + get(name) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 1, { header: "FormData.get" }); + name = webidl.converters.USVString(name); + const idx = this[kState].findIndex((entry) => entry.name === name); + if (idx === -1) { + return null; + } + return this[kState][idx].value; + } + getAll(name) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 1, { header: "FormData.getAll" }); + name = webidl.converters.USVString(name); + return this[kState].filter((entry) => entry.name === name).map((entry) => entry.value); + } + has(name) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 1, { header: "FormData.has" }); + name = webidl.converters.USVString(name); + return this[kState].findIndex((entry) => entry.name === name) !== -1; + } + set(name, value, filename = void 0) { + webidl.brandCheck(this, _FormData); + webidl.argumentLengthCheck(arguments, 2, { header: "FormData.set" }); + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ); + } + name = webidl.converters.USVString(name); + value = isBlobLike(value) ? webidl.converters.Blob(value, { strict: false }) : webidl.converters.USVString(value); + filename = arguments.length === 3 ? toUSVString(filename) : void 0; + const entry = makeEntry(name, value, filename); + const idx = this[kState].findIndex((entry2) => entry2.name === name); + if (idx !== -1) { + this[kState] = [ + ...this[kState].slice(0, idx), + entry, + ...this[kState].slice(idx + 1).filter((entry2) => entry2.name !== name) + ]; + } else { + this[kState].push(entry); + } + } + entries() { + webidl.brandCheck(this, _FormData); + return makeIterator( + () => this[kState].map((pair) => [pair.name, pair.value]), + "FormData", + "key+value" + ); + } + keys() { + webidl.brandCheck(this, _FormData); + return makeIterator( + () => this[kState].map((pair) => [pair.name, pair.value]), + "FormData", + "key" + ); + } + values() { + webidl.brandCheck(this, _FormData); + return makeIterator( + () => this[kState].map((pair) => [pair.name, pair.value]), + "FormData", + "value" + ); + } + /** + * @param {(value: string, key: string, self: FormData) => void} callbackFn + * @param {unknown} thisArg + */ + forEach(callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, _FormData); + 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]); + } + } + }; + FormData.prototype[Symbol.iterator] = FormData.prototype.entries; + Object.defineProperties(FormData.prototype, { + [Symbol.toStringTag]: { + value: "FormData", + configurable: true + } + }); + function makeEntry(name, value, filename) { + name = Buffer.from(name).toString("utf8"); + if (typeof value === "string") { + value = Buffer.from(value).toString("utf8"); + } else { + if (!isFileLike(value)) { + value = value instanceof Blob2 ? new File([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type }); + } + if (filename !== void 0) { + const options2 = { + type: value.type, + lastModified: value.lastModified + }; + value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File([value], filename, options2) : new FileLike(value, filename, options2); + } + } + return { name, value }; } + module2.exports = { FormData }; } +}); - /** - * @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[kResponse] = response - - const parser = new ByteParser(this) - parser.on('drain', function onParserDrain () { - this.ws[kResponse].socket.resume() - }) - - response.socket.ws = this - this[kByteParser] = parser - - // 1. Change the ready state to OPEN (1). - this[kReadyState] = 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 +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/body.js +var require_body = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/body.js"(exports2, module2) { + "use strict"; + var Busboy = require_main2(); + var util2 = require_util2(); + var { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody + } = require_util3(); + var { FormData } = require_formdata(); + var { kState } = require_symbols4(); + var { webidl } = require_webidl(); + var { DOMException: DOMException2, structuredClone } = require_constants5(); + var { Blob: Blob2, File: NativeFile } = __require("buffer"); + var { kBodyUsed } = require_symbols3(); + var assert = __require("assert"); + var { isErrored } = require_util2(); + var { isUint8Array, isArrayBuffer } = __require("util/types"); + var { File: UndiciFile } = require_file(); + var { parseMIMEType, serializeAMimeType } = require_dataURL(); + var ReadableStream = globalThis.ReadableStream; + var File = NativeFile ?? UndiciFile; + var textEncoder = new TextEncoder(); + var textDecoder = new TextDecoder(); + function extractBody(object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = __require("stream/web").ReadableStream; + } + let stream = null; + if (object instanceof ReadableStream) { + stream = object; + } else if (isBlobLike(object)) { + stream = object.stream(); + } else { + stream = new ReadableStream({ + async pull(controller) { + controller.enqueue( + typeof source === "string" ? textEncoder.encode(source) : source + ); + queueMicrotask(() => readableStreamClose(controller)); + }, + start() { + }, + type: void 0 + }); + } + assert(isReadableStreamLike(stream)); + let action = null; + let source = null; + let length = null; + let type2 = null; + if (typeof object === "string") { + source = object; + type2 = "text/plain;charset=UTF-8"; + } else if (object instanceof URLSearchParams) { + source = object.toString(); + type2 = "application/x-www-form-urlencoded;charset=UTF-8"; + } else if (isArrayBuffer(object)) { + source = new Uint8Array(object.slice()); + } else if (ArrayBuffer.isView(object)) { + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); + } else if (util2.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; + const prefix = `--${boundary}\r +Content-Disposition: form-data`; + const escape2 = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); + const blobParts = []; + const rn = new Uint8Array([13, 10]); + length = 0; + let hasUnknownSizeValue = false; + for (const [name, value] of object) { + if (typeof value === "string") { + const chunk2 = textEncoder.encode(prefix + `; name="${escape2(normalizeLinefeeds(name))}"\r +\r +${normalizeLinefeeds(value)}\r +`); + blobParts.push(chunk2); + length += chunk2.byteLength; + } else { + const chunk2 = textEncoder.encode(`${prefix}; name="${escape2(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape2(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r +\r +`); + blobParts.push(chunk2, value, rn); + if (typeof value.size === "number") { + length += chunk2.byteLength + value.size + rn.byteLength; + } else { + hasUnknownSizeValue = true; + } + } + } + const chunk = textEncoder.encode(`--${boundary}--`); + blobParts.push(chunk); + length += chunk.byteLength; + if (hasUnknownSizeValue) { + length = null; + } + source = object; + action = async function* () { + for (const part of blobParts) { + if (part.stream) { + yield* part.stream(); + } else { + yield part; + } + } + }; + type2 = "multipart/form-data; boundary=" + boundary; + } else if (isBlobLike(object)) { + source = object; + length = object.size; + if (object.type) { + type2 = object.type; + } + } else if (typeof object[Symbol.asyncIterator] === "function") { + if (keepalive) { + throw new TypeError("keepalive"); + } + if (util2.isDisturbed(object) || object.locked) { + throw new TypeError( + "Response body object should not be disturbed or locked" + ); + } + stream = object instanceof ReadableStream ? object : ReadableStreamFrom(object); + } + if (typeof source === "string" || util2.isBuffer(source)) { + length = Buffer.byteLength(source); + } + if (action != null) { + let iterator2; + stream = new ReadableStream({ + async start() { + iterator2 = action(object)[Symbol.asyncIterator](); + }, + async pull(controller) { + const { value, done } = await iterator2.next(); + if (done) { + queueMicrotask(() => { + controller.close(); + }); + } else { + if (!isErrored(stream)) { + controller.enqueue(new Uint8Array(value)); + } + } + return controller.desiredSize > 0; + }, + async cancel(reason) { + await iterator2.return(); + }, + type: void 0 + }); + } + const body = { stream, source, length }; + return [body, type2]; } - - // 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 + function safelyExtractBody(object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = __require("stream/web").ReadableStream; + } + if (object instanceof ReadableStream) { + assert(!util2.isDisturbed(object), "The body has already been consumed."); + assert(!object.locked, "The stream is locked."); + } + return extractBody(object, keepalive); } - - // 4. Fire an event named open at the WebSocket object. - fireEvent('open', this) - } -} - -// https://websockets.spec.whatwg.org/#dom-websocket-connecting -WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING -// https://websockets.spec.whatwg.org/#dom-websocket-open -WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN -// https://websockets.spec.whatwg.org/#dom-websocket-closing -WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING -// https://websockets.spec.whatwg.org/#dom-websocket-closed -WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED - -Object.defineProperties(WebSocket.prototype, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors, - url: kEnumerableProperty, - readyState: kEnumerableProperty, - bufferedAmount: kEnumerableProperty, - onopen: kEnumerableProperty, - onerror: kEnumerableProperty, - onclose: kEnumerableProperty, - close: kEnumerableProperty, - onmessage: kEnumerableProperty, - binaryType: kEnumerableProperty, - send: kEnumerableProperty, - extensions: kEnumerableProperty, - protocol: kEnumerableProperty, - [Symbol.toStringTag]: { - value: 'WebSocket', - writable: false, - enumerable: false, - configurable: true - } -}) - -Object.defineProperties(WebSocket, { - CONNECTING: staticPropertyDescriptors, - OPEN: staticPropertyDescriptors, - CLOSING: staticPropertyDescriptors, - CLOSED: staticPropertyDescriptors -}) - -webidl.converters['sequence'] = webidl.sequenceConverter( - webidl.converters.DOMString -) - -webidl.converters['DOMString or sequence'] = function (V) { - if (webidl.util.Type(V) === 'Object' && Symbol.iterator in V) { - return webidl.converters['sequence'](V) - } - - return webidl.converters.DOMString(V) -} - -// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 -webidl.converters.WebSocketInit = webidl.dictionaryConverter([ - { - key: 'protocols', - converter: webidl.converters['DOMString or sequence'], - get defaultValue () { - return [] + function cloneBody(body) { + const [out1, out2] = body.stream.tee(); + const out2Clone = structuredClone(out2, { transfer: [out2] }); + const [, finalClone] = out2Clone.tee(); + body.stream = out1; + return { + stream: finalClone, + length: body.length, + source: body.source + }; } - }, - { - key: 'dispatcher', - converter: (V) => V, - get defaultValue () { - return getGlobalDispatcher() + async function* consumeBody(body) { + if (body) { + if (isUint8Array(body)) { + yield body; + } else { + const stream = body.stream; + if (util2.isDisturbed(stream)) { + throw new TypeError("The body has already been consumed."); + } + if (stream.locked) { + throw new TypeError("The stream is locked."); + } + stream[kBodyUsed] = true; + yield* stream; + } + } } - }, - { - key: 'headers', - converter: webidl.nullableConverter(webidl.converters.HeadersInit) - } -]) - -webidl.converters['DOMString or sequence or WebSocketInit'] = function (V) { - if (webidl.util.Type(V) === 'Object' && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V) - } - - return { protocols: webidl.converters['DOMString or sequence'](V) } -} - -webidl.converters.WebSocketSendData = function (V) { - if (webidl.util.Type(V) === 'Object') { - if (isBlobLike(V)) { - return webidl.converters.Blob(V, { strict: false }) + function throwIfAborted(state) { + if (state.aborted) { + throw new DOMException2("The operation was aborted.", "AbortError"); + } } - - if (ArrayBuffer.isView(V) || types.isAnyArrayBuffer(V)) { - return webidl.converters.BufferSource(V) + function bodyMixinMethods(instance) { + const methods = { + blob() { + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this); + if (mimeType === "failure") { + mimeType = ""; + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType); + } + return new Blob2([bytes], { type: mimeType }); + }, instance); + }, + arrayBuffer() { + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer; + }, instance); + }, + text() { + return specConsumeBody(this, utf8DecodeBytes, instance); + }, + json() { + return specConsumeBody(this, parseJSONFromBytes, instance); + }, + async formData() { + webidl.brandCheck(this, instance); + throwIfAborted(this[kState]); + const contentType = this.headers.get("Content-Type"); + if (/multipart\/form-data/.test(contentType)) { + const headers = {}; + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value; + const responseFormData = new FormData(); + let busboy; + try { + busboy = new Busboy({ + headers, + preservePath: true + }); + } catch (err) { + throw new DOMException2(`${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 end2 = base64chunk.length - base64chunk.length % 4; + chunks.push(Buffer.from(base64chunk.slice(0, end2), "base64")); + base64chunk = base64chunk.slice(end2); + }); + value.on("end", () => { + chunks.push(Buffer.from(base64chunk, "base64")); + responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + }); + } else { + value.on("data", (chunk) => { + chunks.push(chunk); + }); + value.on("end", () => { + responseFormData.append(name, new File(chunks, filename, { type: mimeType })); + }); + } + }); + const busboyResolve = new Promise((resolve4, reject) => { + busboy.on("finish", resolve4); + busboy.on("error", (err) => reject(new TypeError(err))); + }); + if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); + busboy.end(); + await busboyResolve; + return responseFormData; + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + let entries; + try { + let text = ""; + const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); + for await (const chunk of consumeBody(this[kState].body)) { + if (!isUint8Array(chunk)) { + throw new TypeError("Expected Uint8Array chunk"); + } + text += streamingDecoder.decode(chunk, { stream: true }); + } + text += streamingDecoder.decode(); + entries = new URLSearchParams(text); + } catch (err) { + throw Object.assign(new TypeError(), { cause: err }); + } + const formData = new FormData(); + for (const [name, value] of entries) { + formData.append(name, value); + } + return formData; + } else { + await Promise.resolve(); + throwIfAborted(this[kState]); + throw webidl.errors.exception({ + header: `${instance.name}.formData`, + message: "Could not parse content as FormData." + }); + } + } + }; + return methods; } - } - - return webidl.converters.USVString(V) -} - -module.exports = { - WebSocket -} - - -/***/ }), - -/***/ 67767: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var jsonwebtoken = _interopDefault(__nccwpck_require__(78351)); - -async function getToken({ - privateKey, - payload -}) { - return jsonwebtoken.sign(payload, privateKey, { - algorithm: "RS256" - }); -} - -async function githubAppJwt({ - id, - privateKey, - now = Math.floor(Date.now() / 1000) -}) { - // When creating a JSON Web Token, it sets the "issued at time" (iat) to 30s - // in the past as we have seen people running situations where the GitHub API - // claimed the iat would be in future. It turned out the clocks on the - // different machine were not in sync. - const nowWithSafetyMargin = now - 30; - const expiration = nowWithSafetyMargin + 60 * 10; // JWT expiration time (10 minute maximum) - const payload = { - iat: nowWithSafetyMargin, - exp: expiration, - iss: id - }; - const token = await getToken({ - privateKey, - payload - }); - return { - appId: id, - expiration, - token - }; -} - -exports.githubAppJwt = githubAppJwt; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 59279: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && process.version !== undefined) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 63513: -/***/ ((module) => { - -"use strict"; -/*! - * unpipe - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = unpipe - -/** - * Determine if there are Node.js pipe-like data listeners. - * @private - */ - -function hasPipeDataListeners(stream) { - var listeners = stream.listeners('data') - - for (var i = 0; i < listeners.length; i++) { - if (listeners[i].name === 'ondata') { - return true + function mixinBody(prototype) { + Object.assign(prototype.prototype, bodyMixinMethods(prototype)); } - } - - return false -} - -/** - * Unpipe a stream from all destinations. - * - * @param {object} stream - * @public - */ - -function unpipe(stream) { - if (!stream) { - throw new TypeError('argument stream is required') - } - - if (typeof stream.unpipe === 'function') { - // new-style - stream.unpipe() - return - } - - // Node.js 0.8 hack - if (!hasPipeDataListeners(stream)) { - return - } - - var listener - var listeners = stream.listeners('close') - - for (var i = 0; i < listeners.length; i++) { - listener = listeners[i] - - if (listener.name !== 'cleanup' && listener.name !== 'onclose') { - continue + async function specConsumeBody(object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance); + throwIfAborted(object[kState]); + if (bodyUnusable(object[kState].body)) { + throw new TypeError("Body is unusable"); + } + const promise = createDeferredPromise(); + const errorSteps = (error) => promise.reject(error); + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)); + } catch (e) { + errorSteps(e); + } + }; + if (object[kState].body == null) { + successSteps(new Uint8Array()); + return promise.promise; + } + await fullyReadBody(object[kState].body, successSteps, errorSteps); + return promise.promise; } - - // invoke the listener - listener.call(stream) - } -} - - -/***/ }), - -/***/ 74928: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const dotenv = __nccwpck_require__(84721) -const fs = __nccwpck_require__(79896) -const path = __nccwpck_require__(16928) -const { promisify } = __nccwpck_require__(39023) - -function escapeNewlines (str) { - return str.replace(/\n/g, '\\n') -} - -function format (key, value) { - return `${key}=${escapeNewlines(value)}` -} - -module.exports = async function updateDotenv (env) { - const filename = path.join(process.cwd(), '.env') - - // Merge with existing values - try { - const existing = dotenv.parse(await promisify(fs.readFile)(filename, 'utf-8')) - env = Object.assign(existing, env) - } catch (err) { - if (err.code !== 'ENOENT') { - throw err + function bodyUnusable(body) { + return body != null && (body.stream.locked || util2.isDisturbed(body.stream)); } - } - - const contents = Object.keys(env).map(key => format(key, env[key])).join('\n') - await promisify(fs.writeFile)(filename, contents) - - // Update current env with new values - Object.assign(process.env, env) - - return env -} - - -/***/ }), - -/***/ 39987: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - - -/** - * For Node.js, simply re-export the core `util.deprecate` function. - */ - -module.exports = __nccwpck_require__(39023).deprecate; - - -/***/ }), - -/***/ 83554: -/***/ ((module, exports) => { - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api public - */ - -exports = module.exports = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; + function utf8DecodeBytes(buffer) { + if (buffer.length === 0) { + return ""; + } + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { + buffer = buffer.subarray(3); + } + const output = textDecoder.decode(buffer); + return output; } - } - return a; -}; - - -/***/ }), - -/***/ 80176: -/***/ ((module) => { - -"use strict"; -/*! - * vary - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - */ - -module.exports = vary -module.exports.append = append - -/** - * RegExp to match field-name in RFC 7230 sec 3.2 - * - * field-name = token - * token = 1*tchar - * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" - * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~" - * / DIGIT / ALPHA - * ; any VCHAR, except delimiters - */ - -var FIELD_NAME_REGEXP = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/ - -/** - * Append a field to a vary header. - * - * @param {String} header - * @param {String|Array} field - * @return {String} - * @public - */ - -function append (header, field) { - if (typeof header !== 'string') { - throw new TypeError('header argument is required') - } - - if (!field) { - throw new TypeError('field argument is required') - } - - // get fields array - var fields = !Array.isArray(field) - ? parse(String(field)) - : field - - // assert on invalid field names - for (var j = 0; j < fields.length; j++) { - if (!FIELD_NAME_REGEXP.test(fields[j])) { - throw new TypeError('field argument contains an invalid header name') + function parseJSONFromBytes(bytes) { + return JSON.parse(utf8DecodeBytes(bytes)); } - } - - // existing, unspecified vary - if (header === '*') { - return header - } - - // enumerate current values - var val = header - var vals = parse(header.toLowerCase()) - - // unspecified vary - if (fields.indexOf('*') !== -1 || vals.indexOf('*') !== -1) { - return '*' - } - - for (var i = 0; i < fields.length; i++) { - var fld = fields[i].toLowerCase() - - // append value (case-preserving) - if (vals.indexOf(fld) === -1) { - vals.push(fld) - val = val - ? val + ', ' + fields[i] - : fields[i] + function bodyMimeType(object) { + const { headersList } = object[kState]; + const contentType = headersList.get("content-type"); + if (contentType === null) { + return "failure"; + } + return parseMIMEType(contentType); } + module2.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody + }; } +}); - return val -} - -/** - * Parse a vary header into an array. - * - * @param {String} header - * @return {Array} - * @private - */ - -function parse (header) { - var end = 0 - var list = [] - var start = 0 - - // gather tokens - for (var i = 0, len = header.length; i < len; i++) { - switch (header.charCodeAt(i)) { - case 0x20: /* */ - if (start === end) { - start = end = i + 1 +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/request.js +var require_request2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/request.js"(exports2, module2) { + "use strict"; + var { + InvalidArgumentError, + NotSupportedError + } = require_errors3(); + var assert = __require("assert"); + var { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = require_symbols3(); + var util2 = require_util2(); + var tokenRegExp = /^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/; + var headerCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + var invalidPathRegex = /[^\u0021-\u00ff]/; + var kHandler = Symbol("handler"); + var channels = {}; + var extractBody; + try { + const diagnosticsChannel = __require("diagnostics_channel"); + channels.create = diagnosticsChannel.channel("undici:request:create"); + channels.bodySent = diagnosticsChannel.channel("undici:request:bodySent"); + channels.headers = diagnosticsChannel.channel("undici:request:headers"); + channels.trailers = diagnosticsChannel.channel("undici:request:trailers"); + channels.error = diagnosticsChannel.channel("undici:request:error"); + } catch { + channels.create = { hasSubscribers: false }; + channels.bodySent = { hasSubscribers: false }; + channels.headers = { hasSubscribers: false }; + channels.trailers = { hasSubscribers: false }; + channels.error = { hasSubscribers: false }; + } + var Request2 = class _Request { + constructor(origin, { + path: path2, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue + }, handler2) { + if (typeof path2 !== "string") { + throw new InvalidArgumentError("path must be a string"); + } else if (path2[0] !== "/" && !(path2.startsWith("http://") || path2.startsWith("https://")) && method !== "CONNECT") { + throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + } else if (invalidPathRegex.exec(path2) !== null) { + throw new InvalidArgumentError("invalid request path"); + } + if (typeof method !== "string") { + throw new InvalidArgumentError("method must be a string"); + } else if (tokenRegExp.exec(method) === null) { + throw new InvalidArgumentError("invalid request method"); + } + if (upgrade && typeof upgrade !== "string") { + throw new InvalidArgumentError("upgrade must be a string"); + } + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("invalid headersTimeout"); + } + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("invalid bodyTimeout"); + } + if (reset != null && typeof reset !== "boolean") { + throw new InvalidArgumentError("invalid reset"); + } + if (expectContinue != null && typeof expectContinue !== "boolean") { + throw new 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 (util2.isStream(body)) { + this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy() { + util2.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 (util2.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 (util2.isFormDataLike(body) || util2.isIterable(body) || util2.isBlobLike(body)) { + this.body = body; + } else { + throw new 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 ? util2.buildURL(path2, query) : path2; + 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 = ""; + this.expectContinue = expectContinue != null ? expectContinue : false; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError("headers array must be even"); + } + for (let i = 0; i < headers.length; i += 2) { + 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]; + processHeader(this, key, headers[key]); + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); } - break - case 0x2c: /* , */ - list.push(header.substring(start, end)) - start = end = i + 1 - break - default: - end = i + 1 - break - } - } - - // final token - list.push(header.substring(start, end)) - - return list -} - -/** - * Mark that a request is varied on a header field. - * - * @param {Object} res - * @param {String|Array} field - * @public - */ - -function vary (res, field) { - if (!res || !res.getHeader || !res.setHeader) { - // quack quack - throw new TypeError('res argument is required') - } - - // get existing header - var val = res.getHeader('Vary') || '' - var header = Array.isArray(val) - ? val.join(', ') - : String(val) - - // set new header - if ((val = append(header, field))) { - res.setHeader('Vary', val) - } -} - - -/***/ }), - -/***/ 58092: -/***/ ((module) => { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} - - -/***/ }), - -/***/ 30931: -/***/ ((module) => { - -function webpackEmptyAsyncContext(req) { - // Here Promise.resolve().then() is used instead of new Promise() to prevent - // uncaught exception popping up in devtools - return Promise.resolve().then(() => { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - }); -} -webpackEmptyAsyncContext.keys = () => ([]); -webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; -webpackEmptyAsyncContext.id = 30931; -module.exports = webpackEmptyAsyncContext; - -/***/ }), - -/***/ 42613: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert"); - -/***/ }), - -/***/ 90290: -/***/ ((module) => { - -"use strict"; -module.exports = require("async_hooks"); - -/***/ }), - -/***/ 20181: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer"); - -/***/ }), - -/***/ 35317: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process"); - -/***/ }), - -/***/ 64236: -/***/ ((module) => { - -"use strict"; -module.exports = require("console"); - -/***/ }), - -/***/ 49140: -/***/ ((module) => { - -"use strict"; -module.exports = require("constants"); - -/***/ }), - -/***/ 76982: -/***/ ((module) => { - -"use strict"; -module.exports = require("crypto"); - -/***/ }), - -/***/ 31637: -/***/ ((module) => { - -"use strict"; -module.exports = require("diagnostics_channel"); - -/***/ }), - -/***/ 72250: -/***/ ((module) => { - -"use strict"; -module.exports = require("dns"); - -/***/ }), - -/***/ 73167: -/***/ ((module) => { - -"use strict"; -module.exports = require("domain"); - -/***/ }), - -/***/ 24434: -/***/ ((module) => { - -"use strict"; -module.exports = require("events"); - -/***/ }), - -/***/ 79896: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs"); - -/***/ }), - -/***/ 58611: -/***/ ((module) => { - -"use strict"; -module.exports = require("http"); - -/***/ }), - -/***/ 85675: -/***/ ((module) => { - -"use strict"; -module.exports = require("http2"); - -/***/ }), - -/***/ 65692: -/***/ ((module) => { - -"use strict"; -module.exports = require("https"); - -/***/ }), - -/***/ 50264: -/***/ ((module) => { - -"use strict"; -module.exports = require("inspector"); - -/***/ }), - -/***/ 73339: -/***/ ((module) => { - -"use strict"; -module.exports = require("module"); - -/***/ }), - -/***/ 69278: -/***/ ((module) => { - -"use strict"; -module.exports = require("net"); - -/***/ }), - -/***/ 4573: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:buffer"); - -/***/ }), - -/***/ 31421: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:child_process"); - -/***/ }), - -/***/ 77598: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:crypto"); - -/***/ }), - -/***/ 78474: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:events"); - -/***/ }), - -/***/ 73024: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs"); - -/***/ }), - -/***/ 48161: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:os"); - -/***/ }), - -/***/ 76760: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:path"); - -/***/ }), - -/***/ 1708: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:process"); - -/***/ }), - -/***/ 57075: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:stream"); - -/***/ }), - -/***/ 57975: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:util"); - -/***/ }), - -/***/ 70857: -/***/ ((module) => { - -"use strict"; -module.exports = require("os"); - -/***/ }), - -/***/ 16928: -/***/ ((module) => { - -"use strict"; -module.exports = require("path"); - -/***/ }), - -/***/ 82987: -/***/ ((module) => { - -"use strict"; -module.exports = require("perf_hooks"); - -/***/ }), - -/***/ 83480: -/***/ ((module) => { - -"use strict"; -module.exports = require("querystring"); - -/***/ }), - -/***/ 2203: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream"); - -/***/ }), - -/***/ 63774: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream/web"); - -/***/ }), - -/***/ 13193: -/***/ ((module) => { - -"use strict"; -module.exports = require("string_decoder"); - -/***/ }), - -/***/ 53557: -/***/ ((module) => { - -"use strict"; -module.exports = require("timers"); - -/***/ }), - -/***/ 64756: -/***/ ((module) => { - -"use strict"; -module.exports = require("tls"); - -/***/ }), - -/***/ 52018: -/***/ ((module) => { - -"use strict"; -module.exports = require("tty"); - -/***/ }), - -/***/ 87016: -/***/ ((module) => { - -"use strict"; -module.exports = require("url"); - -/***/ }), - -/***/ 39023: -/***/ ((module) => { - -"use strict"; -module.exports = require("util"); - -/***/ }), - -/***/ 98253: -/***/ ((module) => { - -"use strict"; -module.exports = require("util/types"); - -/***/ }), - -/***/ 28167: -/***/ ((module) => { - -"use strict"; -module.exports = require("worker_threads"); - -/***/ }), - -/***/ 43106: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib"); - -/***/ }), - -/***/ 56917: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const WritableStream = (__nccwpck_require__(57075).Writable) -const inherits = (__nccwpck_require__(57975).inherits) - -const StreamSearch = __nccwpck_require__(80439) - -const PartStream = __nccwpck_require__(55341) -const HeaderParser = __nccwpck_require__(66890) - -const DASH = 45 -const B_ONEDASH = Buffer.from('-') -const B_CRLF = Buffer.from('\r\n') -const EMPTY_FN = function () {} - -function Dicer (cfg) { - if (!(this instanceof Dicer)) { return new Dicer(cfg) } - 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 HeaderParser(cfg) - this._hparser.on('header', function (header) { - self._inHeader = false - self._part.emit('header', header) - }) -} -inherits(Dicer, WritableStream) - -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 + if (util2.isFormDataLike(this.body)) { + if (util2.nodeMajor < 16 || util2.nodeMajor === 16 && util2.nodeMinor < 8) { + throw new InvalidArgumentError("Form-Data bodies are only supported in node v16.8 and newer."); + } + if (!extractBody) { + extractBody = require_body().extractBody; + } + const [bodyStream, contentType] = extractBody(body); + if (this.contentType == null) { + this.contentType = contentType; + this.headers += `content-type: ${contentType}\r +`; + } + this.body = bodyStream.stream; + this.contentLength = bodyStream.length; + } else if (util2.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type; + this.headers += `content-type: ${body.type}\r +`; + } + util2.validateHandler(handler2, method, upgrade); + this.servername = util2.getServerName(this.host); + this[kHandler] = handler2; + if (channels.create.hasSubscribers) { + channels.create.publish({ request: this }); + } + } + onBodySent(chunk) { + if (this[kHandler].onBodySent) { + try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); + } + } + } + onRequestSent() { + if (channels.bodySent.hasSubscribers) { + channels.bodySent.publish({ request: this }); + } + if (this[kHandler].onRequestSent) { + try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); + } + } + } + onConnect(abort) { + assert(!this.aborted); + assert(!this.completed); + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } + } + onHeaders(statusCode, headers, resume2, statusText) { + assert(!this.aborted); + assert(!this.completed); + if (channels.headers.hasSubscribers) { + channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); + } + try { + return this[kHandler].onHeaders(statusCode, headers, resume2, statusText); + } catch (err) { + this.abort(err); } - self._realFinish = true - self.emit('finish') - self._realFinish = false - }) - } - } else { WritableStream.prototype.emit.apply(this, arguments) } -} - -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 PartStream(this._partOpts) - if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() } + } + onData(chunk) { + assert(!this.aborted); + assert(!this.completed); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } + } + onUpgrade(statusCode, headers, socket) { + assert(!this.aborted); + assert(!this.completed); + return this[kHandler].onUpgrade(statusCode, headers, socket); + } + onComplete(trailers) { + this.onFinally(); + assert(!this.aborted); + this.completed = true; + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }); + } + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } + } + onError(error) { + this.onFinally(); + if (channels.error.hasSubscribers) { + channels.error.publish({ request: this, error }); + } + if (this.aborted) { + return; + } + this.aborted = true; + return this[kHandler].onError(error); + } + 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; + } + } + // TODO: adjust to support H2 + addHeader(key, value) { + processHeader(this, key, value); + return this; + } + static [kHTTP1BuildRequest](origin, opts, handler2) { + return new _Request(origin, opts, handler2); + } + static [kHTTP2BuildRequest](origin, opts, handler2) { + const headers = opts.headers; + opts = { ...opts, headers: null }; + const request2 = new _Request(origin, opts, handler2); + request2.headers = {}; + if (Array.isArray(headers)) { + if (headers.length % 2 !== 0) { + throw new InvalidArgumentError("headers array must be even"); + } + for (let i = 0; i < headers.length; i += 2) { + processHeader(request2, 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]; + processHeader(request2, key, headers[key], true); + } + } else if (headers != null) { + throw new InvalidArgumentError("headers must be an object or an array"); + } + return request2; + } + static [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; + } + return headers; + } + }; + function processHeaderValue(key, val, skipAppend) { + if (val && typeof val === "object") { + throw new InvalidArgumentError(`invalid ${key} header`); + } + val = val != null ? `${val}` : ""; + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + return skipAppend ? val : `${key}: ${val}\r +`; } - 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(B_CRLF) - this._firstWrite = false - } - - this._bparser.push(data) - - if (this._pause) { this._cb = cb } else { cb() } -} - -Dicer.prototype.reset = function () { - this._part = undefined - this._bparser = undefined - this._hparser = undefined -} - -Dicer.prototype.setBoundary = function (boundary) { - const self = this - this._bparser = new StreamSearch('\r\n--' + boundary) - this._bparser.on('info', function (isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end) - }) -} - -Dicer.prototype._ignore = function () { - if (this._part && !this._ignoreData) { - this._ignoreData = true - this._part.on('error', 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() - } -} - -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] === DASH) { - ++i - ++this._dashes + function processHeader(request2, key, val, skipAppend = false) { + if (val && (typeof val === "object" && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === void 0) { + return; + } + if (request2.host === null && key.length === 4 && key.toLowerCase() === "host") { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`); + } + request2.host = val; + } else if (request2.contentLength === null && key.length === 14 && key.toLowerCase() === "content-length") { + request2.contentLength = parseInt(val, 10); + if (!Number.isFinite(request2.contentLength)) { + throw new InvalidArgumentError("invalid content-length header"); + } + } else if (request2.contentType === null && key.length === 12 && key.toLowerCase() === "content-type") { + request2.contentType = val; + if (skipAppend) request2.headers[key] = processHeaderValue(key, val, skipAppend); + else request2.headers += processHeaderValue(key, val); + } else if (key.length === 17 && key.toLowerCase() === "transfer-encoding") { + throw new 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 InvalidArgumentError("invalid connection header"); + } else if (value === "close") { + request2.reset = true; + } + } else if (key.length === 10 && key.toLowerCase() === "keep-alive") { + throw new InvalidArgumentError("invalid keep-alive header"); + } else if (key.length === 7 && key.toLowerCase() === "upgrade") { + throw new InvalidArgumentError("invalid upgrade header"); + } else if (key.length === 6 && key.toLowerCase() === "expect") { + throw new NotSupportedError("expect header not supported"); + } else if (tokenRegExp.exec(key) === null) { + throw new InvalidArgumentError("invalid header key"); } else { - if (this._dashes) { buf = B_ONEDASH } - this._dashes = 0 - break - } - } - 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 - } - } - if (this._dashes) { return } - } - if (this._justMatched) { this._justMatched = false } - if (!this._part) { - this._part = new PartStream(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 + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request2.headers[key]) request2.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}`; + else request2.headers[key] = processHeaderValue(key, val[i], skipAppend); } else { - self._unpause() + request2.headers += processHeaderValue(key, val[i]); } } - }) + } else { + if (skipAppend) request2.headers[key] = processHeaderValue(key, val, skipAppend); + else request2.headers += processHeaderValue(key, val); + } } } - this._part.push(null) - this._part = undefined - this._ignoreData = false - this._justMatched = true - this._dashes = 0 + module2.exports = Request2; } -} - -Dicer.prototype._unpause = function () { - if (!this._pause) { return } +}); - this._pause = false - if (this._cb) { - const cb = this._cb - this._cb = undefined - cb() +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/dispatcher.js +var require_dispatcher = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/dispatcher.js"(exports2, module2) { + "use strict"; + var EventEmitter = __require("events"); + var Dispatcher = class extends EventEmitter { + dispatch() { + throw new Error("not implemented"); + } + close() { + throw new Error("not implemented"); + } + destroy() { + throw new Error("not implemented"); + } + }; + module2.exports = Dispatcher; } -} - -module.exports = Dicer - - -/***/ }), - -/***/ 66890: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const EventEmitter = (__nccwpck_require__(78474).EventEmitter) -const inherits = (__nccwpck_require__(57975).inherits) -const getLimit = __nccwpck_require__(31954) - -const StreamSearch = __nccwpck_require__(80439) - -const B_DCRLF = Buffer.from('\r\n\r\n') -const RE_CRLF = /\r\n/g -const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex - -function HeaderParser (cfg) { - EventEmitter.call(this) +}); - cfg = cfg || {} - const self = this - this.nread = 0 - this.maxed = false - this.npairs = 0 - this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) - this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) - this.buffer = '' - this.header = {} - this.finished = false - this.ss = new StreamSearch(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) } +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/dispatcher-base.js +var require_dispatcher_base = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/dispatcher-base.js"(exports2, module2) { + "use strict"; + var Dispatcher = require_dispatcher(); + var { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError + } = require_errors3(); + var { kDestroy, kClose, kDispatch, kInterceptors } = require_symbols3(); + var kDestroyed = Symbol("destroyed"); + var kClosed = Symbol("closed"); + var kOnDestroyed = Symbol("onDestroyed"); + var kOnClosed = Symbol("onClosed"); + var kInterceptedDispatch = Symbol("Intercepted Dispatch"); + var DispatcherBase = class extends Dispatcher { + constructor() { + super(); + this[kDestroyed] = false; + this[kOnDestroyed] = null; + this[kClosed] = false; + this[kOnClosed] = []; + } + get destroyed() { + return this[kDestroyed]; + } + get closed() { + return this[kClosed]; + } + get interceptors() { + return this[kInterceptors]; + } + set interceptors(newInterceptors) { + if (newInterceptors) { + for (let i = newInterceptors.length - 1; i >= 0; i--) { + const interceptor = this[kInterceptors][i]; + if (typeof interceptor !== "function") { + throw new InvalidArgumentError("interceptor must be an function"); + } + } + } + this[kInterceptors] = newInterceptors; + } + close(callback) { + if (callback === void 0) { + return new Promise((resolve4, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve4(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + queueMicrotask(() => callback(new ClientDestroyedError(), null)); + return; + } + if (this[kClosed]) { + if (this[kOnClosed]) { + this[kOnClosed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + this[kClosed] = true; + this[kOnClosed].push(callback); + const onClosed = () => { + const callbacks = this[kOnClosed]; + this[kOnClosed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kClose]().then(() => this.destroy()).then(() => { + queueMicrotask(onClosed); + }); + } + destroy(err, callback) { + if (typeof err === "function") { + callback = err; + err = null; + } + if (callback === void 0) { + return new Promise((resolve4, reject) => { + this.destroy(err, (err2, data) => { + return err2 ? ( + /* istanbul ignore next: should never error */ + reject(err2) + ) : resolve4(data); + }); + }); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (this[kDestroyed]) { + if (this[kOnDestroyed]) { + this[kOnDestroyed].push(callback); + } else { + queueMicrotask(() => callback(null, null)); + } + return; + } + if (!err) { + err = new ClientDestroyedError(); + } + this[kDestroyed] = true; + this[kOnDestroyed] = this[kOnDestroyed] || []; + this[kOnDestroyed].push(callback); + const onDestroyed = () => { + const callbacks = this[kOnDestroyed]; + this[kOnDestroyed] = null; + for (let i = 0; i < callbacks.length; i++) { + callbacks[i](null, null); + } + }; + this[kDestroy](err).then(() => { + queueMicrotask(onDestroyed); + }); + } + [kInterceptedDispatch](opts, handler2) { + if (!this[kInterceptors] || this[kInterceptors].length === 0) { + this[kInterceptedDispatch] = this[kDispatch]; + return this[kDispatch](opts, handler2); + } + let dispatch = this[kDispatch].bind(this); + for (let i = this[kInterceptors].length - 1; i >= 0; i--) { + dispatch = this[kInterceptors][i](dispatch); + } + this[kInterceptedDispatch] = dispatch; + return dispatch(opts, handler2); + } + dispatch(opts, handler2) { + if (!handler2 || typeof handler2 !== "object") { + throw new InvalidArgumentError("handler must be an object"); + } + try { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object."); + } + if (this[kDestroyed] || this[kOnDestroyed]) { + throw new ClientDestroyedError(); + } + if (this[kClosed]) { + throw new ClientClosedError(); + } + return this[kInterceptedDispatch](opts, handler2); + } catch (err) { + if (typeof handler2.onError !== "function") { + throw new InvalidArgumentError("invalid onError method"); + } + handler2.onError(err); + return false; + } + } + }; + module2.exports = DispatcherBase; + } +}); - self.buffer += data.toString('binary', start, end) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/connect.js +var require_connect = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/core/connect.js"(exports2, module2) { + "use strict"; + var net2 = __require("net"); + var assert = __require("assert"); + var util2 = require_util2(); + var { InvalidArgumentError, ConnectTimeoutError } = require_errors3(); + var tls2; + var SessionCache; + if (global.FinalizationRegistry && !process.env.NODE_V8_COVERAGE) { + SessionCache = class WeakSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new global.FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { + return; + } + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this._sessionCache.delete(key); + } + }); + } + 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 { + SessionCache = class SimpleSessionCache { + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + } + get(sessionKey) { + return this._sessionCache.get(sessionKey); + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; + } + if (this._sessionCache.size >= this._maxCachedSessions) { + const { value: oldestKey } = this._sessionCache.keys().next(); + this._sessionCache.delete(oldestKey); + } + this._sessionCache.set(sessionKey, session); + } + }; } - if (isMatch) { self._finish() } - }) -} -inherits(HeaderParser, EventEmitter) - -HeaderParser.prototype.push = function (data) { - const r = this.ss.push(data) - if (this.finished) { return r } -} - -HeaderParser.prototype.reset = function () { - this.finished = false - this.buffer = '' - this.header = {} - this.ss.reset() -} - -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) -} - -HeaderParser.prototype._parseHeader = function () { - if (this.npairs === this.maxHeaderPairs) { return } - - const lines = this.buffer.split(RE_CRLF) - const len = lines.length - let m, h - - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (lines[i].length === 0) { continue } - if (lines[i][0] === '\t' || 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 + function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) { + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { + throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); } + const options2 = { path: socketPath, ...opts }; + const sessionCache = new SessionCache(maxCachedSessions == null ? 100 : maxCachedSessions); + timeout = timeout == null ? 1e4 : timeout; + allowH2 = allowH2 != null ? allowH2 : false; + return function connect3({ hostname: hostname2, host, protocol, port, servername, localAddress, httpSocket }, callback) { + let socket; + if (protocol === "https:") { + if (!tls2) { + tls2 = __require("tls"); + } + servername = servername || options2.servername || util2.getServerName(host) || null; + const sessionKey = servername || hostname2; + const session = sessionCache.get(sessionKey) || null; + assert(sessionKey); + socket = tls2.connect({ + highWaterMark: 16384, + // TLS in node can't have bigger HWM anyway... + ...options2, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ["http/1.1", "h2"] : ["http/1.1"], + socket: httpSocket, + // upgrade socket connection + port: port || 443, + host: hostname2 + }); + socket.on("session", function(session2) { + sessionCache.set(sessionKey, session2); + }); + } else { + assert(!httpSocket, "httpSocket can only be sent on TLS update"); + socket = net2.connect({ + highWaterMark: 64 * 1024, + // Same as nodejs fs streams. + ...options2, + localAddress, + port: port || 80, + host: hostname2 + }); + } + if (options2.keepAlive == null || options2.keepAlive) { + const keepAliveInitialDelay = options2.keepAliveInitialDelay === void 0 ? 6e4 : options2.keepAliveInitialDelay; + socket.setKeepAlive(true, keepAliveInitialDelay); + } + const cancelTimeout = setupTimeout(() => 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; + }; } - - const posColon = lines[i].indexOf(':') - if ( - posColon === -1 || - posColon === 0 - ) { - return + function setupTimeout(onConnectTimeout2, timeout) { + if (!timeout) { + return () => { + }; + } + let s1 = null; + let s2 = null; + const timeoutId = setTimeout(() => { + s1 = setImmediate(() => { + if (process.platform === "win32") { + s2 = setImmediate(() => onConnectTimeout2()); + } else { + onConnectTimeout2(); + } + }); + }, timeout); + return () => { + clearTimeout(timeoutId); + clearImmediate(s1); + clearImmediate(s2); + }; } - m = 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 } - } -} - -module.exports = HeaderParser - - -/***/ }), - -/***/ 55341: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const inherits = (__nccwpck_require__(57975).inherits) -const ReadableStream = (__nccwpck_require__(57075).Readable) - -function PartStream (opts) { - ReadableStream.call(this, opts) -} -inherits(PartStream, ReadableStream) - -PartStream.prototype._read = function (n) {} - -module.exports = PartStream - - -/***/ }), - -/***/ 80439: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/** - * Copyright Brian White. All rights reserved. - * - * @see https://github.com/mscdex/streamsearch - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - * - * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation - * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool - */ -const EventEmitter = (__nccwpck_require__(78474).EventEmitter) -const inherits = (__nccwpck_require__(57975).inherits) - -function 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.') + function onConnectTimeout(socket) { + util2.destroy(socket, new ConnectTimeoutError()); + } + module2.exports = buildConnector; } +}); - 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) { // eslint-disable-line no-var - this._occ[needle[i]] = needleLength - 1 - i +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/utils.js +var require_utils7 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/utils.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.enumToMap = void 0; + function enumToMap(obj) { + const res = {}; + Object.keys(obj).forEach((key) => { + const value = obj[key]; + if (typeof value === "number") { + res[key] = value; + } + }); + return res; + } + exports2.enumToMap = enumToMap; } -} -inherits(SBMH, EventEmitter) - -SBMH.prototype.reset = function () { - this._lookbehind_size = 0 - this.matches = 0 - this._bufpos = 0 -} +}); -SBMH.prototype.push = function (chunk, pos) { - if (!Buffer.isBuffer(chunk)) { - chunk = Buffer.from(chunk, 'binary') +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/constants.js +var require_constants6 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/constants.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; + var utils_1 = require_utils7(); + var ERROR; + (function(ERROR2) { + ERROR2[ERROR2["OK"] = 0] = "OK"; + ERROR2[ERROR2["INTERNAL"] = 1] = "INTERNAL"; + ERROR2[ERROR2["STRICT"] = 2] = "STRICT"; + ERROR2[ERROR2["LF_EXPECTED"] = 3] = "LF_EXPECTED"; + ERROR2[ERROR2["UNEXPECTED_CONTENT_LENGTH"] = 4] = "UNEXPECTED_CONTENT_LENGTH"; + ERROR2[ERROR2["CLOSED_CONNECTION"] = 5] = "CLOSED_CONNECTION"; + ERROR2[ERROR2["INVALID_METHOD"] = 6] = "INVALID_METHOD"; + ERROR2[ERROR2["INVALID_URL"] = 7] = "INVALID_URL"; + ERROR2[ERROR2["INVALID_CONSTANT"] = 8] = "INVALID_CONSTANT"; + ERROR2[ERROR2["INVALID_VERSION"] = 9] = "INVALID_VERSION"; + ERROR2[ERROR2["INVALID_HEADER_TOKEN"] = 10] = "INVALID_HEADER_TOKEN"; + ERROR2[ERROR2["INVALID_CONTENT_LENGTH"] = 11] = "INVALID_CONTENT_LENGTH"; + ERROR2[ERROR2["INVALID_CHUNK_SIZE"] = 12] = "INVALID_CHUNK_SIZE"; + ERROR2[ERROR2["INVALID_STATUS"] = 13] = "INVALID_STATUS"; + ERROR2[ERROR2["INVALID_EOF_STATE"] = 14] = "INVALID_EOF_STATE"; + ERROR2[ERROR2["INVALID_TRANSFER_ENCODING"] = 15] = "INVALID_TRANSFER_ENCODING"; + ERROR2[ERROR2["CB_MESSAGE_BEGIN"] = 16] = "CB_MESSAGE_BEGIN"; + ERROR2[ERROR2["CB_HEADERS_COMPLETE"] = 17] = "CB_HEADERS_COMPLETE"; + ERROR2[ERROR2["CB_MESSAGE_COMPLETE"] = 18] = "CB_MESSAGE_COMPLETE"; + ERROR2[ERROR2["CB_CHUNK_HEADER"] = 19] = "CB_CHUNK_HEADER"; + ERROR2[ERROR2["CB_CHUNK_COMPLETE"] = 20] = "CB_CHUNK_COMPLETE"; + ERROR2[ERROR2["PAUSED"] = 21] = "PAUSED"; + ERROR2[ERROR2["PAUSED_UPGRADE"] = 22] = "PAUSED_UPGRADE"; + ERROR2[ERROR2["PAUSED_H2_UPGRADE"] = 23] = "PAUSED_H2_UPGRADE"; + ERROR2[ERROR2["USER"] = 24] = "USER"; + })(ERROR = exports2.ERROR || (exports2.ERROR = {})); + var TYPE; + (function(TYPE2) { + TYPE2[TYPE2["BOTH"] = 0] = "BOTH"; + TYPE2[TYPE2["REQUEST"] = 1] = "REQUEST"; + TYPE2[TYPE2["RESPONSE"] = 2] = "RESPONSE"; + })(TYPE = exports2.TYPE || (exports2.TYPE = {})); + var FLAGS; + (function(FLAGS2) { + FLAGS2[FLAGS2["CONNECTION_KEEP_ALIVE"] = 1] = "CONNECTION_KEEP_ALIVE"; + FLAGS2[FLAGS2["CONNECTION_CLOSE"] = 2] = "CONNECTION_CLOSE"; + FLAGS2[FLAGS2["CONNECTION_UPGRADE"] = 4] = "CONNECTION_UPGRADE"; + FLAGS2[FLAGS2["CHUNKED"] = 8] = "CHUNKED"; + FLAGS2[FLAGS2["UPGRADE"] = 16] = "UPGRADE"; + FLAGS2[FLAGS2["CONTENT_LENGTH"] = 32] = "CONTENT_LENGTH"; + FLAGS2[FLAGS2["SKIPBODY"] = 64] = "SKIPBODY"; + FLAGS2[FLAGS2["TRAILING"] = 128] = "TRAILING"; + FLAGS2[FLAGS2["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; + })(FLAGS = exports2.FLAGS || (exports2.FLAGS = {})); + var LENIENT_FLAGS; + (function(LENIENT_FLAGS2) { + LENIENT_FLAGS2[LENIENT_FLAGS2["HEADERS"] = 1] = "HEADERS"; + LENIENT_FLAGS2[LENIENT_FLAGS2["CHUNKED_LENGTH"] = 2] = "CHUNKED_LENGTH"; + LENIENT_FLAGS2[LENIENT_FLAGS2["KEEP_ALIVE"] = 4] = "KEEP_ALIVE"; + })(LENIENT_FLAGS = exports2.LENIENT_FLAGS || (exports2.LENIENT_FLAGS = {})); + var METHODS; + (function(METHODS2) { + METHODS2[METHODS2["DELETE"] = 0] = "DELETE"; + METHODS2[METHODS2["GET"] = 1] = "GET"; + METHODS2[METHODS2["HEAD"] = 2] = "HEAD"; + METHODS2[METHODS2["POST"] = 3] = "POST"; + METHODS2[METHODS2["PUT"] = 4] = "PUT"; + METHODS2[METHODS2["CONNECT"] = 5] = "CONNECT"; + METHODS2[METHODS2["OPTIONS"] = 6] = "OPTIONS"; + METHODS2[METHODS2["TRACE"] = 7] = "TRACE"; + METHODS2[METHODS2["COPY"] = 8] = "COPY"; + METHODS2[METHODS2["LOCK"] = 9] = "LOCK"; + METHODS2[METHODS2["MKCOL"] = 10] = "MKCOL"; + METHODS2[METHODS2["MOVE"] = 11] = "MOVE"; + METHODS2[METHODS2["PROPFIND"] = 12] = "PROPFIND"; + METHODS2[METHODS2["PROPPATCH"] = 13] = "PROPPATCH"; + METHODS2[METHODS2["SEARCH"] = 14] = "SEARCH"; + METHODS2[METHODS2["UNLOCK"] = 15] = "UNLOCK"; + METHODS2[METHODS2["BIND"] = 16] = "BIND"; + METHODS2[METHODS2["REBIND"] = 17] = "REBIND"; + METHODS2[METHODS2["UNBIND"] = 18] = "UNBIND"; + METHODS2[METHODS2["ACL"] = 19] = "ACL"; + METHODS2[METHODS2["REPORT"] = 20] = "REPORT"; + METHODS2[METHODS2["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS2[METHODS2["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS2[METHODS2["MERGE"] = 23] = "MERGE"; + METHODS2[METHODS2["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS2[METHODS2["NOTIFY"] = 25] = "NOTIFY"; + METHODS2[METHODS2["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS2[METHODS2["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + METHODS2[METHODS2["PATCH"] = 28] = "PATCH"; + METHODS2[METHODS2["PURGE"] = 29] = "PURGE"; + METHODS2[METHODS2["MKCALENDAR"] = 30] = "MKCALENDAR"; + METHODS2[METHODS2["LINK"] = 31] = "LINK"; + METHODS2[METHODS2["UNLINK"] = 32] = "UNLINK"; + METHODS2[METHODS2["SOURCE"] = 33] = "SOURCE"; + METHODS2[METHODS2["PRI"] = 34] = "PRI"; + METHODS2[METHODS2["DESCRIBE"] = 35] = "DESCRIBE"; + METHODS2[METHODS2["ANNOUNCE"] = 36] = "ANNOUNCE"; + METHODS2[METHODS2["SETUP"] = 37] = "SETUP"; + METHODS2[METHODS2["PLAY"] = 38] = "PLAY"; + METHODS2[METHODS2["PAUSE"] = 39] = "PAUSE"; + METHODS2[METHODS2["TEARDOWN"] = 40] = "TEARDOWN"; + METHODS2[METHODS2["GET_PARAMETER"] = 41] = "GET_PARAMETER"; + METHODS2[METHODS2["SET_PARAMETER"] = 42] = "SET_PARAMETER"; + METHODS2[METHODS2["REDIRECT"] = 43] = "REDIRECT"; + METHODS2[METHODS2["RECORD"] = 44] = "RECORD"; + METHODS2[METHODS2["FLUSH"] = 45] = "FLUSH"; + })(METHODS = exports2.METHODS || (exports2.METHODS = {})); + exports2.METHODS_HTTP = [ + METHODS.DELETE, + METHODS.GET, + METHODS.HEAD, + METHODS.POST, + METHODS.PUT, + METHODS.CONNECT, + METHODS.OPTIONS, + METHODS.TRACE, + METHODS.COPY, + METHODS.LOCK, + METHODS.MKCOL, + METHODS.MOVE, + METHODS.PROPFIND, + METHODS.PROPPATCH, + METHODS.SEARCH, + METHODS.UNLOCK, + METHODS.BIND, + METHODS.REBIND, + METHODS.UNBIND, + METHODS.ACL, + METHODS.REPORT, + METHODS.MKACTIVITY, + METHODS.CHECKOUT, + METHODS.MERGE, + METHODS["M-SEARCH"], + METHODS.NOTIFY, + METHODS.SUBSCRIBE, + METHODS.UNSUBSCRIBE, + METHODS.PATCH, + METHODS.PURGE, + METHODS.MKCALENDAR, + METHODS.LINK, + METHODS.UNLINK, + METHODS.PRI, + // TODO(indutny): should we allow it with HTTP? + METHODS.SOURCE + ]; + exports2.METHODS_ICE = [ + METHODS.SOURCE + ]; + exports2.METHODS_RTSP = [ + METHODS.OPTIONS, + METHODS.DESCRIBE, + METHODS.ANNOUNCE, + METHODS.SETUP, + METHODS.PLAY, + METHODS.PAUSE, + METHODS.TEARDOWN, + METHODS.GET_PARAMETER, + METHODS.SET_PARAMETER, + METHODS.REDIRECT, + METHODS.RECORD, + METHODS.FLUSH, + // For AirPlay + METHODS.GET, + METHODS.POST + ]; + exports2.METHOD_MAP = utils_1.enumToMap(METHODS); + exports2.H_METHOD_MAP = {}; + Object.keys(exports2.METHOD_MAP).forEach((key) => { + if (/^H/.test(key)) { + exports2.H_METHOD_MAP[key] = exports2.METHOD_MAP[key]; + } + }); + var FINISH; + (function(FINISH2) { + FINISH2[FINISH2["SAFE"] = 0] = "SAFE"; + FINISH2[FINISH2["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH2[FINISH2["UNSAFE"] = 2] = "UNSAFE"; + })(FINISH = exports2.FINISH || (exports2.FINISH = {})); + exports2.ALPHA = []; + for (let i = "A".charCodeAt(0); i <= "Z".charCodeAt(0); i++) { + exports2.ALPHA.push(String.fromCharCode(i)); + exports2.ALPHA.push(String.fromCharCode(i + 32)); + } + exports2.NUM_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + }; + exports2.HEX_MAP = { + 0: 0, + 1: 1, + 2: 2, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9, + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + a: 10, + b: 11, + c: 12, + d: 13, + e: 14, + f: 15 + }; + exports2.NUM = [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ]; + exports2.ALPHANUM = exports2.ALPHA.concat(exports2.NUM); + exports2.MARK = ["-", "_", ".", "!", "~", "*", "'", "(", ")"]; + exports2.USERINFO_CHARS = exports2.ALPHANUM.concat(exports2.MARK).concat(["%", ";", ":", "&", "=", "+", "$", ","]); + exports2.STRICT_URL_CHAR = [ + "!", + '"', + "$", + "%", + "&", + "'", + "(", + ")", + "*", + "+", + ",", + "-", + ".", + "/", + ":", + ";", + "<", + "=", + ">", + "@", + "[", + "\\", + "]", + "^", + "_", + "`", + "{", + "|", + "}", + "~" + ].concat(exports2.ALPHANUM); + exports2.URL_CHAR = exports2.STRICT_URL_CHAR.concat([" ", "\f"]); + for (let i = 128; i <= 255; i++) { + exports2.URL_CHAR.push(i); + } + exports2.HEX = exports2.NUM.concat(["a", "b", "c", "d", "e", "f", "A", "B", "C", "D", "E", "F"]); + exports2.STRICT_TOKEN = [ + "!", + "#", + "$", + "%", + "&", + "'", + "*", + "+", + "-", + ".", + "^", + "_", + "`", + "|", + "~" + ].concat(exports2.ALPHANUM); + exports2.TOKEN = exports2.STRICT_TOKEN.concat([" "]); + exports2.HEADER_CHARS = [" "]; + for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports2.HEADER_CHARS.push(i); + } + } + exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS.filter((c) => c !== 44); + exports2.MAJOR = exports2.NUM_MAP; + exports2.MINOR = exports2.MAJOR; + var HEADER_STATE; + (function(HEADER_STATE2) { + HEADER_STATE2[HEADER_STATE2["GENERAL"] = 0] = "GENERAL"; + HEADER_STATE2[HEADER_STATE2["CONNECTION"] = 1] = "CONNECTION"; + HEADER_STATE2[HEADER_STATE2["CONTENT_LENGTH"] = 2] = "CONTENT_LENGTH"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING"] = 3] = "TRANSFER_ENCODING"; + HEADER_STATE2[HEADER_STATE2["UPGRADE"] = 4] = "UPGRADE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_KEEP_ALIVE"] = 5] = "CONNECTION_KEEP_ALIVE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_CLOSE"] = 6] = "CONNECTION_CLOSE"; + HEADER_STATE2[HEADER_STATE2["CONNECTION_UPGRADE"] = 7] = "CONNECTION_UPGRADE"; + HEADER_STATE2[HEADER_STATE2["TRANSFER_ENCODING_CHUNKED"] = 8] = "TRANSFER_ENCODING_CHUNKED"; + })(HEADER_STATE = exports2.HEADER_STATE || (exports2.HEADER_STATE = {})); + exports2.SPECIAL_HEADERS = { + "connection": HEADER_STATE.CONNECTION, + "content-length": HEADER_STATE.CONTENT_LENGTH, + "proxy-connection": HEADER_STATE.CONNECTION, + "transfer-encoding": HEADER_STATE.TRANSFER_ENCODING, + "upgrade": HEADER_STATE.UPGRADE + }; } - const chlen = chunk.length - this._bufpos = pos || 0 - let r - while (r !== chlen && this.matches < this.maxMatches) { r = this._sbmh_feed(chunk) } - return r -} - -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) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/RedirectHandler.js +var require_RedirectHandler = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/RedirectHandler.js"(exports2, module2) { + "use strict"; + var util2 = require_util2(); + var { kBodyUsed } = require_symbols3(); + var assert = __require("assert"); + var { InvalidArgumentError } = require_errors3(); + var EE = __require("events"); + var redirectableStatusCodes = [300, 301, 302, 303, 307, 308]; + var kBody = Symbol("body"); + var BodyAsyncIterable = class { + constructor(body) { + this[kBody] = body; + this[kBodyUsed] = false; + } + async *[Symbol.asyncIterator]() { + assert(!this[kBodyUsed], "disturbed"); + this[kBodyUsed] = true; + yield* this[kBody]; + } + }; + var RedirectHandler = class { + constructor(dispatch, maxRedirections, opts, handler2) { + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + util2.validateHandler(handler2, opts.method, opts.upgrade); + this.dispatch = dispatch; + this.location = null; + this.abort = null; + this.opts = { ...opts, maxRedirections: 0 }; + this.maxRedirections = maxRedirections; + this.handler = handler2; + this.history = []; + if (util2.isStream(this.opts.body)) { + if (util2.bodyLength(this.opts.body) === 0) { + this.opts.body.on("data", function() { + assert(false); + }); + } + if (typeof this.opts.body.readableDidRead !== "boolean") { + this.opts.body[kBodyUsed] = false; + EE.prototype.on.call(this.opts.body, "data", function() { + this[kBodyUsed] = true; + }); + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { + this.opts.body = new BodyAsyncIterable(this.opts.body); + } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util2.isIterable(this.opts.body)) { + this.opts.body = new 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, resume2, statusText) { + this.location = this.history.length >= this.maxRedirections || util2.isDisturbed(this.opts.body) ? null : 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, resume2, statusText); + } + const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); + const path2 = search ? `${pathname}${search}` : pathname; + this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); + this.opts.path = path2; + this.opts.origin = origin; + this.opts.maxRedirections = 0; + this.opts.query = null; + 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) { + 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 parseLocation(statusCode, headers) { + if (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]; + } } - 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 } + function shouldRemoveHeader(header, removeContent, unknownOrigin) { + if (header.length === 4) { + return util2.headerNameToString(header) === "host"; + } + if (removeContent && util2.headerNameToString(header).startsWith("content-")) { + return true; + } + if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { + const name = util2.headerNameToString(header); + return name === "authorization" || name === "cookie" || name === "proxy-authorization"; + } + return false; } - - 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) + function cleanRequestHeaders(headers, removeContent, unknownOrigin) { + const ret = []; + if (Array.isArray(headers)) { + for (let i = 0; i < headers.length; i += 2) { + if (!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 (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { + ret.push(key, headers[key]); + } + } + } else { + assert(headers == null, "headers must be an object or an array"); } - - 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 + return ret; } + module2.exports = RedirectHandler; } +}); - 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 -} - -SBMH.prototype._sbmh_lookup_char = function (data, pos) { - return (pos < 0) - ? this._lookbehind[this._lookbehind_size + pos] - : data[pos] -} - -SBMH.prototype._sbmh_memcmp = function (data, pos, len) { - for (var i = 0; i < len; ++i) { // eslint-disable-line no-var - if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } - } - return true -} - -module.exports = SBMH - - -/***/ }), - -/***/ 69766: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const WritableStream = (__nccwpck_require__(57075).Writable) -const { inherits } = __nccwpck_require__(57975) -const Dicer = __nccwpck_require__(56917) - -const MultipartParser = __nccwpck_require__(84945) -const UrlencodedParser = __nccwpck_require__(31724) -const parseParams = __nccwpck_require__(66812) - -function Busboy (opts) { - if (!(this instanceof Busboy)) { return new 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, - ...streamOptions - } = opts - - this.opts = { - autoDestroy: false, - ...streamOptions - } - WritableStream.call(this, this.opts) - - this._done = false - this._parser = this.getParserByHeaders(headers) - this._finished = false -} -inherits(Busboy, WritableStream) - -Busboy.prototype.emit = function (ev) { - if (ev === 'finish') { - if (!this._done) { - this._parser?.end() - return - } else if (this._finished) { - return +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/interceptor/redirectInterceptor.js +var require_redirectInterceptor = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/interceptor/redirectInterceptor.js"(exports2, module2) { + "use strict"; + var RedirectHandler = require_RedirectHandler(); + function createRedirectInterceptor({ maxRedirections: defaultMaxRedirections }) { + return (dispatch) => { + return function Intercept(opts, handler2) { + const { maxRedirections = defaultMaxRedirections } = opts; + if (!maxRedirections) { + return dispatch(opts, handler2); + } + const redirectHandler = new RedirectHandler(dispatch, maxRedirections, opts, handler2); + opts = { ...opts, maxRedirections: 0 }; + return dispatch(opts, redirectHandler); + }; + }; } - this._finished = true + module2.exports = createRedirectInterceptor; } - WritableStream.prototype.emit.apply(this, arguments) -} - -Busboy.prototype.getParserByHeaders = function (headers) { - const parsed = parseParams(headers['content-type']) +}); - const cfg = { - defCharset: this.opts.defCharset, - fileHwm: this.opts.fileHwm, - headers, - highWaterMark: this.opts.highWaterMark, - isPartAFile: this.opts.isPartAFile, - limits: this.opts.limits, - parsedConType: parsed, - preservePath: this.opts.preservePath +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/llhttp-wasm.js +var require_llhttp_wasm = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports2, module2) { + module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0d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3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAG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hEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQA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yIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgs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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8="; } +}); - if (MultipartParser.detect.test(parsed[0])) { - return new MultipartParser(this, cfg) - } - if (UrlencodedParser.detect.test(parsed[0])) { - return new UrlencodedParser(this, cfg) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +var require_llhttp_simd_wasm = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports2, module2) { + module2.exports = "AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNb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AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAk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AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgC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AAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABI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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw=="; } - throw new Error('Unsupported Content-Type.') -} - -Busboy.prototype._write = function (chunk, encoding, cb) { - this._parser.write(chunk, cb) -} - -module.exports = Busboy -module.exports["default"] = Busboy -module.exports.Busboy = Busboy - -module.exports.Dicer = Dicer - - -/***/ }), - -/***/ 84945: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// TODO: -// * support 1 nested multipart level -// (see second multipart example here: -// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) -// * support limits.fieldNameSize -// -- this will require modifications to utils.parseParams - -const { Readable } = __nccwpck_require__(57075) -const { inherits } = __nccwpck_require__(57975) - -const Dicer = __nccwpck_require__(56917) - -const parseParams = __nccwpck_require__(66812) -const decodeText = __nccwpck_require__(3772) -const basename = __nccwpck_require__(14935) -const getLimit = __nccwpck_require__(31954) - -const RE_BOUNDARY = /^boundary$/i -const RE_FIELD = /^form-data$/i -const RE_CHARSET = /^charset$/i -const RE_FILENAME = /^filename$/i -const RE_NAME = /^name$/i - -Multipart.detect = /^multipart\/form-data/i -function 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]) && - RE_BOUNDARY.test(parsedConType[i][0])) { - boundary = parsedConType[i][1] - break +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/client.js +var require_client = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/client.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var net2 = __require("net"); + var http4 = __require("http"); + var { pipeline } = __require("stream"); + var util2 = require_util2(); + var timers = require_timers(); + var Request2 = require_request2(); + var DispatcherBase = require_dispatcher_base(); + var { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + InvalidArgumentError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError + } = require_errors3(); + var buildConnector = require_connect(); + var { + kUrl, + kReset, + kServerName, + kClient, + kBusy, + kParser, + kConnect, + kBlocking, + kResuming, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest + } = require_symbols3(); + var http22; + try { + http22 = __require("http2"); + } catch { + http22 = { constants: {} }; + } + var { + constants: { + HTTP2_HEADER_AUTHORITY, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_CONTENT_LENGTH, + HTTP2_HEADER_EXPECT, + HTTP2_HEADER_STATUS + } + } = http22; + var h2ExperimentalWarned = false; + var FastBuffer = Buffer[Symbol.species]; + var kClosedResolve = Symbol("kClosedResolve"); + var channels = {}; + try { + const diagnosticsChannel = __require("diagnostics_channel"); + channels.sendHeaders = diagnosticsChannel.channel("undici:client:sendHeaders"); + channels.beforeConnect = diagnosticsChannel.channel("undici:client:beforeConnect"); + channels.connectError = diagnosticsChannel.channel("undici:client:connectError"); + channels.connected = diagnosticsChannel.channel("undici:client:connected"); + } catch { + channels.sendHeaders = { hasSubscribers: false }; + channels.beforeConnect = { hasSubscribers: false }; + channels.connectError = { hasSubscribers: false }; + channels.connected = { hasSubscribers: false }; + } + var Client = class extends DispatcherBase { + /** + * + * @param {string|URL} url + * @param {import('../types/client').Client.Options} options + */ + constructor(url, { + interceptors, + maxHeaderSize, + headersTimeout, + socketTimeout, + requestTimeout, + connectTimeout, + bodyTimeout, + idleTimeout, + keepAlive, + keepAliveTimeout, + maxKeepAliveTimeout, + keepAliveMaxTimeout, + keepAliveTimeoutThreshold, + socketPath, + pipelining, + tls: tls2, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect: connect4, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams + } = {}) { + super(); + if (keepAlive !== void 0) { + throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + } + if (socketTimeout !== void 0) { + throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + } + if (requestTimeout !== void 0) { + throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + } + if (idleTimeout !== void 0) { + throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + } + if (maxKeepAliveTimeout !== void 0) { + throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); + } + if (maxHeaderSize != null && !Number.isFinite(maxHeaderSize)) { + throw new InvalidArgumentError("invalid maxHeaderSize"); + } + if (socketPath != null && typeof socketPath !== "string") { + throw new InvalidArgumentError("invalid socketPath"); + } + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { + throw new InvalidArgumentError("invalid connectTimeout"); + } + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveTimeout"); + } + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { + throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + } + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { + throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + } + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { + throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + } + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { + throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + } + if (connect4 != null && typeof connect4 !== "function" && typeof connect4 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { + throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + } + if (localAddress != null && (typeof localAddress !== "string" || net2.isIP(localAddress) === 0)) { + throw new InvalidArgumentError("localAddress must be valid string IP address"); + } + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { + throw new InvalidArgumentError("maxResponseSize must be a positive number"); + } + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { + throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + } + if (allowH2 != null && typeof allowH2 !== "boolean") { + throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + } + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { + throw new InvalidArgumentError("maxConcurrentStreams must be a possitive integer, greater than 0"); + } + if (typeof connect4 !== "function") { + connect4 = buildConnector({ + ...tls2, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...util2.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect4 + }); + } + this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; + this[kUrl] = util2.parseOrigin(url); + this[kConnector] = connect4; + this[kSocket] = null; + this[kPipelining] = pipelining != null ? pipelining : 1; + this[kMaxHeadersSize] = maxHeaderSize || http4.maxHeaderSize; + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout; + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 6e5 : keepAliveMaxTimeout; + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold; + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout]; + this[kServerName] = null; + this[kLocalAddress] = localAddress != null ? localAddress : null; + this[kResuming] = 0; + this[kNeedDrain] = 0; + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}\r +`; + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 3e5; + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 3e5; + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength; + this[kMaxRedirections] = maxRedirections; + this[kMaxRequests] = maxRequestsPerClient; + this[kClosedResolve] = null; + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1; + this[kHTTPConnVersion] = "h1"; + this[kHTTP2Session] = null; + this[kHTTP2SessionState] = !allowH2 ? null : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, + // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 + // Max peerConcurrentStreams for a Node h2 server + }; + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ""}`; + this[kQueue] = []; + this[kRunningIdx] = 0; + this[kPendingIdx] = 0; + } + get pipelining() { + return this[kPipelining]; + } + set pipelining(value) { + this[kPipelining] = value; + resume2(this, true); + } + get [kPending]() { + return this[kQueue].length - this[kPendingIdx]; + } + get [kRunning]() { + return this[kPendingIdx] - this[kRunningIdx]; + } + get [kSize]() { + return this[kQueue].length - this[kRunningIdx]; + } + get [kConnected]() { + return !!this[kSocket] && !this[kConnecting] && !this[kSocket].destroyed; + } + get [kBusy]() { + const socket = this[kSocket]; + return socket && (socket[kReset] || socket[kWriting] || socket[kBlocking]) || this[kSize] >= (this[kPipelining] || 1) || this[kPending] > 0; + } + /* istanbul ignore: only used for test */ + [kConnect](cb) { + connect3(this); + this.once("connect", cb); + } + [kDispatch](opts, handler2) { + const origin = opts.origin || this[kUrl].origin; + const request2 = this[kHTTPConnVersion] === "h2" ? Request2[kHTTP2BuildRequest](origin, opts, handler2) : Request2[kHTTP1BuildRequest](origin, opts, handler2); + this[kQueue].push(request2); + if (this[kResuming]) { + } else if (util2.bodyLength(request2.body) == null && util2.isIterable(request2.body)) { + this[kResuming] = 1; + process.nextTick(resume2, this); + } else { + resume2(this, true); + } + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2; + } + return this[kNeedDrain] < 2; + } + async [kClose]() { + return new Promise((resolve4) => { + if (!this[kSize]) { + resolve4(null); + } else { + this[kClosedResolve] = resolve4; + } + }); + } + async [kDestroy](err) { + return new Promise((resolve4) => { + const requests = this[kQueue].splice(this[kPendingIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + errorRequest2(this, request2, err); + } + const callback = () => { + if (this[kClosedResolve]) { + this[kClosedResolve](); + this[kClosedResolve] = null; + } + resolve4(); + }; + if (this[kHTTP2Session] != null) { + util2.destroy(this[kHTTP2Session], err); + this[kHTTP2Session] = null; + this[kHTTP2SessionState] = null; + } + if (!this[kSocket]) { + queueMicrotask(callback); + } else { + util2.destroy(this[kSocket].on("close", callback), err); + } + resume2(this); + }); + } + }; + function onHttp2SessionError(err) { + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + this[kSocket][kError] = err; + onError(this[kClient], err); + } + function onHttp2FrameError(type2, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + if (id === 0) { + this[kSocket][kError] = err; + onError(this[kClient], err); + } + } + function onHttp2SessionEnd() { + util2.destroy(this, new SocketError("other side closed")); + util2.destroy(this[kSocket], new SocketError("other side closed")); + } + function onHTTP2GoAway(code) { + const client = this[kClient]; + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`); + client[kSocket] = null; + client[kHTTP2Session] = null; + if (client.destroyed) { + assert(this[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + errorRequest2(this, request2, err); + } + } else if (client[kRunning] > 0) { + const request2 = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + errorRequest2(client, request2, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert(client[kRunning] === 0); + client.emit( + "disconnect", + client[kUrl], + [client], + err + ); + resume2(client); + } + var constants = require_constants6(); + var createRedirectInterceptor = require_redirectInterceptor(); + var EMPTY_BUF = Buffer.alloc(0); + async function lazyllhttp() { + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; + let mod; + try { + mod = await WebAssembly.compile(Buffer.from(require_llhttp_simd_wasm(), "base64")); + } catch (e) { + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || require_llhttp_wasm(), "base64")); + } + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + wasm_on_url: (p, at, len) => { + return 0; + }, + wasm_on_status: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_begin: (p) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onMessageBegin() || 0; + }, + wasm_on_header_field: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_header_value: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0; + }, + wasm_on_body: (p, at, len) => { + assert.strictEqual(currentParser.ptr, p); + const start = at - currentBufferPtr + currentBufferRef.byteOffset; + return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len)) || 0; + }, + wasm_on_message_complete: (p) => { + assert.strictEqual(currentParser.ptr, p); + return currentParser.onMessageComplete() || 0; + } + /* eslint-enable camelcase */ + } + }); + } + var llhttpInstance = null; + var llhttpPromise = lazyllhttp(); + llhttpPromise.catch(); + var currentParser = null; + var currentBufferRef = null; + var currentBufferSize = 0; + var currentBufferPtr = null; + var TIMEOUT_HEADERS = 1; + var TIMEOUT_BODY = 2; + var TIMEOUT_IDLE = 3; + var Parser = class { + constructor(client, socket, { exports: exports3 }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0); + this.llhttp = exports3; + this.ptr = this.llhttp.llhttp_alloc(constants.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[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[kMaxResponseSize]; + } + setTimeout(value, type2) { + this.timeoutType = type2; + if (value !== this.timeoutValue) { + timers.clearTimeout(this.timeout); + if (value) { + this.timeout = timers.setTimeout(onParserTimeout, value, this); + if (this.timeout.unref) { + this.timeout.unref(); + } + } else { + this.timeout = null; + } + this.timeoutValue = value; + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + } + resume() { + if (this.socket.destroyed || !this.paused) { + return; + } + assert(this.ptr != null); + assert(currentParser == null); + this.llhttp.llhttp_resume(this.ptr); + assert(this.timeoutType === TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + this.paused = false; + this.execute(this.socket.read() || EMPTY_BUF); + this.readMore(); + } + readMore() { + while (!this.paused && this.ptr) { + const chunk = this.socket.read(); + if (chunk === null) { + break; + } + this.execute(chunk); + } + } + execute(data) { + assert(this.ptr != null); + assert(currentParser == null); + assert(!this.paused); + const { socket, llhttp } = this; + if (data.length > currentBufferSize) { + if (currentBufferPtr) { + llhttp.free(currentBufferPtr); + } + currentBufferSize = Math.ceil(data.length / 4096) * 4096; + currentBufferPtr = llhttp.malloc(currentBufferSize); + } + new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(data); + try { + let ret; + try { + currentBufferRef = data; + currentParser = this; + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length); + } catch (err) { + throw err; + } finally { + currentParser = null; + currentBufferRef = null; + } + const offset = llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr; + if (ret === constants.ERROR.PAUSED_UPGRADE) { + this.onUpgrade(data.slice(offset)); + } else if (ret === constants.ERROR.PAUSED) { + this.paused = true; + socket.unshift(data.slice(offset)); + } else if (ret !== constants.ERROR.OK) { + 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() + ")"; + } + throw new HTTPParserError(message, constants.ERROR[ret], data.slice(offset)); + } + } catch (err) { + util2.destroy(socket, err); + } + } + destroy() { + assert(this.ptr != null); + assert(currentParser == null); + this.llhttp.llhttp_free(this.ptr); + this.ptr = null; + timers.clearTimeout(this.timeout); + this.timeout = null; + this.timeoutValue = null; + this.timeoutType = null; + this.paused = false; + } + onStatus(buf) { + this.statusText = buf.toString(); + } + onMessageBegin() { + const { socket, client } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { + return -1; + } + } + 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) { + util2.destroy(this.socket, new HeadersOverflowError()); + } + } + onUpgrade(head) { + const { upgrade, client, socket, headers, statusCode } = this; + assert(upgrade); + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert(!socket.destroyed); + assert(socket === client[kSocket]); + assert(!this.paused); + assert(request2.upgrade || request2.method === "CONNECT"); + this.statusCode = null; + this.statusText = ""; + this.shouldKeepAlive = null; + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + socket.unshift(head); + socket[kParser].destroy(); + socket[kParser] = null; + socket[kClient] = null; + socket[kError] = null; + socket.removeListener("error", onSocketError).removeListener("readable", onSocketReadable).removeListener("end", onSocketEnd).removeListener("close", onSocketClose); + client[kSocket] = null; + client[kQueue][client[kRunningIdx]++] = null; + client.emit("disconnect", client[kUrl], [client], new InformationalError("upgrade")); + try { + request2.onUpgrade(statusCode, headers, socket); + } catch (err) { + util2.destroy(socket, err); + } + resume2(client); + } + onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { + const { client, socket, headers, statusText } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + if (!request2) { + return -1; + } + assert(!this.upgrade); + assert(this.statusCode < 200); + if (statusCode === 100) { + util2.destroy(socket, new SocketError("bad response", util2.getSocketInfo(socket))); + return -1; + } + if (upgrade && !request2.upgrade) { + util2.destroy(socket, new SocketError("bad upgrade", util2.getSocketInfo(socket))); + return -1; + } + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS); + this.statusCode = statusCode; + this.shouldKeepAlive = shouldKeepAlive || // Override llhttp value which does not allow keepAlive for HEAD. + request2.method === "HEAD" && !socket[kReset] && this.connection.toLowerCase() === "keep-alive"; + if (this.statusCode >= 200) { + const bodyTimeout = request2.bodyTimeout != null ? request2.bodyTimeout : client[kBodyTimeout]; + this.setTimeout(bodyTimeout, TIMEOUT_BODY); + } else if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + if (request2.method === "CONNECT") { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + if (upgrade) { + assert(client[kRunning] === 1); + this.upgrade = true; + return 2; + } + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (this.shouldKeepAlive && client[kPipelining]) { + const keepAliveTimeout = this.keepAlive ? util2.parseKeepAliveTimeout(this.keepAlive) : null; + if (keepAliveTimeout != null) { + const timeout = Math.min( + keepAliveTimeout - client[kKeepAliveTimeoutThreshold], + client[kKeepAliveMaxTimeout] + ); + if (timeout <= 0) { + socket[kReset] = true; + } else { + client[kKeepAliveTimeoutValue] = timeout; + } + } else { + client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } + } else { + socket[kReset] = true; + } + const pause = request2.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request2.aborted) { + return -1; + } + if (request2.method === "HEAD") { + return 1; + } + if (statusCode < 200) { + return 1; + } + if (socket[kBlocking]) { + socket[kBlocking] = false; + resume2(client); + } + return pause ? constants.ERROR.PAUSED : 0; + } + onBody(buf) { + const { client, socket, statusCode, maxResponseSize } = this; + if (socket.destroyed) { + return -1; + } + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert.strictEqual(this.timeoutType, TIMEOUT_BODY); + if (this.timeout) { + if (this.timeout.refresh) { + this.timeout.refresh(); + } + } + assert(statusCode >= 200); + if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { + util2.destroy(socket, new ResponseExceededMaxSizeError()); + return -1; + } + this.bytesRead += buf.length; + if (request2.onData(buf) === false) { + return constants.ERROR.PAUSED; + } + } + onMessageComplete() { + const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; + if (socket.destroyed && (!statusCode || shouldKeepAlive)) { + return -1; + } + if (upgrade) { + return; + } + const request2 = client[kQueue][client[kRunningIdx]]; + assert(request2); + assert(statusCode >= 100); + this.statusCode = null; + this.statusText = ""; + this.bytesRead = 0; + this.contentLength = ""; + this.keepAlive = ""; + this.connection = ""; + assert(this.headers.length % 2 === 0); + this.headers = []; + this.headersSize = 0; + if (statusCode < 200) { + return; + } + if (request2.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { + util2.destroy(socket, new ResponseContentLengthMismatchError()); + return -1; + } + request2.onComplete(headers); + client[kQueue][client[kRunningIdx]++] = null; + if (socket[kWriting]) { + assert.strictEqual(client[kRunning], 0); + util2.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (!shouldKeepAlive) { + util2.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (socket[kReset] && client[kRunning] === 0) { + util2.destroy(socket, new InformationalError("reset")); + return constants.ERROR.PAUSED; + } else if (client[kPipelining] === 1) { + setImmediate(resume2, client); + } else { + resume2(client); + } + } + }; + function onParserTimeout(parser2) { + const { socket, timeoutType, client } = parser2; + if (timeoutType === TIMEOUT_HEADERS) { + if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { + assert(!parser2.paused, "cannot be paused while waiting for headers"); + util2.destroy(socket, new HeadersTimeoutError()); + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser2.paused) { + util2.destroy(socket, new BodyTimeoutError()); + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); + util2.destroy(socket, new InformationalError("socket idle timeout")); + } + } + function onSocketReadable() { + const { [kParser]: parser2 } = this; + if (parser2) { + parser2.readMore(); + } + } + function onSocketError(err) { + const { [kClient]: client, [kParser]: parser2 } = this; + assert(err.code !== "ERR_TLS_CERT_ALTNAME_INVALID"); + if (client[kHTTPConnVersion] !== "h2") { + if (err.code === "ECONNRESET" && parser2.statusCode && !parser2.shouldKeepAlive) { + parser2.onMessageComplete(); + return; + } + } + this[kError] = err; + onError(this[kClient], err); + } + function onError(client, err) { + if (client[kRunning] === 0 && err.code !== "UND_ERR_INFO" && err.code !== "UND_ERR_SOCKET") { + assert(client[kPendingIdx] === client[kRunningIdx]); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + errorRequest2(client, request2, err); + } + assert(client[kSize] === 0); + } + } + function onSocketEnd() { + const { [kParser]: parser2, [kClient]: client } = this; + if (client[kHTTPConnVersion] !== "h2") { + if (parser2.statusCode && !parser2.shouldKeepAlive) { + parser2.onMessageComplete(); + return; + } + } + util2.destroy(this, new SocketError("other side closed", util2.getSocketInfo(this))); + } + function onSocketClose() { + const { [kClient]: client, [kParser]: parser2 } = this; + if (client[kHTTPConnVersion] === "h1" && parser2) { + if (!this[kError] && parser2.statusCode && !parser2.shouldKeepAlive) { + parser2.onMessageComplete(); + } + this[kParser].destroy(); + this[kParser] = null; + } + const err = this[kError] || new SocketError("closed", util2.getSocketInfo(this)); + client[kSocket] = null; + if (client.destroyed) { + assert(client[kPending] === 0); + const requests = client[kQueue].splice(client[kRunningIdx]); + for (let i = 0; i < requests.length; i++) { + const request2 = requests[i]; + errorRequest2(client, request2, err); + } + } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { + const request2 = client[kQueue][client[kRunningIdx]]; + client[kQueue][client[kRunningIdx]++] = null; + errorRequest2(client, request2, err); + } + client[kPendingIdx] = client[kRunningIdx]; + assert(client[kRunning] === 0); + client.emit("disconnect", client[kUrl], [client], err); + resume2(client); + } + async function connect3(client) { + assert(!client[kConnecting]); + assert(!client[kSocket]); + let { host, hostname: hostname2, protocol, port } = client[kUrl]; + if (hostname2[0] === "[") { + const idx = hostname2.indexOf("]"); + assert(idx !== -1); + const ip = hostname2.substring(1, idx); + assert(net2.isIP(ip)); + hostname2 = ip; + } + client[kConnecting] = true; + if (channels.beforeConnect.hasSubscribers) { + channels.beforeConnect.publish({ + connectParams: { + host, + hostname: hostname2, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); + } + try { + const socket = await new Promise((resolve4, reject) => { + client[kConnector]({ + host, + hostname: hostname2, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, (err, socket2) => { + if (err) { + reject(err); + } else { + resolve4(socket2); + } + }); + }); + if (client.destroyed) { + util2.destroy(socket.on("error", () => { + }), new ClientDestroyedError()); + return; + } + client[kConnecting] = false; + assert(socket); + const isH2 = socket.alpnProtocol === "h2"; + if (isH2) { + if (!h2ExperimentalWarned) { + h2ExperimentalWarned = true; + process.emitWarning("H2 support is experimental, expect them to change at any time.", { + code: "UNDICI-H2" + }); + } + const session = http22.connect(client[kUrl], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }); + client[kHTTPConnVersion] = "h2"; + session[kClient] = client; + session[kSocket] = socket; + session.on("error", onHttp2SessionError); + session.on("frameError", onHttp2FrameError); + session.on("end", onHttp2SessionEnd); + session.on("goaway", onHTTP2GoAway); + session.on("close", onSocketClose); + session.unref(); + client[kHTTP2Session] = session; + socket[kHTTP2Session] = session; + } else { + if (!llhttpInstance) { + llhttpInstance = await llhttpPromise; + llhttpPromise = null; + } + socket[kNoRef] = false; + socket[kWriting] = false; + socket[kReset] = false; + socket[kBlocking] = false; + socket[kParser] = new Parser(client, socket, llhttpInstance); + } + socket[kCounter] = 0; + socket[kMaxRequests] = client[kMaxRequests]; + socket[kClient] = client; + socket[kError] = null; + socket.on("error", onSocketError).on("readable", onSocketReadable).on("end", onSocketEnd).on("close", onSocketClose); + client[kSocket] = socket; + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname: hostname2, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + socket + }); + } + client.emit("connect", client[kUrl], [client]); + } catch (err) { + if (client.destroyed) { + return; + } + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) { + channels.connectError.publish({ + connectParams: { + host, + hostname: hostname2, + protocol, + port, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); + } + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + assert(client[kRunning] === 0); + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request2 = client[kQueue][client[kPendingIdx]++]; + errorRequest2(client, request2, err); + } + } else { + onError(client, err); + } + client.emit("connectionError", client[kUrl], [client], err); + } + resume2(client); } - } - - function checkFinished () { - if (nends === 0 && finished && !boy._done) { - finished = false - self.end() + function emitDrain(client) { + client[kNeedDrain] = 0; + client.emit("drain", client[kUrl], [client]); } - } - - if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } - - const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) - const filesLimit = getLimit(limits, 'files', Infinity) - const fieldsLimit = getLimit(limits, 'fields', Infinity) - const partsLimit = getLimit(limits, 'parts', Infinity) - const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) - const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) - - 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, - maxHeaderPairs: headerPairsLimit, - maxHeaderSize: headerSizeLimit, - partHwm: fileOpts.highWaterMark, - highWaterMark: cfg.highWaterMark - } - - this.parser = new Dicer(parserCfg) - this.parser.on('drain', function () { - self._needDrain = false - if (self._cb && !self._pause) { - const cb = self._cb - self._cb = undefined - cb() + function resume2(client, sync) { + if (client[kResuming] === 2) { + return; + } + client[kResuming] = 2; + _resume(client, sync); + client[kResuming] = 0; + if (client[kRunningIdx] > 256) { + client[kQueue].splice(0, client[kRunningIdx]); + client[kPendingIdx] -= client[kRunningIdx]; + client[kRunningIdx] = 0; + } } - }).on('part', function onPart (part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener('part', onPart) - self.parser.on('part', skipPart) - boy.hitPartsLimit = true - boy.emit('partsLimit') - return 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 = parseParams(header['content-type'][0]) - if (parsed[0]) { - contype = parsed[0].toLowerCase() - for (i = 0, len = parsed.length; i < len; ++i) { - if (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 = parseParams(header['content-disposition'][0]) - if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } - for (i = 0, len = parsed.length; i < len; ++i) { - if (RE_NAME.test(parsed[i][0])) { - fieldname = parsed[i][1] - } else if (RE_FILENAME.test(parsed[i][0])) { - filename = parsed[i][1] - if (!preservePath) { filename = basename(filename) } + function _resume(client, sync) { + while (true) { + if (client.destroyed) { + assert(client[kPending] === 0); + return; + } + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve](); + client[kClosedResolve] = null; + return; + } + const socket = client[kSocket]; + if (socket && !socket.destroyed && socket.alpnProtocol !== "h2") { + if (client[kSize] === 0) { + if (!socket[kNoRef] && socket.unref) { + socket.unref(); + socket[kNoRef] = true; + } + } else if (socket[kNoRef] && socket.ref) { + socket.ref(); + socket[kNoRef] = false; + } + if (client[kSize] === 0) { + if (socket[kParser].timeoutType !== TIMEOUT_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE); + } + } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { + if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { + const request3 = client[kQueue][client[kRunningIdx]]; + const headersTimeout = request3.headersTimeout != null ? request3.headersTimeout : client[kHeadersTimeout]; + socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); + } } } - } else { return 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 skipPart(part) - } - - ++nfiles - - if (boy.listenerCount('file') === 0) { - self.parser._ignore() - return + if (client[kBusy]) { + client[kNeedDrain] = 2; + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1; + process.nextTick(emitDrain, client); + } else { + emitDrain(client); + } + continue; } - - ++nends - const file = new 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() + if (client[kPending] === 0) { + return; + } + if (client[kRunning] >= (client[kPipelining] || 1)) { + return; + } + const request2 = client[kQueue][client[kPendingIdx]]; + if (client[kUrl].protocol === "https:" && client[kServerName] !== request2.servername) { + if (client[kRunning] > 0) { + return; } - }) - file._read = function (n) { - if (!self._pause) { return } - self._pause = false - if (self._cb && !self._needDrain) { - const cb = self._cb - self._cb = undefined - cb() + client[kServerName] = request2.servername; + if (socket && socket.servername !== request2.servername) { + util2.destroy(socket, new InformationalError("servername changed")); + return; } } - 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 + if (client[kConnecting]) { + return; } - - onEnd = function () { - curFile = undefined - file.push(null) + if (!socket && !client[kHTTP2Session]) { + connect3(client); + return; } - } else { - // non-file field - if (nfields === fieldsLimit) { - if (!boy.hitFieldsLimit) { - boy.hitFieldsLimit = true - boy.emit('fieldsLimit') - } - return 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 = decodeText(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() - }) -} - -Multipart.prototype.write = function (chunk, cb) { - const r = this.parser.write(chunk) - if (r && !this._pause) { - cb() - } else { - this._needDrain = !r - this._cb = cb - } -} - -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 skipPart (part) { - part.resume() -} - -function FileStream (opts) { - Readable.call(this, opts) - - this.bytesRead = 0 - - this.truncated = false -} - -inherits(FileStream, Readable) - -FileStream.prototype._read = function (n) {} - -module.exports = Multipart - - -/***/ }), - -/***/ 31724: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const Decoder = __nccwpck_require__(70393) -const decodeText = __nccwpck_require__(3772) -const getLimit = __nccwpck_require__(31954) - -const RE_CHARSET = /^charset$/i - -UrlEncoded.detect = /^application\/x-www-form-urlencoded/i -function UrlEncoded (boy, cfg) { - const limits = cfg.limits - const parsedConType = cfg.parsedConType - this.boy = boy - - this.fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) - this.fieldNameSizeLimit = getLimit(limits, 'fieldNameSize', 100) - this.fieldsLimit = getLimit(limits, 'fields', Infinity) - - let charset - for (var i = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var - if (Array.isArray(parsedConType[i]) && - RE_CHARSET.test(parsedConType[i][0])) { - charset = parsedConType[i][1].toLowerCase() - break + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return; + } + if (client[kRunning] > 0 && !request2.idempotent) { + return; + } + if (client[kRunning] > 0 && (request2.upgrade || request2.method === "CONNECT")) { + return; + } + if (client[kRunning] > 0 && util2.bodyLength(request2.body) !== 0 && (util2.isStream(request2.body) || util2.isAsyncIterable(request2.body))) { + return; + } + if (!request2.aborted && write(client, request2)) { + client[kPendingIdx]++; + } else { + client[kQueue].splice(client[kPendingIdx], 1); + } + } } - } - - if (charset === undefined) { charset = cfg.defCharset || 'utf8' } - - this.decoder = new Decoder() - 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 -} - -UrlEncoded.prototype.write = function (data, cb) { - if (this._fields === this.fieldsLimit) { - if (!this.boy.hitFieldsLimit) { - this.boy.hitFieldsLimit = true - this.boy.emit('fieldsLimit') + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } - 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 } + function write(client, request2) { + if (client[kHTTPConnVersion] === "h2") { + writeH2(client, client[kHTTP2Session], request2); + return; } - - 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', decodeText(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 + const { body, method, path: path2, host, upgrade, headers, blocking, reset } = request2; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") { + body.read(0); + } + const bodyLength = util2.bodyLength(body); + let contentLength = bodyLength; + if (contentLength === null) { + contentLength = request2.contentLength; + } + if (contentLength === 0 && !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest2(client, request2, new RequestContentLengthMismatchError()); + return false; } + process.emitWarning(new RequestContentLengthMismatchError()); + } + const socket = client[kSocket]; + try { + request2.onConnect((err) => { + if (request2.aborted || request2.completed) { + return; + } + errorRequest2(client, request2, err || new RequestAbortedError()); + util2.destroy(socket, new InformationalError("aborted")); + }); + } catch (err) { + errorRequest2(client, request2, err); + } + if (request2.aborted) { + return false; + } + if (method === "HEAD") { + socket[kReset] = true; + } + if (upgrade || method === "CONNECT") { + socket[kReset] = true; + } + if (reset != null) { + socket[kReset] = reset; + } + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { + socket[kReset] = true; + } + if (blocking) { + socket[kBlocking] = true; + } + let header = `${method} ${path2} HTTP/1.1\r +`; + if (typeof host === "string") { + header += `host: ${host}\r +`; + } else { + header += client[kHostHeader]; + } + if (upgrade) { + header += `connection: upgrade\r +upgrade: ${upgrade}\r +`; + } else if (client[kPipelining] && !socket[kReset]) { + header += "connection: keep-alive\r\n"; } else { - if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } - p = len + header += "connection: close\r\n"; } - } 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', decodeText(this._key, 'binary', this.charset), - decodeText(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 + if (headers) { + header += headers; + } + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request: request2, headers: header, socket }); + } + if (!body || bodyLength === 0) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + assert(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r +`, "latin1"); + } + request2.onRequestSent(); + } else if (util2.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + socket.cork(); + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + socket.write(body); + socket.uncork(); + request2.onBodySent(body); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + } else if (util2.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable({ body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload }); + } else { + writeBlob({ body, client, request: request2, socket, contentLength, header, expectsPayload }); } + } else if (util2.isStream(body)) { + writeStream({ body, client, request: request2, socket, contentLength, header, expectsPayload }); + } else if (util2.isIterable(body)) { + writeIterable({ body, client, request: request2, socket, contentLength, header, expectsPayload }); } else { - if (p < len) { this._val += this.decoder.write(data.toString('binary', p)) } - p = len + assert(false); } + return true; } - } - cb() -} - -UrlEncoded.prototype.end = function () { - if (this.boy._done) { return } - - if (this._state === 'key' && this._key.length > 0) { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - '', - this._keyTrunc, - false) - } else if (this._state === 'val') { - this.boy.emit('field', decodeText(this._key, 'binary', this.charset), - decodeText(this._val, 'binary', this.charset), - this._keyTrunc, - this._valTrunc) - } - this.boy._done = true - this.boy.emit('finish') -} - -module.exports = UrlEncoded - - -/***/ }), - -/***/ 70393: -/***/ ((module) => { - -"use strict"; - - -const RE_PLUS = /\+/g - -const 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 Decoder () { - this.buffer = undefined -} -Decoder.prototype.write = function (str) { - // Replace '+' with ' ' before decoding - str = str.replace(RE_PLUS, ' ') - let res = '' - let i = 0; let p = 0; const len = str.length - for (; i < len; ++i) { - if (this.buffer !== undefined) { - if (!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 + function writeH2(client, session, request2) { + const { body, method, path: path2, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + let headers; + if (typeof reqHeaders === "string") headers = Request2[kHTTP2CopyHeaders](reqHeaders.trim()); + else headers = reqHeaders; + if (upgrade) { + errorRequest2(client, request2, new Error("Upgrade not supported for H2")); + return false; + } + try { + request2.onConnect((err) => { + if (request2.aborted || request2.completed) { + return; + } + errorRequest2(client, request2, err || new RequestAbortedError()); + }); + } catch (err) { + errorRequest2(client, request2, err); + } + if (request2.aborted) { + return false; + } + let stream; + const h2State = client[kHTTP2SessionState]; + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]; + headers[HTTP2_HEADER_METHOD] = method; + if (method === "CONNECT") { + session.ref(); + stream = session.request(headers, { endStream: false, signal }); + if (stream.id && !stream.pending) { + request2.onUpgrade(null, null, stream); + ++h2State.openStreams; + } else { + stream.once("ready", () => { + request2.onUpgrade(null, null, stream); + ++h2State.openStreams; + }); } + stream.once("close", () => { + h2State.openStreams -= 1; + if (h2State.openStreams === 0) session.unref(); + }); + return true; } - } else if (str[i] === '%') { - if (i > p) { - res += str.substring(p, i) - p = i + headers[HTTP2_HEADER_PATH] = path2; + headers[HTTP2_HEADER_SCHEME] = "https"; + const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; + if (body && typeof body.read === "function") { + body.read(0); } - this.buffer = '' - ++p - } - } - if (p < len && this.buffer === undefined) { res += str.substring(p) } - return res -} -Decoder.prototype.reset = function () { - this.buffer = undefined -} - -module.exports = Decoder - - -/***/ }), - -/***/ 14935: -/***/ ((module) => { - -"use strict"; - - -module.exports = function basename (path) { - if (typeof path !== 'string') { return '' } - for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var - switch (path.charCodeAt(i)) { - case 0x2F: // '/' - case 0x5C: // '\' - path = path.slice(i + 1) - return (path === '..' || path === '.' ? '' : path) - } - } - return (path === '..' || path === '.' ? '' : path) -} - - -/***/ }), - -/***/ 3772: -/***/ (function(module) { - -"use strict"; - - -// Node has always utf-8 -const utf8Decoder = new TextDecoder('utf-8') -const textDecoders = new Map([ - ['utf-8', utf8Decoder], - ['utf8', utf8Decoder] -]) - -function getDecoder (charset) { - let lc - while (true) { - switch (charset) { - case 'utf-8': - case 'utf8': - return decoders.utf8 - case 'latin1': - case 'ascii': // TODO: Make these a separate, strict decoder? - 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 decoders.latin1 - case 'utf16le': - case 'utf-16le': - case 'ucs2': - case 'ucs-2': - return decoders.utf16le - case 'base64': - return decoders.base64 - default: - if (lc === undefined) { - lc = true - charset = charset.toLowerCase() - continue + let contentLength = util2.bodyLength(body); + if (contentLength == null) { + contentLength = request2.contentLength; + } + if (contentLength === 0 || !expectsPayload) { + contentLength = null; + } + if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest2(client, request2, new RequestContentLengthMismatchError()); + return false; } - return decoders.other.bind(charset) - } - } -} - -const 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 (textDecoders.has(this.toString())) { - try { - return textDecoders.get(this).decode(data) - } catch {} - } - return typeof data === 'string' - ? data - : data.toString() - } -} - -function decodeText (text, sourceEncoding, destEncoding) { - if (text) { - return getDecoder(destEncoding)(text, sourceEncoding) - } - return text -} - -module.exports = decodeText - - -/***/ }), - -/***/ 31954: -/***/ ((module) => { - -"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] -} - - -/***/ }), - -/***/ 66812: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable object-property-newline */ - - -const decodeText = __nccwpck_require__(3772) - -const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g - -const EncodedLookup = { - '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', - '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', - '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', - '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%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': '\x20', - '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', - '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', - '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', - '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', - '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', - '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', - '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', - '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', - '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', - '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', - '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', - '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', - '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', - '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', - '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', - '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', - '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', - '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', - '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', - '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', - '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', - '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', - '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', - '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', - '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', - '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%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 encodedReplacer (match) { - return EncodedLookup[match] -} - -const STATE_KEY = 0 -const STATE_VALUE = 1 -const STATE_CHARSET = 2 -const STATE_LANG = 3 - -function parseParams (str) { - const res = [] - let state = 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) { // eslint-disable-line no-var - 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 = STATE_KEY - } else { inquote = true } - continue - } else { escaping = false } - } else { - if (escaping && inquote) { tmp += '\\' } - escaping = false - if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { - if (state === STATE_CHARSET) { - state = STATE_LANG - charset = tmp.substring(1) - } else { state = STATE_VALUE } - tmp = '' - continue - } else if (state === STATE_KEY && - (char === '*' || char === '=') && - res.length) { - state = char === '*' - ? STATE_CHARSET - : STATE_VALUE - res[p] = [tmp, undefined] - tmp = '' - continue - } else if (!inquote && char === ';') { - state = STATE_KEY - if (charset) { - if (tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } - charset = '' - } else if (tmp.length) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } - tmp = '' - ++p - continue - } else if (!inquote && (char === ' ' || char === '\t')) { continue } - } - tmp += char - } - if (charset && tmp.length) { - tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), - 'binary', - charset) - } else if (tmp) { - tmp = decodeText(tmp, 'binary', 'utf8') - } - - if (res[p] === undefined) { - if (tmp) { res[p] = tmp } - } else { res[p][1] = tmp } - - return res -} - -module.exports = parseParams - - -/***/ }), - -/***/ 33627: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -/** - * @module LRUCache - */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.LRUCache = void 0; -const perf = typeof performance === 'object' && - performance && - typeof performance.now === 'function' - ? performance - : Date; -const warned = new Set(); -/* c8 ignore start */ -const PROCESS = (typeof process === 'object' && !!process ? process : {}); -/* c8 ignore start */ -const emitWarning = (msg, type, code, fn) => { - typeof PROCESS.emitWarning === 'function' - ? PROCESS.emitWarning(msg, type, code, fn) - : console.error(`[${code}] ${type}: ${msg}`); -}; -let AC = globalThis.AbortController; -let AS = globalThis.AbortSignal; -/* c8 ignore start */ -if (typeof AC === 'undefined') { - //@ts-ignore - AS = class AbortSignal { - onabort; - _onabort = []; - reason; - aborted = false; - addEventListener(_, fn) { - this._onabort.push(fn); + process.emitWarning(new RequestContentLengthMismatchError()); + } + if (contentLength != null) { + assert(body, "no body must not have content length"); + headers[HTTP2_HEADER_CONTENT_LENGTH] = `${contentLength}`; + } + session.ref(); + const shouldEndStream = method === "GET" || method === "HEAD"; + if (expectContinue) { + headers[HTTP2_HEADER_EXPECT] = "100-continue"; + stream = session.request(headers, { endStream: shouldEndStream, signal }); + stream.once("continue", writeBodyH2); + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }); + writeBodyH2(); + } + ++h2State.openStreams; + stream.once("response", (headers2) => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + if (request2.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) { + stream.pause(); } - }; - //@ts-ignore - AC = class AbortController { - constructor() { - warnACPolyfill(); + }); + stream.once("end", () => { + request2.onComplete([]); + }); + stream.on("data", (chunk) => { + if (request2.onData(chunk) === false) { + stream.pause(); } - signal = new AS(); - abort(reason) { - if (this.signal.aborted) - return; - //@ts-ignore - this.signal.reason = reason; - //@ts-ignore - this.signal.aborted = true; - //@ts-ignore - for (const fn of this.signal._onabort) { - fn(reason); - } - this.signal.onabort?.(reason); + }); + stream.once("close", () => { + h2State.openStreams -= 1; + if (h2State.openStreams === 0) { + session.unref(); } - }; - let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1'; - const warnACPolyfill = () => { - if (!printACPolyfillWarning) - return; - printACPolyfillWarning = false; - emitWarning('AbortController is not defined. If using lru-cache in ' + - 'node 14, load an AbortController polyfill from the ' + - '`node-abort-controller` package. A minimal polyfill is ' + - 'provided for use by LRUCache.fetch(), but it should not be ' + - 'relied upon in other contexts (eg, passing it to other APIs that ' + - 'use AbortController/AbortSignal might have undesirable effects). ' + - 'You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.', 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill); - }; -} -/* c8 ignore stop */ -const shouldWarn = (code) => !warned.has(code); -const TYPE = Symbol('type'); -const isPosInt = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n); -/* c8 ignore start */ -// This is a little bit ridiculous, tbh. -// The maximum array length is 2^32-1 or thereabouts on most JS impls. -// And well before that point, you're caching the entire world, I mean, -// that's ~32GB of just integers for the next/prev links, plus whatever -// else to hold that many keys and values. Just filling the memory with -// zeroes at init time is brutal when you get that big. -// But why not be complete? -// Maybe in the future, these limits will have expanded. -const getUintArray = (max) => !isPosInt(max) - ? null - : max <= Math.pow(2, 8) - ? Uint8Array - : max <= Math.pow(2, 16) - ? Uint16Array - : max <= Math.pow(2, 32) - ? Uint32Array - : max <= Number.MAX_SAFE_INTEGER - ? ZeroArray - : null; -/* c8 ignore stop */ -class ZeroArray extends Array { - constructor(size) { - super(size); - this.fill(0); - } -} -class Stack { - heap; - length; - // private constructor - static #constructing = false; - static create(max) { - const HeapCls = getUintArray(max); - if (!HeapCls) - return []; - Stack.#constructing = true; - const s = new Stack(max, HeapCls); - Stack.#constructing = false; - return s; - } - constructor(max, HeapCls) { - /* c8 ignore start */ - if (!Stack.#constructing) { - throw new TypeError('instantiate Stack using Stack.create(n)'); + }); + stream.once("error", function(err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1; + util2.destroy(stream, err); } - /* c8 ignore stop */ - this.heap = new HeapCls(max); - this.length = 0; - } - push(n) { - this.heap[this.length++] = n; - } - pop() { - return this.heap[--this.length]; + }); + stream.once("frameError", (type2, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type2}, code ${code}`); + errorRequest2(client, request2, err); + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1; + util2.destroy(stream, err); + } + }); + return true; + function writeBodyH2() { + if (!body) { + request2.onRequestSent(); + } else if (util2.isBuffer(body)) { + assert(contentLength === body.byteLength, "buffer body must have content length"); + stream.cork(); + stream.write(body); + stream.uncork(); + stream.end(); + request2.onBodySent(body); + request2.onRequestSent(); + } else if (util2.isBlobLike(body)) { + if (typeof body.stream === "function") { + writeIterable({ + client, + request: request2, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: "" + }); + } else { + writeBlob({ + body, + client, + request: request2, + contentLength, + expectsPayload, + h2stream: stream, + header: "", + socket: client[kSocket] + }); + } + } else if (util2.isStream(body)) { + writeStream({ + body, + client, + request: request2, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: "" + }); + } else if (util2.isIterable(body)) { + writeIterable({ + body, + client, + request: request2, + contentLength, + expectsPayload, + header: "", + h2stream: stream, + socket: client[kSocket] + }); + } else { + assert(false); + } + } } -} -/** - * Default export, the thing you're using this module to get. - * - * The `K` and `V` types define the key and value types, respectively. The - * optional `FC` type defines the type of the `context` object passed to - * `cache.fetch()` and `cache.memo()`. - * - * Keys and values **must not** be `null` or `undefined`. - * - * All properties from the options object (with the exception of `max`, - * `maxSize`, `fetchMethod`, `memoMethod`, `dispose` and `disposeAfter`) are - * added as normal public members. (The listed options are read-only getters.) - * - * Changing any of these will alter the defaults for subsequent method calls. - */ -class LRUCache { - // options that cannot be changed without disaster - #max; - #maxSize; - #dispose; - #disposeAfter; - #fetchMethod; - #memoMethod; - /** - * {@link LRUCache.OptionsBase.ttl} - */ - ttl; - /** - * {@link LRUCache.OptionsBase.ttlResolution} - */ - ttlResolution; - /** - * {@link LRUCache.OptionsBase.ttlAutopurge} - */ - ttlAutopurge; - /** - * {@link LRUCache.OptionsBase.updateAgeOnGet} - */ - updateAgeOnGet; - /** - * {@link LRUCache.OptionsBase.updateAgeOnHas} - */ - updateAgeOnHas; - /** - * {@link LRUCache.OptionsBase.allowStale} - */ - allowStale; - /** - * {@link LRUCache.OptionsBase.noDisposeOnSet} - */ - noDisposeOnSet; - /** - * {@link LRUCache.OptionsBase.noUpdateTTL} - */ - noUpdateTTL; - /** - * {@link LRUCache.OptionsBase.maxEntrySize} - */ - maxEntrySize; - /** - * {@link LRUCache.OptionsBase.sizeCalculation} - */ - sizeCalculation; - /** - * {@link LRUCache.OptionsBase.noDeleteOnFetchRejection} - */ - noDeleteOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.noDeleteOnStaleGet} - */ - noDeleteOnStaleGet; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchAbort} - */ - allowStaleOnFetchAbort; - /** - * {@link LRUCache.OptionsBase.allowStaleOnFetchRejection} - */ - allowStaleOnFetchRejection; - /** - * {@link LRUCache.OptionsBase.ignoreFetchAbort} - */ - ignoreFetchAbort; - // computed properties - #size; - #calculatedSize; - #keyMap; - #keyList; - #valList; - #next; - #prev; - #head; - #tail; - #free; - #disposed; - #sizes; - #starts; - #ttls; - #hasDispose; - #hasFetchMethod; - #hasDisposeAfter; - /** - * Do not call this method unless you need to inspect the - * inner workings of the cache. If anything returned by this - * object is modified in any way, strange breakage may occur. - * - * These fields are private for a reason! - * - * @internal - */ - static unsafeExposeInternals(c) { - return { - // properties - starts: c.#starts, - ttls: c.#ttls, - sizes: c.#sizes, - keyMap: c.#keyMap, - keyList: c.#keyList, - valList: c.#valList, - next: c.#next, - prev: c.#prev, - get head() { - return c.#head; - }, - get tail() { - return c.#tail; - }, - free: c.#free, - // methods - isBackgroundFetch: (p) => c.#isBackgroundFetch(p), - backgroundFetch: (k, index, options, context) => c.#backgroundFetch(k, index, options, context), - moveToTail: (index) => c.#moveToTail(index), - indexes: (options) => c.#indexes(options), - rindexes: (options) => c.#rindexes(options), - isStale: (index) => c.#isStale(index), + function writeStream({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); + if (client[kHTTPConnVersion] === "h2") { + let onPipeData = function(chunk) { + request2.onBodySent(chunk); }; + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util2.destroy(body, err); + util2.destroy(h2stream, err); + } else { + request2.onRequestSent(); + } + } + ); + pipe.on("data", onPipeData); + pipe.once("end", () => { + pipe.removeListener("data", onPipeData); + util2.destroy(pipe); + }); + return; + } + let finished = false; + const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); + const onData = function(chunk) { + if (finished) { + return; + } + try { + if (!writer.write(chunk) && this.pause) { + this.pause(); + } + } catch (err) { + util2.destroy(this, err); + } + }; + const onDrain = function() { + if (finished) { + return; + } + if (body.resume) { + body.resume(); + } + }; + const onAbort = function() { + if (finished) { + return; + } + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); + }; + const onFinished = function(err) { + if (finished) { + return; + } + finished = true; + assert(socket.destroyed || socket[kWriting] && client[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")) { + util2.destroy(body, err); + } else { + util2.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); } - // Protected read-only members - /** - * {@link LRUCache.OptionsBase.max} (read-only) - */ - get max() { - return this.#max; - } - /** - * {@link LRUCache.OptionsBase.maxSize} (read-only) - */ - get maxSize() { - return this.#maxSize; - } - /** - * The total computed size of items in the cache (read-only) - */ - get calculatedSize() { - return this.#calculatedSize; - } - /** - * The number of items stored in the cache (read-only) - */ - get size() { - return this.#size; - } - /** - * {@link LRUCache.OptionsBase.fetchMethod} (read-only) - */ - get fetchMethod() { - return this.#fetchMethod; - } - get memoMethod() { - return this.#memoMethod; - } - /** - * {@link LRUCache.OptionsBase.dispose} (read-only) - */ - get dispose() { - return this.#dispose; - } - /** - * {@link LRUCache.OptionsBase.disposeAfter} (read-only) - */ - get disposeAfter() { - return this.#disposeAfter; + async function writeBlob({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + assert(contentLength === body.size, "blob body must have content length"); + const isH2 = client[kHTTPConnVersion] === "h2"; + try { + if (contentLength != null && contentLength !== body.size) { + throw new 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 +\r +`, "latin1"); + socket.write(buffer); + socket.uncork(); + } + request2.onBodySent(buffer); + request2.onRequestSent(); + if (!expectsPayload) { + socket[kReset] = true; + } + resume2(client); + } catch (err) { + util2.destroy(isH2 ? h2stream : socket, err); + } } - constructor(options) { - const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, } = options; - if (max !== 0 && !isPosInt(max)) { - throw new TypeError('max option must be a nonnegative integer'); + async function writeIterable({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined"); + let callback = null; + function onDrain() { + if (callback) { + const cb = callback; + callback = null; + cb(); } - const UintArray = max ? getUintArray(max) : Array; - if (!UintArray) { - throw new Error('invalid max value: ' + max); + } + const waitForDrain = () => new Promise((resolve4, reject) => { + assert(callback === null); + if (socket[kError]) { + reject(socket[kError]); + } else { + callback = resolve4; } - this.#max = max; - this.#maxSize = maxSize; - this.maxEntrySize = maxEntrySize || this.#maxSize; - this.sizeCalculation = sizeCalculation; - if (this.sizeCalculation) { - if (!this.#maxSize && !this.maxEntrySize) { - throw new TypeError('cannot set sizeCalculation without setting maxSize or maxEntrySize'); + }); + if (client[kHTTPConnVersion] === "h2") { + h2stream.on("close", onDrain).on("drain", onDrain); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; } - if (typeof this.sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation set to non-function'); + const res = h2stream.write(chunk); + request2.onBodySent(chunk); + if (!res) { + await waitForDrain(); } + } + } catch (err) { + h2stream.destroy(err); + } finally { + request2.onRequestSent(); + h2stream.end(); + h2stream.off("close", onDrain).off("drain", onDrain); } - if (memoMethod !== undefined && - typeof memoMethod !== 'function') { - throw new TypeError('memoMethod must be a function if defined'); + return; + } + socket.on("close", onDrain).on("drain", onDrain); + const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); + try { + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError]; + } + if (!writer.write(chunk)) { + await waitForDrain(); + } } - this.#memoMethod = memoMethod; - if (fetchMethod !== undefined && - typeof fetchMethod !== 'function') { - throw new TypeError('fetchMethod must be a function if specified'); + writer.end(); + } catch (err) { + writer.destroy(err); + } finally { + socket.off("close", onDrain).off("drain", onDrain); + } + } + var AsyncWriter = class { + constructor({ socket, request: request2, contentLength, client, expectsPayload, header }) { + this.socket = socket; + this.request = request2; + this.contentLength = contentLength; + this.client = client; + this.bytesWritten = 0; + this.expectsPayload = expectsPayload; + this.header = header; + socket[kWriting] = true; + } + write(chunk) { + const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; + if (socket[kError]) { + throw socket[kError]; } - this.#fetchMethod = fetchMethod; - this.#hasFetchMethod = !!fetchMethod; - this.#keyMap = new Map(); - this.#keyList = new Array(max).fill(undefined); - this.#valList = new Array(max).fill(undefined); - this.#next = new UintArray(max); - this.#prev = new UintArray(max); - this.#head = 0; - this.#tail = 0; - this.#free = Stack.create(max); - this.#size = 0; - this.#calculatedSize = 0; - if (typeof dispose === 'function') { - this.#dispose = dispose; + if (socket.destroyed) { + return false; } - if (typeof disposeAfter === 'function') { - this.#disposeAfter = disposeAfter; - this.#disposed = []; + const len = Buffer.byteLength(chunk); + if (!len) { + return true; } - else { - this.#disposeAfter = undefined; - this.#disposed = undefined; + if (contentLength !== null && bytesWritten + len > contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } + process.emitWarning(new RequestContentLengthMismatchError()); } - this.#hasDispose = !!this.#dispose; - this.#hasDisposeAfter = !!this.#disposeAfter; - this.noDisposeOnSet = !!noDisposeOnSet; - this.noUpdateTTL = !!noUpdateTTL; - this.noDeleteOnFetchRejection = !!noDeleteOnFetchRejection; - this.allowStaleOnFetchRejection = !!allowStaleOnFetchRejection; - this.allowStaleOnFetchAbort = !!allowStaleOnFetchAbort; - this.ignoreFetchAbort = !!ignoreFetchAbort; - // NB: maxEntrySize is set to maxSize if it's set - if (this.maxEntrySize !== 0) { - if (this.#maxSize !== 0) { - if (!isPosInt(this.#maxSize)) { - throw new TypeError('maxSize must be a positive integer if specified'); - } - } - if (!isPosInt(this.maxEntrySize)) { - throw new TypeError('maxEntrySize must be a positive integer if specified'); - } - this.#initializeSizeTracking(); + socket.cork(); + if (bytesWritten === 0) { + if (!expectsPayload) { + socket[kReset] = true; + } + if (contentLength === null) { + socket.write(`${header}transfer-encoding: chunked\r +`, "latin1"); + } else { + socket.write(`${header}content-length: ${contentLength}\r +\r +`, "latin1"); + } } - this.allowStale = !!allowStale; - this.noDeleteOnStaleGet = !!noDeleteOnStaleGet; - this.updateAgeOnGet = !!updateAgeOnGet; - this.updateAgeOnHas = !!updateAgeOnHas; - this.ttlResolution = - isPosInt(ttlResolution) || ttlResolution === 0 - ? ttlResolution - : 1; - this.ttlAutopurge = !!ttlAutopurge; - this.ttl = ttl || 0; - if (this.ttl) { - if (!isPosInt(this.ttl)) { - throw new TypeError('ttl must be a positive integer if specified'); + if (contentLength === null) { + socket.write(`\r +${len.toString(16)}\r +`, "latin1"); + } + this.bytesWritten += len; + const ret = socket.write(chunk); + socket.uncork(); + request2.onBodySent(chunk); + if (!ret) { + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); } - this.#initializeTTLTracking(); + } } - // do not allow completely unbounded caches - if (this.#max === 0 && this.ttl === 0 && this.#maxSize === 0) { - throw new TypeError('At least one of max, maxSize, or ttl is required'); + return ret; + } + end() { + const { socket, contentLength, client, bytesWritten, expectsPayload, header, request: request2 } = this; + request2.onRequestSent(); + socket[kWriting] = false; + if (socket[kError]) { + throw socket[kError]; } - if (!this.ttlAutopurge && !this.#max && !this.#maxSize) { - const code = 'LRU_CACHE_UNBOUNDED'; - if (shouldWarn(code)) { - warned.add(code); - const msg = 'TTL caching without ttlAutopurge, max, or maxSize can ' + - 'result in unbounded memory consumption.'; - emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache); - } + if (socket.destroyed) { + return; } + if (bytesWritten === 0) { + if (expectsPayload) { + socket.write(`${header}content-length: 0\r +\r +`, "latin1"); + } else { + socket.write(`${header}\r +`, "latin1"); + } + } else if (contentLength === null) { + socket.write("\r\n0\r\n\r\n", "latin1"); + } + if (contentLength !== null && bytesWritten !== contentLength) { + if (client[kStrictContentLength]) { + throw new RequestContentLengthMismatchError(); + } else { + process.emitWarning(new RequestContentLengthMismatchError()); + } + } + if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { + if (socket[kParser].timeout.refresh) { + socket[kParser].timeout.refresh(); + } + } + resume2(client); + } + destroy(err) { + const { socket, client } = this; + socket[kWriting] = false; + if (err) { + assert(client[kRunning] <= 1, "pipeline should only contain this request"); + util2.destroy(socket, err); + } + } + }; + function errorRequest2(client, request2, err) { + try { + request2.onError(err); + assert(request2.aborted); + } catch (err2) { + client.emit("error", err2); + } } - /** - * Return the number of ms left in the item's TTL. If item is not in cache, - * returns `0`. Returns `Infinity` if item is in cache without a defined TTL. - */ - getRemainingTTL(key) { - return this.#keyMap.has(key) ? Infinity : 0; - } - #initializeTTLTracking() { - const ttls = new ZeroArray(this.#max); - const starts = new ZeroArray(this.#max); - this.#ttls = ttls; - this.#starts = starts; - this.#setItemTTL = (index, ttl, start = perf.now()) => { - starts[index] = ttl !== 0 ? start : 0; - ttls[index] = ttl; - if (ttl !== 0 && this.ttlAutopurge) { - const t = setTimeout(() => { - if (this.#isStale(index)) { - this.#delete(this.#keyList[index], 'expire'); - } - }, ttl + 1); - // unref() not supported on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ + module2.exports = Client; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/node/fixed-queue.js +var require_fixed_queue = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/node/fixed-queue.js"(exports2, module2) { + "use strict"; + var kSize = 2048; + var kMask = kSize - 1; + var FixedCircularBuffer = class { + constructor() { + this.bottom = 0; + this.top = 0; + this.list = new Array(kSize); + this.next = null; + } + isEmpty() { + return this.top === this.bottom; + } + isFull() { + return (this.top + 1 & kMask) === this.bottom; + } + push(data) { + this.list[this.top] = data; + this.top = this.top + 1 & kMask; + } + shift() { + const nextItem = this.list[this.bottom]; + if (nextItem === void 0) + return null; + this.list[this.bottom] = void 0; + this.bottom = this.bottom + 1 & kMask; + return nextItem; + } + }; + module2.exports = class FixedQueue { + constructor() { + this.head = this.tail = new FixedCircularBuffer(); + } + isEmpty() { + return this.head.isEmpty(); + } + push(data) { + if (this.head.isFull()) { + this.head = this.head.next = new FixedCircularBuffer(); + } + this.head.push(data); + } + shift() { + const tail = this.tail; + const next = tail.shift(); + if (tail.isEmpty() && tail.next !== null) { + this.tail = tail.next; + } + return next; + } + }; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool-stats.js +var require_pool_stats = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool-stats.js"(exports2, module2) { + var { kFree, kConnected, kPending, kQueued, kRunning, kSize } = require_symbols3(); + var kPool = Symbol("pool"); + var PoolStats = class { + constructor(pool) { + this[kPool] = pool; + } + get connected() { + return this[kPool][kConnected]; + } + get free() { + return this[kPool][kFree]; + } + get pending() { + return this[kPool][kPending]; + } + get queued() { + return this[kPool][kQueued]; + } + get running() { + return this[kPool][kRunning]; + } + get size() { + return this[kPool][kSize]; + } + }; + module2.exports = PoolStats; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool-base.js +var require_pool_base = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool-base.js"(exports2, module2) { + "use strict"; + var DispatcherBase = require_dispatcher_base(); + var FixedQueue = require_fixed_queue(); + var { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = require_symbols3(); + var PoolStats = require_pool_stats(); + var kClients = Symbol("clients"); + var kNeedDrain = Symbol("needDrain"); + var kQueue = Symbol("queue"); + var kClosedResolve = Symbol("closed resolve"); + var kOnDrain = Symbol("onDrain"); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kGetDispatcher = Symbol("get dispatcher"); + var kAddClient = Symbol("add client"); + var kRemoveClient = Symbol("remove client"); + var kStats = Symbol("stats"); + var PoolBase = class extends DispatcherBase { + constructor() { + super(); + this[kQueue] = new FixedQueue(); + this[kClients] = []; + this[kQueued] = 0; + const pool = this; + this[kOnDrain] = function onDrain(origin, targets) { + const queue = pool[kQueue]; + let needDrain = false; + while (!needDrain) { + const item = queue.shift(); + if (!item) { + break; } + pool[kQueued]--; + needDrain = !this.dispatch(item.opts, item.handler); + } + this[kNeedDrain] = needDrain; + if (!this[kNeedDrain] && pool[kNeedDrain]) { + pool[kNeedDrain] = false; + pool.emit("drain", origin, [pool, ...targets]); + } + if (pool[kClosedResolve] && queue.isEmpty()) { + Promise.all(pool[kClients].map((c) => c.close())).then(pool[kClosedResolve]); + } }; - this.#updateItemAge = index => { - starts[index] = ttls[index] !== 0 ? perf.now() : 0; + this[kOnConnect] = (origin, targets) => { + pool.emit("connect", origin, [pool, ...targets]); }; - this.#statusTTL = (status, index) => { - if (ttls[index]) { - const ttl = ttls[index]; - const start = starts[index]; - /* c8 ignore next */ - if (!ttl || !start) - return; - status.ttl = ttl; - status.start = start; - status.now = cachedNow || getNow(); - const age = status.now - start; - status.remainingTTL = ttl - age; + this[kOnDisconnect] = (origin, targets, err) => { + pool.emit("disconnect", origin, [pool, ...targets], err); + }; + this[kOnConnectionError] = (origin, targets, err) => { + pool.emit("connectionError", origin, [pool, ...targets], err); + }; + this[kStats] = new PoolStats(this); + } + get [kBusy]() { + return this[kNeedDrain]; + } + get [kConnected]() { + return this[kClients].filter((client) => client[kConnected]).length; + } + get [kFree]() { + return this[kClients].filter((client) => client[kConnected] && !client[kNeedDrain]).length; + } + get [kPending]() { + let ret = this[kQueued]; + for (const { [kPending]: pending } of this[kClients]) { + ret += pending; + } + return ret; + } + get [kRunning]() { + let ret = 0; + for (const { [kRunning]: running } of this[kClients]) { + ret += running; + } + return ret; + } + get [kSize]() { + let ret = this[kQueued]; + for (const { [kSize]: size } of this[kClients]) { + ret += size; + } + return ret; + } + get stats() { + return this[kStats]; + } + async [kClose]() { + if (this[kQueue].isEmpty()) { + return Promise.all(this[kClients].map((c) => c.close())); + } else { + return new Promise((resolve4) => { + this[kClosedResolve] = resolve4; + }); + } + } + async [kDestroy](err) { + while (true) { + const item = this[kQueue].shift(); + if (!item) { + break; + } + item.handler.onError(err); + } + return Promise.all(this[kClients].map((c) => c.destroy(err))); + } + [kDispatch](opts, handler2) { + const dispatcher = this[kGetDispatcher](); + if (!dispatcher) { + this[kNeedDrain] = true; + this[kQueue].push({ opts, handler: handler2 }); + this[kQueued]++; + } else if (!dispatcher.dispatch(opts, handler2)) { + dispatcher[kNeedDrain] = true; + this[kNeedDrain] = !this[kGetDispatcher](); + } + return !this[kNeedDrain]; + } + [kAddClient](client) { + client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].push(client); + if (this[kNeedDrain]) { + process.nextTick(() => { + if (this[kNeedDrain]) { + this[kOnDrain](client[kUrl], [this, client]); + } + }); + } + return this; + } + [kRemoveClient](client) { + client.close(() => { + const idx = this[kClients].indexOf(client); + if (idx !== -1) { + this[kClients].splice(idx, 1); + } + }); + this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); + } + }; + module2.exports = { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + }; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool.js +var require_pool = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/pool.js"(exports2, module2) { + "use strict"; + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher + } = require_pool_base(); + var Client = require_client(); + var { + InvalidArgumentError + } = require_errors3(); + var util2 = require_util2(); + var { kUrl, kInterceptors } = require_symbols3(); + var buildConnector = require_connect(); + var kOptions = Symbol("options"); + var kConnections = Symbol("connections"); + var kFactory = Symbol("factory"); + function defaultFactory(origin, opts) { + return new Client(origin, opts); + } + var Pool = class extends PoolBase { + constructor(origin, { + connections, + factory = defaultFactory, + connect: connect3, + connectTimeout, + tls: tls2, + maxCachedSessions, + socketPath, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + allowH2, + ...options2 + } = {}) { + super(); + if (connections != null && (!Number.isFinite(connections) || connections < 0)) { + throw new InvalidArgumentError("invalid connections"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect3 != null && typeof connect3 !== "function" && typeof connect3 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (typeof connect3 !== "function") { + connect3 = buildConnector({ + ...tls2, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...util2.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, + ...connect3 + }); + } + this[kInterceptors] = options2.interceptors && options2.interceptors.Pool && Array.isArray(options2.interceptors.Pool) ? options2.interceptors.Pool : []; + this[kConnections] = connections || null; + this[kUrl] = util2.parseOrigin(origin); + this[kOptions] = { ...util2.deepClone(options2), connect: connect3, allowH2 }; + this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; + this[kFactory] = factory; + } + [kGetDispatcher]() { + let dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain]); + if (dispatcher) { + return dispatcher; + } + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + dispatcher = this[kFactory](this[kUrl], this[kOptions]); + this[kAddClient](dispatcher); + } + return dispatcher; + } + }; + module2.exports = Pool; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/balanced-pool.js +var require_balanced_pool = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/balanced-pool.js"(exports2, module2) { + "use strict"; + var { + BalancedPoolMissingUpstreamError, + InvalidArgumentError + } = require_errors3(); + var { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher + } = require_pool_base(); + var Pool = require_pool(); + var { kUrl, kInterceptors } = require_symbols3(); + var { parseOrigin } = require_util2(); + var kFactory = Symbol("factory"); + var kOptions = Symbol("options"); + var kGreatestCommonDivisor = Symbol("kGreatestCommonDivisor"); + var kCurrentWeight = Symbol("kCurrentWeight"); + var kIndex = Symbol("kIndex"); + var kWeight = Symbol("kWeight"); + var kMaxWeightPerServer = Symbol("kMaxWeightPerServer"); + var kErrorPenalty = Symbol("kErrorPenalty"); + function getGreatestCommonDivisor(a, b) { + if (b === 0) return a; + return getGreatestCommonDivisor(b, a % b); + } + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var BalancedPool = class extends PoolBase { + constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { + super(); + this[kOptions] = opts; + this[kIndex] = -1; + this[kCurrentWeight] = 0; + this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; + this[kErrorPenalty] = this[kOptions].errorPenalty || 15; + if (!Array.isArray(upstreams)) { + upstreams = [upstreams]; + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + this[kInterceptors] = opts.interceptors && opts.interceptors.BalancedPool && Array.isArray(opts.interceptors.BalancedPool) ? opts.interceptors.BalancedPool : []; + this[kFactory] = factory; + for (const upstream of upstreams) { + this.addUpstream(upstream); + } + this._updateBalancedPoolStats(); + } + addUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + if (this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true)) { + return this; + } + const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); + this[kAddClient](pool); + pool.on("connect", () => { + pool[kWeight] = Math.min(this[kMaxWeightPerServer], pool[kWeight] + this[kErrorPenalty]); + }); + pool.on("connectionError", () => { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + }); + pool.on("disconnect", (...args) => { + const err = args[2]; + if (err && err.code === "UND_ERR_SOCKET") { + pool[kWeight] = Math.max(1, pool[kWeight] - this[kErrorPenalty]); + this._updateBalancedPoolStats(); + } + }); + for (const client of this[kClients]) { + client[kWeight] = this[kMaxWeightPerServer]; + } + this._updateBalancedPoolStats(); + return this; + } + _updateBalancedPoolStats() { + this[kGreatestCommonDivisor] = this[kClients].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0); + } + removeUpstream(upstream) { + const upstreamOrigin = parseOrigin(upstream).origin; + const pool = this[kClients].find((pool2) => pool2[kUrl].origin === upstreamOrigin && pool2.closed !== true && pool2.destroyed !== true); + if (pool) { + this[kRemoveClient](pool); + } + return this; + } + get upstreams() { + return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); + } + [kGetDispatcher]() { + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError(); + } + const dispatcher = this[kClients].find((dispatcher2) => !dispatcher2[kNeedDrain] && dispatcher2.closed !== true && dispatcher2.destroyed !== true); + if (!dispatcher) { + return; + } + const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); + if (allClientsBusy) { + return; + } + let counter = 0; + let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); + while (counter++ < this[kClients].length) { + this[kIndex] = (this[kIndex] + 1) % this[kClients].length; + const pool = this[kClients][this[kIndex]]; + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex]; + } + if (this[kIndex] === 0) { + this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; + if (this[kCurrentWeight] <= 0) { + this[kCurrentWeight] = this[kMaxWeightPerServer]; } - }; - // debounce calls to perf.now() to 1s so we're not hitting - // that costly call repeatedly. - let cachedNow = 0; - const getNow = () => { - const n = perf.now(); - if (this.ttlResolution > 0) { - cachedNow = n; - const t = setTimeout(() => (cachedNow = 0), this.ttlResolution); - // not available on all platforms - /* c8 ignore start */ - if (t.unref) { - t.unref(); - } - /* c8 ignore stop */ + } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { + return pool; + } + } + this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; + this[kIndex] = maxWeightIndex; + return this[kClients][maxWeightIndex]; + } + }; + module2.exports = BalancedPool; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/compat/dispatcher-weakref.js +var require_dispatcher_weakref = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/compat/dispatcher-weakref.js"(exports2, module2) { + "use strict"; + var { kConnected, kSize } = require_symbols3(); + var CompatWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; + } + }; + var CompatFinalizer = class { + constructor(finalizer) { + this.finalizer = finalizer; + } + register(dispatcher, key) { + if (dispatcher.on) { + dispatcher.on("disconnect", () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key); } - return n; + }); + } + } + }; + module2.exports = function() { + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer }; - this.getRemainingTTL = key => { - const index = this.#keyMap.get(key); - if (index === undefined) { - return 0; - } - const ttl = ttls[index]; - const start = starts[index]; - if (!ttl || !start) { - return Infinity; + } + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + }; + }; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/agent.js +var require_agent = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/agent.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError } = require_errors3(); + var { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = require_symbols3(); + var DispatcherBase = require_dispatcher_base(); + var Pool = require_pool(); + var Client = require_client(); + var util2 = require_util2(); + var createRedirectInterceptor = require_redirectInterceptor(); + var { WeakRef: WeakRef2, FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); + var kOnConnect = Symbol("onConnect"); + var kOnDisconnect = Symbol("onDisconnect"); + var kOnConnectionError = Symbol("onConnectionError"); + var kMaxRedirections = Symbol("maxRedirections"); + var kOnDrain = Symbol("onDrain"); + var kFactory = Symbol("factory"); + var kFinalizer = Symbol("finalizer"); + var kOptions = Symbol("options"); + function defaultFactory(origin, opts) { + return opts && opts.connections === 1 ? new Client(origin, opts) : new Pool(origin, opts); + } + var Agent3 = class extends DispatcherBase { + constructor({ factory = defaultFactory, maxRedirections = 0, connect: connect3, ...options2 } = {}) { + super(); + if (typeof factory !== "function") { + throw new InvalidArgumentError("factory must be a function."); + } + if (connect3 != null && typeof connect3 !== "function" && typeof connect3 !== "object") { + throw new InvalidArgumentError("connect must be a function or an object"); + } + if (!Number.isInteger(maxRedirections) || maxRedirections < 0) { + throw new InvalidArgumentError("maxRedirections must be a positive number"); + } + if (connect3 && typeof connect3 !== "function") { + connect3 = { ...connect3 }; + } + this[kInterceptors] = options2.interceptors && options2.interceptors.Agent && Array.isArray(options2.interceptors.Agent) ? options2.interceptors.Agent : [createRedirectInterceptor({ maxRedirections })]; + this[kOptions] = { ...util2.deepClone(options2), connect: connect3 }; + this[kOptions].interceptors = options2.interceptors ? { ...options2.interceptors } : void 0; + this[kMaxRedirections] = maxRedirections; + this[kFactory] = factory; + this[kClients] = /* @__PURE__ */ new Map(); + this[kFinalizer] = new FinalizationRegistry2( + /* istanbul ignore next: gc is undeterministic */ + (key) => { + const ref = this[kClients].get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this[kClients].delete(key); } - const age = (cachedNow || getNow()) - start; - return ttl - age; - }; - this.#isStale = index => { - const s = starts[index]; - const t = ttls[index]; - return !!t && !!s && (cachedNow || getNow()) - s > t; + } + ); + const agent = this; + this[kOnDrain] = (origin, targets) => { + agent.emit("drain", origin, [agent, ...targets]); }; - } - // conditionally set private methods related to TTL - #updateItemAge = () => { }; - #statusTTL = () => { }; - #setItemTTL = () => { }; - /* c8 ignore stop */ - #isStale = () => false; - #initializeSizeTracking() { - const sizes = new ZeroArray(this.#max); - this.#calculatedSize = 0; - this.#sizes = sizes; - this.#removeItemSize = index => { - this.#calculatedSize -= sizes[index]; - sizes[index] = 0; + this[kOnConnect] = (origin, targets) => { + agent.emit("connect", origin, [agent, ...targets]); }; - this.#requireSize = (k, v, size, sizeCalculation) => { - // provisionally accept background fetches. - // actual value size will be checked when they return. - if (this.#isBackgroundFetch(v)) { - return 0; - } - if (!isPosInt(size)) { - if (sizeCalculation) { - if (typeof sizeCalculation !== 'function') { - throw new TypeError('sizeCalculation must be a function'); - } - size = sizeCalculation(v, k); - if (!isPosInt(size)) { - throw new TypeError('sizeCalculation return invalid (expect positive integer)'); - } - } - else { - throw new TypeError('invalid size value (must be positive integer). ' + - 'When maxSize or maxEntrySize is used, sizeCalculation ' + - 'or size must be set.'); - } - } - return size; + this[kOnDisconnect] = (origin, targets, err) => { + agent.emit("disconnect", origin, [agent, ...targets], err); }; - this.#addItemSize = (index, size, status) => { - sizes[index] = size; - if (this.#maxSize) { - const maxSize = this.#maxSize - sizes[index]; - while (this.#calculatedSize > maxSize) { - this.#evict(true); - } - } - this.#calculatedSize += sizes[index]; - if (status) { - status.entrySize = size; - status.totalCalculatedSize = this.#calculatedSize; - } + this[kOnConnectionError] = (origin, targets, err) => { + agent.emit("connectionError", origin, [agent, ...targets], err); }; - } - #removeItemSize = _i => { }; - #addItemSize = (_i, _s, _st) => { }; - #requireSize = (_k, _v, size, sizeCalculation) => { - if (size || sizeCalculation) { - throw new TypeError('cannot set size without setting maxSize or maxEntrySize on cache'); + } + get [kRunning]() { + let ret = 0; + for (const ref of this[kClients].values()) { + const client = ref.deref(); + if (client) { + ret += client[kRunning]; + } } - return 0; + return ret; + } + [kDispatch](opts, handler2) { + let key; + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { + key = String(opts.origin); + } else { + throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + } + const ref = this[kClients].get(key); + let dispatcher = ref ? ref.deref() : null; + if (!dispatcher) { + dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); + this[kClients].set(key, new WeakRef2(dispatcher)); + this[kFinalizer].register(dispatcher, key); + } + return dispatcher.dispatch(opts, handler2); + } + async [kClose]() { + const closePromises = []; + for (const ref of this[kClients].values()) { + const client = ref.deref(); + if (client) { + closePromises.push(client.close()); + } + } + await Promise.all(closePromises); + } + async [kDestroy](err) { + const destroyPromises = []; + for (const ref of this[kClients].values()) { + const client = ref.deref(); + if (client) { + destroyPromises.push(client.destroy(err)); + } + } + await Promise.all(destroyPromises); + } }; - *#indexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#tail; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#head) { - break; - } - else { - i = this.#prev[i]; - } - } + module2.exports = Agent3; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/readable.js +var require_readable2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/readable.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var { Readable: Readable2 } = __require("stream"); + var { RequestAbortedError, NotSupportedError, InvalidArgumentError } = require_errors3(); + var util2 = require_util2(); + var { ReadableStreamFrom, toUSVString } = require_util2(); + var Blob2; + var kConsume = Symbol("kConsume"); + var kReading = Symbol("kReading"); + var kBody = Symbol("kBody"); + var kAbort = Symbol("abort"); + var kContentType = Symbol("kContentType"); + var noop3 = () => { + }; + module2.exports = class BodyReadable extends Readable2 { + constructor({ + resume: resume2, + abort, + contentType = "", + highWaterMark = 64 * 1024 + // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume2, + highWaterMark + }); + this._readableState.dataEmitted = false; + this[kAbort] = abort; + this[kConsume] = null; + this[kBody] = null; + this[kContentType] = contentType; + this[kReading] = false; + } + destroy(err) { + if (this.destroyed) { + return this; } - } - *#rindexes({ allowStale = this.allowStale } = {}) { - if (this.#size) { - for (let i = this.#head; true;) { - if (!this.#isValidIndex(i)) { - break; - } - if (allowStale || !this.#isStale(i)) { - yield i; - } - if (i === this.#tail) { - break; - } - else { - i = this.#next[i]; - } - } + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); } - } - #isValidIndex(index) { - return (index !== undefined && - this.#keyMap.get(this.#keyList[index]) === index); - } - /** - * Return a generator yielding `[key, value]` pairs, - * in order from most recently used to least recently used. - */ - *entries() { - for (const i of this.#indexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } + if (err) { + this[kAbort](); } - } - /** - * Inverse order version of {@link LRUCache.entries} - * - * Return a generator yielding `[key, value]` pairs, - * in order from least recently used to most recently used. - */ - *rentries() { - for (const i of this.#rindexes()) { - if (this.#valList[i] !== undefined && - this.#keyList[i] !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield [this.#keyList[i], this.#valList[i]]; - } + return super.destroy(err); + } + emit(ev, ...args) { + if (ev === "data") { + this._readableState.dataEmitted = true; + } else if (ev === "error") { + this._readableState.errorEmitted = true; } - } - /** - * Return a generator yielding the keys in the cache, - * in order from most recently used to least recently used. - */ - *keys() { - for (const i of this.#indexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } + return super.emit(ev, ...args); + } + on(ev, ...args) { + if (ev === "data" || ev === "readable") { + this[kReading] = true; } - } - /** - * Inverse order version of {@link LRUCache.keys} - * - * Return a generator yielding the keys in the cache, - * in order from least recently used to most recently used. - */ - *rkeys() { - for (const i of this.#rindexes()) { - const k = this.#keyList[i]; - if (k !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield k; - } + 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[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; } - } - /** - * Return a generator yielding the values in the cache, - * in order from most recently used to least recently used. - */ - *values() { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; - } + return ret; + } + removeListener(ev, ...args) { + return this.off(ev, ...args); + } + push(chunk) { + if (this[kConsume] && chunk !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk); + return this[kReading] ? super.push(chunk) : true; } - } - /** - * Inverse order version of {@link LRUCache.values} - * - * Return a generator yielding the values in the cache, - * in order from least recently used to most recently used. - */ - *rvalues() { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - if (v !== undefined && - !this.#isBackgroundFetch(this.#valList[i])) { - yield this.#valList[i]; + return super.push(chunk); + } + // https://fetch.spec.whatwg.org/#dom-body-text + async text() { + return consume(this, "text"); + } + // https://fetch.spec.whatwg.org/#dom-body-json + async json() { + return consume(this, "json"); + } + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob() { + return consume(this, "blob"); + } + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer() { + return consume(this, "arrayBuffer"); + } + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData() { + throw new NotSupportedError(); + } + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed() { + return util2.isDisturbed(this); + } + // https://fetch.spec.whatwg.org/#dom-body-body + get body() { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this); + if (this[kConsume]) { + this[kBody].getReader(); + assert(this[kBody].locked); + } + } + return this[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 InvalidArgumentError("signal must be an AbortSignal"); } + util2.throwIfAborted(signal); + } catch (err) { + return Promise.reject(err); + } } + if (this.closed) { + return Promise.resolve(null); + } + return new Promise((resolve4, reject) => { + const signalListenerCleanup = signal ? util2.addAbortListener(signal, () => { + this.destroy(); + }) : noop3; + this.on("close", function() { + signalListenerCleanup(); + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); + } else { + resolve4(null); + } + }).on("error", noop3).on("data", function(chunk) { + limit -= chunk.length; + if (limit <= 0) { + this.destroy(); + } + }).resume(); + }); + } + }; + function isLocked(self2) { + return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; + } + function isUnusable(self2) { + return util2.isDisturbed(self2) || isLocked(self2); + } + async function consume(stream, type2) { + if (isUnusable(stream)) { + throw new TypeError("unusable"); + } + assert(!stream[kConsume]); + return new Promise((resolve4, reject) => { + stream[kConsume] = { + type: type2, + stream, + resolve: resolve4, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) { + consumeFinish(this[kConsume], new RequestAbortedError()); + } + }); + process.nextTick(consumeStart, stream[kConsume]); + }); } - /** - * Iterating over the cache itself yields the same results as - * {@link LRUCache.entries} - */ - [Symbol.iterator]() { - return this.entries(); + function consumeStart(consume2) { + if (consume2.body === null) { + return; + } + const { _readableState: state } = consume2.stream; + for (const chunk of state.buffer) { + consumePush(consume2, chunk); + } + if (state.endEmitted) { + consumeEnd(this[kConsume]); + } else { + consume2.stream.on("end", function() { + consumeEnd(this[kConsume]); + }); + } + consume2.stream.resume(); + while (consume2.stream.read() != null) { + } } - /** - * A String value that is used in the creation of the default string - * description of an object. Called by the built-in method - * `Object.prototype.toString`. - */ - [Symbol.toStringTag] = 'LRUCache'; - /** - * Find a value for which the supplied fn method returns a truthy value, - * similar to `Array.find()`. fn is called as `fn(value, key, cache)`. - */ - find(fn, getOptions = {}) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - if (fn(value, this.#keyList[i], this)) { - return this.get(this.#keyList[i], getOptions); - } - } - } - /** - * Call the supplied function on each item in the cache, in order from most - * recently used to least recently used. - * - * `fn` is called as `fn(value, key, cache)`. - * - * If `thisp` is provided, function will be called in the `this`-context of - * the provided object, or the cache if no `thisp` object is provided. - * - * Does not update age or recenty of use, or iterate over stale values. - */ - forEach(fn, thisp = this) { - for (const i of this.#indexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); + function consumeEnd(consume2) { + const { type: type2, body, resolve: resolve4, stream, length } = consume2; + try { + if (type2 === "text") { + resolve4(toUSVString(Buffer.concat(body))); + } else if (type2 === "json") { + resolve4(JSON.parse(Buffer.concat(body))); + } else if (type2 === "arrayBuffer") { + const dst = new Uint8Array(length); + let pos = 0; + for (const buf of body) { + dst.set(buf, pos); + pos += buf.byteLength; + } + resolve4(dst.buffer); + } else if (type2 === "blob") { + if (!Blob2) { + Blob2 = __require("buffer").Blob; + } + resolve4(new Blob2(body, { type: stream[kContentType] })); } + consumeFinish(consume2); + } catch (err) { + stream.destroy(err); + } } - /** - * The same as {@link LRUCache.forEach} but items are iterated over in - * reverse order. (ie, less recently used items are iterated over first.) - */ - rforEach(fn, thisp = this) { - for (const i of this.#rindexes()) { - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - continue; - fn.call(thisp, value, this.#keyList[i], this); - } + function consumePush(consume2, chunk) { + consume2.length += chunk.length; + consume2.body.push(chunk); } - /** - * Delete any stale entries. Returns true if anything was removed, - * false otherwise. - */ - purgeStale() { - let deleted = false; - for (const i of this.#rindexes({ allowStale: true })) { - if (this.#isStale(i)) { - this.#delete(this.#keyList[i], 'expire'); - deleted = true; - } - } - return deleted; + function consumeFinish(consume2, err) { + if (consume2.body === null) { + return; + } + if (err) { + consume2.reject(err); + } else { + consume2.resolve(); + } + consume2.type = null; + consume2.stream = null; + consume2.resolve = null; + consume2.reject = null; + consume2.length = 0; + consume2.body = null; } - /** - * Get the extended info about a given entry, to get its value, size, and - * TTL info simultaneously. Returns `undefined` if the key is not present. - * - * Unlike {@link LRUCache#dump}, which is designed to be portable and survive - * serialization, the `start` value is always the current timestamp, and the - * `ttl` is a calculated remaining time to live (negative if expired). - * - * Always returns stale values, if their info is found in the cache, so be - * sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl}) - * if relevant. - */ - info(key) { - const i = this.#keyMap.get(key); - if (i === undefined) - return undefined; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined) - return undefined; - const entry = { value }; - if (this.#ttls && this.#starts) { - const ttl = this.#ttls[i]; - const start = this.#starts[i]; - if (ttl && start) { - const remain = ttl - (perf.now() - start); - entry.ttl = remain; - entry.start = Date.now(); - } + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/util.js +var require_util4 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/util.js"(exports2, module2) { + var assert = __require("assert"); + var { + ResponseStatusCodeError + } = require_errors3(); + var { toUSVString } = require_util2(); + async function getResolveErrorBodyCallback({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(body); + let chunks = []; + let limit = 0; + for await (const chunk of body) { + chunks.push(chunk); + limit += chunk.length; + if (limit > 128 * 1024) { + chunks = null; + break; } - if (this.#sizes) { - entry.size = this.#sizes[i]; + } + if (statusCode === 204 || !contentType || !chunks) { + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); + return; + } + try { + if (contentType.startsWith("application/json")) { + const payload = JSON.parse(toUSVString(Buffer.concat(chunks))); + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); + return; } - return entry; - } - /** - * Return an array of [key, {@link LRUCache.Entry}] tuples which can be - * passed to {@link LRUCache#load}. - * - * The `start` fields are calculated relative to a portable `Date.now()` - * timestamp, even if `performance.now()` is available. - * - * Stale entries are always included in the `dump`, even if - * {@link LRUCache.OptionsBase.allowStale} is false. - * - * Note: this returns an actual array, not a generator, so it can be more - * easily passed around. - */ - dump() { - const arr = []; - for (const i of this.#indexes({ allowStale: true })) { - const key = this.#keyList[i]; - const v = this.#valList[i]; - const value = this.#isBackgroundFetch(v) - ? v.__staleWhileFetching - : v; - if (value === undefined || key === undefined) - continue; - const entry = { value }; - if (this.#ttls && this.#starts) { - entry.ttl = this.#ttls[i]; - // always dump the start relative to a portable timestamp - // it's ok for this to be a bit slow, it's a rare operation. - const age = perf.now() - this.#starts[i]; - entry.start = Math.floor(Date.now() - age); - } - if (this.#sizes) { - entry.size = this.#sizes[i]; - } - arr.unshift([key, entry]); + if (contentType.startsWith("text/")) { + const payload = toUSVString(Buffer.concat(chunks)); + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers, payload)); + return; } - return arr; + } catch (err) { + } + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ""}`, statusCode, headers)); } - /** - * Reset the cache and load in the items in entries in the order listed. - * - * The shape of the resulting cache may be different if the same options are - * not used in both caches. - * - * The `start` fields are assumed to be calculated relative to a portable - * `Date.now()` timestamp, even if `performance.now()` is available. - */ - load(arr) { - this.clear(); - for (const [key, entry] of arr) { - if (entry.start) { - // entry.start is a portable timestamp, but we may be using - // node's performance.now(), so calculate the offset, so that - // we get the intended remaining TTL, no matter how long it's - // been on ice. - // - // it's ok for this to be a bit slow, it's a rare operation. - const age = Date.now() - entry.start; - entry.start = perf.now() - age; - } - this.set(key, entry.value, entry); - } - } - /** - * Add a value to the cache. - * - * Note: if `undefined` is specified as a value, this is an alias for - * {@link LRUCache#delete} - * - * Fields on the {@link LRUCache.SetOptions} options param will override - * their corresponding values in the constructor options for the scope - * of this single `set()` operation. - * - * If `start` is provided, then that will set the effective start - * time for the TTL calculation. Note that this must be a previous - * value of `performance.now()` if supported, or a previous value of - * `Date.now()` if not. - * - * Options object may also include `size`, which will prevent - * calling the `sizeCalculation` function and just use the specified - * number if it is a positive integer, and `noDisposeOnSet` which - * will prevent calling a `dispose` function in the case of - * overwrites. - * - * If the `size` (or return value of `sizeCalculation`) for a given - * entry is greater than `maxEntrySize`, then the item will not be - * added to the cache. - * - * Will update the recency of the entry. - * - * If the value is `undefined`, then this is an alias for - * `cache.delete(key)`. `undefined` is never stored in the cache. - */ - set(k, v, setOptions = {}) { - if (v === undefined) { - this.delete(k); - return this; + module2.exports = { getResolveErrorBodyCallback }; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/abort-signal.js +var require_abort_signal = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/abort-signal.js"(exports2, module2) { + var { addAbortListener } = require_util2(); + var { RequestAbortedError } = require_errors3(); + var kListener = Symbol("kListener"); + var kSignal = Symbol("kSignal"); + function abort(self2) { + if (self2.abort) { + self2.abort(); + } else { + self2.onError(new RequestAbortedError()); + } + } + function addSignal(self2, signal) { + self2[kSignal] = null; + self2[kListener] = null; + if (!signal) { + return; + } + if (signal.aborted) { + abort(self2); + return; + } + self2[kSignal] = signal; + self2[kListener] = () => { + abort(self2); + }; + addAbortListener(self2[kSignal], self2[kListener]); + } + function removeSignal(self2) { + if (!self2[kSignal]) { + return; + } + if ("removeEventListener" in self2[kSignal]) { + self2[kSignal].removeEventListener("abort", self2[kListener]); + } else { + self2[kSignal].removeListener("abort", self2[kListener]); + } + self2[kSignal] = null; + self2[kListener] = null; + } + module2.exports = { + addSignal, + removeSignal + }; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-request.js +var require_api_request = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-request.js"(exports2, module2) { + "use strict"; + var Readable2 = require_readable2(); + var { + InvalidArgumentError, + RequestAbortedError + } = require_errors3(); + var util2 = require_util2(); + var { getResolveErrorBodyCallback } = require_util4(); + var { AsyncResource } = __require("async_hooks"); + var { addSignal, removeSignal } = require_abort_signal(); + var RequestHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError, highWaterMark } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { + throw new InvalidArgumentError("invalid highWaterMark"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_REQUEST"); + } catch (err) { + if (util2.isStream(body)) { + util2.destroy(body.on("error", util2.nop), err); + } + throw err; } - const { ttl = this.ttl, start, noDisposeOnSet = this.noDisposeOnSet, sizeCalculation = this.sizeCalculation, status, } = setOptions; - let { noUpdateTTL = this.noUpdateTTL } = setOptions; - const size = this.#requireSize(k, v, setOptions.size || 0, sizeCalculation); - // if the item doesn't fit, don't do anything - // NB: maxEntrySize set to maxSize by default - if (this.maxEntrySize && size > this.maxEntrySize) { - if (status) { - status.set = 'miss'; - status.maxEntrySizeExceeded = true; - } - // have to delete, in case something is there already. - this.#delete(k, 'set'); - return this; + 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 (util2.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); } - let index = this.#size === 0 ? undefined : this.#keyMap.get(k); - if (index === undefined) { - // addition - index = (this.#size === 0 - ? this.#tail - : this.#free.length !== 0 - ? this.#free.pop() - : this.#size === this.#max - ? this.#evict(false) - : this.#size); - this.#keyList[index] = k; - this.#valList[index] = v; - this.#keyMap.set(k, index); - this.#next[this.#tail] = index; - this.#prev[index] = this.#tail; - this.#tail = index; - this.#size++; - this.#addItemSize(index, size, status); - if (status) - status.set = 'add'; - noUpdateTTL = false; + addSignal(this, signal); + } + onConnect(abort, context) { + if (!this.callback) { + throw new RequestAbortedError(); } - else { - // update - this.#moveToTail(index); - const oldVal = this.#valList[index]; - if (v !== oldVal) { - if (this.#hasFetchMethod && this.#isBackgroundFetch(oldVal)) { - oldVal.__abortController.abort(new Error('replaced')); - const { __staleWhileFetching: s } = oldVal; - if (s !== undefined && !noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(s, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([s, k, 'set']); - } - } - } - else if (!noDisposeOnSet) { - if (this.#hasDispose) { - this.#dispose?.(oldVal, k, 'set'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([oldVal, k, 'set']); - } - } - this.#removeItemSize(index); - this.#addItemSize(index, size, status); - this.#valList[index] = v; - if (status) { - status.set = 'replace'; - const oldValue = oldVal && this.#isBackgroundFetch(oldVal) - ? oldVal.__staleWhileFetching - : oldVal; - if (oldValue !== undefined) - status.oldValue = oldValue; - } - } - else if (status) { - status.set = 'update'; - } + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume2, statusMessage) { + const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; + const headers = responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; } - if (ttl !== 0 && !this.#ttls) { - this.#initializeTTLTracking(); + const parsedHeaders = responseHeaders === "raw" ? util2.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + const body = new Readable2({ resume: resume2, abort, contentType, highWaterMark }); + this.callback = null; + this.res = body; + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope( + getResolveErrorBodyCallback, + null, + { callback, body, contentType, statusCode, statusMessage, headers } + ); + } else { + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + trailers: this.trailers, + opaque, + body, + context + }); + } } - if (this.#ttls) { - if (!noUpdateTTL) { - this.#setItemTTL(index, ttl, start); - } - if (status) - this.#statusTTL(status, index); + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + util2.parseHeaders(trailers, this.trailers); + res.push(null); + } + onError(err) { + const { res, callback, body, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); } - if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } + if (res) { + this.res = null; + queueMicrotask(() => { + util2.destroy(res, err); + }); } - return this; - } - /** - * Evict the least recently used item, returning its value or - * `undefined` if cache is empty. - */ - pop() { - try { - while (this.#size) { - const val = this.#valList[this.#head]; - this.#evict(true); - if (this.#isBackgroundFetch(val)) { - if (val.__staleWhileFetching) { - return val.__staleWhileFetching; - } - } - else if (val !== undefined) { - return val; - } - } + if (body) { + this.body = null; + util2.destroy(body, err); } - finally { - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } - } + } + }; + function request2(opts, callback) { + if (callback === void 0) { + return new Promise((resolve4, reject) => { + request2.call(this, opts, (err, data) => { + return err ? reject(err) : resolve4(data); + }); + }); + } + try { + this.dispatch(opts, new RequestHandler(opts, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; } + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - #evict(free) { - const head = this.#head; - const k = this.#keyList[head]; - const v = this.#valList[head]; - if (this.#hasFetchMethod && this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('evicted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, 'evict'); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, 'evict']); - } + module2.exports = request2; + module2.exports.RequestHandler = RequestHandler; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-stream.js +var require_api_stream = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-stream.js"(exports2, module2) { + "use strict"; + var { finished, PassThrough } = __require("stream"); + var { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError + } = require_errors3(); + var util2 = require_util2(); + var { getResolveErrorBodyCallback } = require_util4(); + var { AsyncResource } = __require("async_hooks"); + var { addSignal, removeSignal } = require_abort_signal(); + var StreamHandler = class extends AsyncResource { + constructor(opts, factory, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + const { signal, method, opaque, body, onInfo, responseHeaders, throwOnError } = opts; + try { + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + if (typeof factory !== "function") { + throw new InvalidArgumentError("invalid factory"); + } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_STREAM"); + } catch (err) { + if (util2.isStream(body)) { + util2.destroy(body.on("error", util2.nop), err); + } + throw err; } - this.#removeItemSize(head); - // if we aren't about to use the index, then null these out - if (free) { - this.#keyList[head] = undefined; - this.#valList[head] = undefined; - this.#free.push(head); + 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 (util2.isStream(body)) { + body.on("error", (err) => { + this.onError(err); + }); } - if (this.#size === 1) { - this.#head = this.#tail = 0; - this.#free.length = 0; + addSignal(this, signal); + } + onConnect(abort, context) { + if (!this.callback) { + throw new RequestAbortedError(); } - else { - this.#head = this.#next[head]; + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume2, statusMessage) { + const { factory, opaque, context, callback, responseHeaders } = this; + const headers = responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); + if (statusCode < 200) { + if (this.onInfo) { + this.onInfo({ statusCode, headers }); + } + return; } - this.#keyMap.delete(k); - this.#size--; - return head; - } - /** - * Check if a key is in the cache, without updating the recency of use. - * Will return false if the item is stale, even though it is technically - * in the cache. - * - * Check if a key is in the cache, without updating the recency of - * use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set - * to `true` in either the options or the constructor. - * - * Will return `false` if the item is stale, even though it is technically in - * the cache. The difference can be determined (if it matters) by using a - * `status` argument, and inspecting the `has` field. - * - * Will not update item age unless - * {@link LRUCache.OptionsBase.updateAgeOnHas} is set. - */ - has(k, hasOptions = {}) { - const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v) && - v.__staleWhileFetching === undefined) { - return false; - } - if (!this.#isStale(index)) { - if (updateAgeOnHas) { - this.#updateItemAge(index); - } - if (status) { - status.has = 'hit'; - this.#statusTTL(status, index); - } - return true; + this.factory = null; + let res; + if (this.throwOnError && statusCode >= 400) { + const parsedHeaders = responseHeaders === "raw" ? util2.parseHeaders(rawHeaders) : headers; + const contentType = parsedHeaders["content-type"]; + res = new PassThrough(); + this.callback = null; + this.runInAsyncScope( + getResolveErrorBodyCallback, + null, + { callback, body: res, contentType, statusCode, statusMessage, headers } + ); + } else { + if (factory === null) { + return; + } + res = this.runInAsyncScope(factory, null, { + statusCode, + headers, + opaque, + context + }); + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { + throw new InvalidReturnValueError("expected Writable"); + } + finished(res, { readable: false }, (err) => { + const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; + this.res = null; + if (err || !res2.readable) { + util2.destroy(res2, err); } - else if (status) { - status.has = 'stale'; - this.#statusTTL(status, index); + this.callback = null; + this.runInAsyncScope(callback2, null, err || null, { opaque: opaque2, trailers }); + if (err) { + abort(); } + }); } - else if (status) { - status.has = 'miss'; + res.on("drain", resume2); + this.res = res; + const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; + return needDrain !== true; + } + onData(chunk) { + const { res } = this; + return res ? res.write(chunk) : true; + } + onComplete(trailers) { + const { res } = this; + removeSignal(this); + if (!res) { + return; } - return false; - } - /** - * Like {@link LRUCache#get} but doesn't update recency or delete stale - * items. - * - * Returns `undefined` if the item is stale, unless - * {@link LRUCache.OptionsBase.allowStale} is set. - */ - peek(k, peekOptions = {}) { - const { allowStale = this.allowStale } = peekOptions; - const index = this.#keyMap.get(k); - if (index === undefined || - (!allowStale && this.#isStale(index))) { - return; + this.trailers = util2.parseHeaders(trailers); + res.end(); + } + onError(err) { + const { res, callback, opaque, body } = this; + removeSignal(this); + this.factory = null; + if (res) { + this.res = null; + util2.destroy(res, err); + } else if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); } - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; - } - #backgroundFetch(k, index, options, context) { - const v = index === undefined ? undefined : this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - return v; + if (body) { + this.body = null; + util2.destroy(body, err); } - const ac = new AC(); - const { signal } = options; - // when/if our AC signals, then stop listening to theirs. - signal?.addEventListener('abort', () => ac.abort(signal.reason), { - signal: ac.signal, - }); - const fetchOpts = { - signal: ac.signal, - options, - context, - }; - const cb = (v, updateCache = false) => { - const { aborted } = ac.signal; - const ignoreAbort = options.ignoreFetchAbort && v !== undefined; - if (options.status) { - if (aborted && !updateCache) { - options.status.fetchAborted = true; - options.status.fetchError = ac.signal.reason; - if (ignoreAbort) - options.status.fetchAbortIgnored = true; - } - else { - options.status.fetchResolved = true; - } - } - if (aborted && !ignoreAbort && !updateCache) { - return fetchFail(ac.signal.reason); - } - // either we didn't abort, and are still here, or we did, and ignored - const bf = p; - if (this.#valList[index] === p) { - if (v === undefined) { - if (bf.__staleWhileFetching) { - this.#valList[index] = bf.__staleWhileFetching; - } - else { - this.#delete(k, 'fetch'); - } - } - else { - if (options.status) - options.status.fetchUpdated = true; - this.set(k, v, fetchOpts.options); - } - } - return v; - }; - const eb = (er) => { - if (options.status) { - options.status.fetchRejected = true; - options.status.fetchError = er; - } - return fetchFail(er); - }; - const fetchFail = (er) => { - const { aborted } = ac.signal; - const allowStaleAborted = aborted && options.allowStaleOnFetchAbort; - const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection; - const noDelete = allowStale || options.noDeleteOnFetchRejection; - const bf = p; - if (this.#valList[index] === p) { - // if we allow stale on fetch rejections, then we need to ensure that - // the stale value is not removed from the cache when the fetch fails. - const del = !noDelete || bf.__staleWhileFetching === undefined; - if (del) { - this.#delete(k, 'fetch'); - } - else if (!allowStaleAborted) { - // still replace the *promise* with the stale value, - // since we are done with the promise at this point. - // leave it untouched if we're still waiting for an - // aborted background fetch that hasn't yet returned. - this.#valList[index] = bf.__staleWhileFetching; - } - } - if (allowStale) { - if (options.status && bf.__staleWhileFetching !== undefined) { - options.status.returnedStale = true; - } - return bf.__staleWhileFetching; - } - else if (bf.__returned === bf) { - throw er; - } - }; - const pcall = (res, rej) => { - const fmp = this.#fetchMethod?.(k, v, fetchOpts); - if (fmp && fmp instanceof Promise) { - fmp.then(v => res(v === undefined ? undefined : v), rej); - } - // ignored, we go until we finish, regardless. - // defer check until we are actually aborting, - // so fetchMethod can override. - ac.signal.addEventListener('abort', () => { - if (!options.ignoreFetchAbort || - options.allowStaleOnFetchAbort) { - res(undefined); - // when it eventually resolves, update the cache. - if (options.allowStaleOnFetchAbort) { - res = v => cb(v, true); - } - } - }); - }; - if (options.status) - options.status.fetchDispatched = true; - const p = new Promise(pcall).then(cb, eb); - const bf = Object.assign(p, { - __abortController: ac, - __staleWhileFetching: v, - __returned: undefined, + } + }; + function stream(opts, factory, callback) { + if (callback === void 0) { + return new Promise((resolve4, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve4(data); + }); }); - if (index === undefined) { - // internal, don't expose status. - this.set(k, bf, { ...fetchOpts.options, status: undefined }); - index = this.#keyMap.get(k); - } - else { - this.#valList[index] = bf; + } + try { + this.dispatch(opts, new StreamHandler(opts, factory, callback)); + } catch (err) { + if (typeof callback !== "function") { + throw err; } - return bf; + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - #isBackgroundFetch(p) { - if (!this.#hasFetchMethod) - return false; - const b = p; - return (!!b && - b instanceof Promise && - b.hasOwnProperty('__staleWhileFetching') && - b.__abortController instanceof AC); - } - async fetch(k, fetchOptions = {}) { - const { - // get options - allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, - // set options - ttl = this.ttl, noDisposeOnSet = this.noDisposeOnSet, size = 0, sizeCalculation = this.sizeCalculation, noUpdateTTL = this.noUpdateTTL, - // fetch exclusive options - noDeleteOnFetchRejection = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection = this.allowStaleOnFetchRejection, ignoreFetchAbort = this.ignoreFetchAbort, allowStaleOnFetchAbort = this.allowStaleOnFetchAbort, context, forceRefresh = false, status, signal, } = fetchOptions; - if (!this.#hasFetchMethod) { - if (status) - status.fetch = 'get'; - return this.get(k, { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - status, - }); - } - const options = { - allowStale, - updateAgeOnGet, - noDeleteOnStaleGet, - ttl, - noDisposeOnSet, - size, - sizeCalculation, - noUpdateTTL, - noDeleteOnFetchRejection, - allowStaleOnFetchRejection, - allowStaleOnFetchAbort, - ignoreFetchAbort, - status, - signal, - }; - let index = this.#keyMap.get(k); - if (index === undefined) { - if (status) - status.fetch = 'miss'; - const p = this.#backgroundFetch(k, index, options, context); - return (p.__returned = p); + module2.exports = stream; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-pipeline.js +var require_api_pipeline = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-pipeline.js"(exports2, module2) { + "use strict"; + var { + Readable: Readable2, + Duplex, + PassThrough + } = __require("stream"); + var { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError + } = require_errors3(); + var util2 = require_util2(); + var { AsyncResource } = __require("async_hooks"); + var { addSignal, removeSignal } = require_abort_signal(); + var assert = __require("assert"); + var kResume = Symbol("resume"); + var PipelineRequest = class extends Readable2 { + constructor() { + super({ autoDestroy: true }); + this[kResume] = null; + } + _read() { + const { [kResume]: resume2 } = this; + if (resume2) { + this[kResume] = null; + resume2(); + } + } + _destroy(err, callback) { + this._read(); + callback(err); + } + }; + var PipelineResponse = class extends Readable2 { + constructor(resume2) { + super({ autoDestroy: true }); + this[kResume] = resume2; + } + _read() { + this[kResume](); + } + _destroy(err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError(); } - else { - // in cache, maybe already fetching - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - const stale = allowStale && v.__staleWhileFetching !== undefined; - if (status) { - status.fetch = 'inflight'; - if (stale) - status.returnedStale = true; - } - return stale ? v.__staleWhileFetching : (v.__returned = v); - } - // if we force a refresh, that means do NOT serve the cached value, - // unless we are already in the process of refreshing the cache. - const isStale = this.#isStale(index); - if (!forceRefresh && !isStale) { - if (status) - status.fetch = 'hit'; - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - if (status) - this.#statusTTL(status, index); - return v; - } - // ok, it is stale or a forced refresh, and not already fetching. - // refresh the cache. - const p = this.#backgroundFetch(k, index, options, context); - const hasStale = p.__staleWhileFetching !== undefined; - const staleVal = hasStale && allowStale; - if (status) { - status.fetch = isStale ? 'stale' : 'refresh'; - if (staleVal && isStale) - status.returnedStale = true; + callback(err); + } + }; + var PipelineHandler = class extends AsyncResource { + constructor(opts, handler2) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof handler2 !== "function") { + throw new InvalidArgumentError("invalid handler"); + } + const { signal, method, opaque, onInfo, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + } + if (method === "CONNECT") { + throw new InvalidArgumentError("invalid method"); + } + if (onInfo && typeof onInfo !== "function") { + throw new InvalidArgumentError("invalid onInfo callback"); + } + super("UNDICI_PIPELINE"); + this.opaque = opaque || null; + this.responseHeaders = responseHeaders || null; + this.handler = handler2; + this.abort = null; + this.context = null; + this.onInfo = onInfo || null; + this.req = new PipelineRequest().on("error", util2.nop); + this.ret = new Duplex({ + readableObjectMode: opts.objectMode, + autoDestroy: true, + read: () => { + const { body } = this; + if (body && body.resume) { + body.resume(); } - return staleVal ? p.__staleWhileFetching : (p.__returned = p); - } - } - async forceFetch(k, fetchOptions = {}) { - const v = await this.fetch(k, fetchOptions); - if (v === undefined) - throw new Error('fetch() returned undefined'); - return v; - } - memo(k, memoOptions = {}) { - const memoMethod = this.#memoMethod; - if (!memoMethod) { - throw new Error('no memoMethod provided to constructor'); - } - const { context, forceRefresh, ...options } = memoOptions; - const v = this.get(k, options); - if (!forceRefresh && v !== undefined) - return v; - const vv = memoMethod(k, v, { - options, - context, - }); - this.set(k, vv, options); - return vv; - } - /** - * Return a value from the cache. Will update the recency of the cache - * entry found. - * - * If the key is not found, get() will return `undefined`. - */ - get(k, getOptions = {}) { - const { allowStale = this.allowStale, updateAgeOnGet = this.updateAgeOnGet, noDeleteOnStaleGet = this.noDeleteOnStaleGet, status, } = getOptions; - const index = this.#keyMap.get(k); - if (index !== undefined) { - const value = this.#valList[index]; - const fetching = this.#isBackgroundFetch(value); - if (status) - this.#statusTTL(status, index); - if (this.#isStale(index)) { - if (status) - status.get = 'stale'; - // delete only if not an in-flight background fetch - if (!fetching) { - if (!noDeleteOnStaleGet) { - this.#delete(k, 'expire'); - } - if (status && allowStale) - status.returnedStale = true; - return allowStale ? value : undefined; - } - else { - if (status && - allowStale && - value.__staleWhileFetching !== undefined) { - status.returnedStale = true; - } - return allowStale ? value.__staleWhileFetching : undefined; - } + }, + write: (chunk, encoding, callback) => { + const { req } = this; + if (req.push(chunk, encoding) || req._readableState.destroyed) { + callback(); + } else { + req[kResume] = callback; } - else { - if (status) - status.get = 'hit'; - // if we're currently fetching it, we don't actually have it yet - // it's not stale, which means this isn't a staleWhileRefetching. - // If it's not stale, and fetching, AND has a __staleWhileFetching - // value, then that means the user fetched with {forceRefresh:true}, - // so it's safe to return that value. - if (fetching) { - return value.__staleWhileFetching; - } - this.#moveToTail(index); - if (updateAgeOnGet) { - this.#updateItemAge(index); - } - return value; + }, + destroy: (err, callback) => { + const { body, req, res, ret, abort } = this; + if (!err && !ret._readableState.endEmitted) { + err = new RequestAbortedError(); + } + if (abort && err) { + abort(); } + util2.destroy(body, err); + util2.destroy(req, err); + util2.destroy(res, err); + removeSignal(this); + callback(err); + } + }).on("prefinish", () => { + const { req } = this; + req.push(null); + }); + this.res = null; + addSignal(this, signal); + } + onConnect(abort, context) { + const { ret, res } = this; + assert(!res, "pipeline cannot be retried"); + if (ret.destroyed) { + throw new RequestAbortedError(); + } + this.abort = abort; + this.context = context; + } + onHeaders(statusCode, rawHeaders, resume2) { + const { opaque, handler: handler2, context } = this; + if (statusCode < 200) { + if (this.onInfo) { + const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); + this.onInfo({ statusCode, headers }); + } + return; } - else if (status) { - status.get = 'miss'; + this.res = new PipelineResponse(resume2); + let body; + try { + this.handler = null; + const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); + body = this.runInAsyncScope(handler2, null, { + statusCode, + headers, + opaque, + body: this.res, + context + }); + } catch (err) { + this.res.on("error", util2.nop); + throw err; } - } - #connect(p, n) { - this.#prev[n] = p; - this.#next[p] = n; - } - #moveToTail(index) { - // if tail already, nothing to do - // if head, move head to next[index] - // else - // move next[prev[index]] to next[index] (head has no prev) - // move prev[next[index]] to prev[index] - // prev[index] = tail - // next[tail] = index - // tail = index - if (index !== this.#tail) { - if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - this.#connect(this.#prev[index], this.#next[index]); - } - this.#connect(this.#tail, index); - this.#tail = index; + if (!body || typeof body.on !== "function") { + throw new InvalidReturnValueError("expected Readable"); } + body.on("data", (chunk) => { + const { ret, body: body2 } = this; + if (!ret.push(chunk) && body2.pause) { + body2.pause(); + } + }).on("error", (err) => { + const { ret } = this; + util2.destroy(ret, err); + }).on("end", () => { + const { ret } = this; + ret.push(null); + }).on("close", () => { + const { ret } = this; + if (!ret._readableState.ended) { + util2.destroy(ret, new RequestAbortedError()); + } + }); + this.body = body; + } + onData(chunk) { + const { res } = this; + return res.push(chunk); + } + onComplete(trailers) { + const { res } = this; + res.push(null); + } + onError(err) { + const { ret } = this; + this.handler = null; + util2.destroy(ret, err); + } + }; + function pipeline(opts, handler2) { + try { + const pipelineHandler = new PipelineHandler(opts, handler2); + this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler); + return pipelineHandler.ret; + } catch (err) { + return new PassThrough().destroy(err); + } } - /** - * Deletes a key out of the cache. - * - * Returns true if the key was deleted, false otherwise. - */ - delete(k) { - return this.#delete(k, 'delete'); - } - #delete(k, reason) { - let deleted = false; - if (this.#size !== 0) { - const index = this.#keyMap.get(k); - if (index !== undefined) { - deleted = true; - if (this.#size === 1) { - this.#clear(reason); - } - else { - this.#removeItemSize(index); - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else if (this.#hasDispose || this.#hasDisposeAfter) { - if (this.#hasDispose) { - this.#dispose?.(v, k, reason); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, reason]); - } - } - this.#keyMap.delete(k); - this.#keyList[index] = undefined; - this.#valList[index] = undefined; - if (index === this.#tail) { - this.#tail = this.#prev[index]; - } - else if (index === this.#head) { - this.#head = this.#next[index]; - } - else { - const pi = this.#prev[index]; - this.#next[pi] = this.#next[index]; - const ni = this.#next[index]; - this.#prev[ni] = this.#prev[index]; - } - this.#size--; - this.#free.push(index); - } - } + module2.exports = pipeline; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-upgrade.js +var require_api_upgrade = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-upgrade.js"(exports2, module2) { + "use strict"; + var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors3(); + var { AsyncResource } = __require("async_hooks"); + var util2 = require_util2(); + var { addSignal, removeSignal } = require_abort_signal(); + var assert = __require("assert"); + var UpgradeHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new 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; + addSignal(this, signal); + } + onConnect(abort, context) { + if (!this.callback) { + throw new RequestAbortedError(); + } + this.abort = abort; + this.context = null; + } + onHeaders() { + throw new SocketError("bad upgrade", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + assert.strictEqual(statusCode, 101); + removeSignal(this); + this.callback = null; + const headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); + this.runInAsyncScope(callback, null, null, { + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); } - if (this.#hasDisposeAfter && this.#disposed?.length) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } + } + }; + function upgrade(opts, callback) { + if (callback === void 0) { + return new Promise((resolve4, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve4(data); + }); + }); + } + try { + const upgradeHandler = new UpgradeHandler(opts, callback); + this.dispatch({ + ...opts, + method: opts.method || "GET", + upgrade: opts.protocol || "Websocket" + }, upgradeHandler); + } catch (err) { + if (typeof callback !== "function") { + throw err; } - return deleted; - } - /** - * Clear the cache entirely, throwing away all values. - */ - clear() { - return this.#clear('delete'); + const opaque = opts && opts.opaque; + queueMicrotask(() => callback(err, { opaque })); + } } - #clear(reason) { - for (const index of this.#rindexes({ allowStale: true })) { - const v = this.#valList[index]; - if (this.#isBackgroundFetch(v)) { - v.__abortController.abort(new Error('deleted')); - } - else { - const k = this.#keyList[index]; - if (this.#hasDispose) { - this.#dispose?.(v, k, reason); - } - if (this.#hasDisposeAfter) { - this.#disposed?.push([v, k, reason]); - } - } + module2.exports = upgrade; + } +}); + +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-connect.js +var require_api_connect = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/api-connect.js"(exports2, module2) { + "use strict"; + var { AsyncResource } = __require("async_hooks"); + var { InvalidArgumentError, RequestAbortedError, SocketError } = require_errors3(); + var util2 = require_util2(); + var { addSignal, removeSignal } = require_abort_signal(); + var ConnectHandler = class extends AsyncResource { + constructor(opts, callback) { + if (!opts || typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (typeof callback !== "function") { + throw new InvalidArgumentError("invalid callback"); + } + const { signal, opaque, responseHeaders } = opts; + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { + throw new 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; + addSignal(this, signal); + } + onConnect(abort, context) { + if (!this.callback) { + throw new RequestAbortedError(); } - this.#keyMap.clear(); - this.#valList.fill(undefined); - this.#keyList.fill(undefined); - if (this.#ttls && this.#starts) { - this.#ttls.fill(0); - this.#starts.fill(0); + this.abort = abort; + this.context = context; + } + onHeaders() { + throw new SocketError("bad connect", null); + } + onUpgrade(statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this; + removeSignal(this); + this.callback = null; + let headers = rawHeaders; + if (headers != null) { + headers = this.responseHeaders === "raw" ? util2.parseRawHeaders(rawHeaders) : util2.parseHeaders(rawHeaders); } - if (this.#sizes) { - this.#sizes.fill(0); + this.runInAsyncScope(callback, null, null, { + statusCode, + headers, + socket, + opaque, + context + }); + } + onError(err) { + const { callback, opaque } = this; + removeSignal(this); + if (callback) { + this.callback = null; + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }); + }); } - this.#head = 0; - this.#tail = 0; - this.#free.length = 0; - this.#calculatedSize = 0; - this.#size = 0; - if (this.#hasDisposeAfter && this.#disposed) { - const dt = this.#disposed; - let task; - while ((task = dt?.shift())) { - this.#disposeAfter?.(...task); - } + } + }; + function connect3(opts, callback) { + if (callback === void 0) { + return new Promise((resolve4, reject) => { + connect3.call(this, opts, (err, data) => { + return err ? reject(err) : resolve4(data); + }); + }); + } + try { + const connectHandler = new 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 })); + } } -} -exports.LRUCache = LRUCache; -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 53497: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const { Argument } = __nccwpck_require__(42606); -const { Command } = __nccwpck_require__(58984); -const { CommanderError, InvalidArgumentError } = __nccwpck_require__(24435); -const { Help } = __nccwpck_require__(1558); -const { Option } = __nccwpck_require__(71156); - -exports.program = new Command(); - -exports.createCommand = (name) => new Command(name); -exports.createOption = (flags, description) => new Option(flags, description); -exports.createArgument = (name, description) => new Argument(name, description); - -/** - * Expose classes - */ - -exports.Command = Command; -exports.Option = Option; -exports.Argument = Argument; -exports.Help = Help; - -exports.CommanderError = CommanderError; -exports.InvalidArgumentError = InvalidArgumentError; -exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated - - -/***/ }), - -/***/ 42606: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const { InvalidArgumentError } = __nccwpck_require__(24435); - -class Argument { - /** - * Initialize a new command argument with the given name and description. - * The default is that the argument is required, and you can explicitly - * indicate this with <> around the name. Put [] around the name for an optional argument. - * - * @param {string} name - * @param {string} [description] - */ - - constructor(name, description) { - this.description = description || ''; - this.variadic = false; - this.parseArg = undefined; - this.defaultValue = undefined; - this.defaultValueDescription = undefined; - this.argChoices = undefined; - - switch (name[0]) { - case '<': // e.g. - this.required = true; - this._name = name.slice(1, -1); - break; - case '[': // e.g. [optional] - this.required = false; - this._name = name.slice(1, -1); - break; - default: - this.required = true; - this._name = name; - break; - } - - if (this._name.length > 3 && this._name.slice(-3) === '...') { - this.variadic = true; - this._name = this._name.slice(0, -3); - } - } - - /** - * Return argument name. - * - * @return {string} - */ - - name() { - return this._name; + module2.exports = connect3; } +}); - /** - * @package - */ - - _concatValue(value, previous) { - if (previous === this.defaultValue || !Array.isArray(previous)) { - return [value]; - } - - return previous.concat(value); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/index.js +var require_api = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/api/index.js"(exports2, module2) { + "use strict"; + module2.exports.request = require_api_request(); + module2.exports.stream = require_api_stream(); + module2.exports.pipeline = require_api_pipeline(); + module2.exports.upgrade = require_api_upgrade(); + module2.exports.connect = require_api_connect(); } +}); - /** - * Set the default value, and optionally supply the description to be displayed in the help. - * - * @param {*} value - * @param {string} [description] - * @return {Argument} - */ - - default(value, description) { - this.defaultValue = value; - this.defaultValueDescription = description; - return this; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-errors.js +var require_mock_errors = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-errors.js"(exports2, module2) { + "use strict"; + var { UndiciError } = require_errors3(); + var MockNotMatchedError = class _MockNotMatchedError extends UndiciError { + constructor(message) { + super(message); + Error.captureStackTrace(this, _MockNotMatchedError); + this.name = "MockNotMatchedError"; + this.message = message || "The request does not match any registered mock dispatches"; + this.code = "UND_MOCK_ERR_MOCK_NOT_MATCHED"; + } + }; + module2.exports = { + MockNotMatchedError + }; } +}); - /** - * Set the custom handler for processing CLI command arguments into argument values. - * - * @param {Function} [fn] - * @return {Argument} - */ - - argParser(fn) { - this.parseArg = fn; - return this; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-symbols.js +var require_mock_symbols = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-symbols.js"(exports2, module2) { + "use strict"; + module2.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") + }; } +}); - /** - * Only allow argument value to be one of choices. - * - * @param {string[]} values - * @return {Argument} - */ - - choices(values) { - this.argChoices = values.slice(); - this.parseArg = (arg, previous) => { - if (!this.argChoices.includes(arg)) { - throw new InvalidArgumentError( - `Allowed choices are ${this.argChoices.join(', ')}.`, - ); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-utils.js +var require_mock_utils = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-utils.js"(exports2, module2) { + "use strict"; + var { MockNotMatchedError } = require_mock_errors(); + var { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect + } = require_mock_symbols(); + var { buildURL, nop } = require_util2(); + var { STATUS_CODES } = __require("http"); + var { + types: { + isPromise + } + } = __require("util"); + function 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; } - if (this.variadic) { - return this._concatValue(arg, previous); - } - return arg; - }; - return this; - } - - /** - * Make argument required. - * - * @returns {Argument} - */ - argRequired() { - this.required = true; - return this; - } - - /** - * Make argument optional. - * - * @returns {Argument} - */ - argOptional() { - this.required = false; - return this; - } -} - -/** - * Takes an argument and returns its human readable equivalent for help usage. - * - * @param {Argument} arg - * @return {string} - * @private - */ - -function humanReadableArgName(arg) { - const nameOutput = arg.name() + (arg.variadic === true ? '...' : ''); - - return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']'; -} - -exports.Argument = Argument; -exports.humanReadableArgName = humanReadableArgName; - - -/***/ }), - -/***/ 58984: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const EventEmitter = (__nccwpck_require__(78474).EventEmitter); -const childProcess = __nccwpck_require__(31421); -const path = __nccwpck_require__(76760); -const fs = __nccwpck_require__(73024); -const process = __nccwpck_require__(1708); - -const { Argument, humanReadableArgName } = __nccwpck_require__(42606); -const { CommanderError } = __nccwpck_require__(24435); -const { Help } = __nccwpck_require__(1558); -const { Option, DualOptions } = __nccwpck_require__(71156); -const { suggestSimilar } = __nccwpck_require__(80698); - -class Command extends EventEmitter { - /** - * Initialize a new `Command`. - * - * @param {string} [name] - */ - - constructor(name) { - super(); - /** @type {Command[]} */ - this.commands = []; - /** @type {Option[]} */ - this.options = []; - this.parent = null; - this._allowUnknownOption = false; - this._allowExcessArguments = true; - /** @type {Argument[]} */ - this.registeredArguments = []; - this._args = this.registeredArguments; // deprecated old name - /** @type {string[]} */ - this.args = []; // cli args with options removed - this.rawArgs = []; - this.processedArgs = []; // like .args but after custom processing and collecting variadic - this._scriptPath = null; - this._name = name || ''; - this._optionValues = {}; - this._optionValueSources = {}; // default, env, cli etc - this._storeOptionsAsProperties = false; - this._actionHandler = null; - this._executableHandler = false; - this._executableFile = null; // custom name for executable - this._executableDir = null; // custom search directory for subcommands - this._defaultCommandName = null; - this._exitCallback = null; - this._aliases = []; - this._combineFlagAndOptionalValue = true; - this._description = ''; - this._summary = ''; - this._argsDescription = undefined; // legacy - this._enablePositionalOptions = false; - this._passThroughOptions = false; - this._lifeCycleHooks = {}; // a hash of arrays - /** @type {(boolean | string)} */ - this._showHelpAfterError = false; - this._showSuggestionAfterError = true; - - // see .configureOutput() for docs - this._outputConfiguration = { - writeOut: (str) => process.stdout.write(str), - writeErr: (str) => process.stderr.write(str), - getOutHelpWidth: () => - process.stdout.isTTY ? process.stdout.columns : undefined, - getErrHelpWidth: () => - process.stderr.isTTY ? process.stderr.columns : undefined, - outputError: (str, write) => write(str), - }; - - this._hidden = false; - /** @type {(Option | null | undefined)} */ - this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled. - this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited - /** @type {Command} */ - this._helpCommand = undefined; // lazy initialised, inherited - this._helpConfiguration = {}; - } - - /** - * Copy settings that are useful to have in common across root command and subcommands. - * - * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.) - * - * @param {Command} sourceCommand - * @return {Command} `this` command for chaining - */ - copyInheritedSettings(sourceCommand) { - this._outputConfiguration = sourceCommand._outputConfiguration; - this._helpOption = sourceCommand._helpOption; - this._helpCommand = sourceCommand._helpCommand; - this._helpConfiguration = sourceCommand._helpConfiguration; - this._exitCallback = sourceCommand._exitCallback; - this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties; - this._combineFlagAndOptionalValue = - sourceCommand._combineFlagAndOptionalValue; - this._allowExcessArguments = sourceCommand._allowExcessArguments; - this._enablePositionalOptions = sourceCommand._enablePositionalOptions; - this._showHelpAfterError = sourceCommand._showHelpAfterError; - this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError; - - return this; - } - - /** - * @returns {Command[]} - * @private - */ - - _getCommandAndAncestors() { - const result = []; - // eslint-disable-next-line @typescript-eslint/no-this-alias - for (let command = this; command; command = command.parent) { - result.push(command); - } - return result; - } - - /** - * Define a command. - * - * There are two styles of command: pay attention to where to put the description. - * - * @example - * // Command implemented using action handler (description is supplied separately to `.command`) - * program - * .command('clone [destination]') - * .description('clone a repository into a newly created directory') - * .action((source, destination) => { - * console.log('clone command called'); - * }); - * - * // Command implemented using separate executable file (description is second parameter to `.command`) - * program - * .command('start ', 'start named service') - * .command('stop [service]', 'stop named service, or all if no name supplied'); - * - * @param {string} nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` - * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) - * @param {object} [execOpts] - configuration options (for executable) - * @return {Command} returns new command for action handler, or `this` for executable command - */ - - command(nameAndArgs, actionOptsOrExecDesc, execOpts) { - let desc = actionOptsOrExecDesc; - let opts = execOpts; - if (typeof desc === 'object' && desc !== null) { - opts = desc; - desc = null; - } - opts = opts || {}; - const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/); - - const cmd = this.createCommand(name); - if (desc) { - cmd.description(desc); - cmd._executableHandler = true; - } - if (opts.isDefault) this._defaultCommandName = cmd._name; - cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden - cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor - if (args) cmd.arguments(args); - this._registerCommand(cmd); - cmd.parent = this; - cmd.copyInheritedSettings(this); - - if (desc) return this; - return cmd; - } - - /** - * Factory routine to create a new unattached command. - * - * See .command() for creating an attached subcommand, which uses this routine to - * create the command. You can override createCommand to customise subcommands. - * - * @param {string} [name] - * @return {Command} new command - */ - - createCommand(name) { - return new Command(name); - } - - /** - * You can customise the help with a subclass of Help by overriding createHelp, - * or by overriding Help properties using configureHelp(). - * - * @return {Help} - */ - - createHelp() { - return Object.assign(new Help(), this.configureHelp()); - } - - /** - * You can customise the help by overriding Help properties using configureHelp(), - * or with a subclass of Help by overriding createHelp(). - * - * @param {object} [configuration] - configuration options - * @return {(Command | object)} `this` command for chaining, or stored configuration - */ - - configureHelp(configuration) { - if (configuration === undefined) return this._helpConfiguration; - - this._helpConfiguration = configuration; - return this; - } - - /** - * The default output goes to stdout and stderr. You can customise this for special - * applications. You can also customise the display of errors by overriding outputError. - * - * The configuration properties are all functions: - * - * // functions to change where being written, stdout and stderr - * writeOut(str) - * writeErr(str) - * // matching functions to specify width for wrapping help - * getOutHelpWidth() - * getErrHelpWidth() - * // functions based on what is being written out - * outputError(str, write) // used for displaying errors, and not used for displaying help - * - * @param {object} [configuration] - configuration options - * @return {(Command | object)} `this` command for chaining, or stored configuration - */ - - configureOutput(configuration) { - if (configuration === undefined) return this._outputConfiguration; - - Object.assign(this._outputConfiguration, configuration); - return this; - } - - /** - * Display the help or a custom message after an error occurs. - * - * @param {(boolean|string)} [displayHelp] - * @return {Command} `this` command for chaining - */ - showHelpAfterError(displayHelp = true) { - if (typeof displayHelp !== 'string') displayHelp = !!displayHelp; - this._showHelpAfterError = displayHelp; - return this; - } - - /** - * Display suggestion of similar commands for unknown commands, or options for unknown options. - * - * @param {boolean} [displaySuggestion] - * @return {Command} `this` command for chaining - */ - showSuggestionAfterError(displaySuggestion = true) { - this._showSuggestionAfterError = !!displaySuggestion; - return this; - } - - /** - * Add a prepared subcommand. - * - * See .command() for creating an attached subcommand which inherits settings from its parent. - * - * @param {Command} cmd - new subcommand - * @param {object} [opts] - configuration options - * @return {Command} `this` command for chaining - */ - - addCommand(cmd, opts) { - if (!cmd._name) { - throw new Error(`Command passed to .addCommand() must have a name -- specify the name in Command constructor or using .name()`); + return false; } - - opts = opts || {}; - if (opts.isDefault) this._defaultCommandName = cmd._name; - if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation - - this._registerCommand(cmd); - cmd.parent = this; - cmd._checkForBrokenPassThrough(); - - return this; - } - - /** - * Factory routine to create a new unattached argument. - * - * See .argument() for creating an attached argument, which uses this routine to - * create the argument. You can override createArgument to return a custom argument. - * - * @param {string} name - * @param {string} [description] - * @return {Argument} new argument - */ - - createArgument(name, description) { - return new Argument(name, description); - } - - /** - * Define argument syntax for command. - * - * The default is that the argument is required, and you can explicitly - * indicate this with <> around the name. Put [] around the name for an optional argument. - * - * @example - * program.argument(''); - * program.argument('[output-file]'); - * - * @param {string} name - * @param {string} [description] - * @param {(Function|*)} [fn] - custom argument processing function - * @param {*} [defaultValue] - * @return {Command} `this` command for chaining - */ - argument(name, description, fn, defaultValue) { - const argument = this.createArgument(name, description); - if (typeof fn === 'function') { - argument.default(defaultValue).argParser(fn); - } else { - argument.default(fn); - } - this.addArgument(argument); - return this; - } - - /** - * Define argument syntax for command, adding multiple at once (without descriptions). - * - * See also .argument(). - * - * @example - * program.arguments(' [env]'); - * - * @param {string} names - * @return {Command} `this` command for chaining - */ - - arguments(names) { - names - .trim() - .split(/ +/) - .forEach((detail) => { - this.argument(detail); - }); - return this; - } - - /** - * Define argument syntax for command, adding a prepared argument. - * - * @param {Argument} argument - * @return {Command} `this` command for chaining - */ - addArgument(argument) { - const previousArgument = this.registeredArguments.slice(-1)[0]; - if (previousArgument && previousArgument.variadic) { - throw new Error( - `only the last argument can be variadic '${previousArgument.name()}'`, + function lowerCaseEntries(headers) { + return Object.fromEntries( + Object.entries(headers).map(([headerName, headerValue]) => { + return [headerName.toLocaleLowerCase(), headerValue]; + }) ); } - if ( - argument.required && - argument.defaultValue !== undefined && - argument.parseArg === undefined - ) { - throw new Error( - `a default value for a required argument is never used: '${argument.name()}'`, - ); + function 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 void 0; + } else if (typeof headers.get === "function") { + return headers.get(key); + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; + } } - this.registeredArguments.push(argument); - return this; - } - - /** - * Customise or override default help command. By default a help command is automatically added if your command has subcommands. - * - * @example - * program.helpCommand('help [cmd]'); - * program.helpCommand('help [cmd]', 'show help'); - * program.helpCommand(false); // suppress default help command - * program.helpCommand(true); // add help command even if no subcommands - * - * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added - * @param {string} [description] - custom description - * @return {Command} `this` command for chaining - */ - - helpCommand(enableOrNameAndArgs, description) { - if (typeof enableOrNameAndArgs === 'boolean') { - this._addImplicitHelpCommand = enableOrNameAndArgs; - return this; + function 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); } - - enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]'; - const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/); - const helpDescription = description ?? 'display help for command'; - - const helpCommand = this.createCommand(helpName); - helpCommand.helpOption(false); - if (helpArgs) helpCommand.arguments(helpArgs); - if (helpDescription) helpCommand.description(helpDescription); - - this._addImplicitHelpCommand = true; - this._helpCommand = helpCommand; - - return this; - } - - /** - * Add prepared custom help command. - * - * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()` - * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only - * @return {Command} `this` command for chaining - */ - addHelpCommand(helpCommand, deprecatedDescription) { - // If not passed an object, call through to helpCommand for backwards compatibility, - // as addHelpCommand was originally used like helpCommand is now. - if (typeof helpCommand !== 'object') { - this.helpCommand(helpCommand, deprecatedDescription); - return this; + function matchHeaders(mockDispatch2, headers) { + if (typeof mockDispatch2.headers === "function") { + if (Array.isArray(headers)) { + headers = buildHeadersFromArray(headers); + } + return mockDispatch2.headers(headers ? lowerCaseEntries(headers) : {}); + } + if (typeof mockDispatch2.headers === "undefined") { + return true; + } + if (typeof headers !== "object" || typeof mockDispatch2.headers !== "object") { + return false; + } + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch2.headers)) { + const headerValue = getHeaderByName(headers, matchHeaderName); + if (!matchValue(matchHeaderValue, headerValue)) { + return false; + } + } + return true; } - - this._addImplicitHelpCommand = true; - this._helpCommand = helpCommand; - return this; - } - - /** - * Lazy create help command. - * - * @return {(Command|null)} - * @package - */ - _getHelpCommand() { - const hasImplicitHelpCommand = - this._addImplicitHelpCommand ?? - (this.commands.length && - !this._actionHandler && - !this._findCommand('help')); - - if (hasImplicitHelpCommand) { - if (this._helpCommand === undefined) { - this.helpCommand(undefined, undefined); // use default name and description + function safeUrl(path2) { + if (typeof path2 !== "string") { + return path2; + } + const pathSegments = path2.split("?"); + if (pathSegments.length !== 2) { + return path2; + } + const qp = new URLSearchParams(pathSegments.pop()); + qp.sort(); + return [...pathSegments, qp.toString()].join("?"); + } + function matchKey(mockDispatch2, { path: path2, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path2); + const methodMatch = matchValue(mockDispatch2.method, method); + const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; + const headersMatch = matchHeaders(mockDispatch2, headers); + return pathMatch && methodMatch && bodyMatch && headersMatch; + } + function getResponseData2(data) { + if (Buffer.isBuffer(data)) { + return data; + } else if (typeof data === "object") { + return JSON.stringify(data); + } else { + return data.toString(); } - return this._helpCommand; } - return null; - } - - /** - * Add hook for life cycle event. - * - * @param {string} event - * @param {Function} listener - * @return {Command} `this` command for chaining - */ - - hook(event, listener) { - const allowedValues = ['preSubcommand', 'preAction', 'postAction']; - if (!allowedValues.includes(event)) { - throw new Error(`Unexpected value for event passed to hook : '${event}'. -Expecting one of '${allowedValues.join("', '")}'`); + function getMockDispatch(mockDispatches, key) { + const basePath = key.query ? buildURL(key.path, key.query) : key.path; + const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path2 }) => matchValue(safeUrl(path2), resolvedPath)); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); + } + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`); + } + matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}'`); + } + matchedMockDispatches = matchedMockDispatches.filter((mockDispatch2) => matchHeaders(mockDispatch2, key.headers)); + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}'`); + } + return matchedMockDispatches[0]; } - if (this._lifeCycleHooks[event]) { - this._lifeCycleHooks[event].push(listener); - } else { - this._lifeCycleHooks[event] = [listener]; + function 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; } - return this; - } - - /** - * Register callback to use as replacement for calling process.exit. - * - * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing - * @return {Command} `this` command for chaining - */ - - exitOverride(fn) { - if (fn) { - this._exitCallback = fn; - } else { - this._exitCallback = (err) => { - if (err.code !== 'commander.executeSubCommandAsync') { - throw err; - } else { - // Async callback from spawn events, not useful to throw. + function deleteMockDispatch(mockDispatches, key) { + const index = mockDispatches.findIndex((dispatch) => { + if (!dispatch.consumed) { + return false; } + return matchKey(dispatch, key); + }); + if (index !== -1) { + mockDispatches.splice(index, 1); + } + } + function buildKey(opts) { + const { path: path2, method, body, headers, query } = opts; + return { + path: path2, + method, + body, + headers, + query }; } - return this; - } - - /** - * Call process.exit, and _exitCallback if defined. - * - * @param {number} exitCode exit code for using with process.exit - * @param {string} code an id string representing the error - * @param {string} message human-readable description of the error - * @return never - * @private - */ - - _exit(exitCode, code, message) { - if (this._exitCallback) { - this._exitCallback(new CommanderError(exitCode, code, message)); - // Expecting this line is not reached. - } - process.exit(exitCode); - } - - /** - * Register callback `fn` for the command. - * - * @example - * program - * .command('serve') - * .description('start service') - * .action(function() { - * // do work here - * }); - * - * @param {Function} fn - * @return {Command} `this` command for chaining - */ - - action(fn) { - const listener = (args) => { - // The .action callback takes an extra parameter which is the command or options. - const expectedArgsCount = this.registeredArguments.length; - const actionArgs = args.slice(0, expectedArgsCount); - if (this._storeOptionsAsProperties) { - actionArgs[expectedArgsCount] = this; // backwards compatible "options" + function 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}`) + ], []); + } + function getStatusText(statusCode) { + return STATUS_CODES[statusCode] || "unknown"; + } + async function getResponse(body) { + const buffers = []; + for await (const data of body) { + buffers.push(data); + } + return Buffer.concat(buffers).toString("utf8"); + } + function mockDispatch(opts, handler2) { + const key = buildKey(opts); + const mockDispatch2 = getMockDispatch(this[kDispatches], key); + mockDispatch2.timesInvoked++; + if (mockDispatch2.data.callback) { + mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; + } + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch2; + const { timesInvoked, times } = mockDispatch2; + mockDispatch2.consumed = !persist && timesInvoked >= times; + mockDispatch2.pending = timesInvoked < times; + if (error !== null) { + deleteMockDispatch(this[kDispatches], key); + handler2.onError(error); + return true; + } + if (typeof delay === "number" && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]); + }, delay); } else { - actionArgs[expectedArgsCount] = this.opts(); + handleReply(this[kDispatches]); } - actionArgs.push(this); - - return fn.apply(this, actionArgs); - }; - this._actionHandler = listener; - return this; - } - - /** - * Factory routine to create a new unattached option. - * - * See .option() for creating an attached option, which uses this routine to - * create the option. You can override createOption to return a custom option. - * - * @param {string} flags - * @param {string} [description] - * @return {Option} new option - */ - - createOption(flags, description) { - return new Option(flags, description); - } - - /** - * Wrap parseArgs to catch 'commander.invalidArgument'. - * - * @param {(Option | Argument)} target - * @param {string} value - * @param {*} previous - * @param {string} invalidArgumentMessage - * @private - */ - - _callParseArg(target, value, previous, invalidArgumentMessage) { - try { - return target.parseArg(value, previous); - } catch (err) { - if (err.code === 'commander.invalidArgument') { - const message = `${invalidArgumentMessage} ${err.message}`; - this.error(message, { exitCode: err.exitCode, code: err.code }); - } - throw err; - } - } - - /** - * Check for option flag conflicts. - * Register option if no conflicts found, or throw on conflict. - * - * @param {Option} option - * @private - */ - - _registerOption(option) { - const matchingOption = - (option.short && this._findOption(option.short)) || - (option.long && this._findOption(option.long)); - if (matchingOption) { - const matchingFlag = - option.long && this._findOption(option.long) - ? option.long - : option.short; - throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}' -- already used by option '${matchingOption.flags}'`); + function handleReply(mockDispatches, _data = data) { + const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; + const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; + if (isPromise(body)) { + body.then((newData) => handleReply(mockDispatches, newData)); + return; + } + const responseData = getResponseData2(body); + const responseHeaders = generateKeyValues(headers); + const responseTrailers = generateKeyValues(trailers); + handler2.abort = nop; + handler2.onHeaders(statusCode, responseHeaders, resume2, getStatusText(statusCode)); + handler2.onData(Buffer.from(responseData)); + handler2.onComplete(responseTrailers); + deleteMockDispatch(mockDispatches, key); + } + function resume2() { + } + return true; } - - this.options.push(option); - } - - /** - * Check for command name and alias conflicts with existing commands. - * Register command if no conflicts found, or throw on conflict. - * - * @param {Command} command - * @private - */ - - _registerCommand(command) { - const knownBy = (cmd) => { - return [cmd.name()].concat(cmd.aliases()); - }; - - const alreadyUsed = knownBy(command).find((name) => - this._findCommand(name), - ); - if (alreadyUsed) { - const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|'); - const newCmd = knownBy(command).join('|'); - throw new Error( - `cannot add command '${newCmd}' as already have command '${existingCmd}'`, - ); + function buildMockDispatch() { + const agent = this[kMockAgent]; + const origin = this[kOrigin]; + const originalDispatch = this[kOriginalDispatch]; + return function dispatch(opts, handler2) { + if (agent.isMockActive) { + try { + mockDispatch.call(this, opts, handler2); + } catch (error) { + if (error instanceof MockNotMatchedError) { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) { + throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + } + if (checkNetConnect(netConnect, origin)) { + originalDispatch.call(this, opts, handler2); + } else { + throw new 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, handler2); + } + }; } - - this.commands.push(command); - } - - /** - * Add an option. - * - * @param {Option} option - * @return {Command} `this` command for chaining - */ - addOption(option) { - this._registerOption(option); - - const oname = option.name(); - const name = option.attributeName(); - - // store default value - if (option.negate) { - // --no-foo is special and defaults foo to true, unless a --foo option is already defined - const positiveLongFlag = option.long.replace(/^--no-/, '--'); - if (!this._findOption(positiveLongFlag)) { - this.setOptionValueWithSource( - name, - option.defaultValue === undefined ? true : option.defaultValue, - 'default', - ); + function checkNetConnect(netConnect, origin) { + const url = new URL(origin); + if (netConnect === true) { + return true; + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + return true; } - } else if (option.defaultValue !== undefined) { - this.setOptionValueWithSource(name, option.defaultValue, 'default'); + return false; } + function buildMockOptions(opts) { + if (opts) { + const { agent, ...mockOptions } = opts; + return mockOptions; + } + } + module2.exports = { + getResponseData: getResponseData2, + getMockDispatch, + addMockDispatch, + deleteMockDispatch, + buildKey, + generateKeyValues, + matchValue, + getResponse, + getStatusText, + mockDispatch, + buildMockDispatch, + checkNetConnect, + buildMockOptions, + getHeaderByName + }; + } +}); - // handler for cli and env supplied values - const handleOptionValue = (val, invalidValueMessage, valueSource) => { - // val is null for optional option used without an optional-argument. - // val is undefined for boolean and negated option. - if (val == null && option.presetArg !== undefined) { - val = option.presetArg; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-interceptor.js +var require_mock_interceptor = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-interceptor.js"(exports2, module2) { + "use strict"; + var { getResponseData: getResponseData2, buildKey, addMockDispatch } = require_mock_utils(); + var { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch + } = require_mock_symbols(); + var { InvalidArgumentError } = require_errors3(); + var { buildURL } = require_util2(); + var MockScope = class { + constructor(mockDispatch) { + this[kMockDispatch] = mockDispatch; } - - // custom processing - const oldValue = this.getOptionValue(name); - if (val !== null && option.parseArg) { - val = this._callParseArg(option, val, oldValue, invalidValueMessage); - } else if (val !== null && option.variadic) { - val = option._concatValue(val, oldValue); + /** + * Delay a reply by a set amount in ms. + */ + delay(waitInMs) { + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) { + throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); + } + this[kMockDispatch].delay = waitInMs; + return this; } - - // Fill-in appropriate missing values. Long winded but easy to follow. - if (val == null) { - if (option.negate) { - val = false; - } else if (option.isBoolean() || option.optional) { - val = true; - } else { - val = ''; // not normal, parseArg might have failed or be a mock function for testing + /** + * For a defined reply, never mark as consumed. + */ + persist() { + this[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 InvalidArgumentError("repeatTimes must be a valid integer > 0"); } + this[kMockDispatch].times = repeatTimes; + return this; } - this.setOptionValueWithSource(name, val, valueSource); }; - - this.on('option:' + oname, (val) => { - const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`; - handleOptionValue(val, invalidValueMessage, 'cli'); - }); - - if (option.envVar) { - this.on('optionEnv:' + oname, (val) => { - const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`; - handleOptionValue(val, invalidValueMessage, 'env'); - }); - } - - return this; - } - - /** - * Internal implementation shared by .option() and .requiredOption() - * - * @return {Command} `this` command for chaining - * @private - */ - _optionEx(config, flags, description, fn, defaultValue) { - if (typeof flags === 'object' && flags instanceof Option) { - throw new Error( - 'To add an Option object use addOption() instead of option() or requiredOption()', - ); - } - const option = this.createOption(flags, description); - option.makeOptionMandatory(!!config.mandatory); - if (typeof fn === 'function') { - option.default(defaultValue).argParser(fn); - } else if (fn instanceof RegExp) { - // deprecated - const regex = fn; - fn = (val, def) => { - const m = regex.exec(val); - return m ? m[0] : def; - }; - option.default(defaultValue).argParser(fn); - } else { - option.default(fn); - } - - return this.addOption(option); - } - - /** - * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both. - * - * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required - * option-argument is indicated by `<>` and an optional option-argument by `[]`. - * - * See the README for more details, and see also addOption() and requiredOption(). - * - * @example - * program - * .option('-p, --pepper', 'add pepper') - * .option('-p, --pizza-type ', 'type of pizza') // required option-argument - * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default - * .option('-t, --tip ', 'add tip to purchase cost', parseFloat) // custom parse function - * - * @param {string} flags - * @param {string} [description] - * @param {(Function|*)} [parseArg] - custom option processing function or default value - * @param {*} [defaultValue] - * @return {Command} `this` command for chaining - */ - - option(flags, description, parseArg, defaultValue) { - return this._optionEx({}, flags, description, parseArg, defaultValue); - } - - /** - * Add a required option which must have a value after parsing. This usually means - * the option must be specified on the command line. (Otherwise the same as .option().) - * - * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. - * - * @param {string} flags - * @param {string} [description] - * @param {(Function|*)} [parseArg] - custom option processing function or default value - * @param {*} [defaultValue] - * @return {Command} `this` command for chaining - */ - - requiredOption(flags, description, parseArg, defaultValue) { - return this._optionEx( - { mandatory: true }, - flags, - description, - parseArg, - defaultValue, - ); - } - - /** - * Alter parsing of short flags with optional values. - * - * @example - * // for `.option('-f,--flag [value]'): - * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour - * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` - * - * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag. - * @return {Command} `this` command for chaining - */ - combineFlagAndOptionalValue(combine = true) { - this._combineFlagAndOptionalValue = !!combine; - return this; - } - - /** - * Allow unknown options on the command line. - * - * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options. - * @return {Command} `this` command for chaining - */ - allowUnknownOption(allowUnknown = true) { - this._allowUnknownOption = !!allowUnknown; - return this; - } - - /** - * Allow excess command-arguments on the command line. Pass false to make excess arguments an error. - * - * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments. - * @return {Command} `this` command for chaining - */ - allowExcessArguments(allowExcess = true) { - this._allowExcessArguments = !!allowExcess; - return this; - } - - /** - * Enable positional options. Positional means global options are specified before subcommands which lets - * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions. - * The default behaviour is non-positional and global options may appear anywhere on the command line. - * - * @param {boolean} [positional] - * @return {Command} `this` command for chaining - */ - enablePositionalOptions(positional = true) { - this._enablePositionalOptions = !!positional; - return this; - } - - /** - * Pass through options that come after command-arguments rather than treat them as command-options, - * so actual command-options come before command-arguments. Turning this on for a subcommand requires - * positional options to have been enabled on the program (parent commands). - * The default behaviour is non-positional and options may appear before or after command-arguments. - * - * @param {boolean} [passThrough] for unknown options. - * @return {Command} `this` command for chaining - */ - passThroughOptions(passThrough = true) { - this._passThroughOptions = !!passThrough; - this._checkForBrokenPassThrough(); - return this; - } - - /** - * @private - */ - - _checkForBrokenPassThrough() { - if ( - this.parent && - this._passThroughOptions && - !this.parent._enablePositionalOptions - ) { - throw new Error( - `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`, - ); - } - } - - /** - * Whether to store option values as properties on command object, - * or store separately (specify false). In both cases the option values can be accessed using .opts(). - * - * @param {boolean} [storeAsProperties=true] - * @return {Command} `this` command for chaining - */ - - storeOptionsAsProperties(storeAsProperties = true) { - if (this.options.length) { - throw new Error('call .storeOptionsAsProperties() before adding options'); - } - if (Object.keys(this._optionValues).length) { - throw new Error( - 'call .storeOptionsAsProperties() before setting option values', - ); - } - this._storeOptionsAsProperties = !!storeAsProperties; - return this; - } - - /** - * Retrieve option value. - * - * @param {string} key - * @return {object} value - */ - - getOptionValue(key) { - if (this._storeOptionsAsProperties) { - return this[key]; - } - return this._optionValues[key]; - } - - /** - * Store option value. - * - * @param {string} key - * @param {object} value - * @return {Command} `this` command for chaining - */ - - setOptionValue(key, value) { - return this.setOptionValueWithSource(key, value, undefined); + var MockInterceptor = class { + constructor(opts, mockDispatches) { + if (typeof opts !== "object") { + throw new InvalidArgumentError("opts must be an object"); + } + if (typeof opts.path === "undefined") { + throw new InvalidArgumentError("opts.path must be defined"); + } + if (typeof opts.method === "undefined") { + opts.method = "GET"; + } + if (typeof opts.path === "string") { + if (opts.query) { + opts.path = buildURL(opts.path, opts.query); + } else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; + } + } + if (typeof opts.method === "string") { + opts.method = opts.method.toUpperCase(); + } + this[kDispatchKey] = buildKey(opts); + this[kDispatches] = mockDispatches; + this[kDefaultHeaders] = {}; + this[kDefaultTrailers] = {}; + this[kContentLength] = false; + } + createMockScopeDispatchData(statusCode, data, responseOptions = {}) { + const responseData = getResponseData2(data); + const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; + const headers = { ...this[kDefaultHeaders], ...contentLength, ...responseOptions.headers }; + const trailers = { ...this[kDefaultTrailers], ...responseOptions.trailers }; + return { statusCode, data, headers, trailers }; + } + validateReplyParameters(statusCode, data, responseOptions) { + if (typeof statusCode === "undefined") { + throw new InvalidArgumentError("statusCode must be defined"); + } + if (typeof data === "undefined") { + throw new InvalidArgumentError("data must be defined"); + } + if (typeof responseOptions !== "object") { + throw new InvalidArgumentError("responseOptions must be an object"); + } + } + /** + * Mock an undici request with a defined reply. + */ + reply(replyData) { + if (typeof replyData === "function") { + const wrappedDefaultsCallback = (opts) => { + const resolvedData = replyData(opts); + if (typeof resolvedData !== "object") { + throw new InvalidArgumentError("reply options callback must return an object"); + } + const { statusCode: statusCode2, data: data2 = "", responseOptions: responseOptions2 = {} } = resolvedData; + this.validateReplyParameters(statusCode2, data2, responseOptions2); + return { + ...this.createMockScopeDispatchData(statusCode2, data2, responseOptions2) + }; + }; + const newMockDispatch2 = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback); + return new MockScope(newMockDispatch2); + } + const [statusCode, data = "", responseOptions = {}] = [...arguments]; + this.validateReplyParameters(statusCode, data, responseOptions); + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData); + return new MockScope(newMockDispatch); + } + /** + * Mock an undici request with a defined error. + */ + replyWithError(error) { + if (typeof error === "undefined") { + throw new InvalidArgumentError("error must be defined"); + } + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }); + return new MockScope(newMockDispatch); + } + /** + * Set default reply headers on the interceptor for subsequent replies + */ + defaultReplyHeaders(headers) { + if (typeof headers === "undefined") { + throw new InvalidArgumentError("headers must be defined"); + } + this[kDefaultHeaders] = headers; + return this; + } + /** + * Set default reply trailers on the interceptor for subsequent replies + */ + defaultReplyTrailers(trailers) { + if (typeof trailers === "undefined") { + throw new InvalidArgumentError("trailers must be defined"); + } + this[kDefaultTrailers] = trailers; + return this; + } + /** + * Set reply content length header for replies on the interceptor + */ + replyContentLength() { + this[kContentLength] = true; + return this; + } + }; + module2.exports.MockInterceptor = MockInterceptor; + module2.exports.MockScope = MockScope; } +}); - /** - * Store option value and where the value came from. - * - * @param {string} key - * @param {object} value - * @param {string} source - expected values are default/config/env/cli/implied - * @return {Command} `this` command for chaining - */ - - setOptionValueWithSource(key, value, source) { - if (this._storeOptionsAsProperties) { - this[key] = value; - } else { - this._optionValues[key] = value; - } - this._optionValueSources[key] = source; - return this; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-client.js +var require_mock_client = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { + "use strict"; + var { promisify: promisify2 } = __require("util"); + var Client = require_client(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols3(); + var { InvalidArgumentError } = require_errors3(); + var MockClient = class extends Client { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify2(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module2.exports = MockClient; } +}); - /** - * Get source of option value. - * Expected values are default | config | env | cli | implied - * - * @param {string} key - * @return {string} - */ - - getOptionValueSource(key) { - return this._optionValueSources[key]; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-pool.js +var require_mock_pool = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { + "use strict"; + var { promisify: promisify2 } = __require("util"); + var Pool = require_pool(); + var { buildMockDispatch } = require_mock_utils(); + var { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected + } = require_mock_symbols(); + var { MockInterceptor } = require_mock_interceptor(); + var Symbols = require_symbols3(); + var { InvalidArgumentError } = require_errors3(); + var MockPool = class extends Pool { + constructor(origin, opts) { + super(origin, opts); + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + this[kMockAgent] = opts.agent; + this[kOrigin] = origin; + this[kDispatches] = []; + this[kConnected] = 1; + this[kOriginalDispatch] = this.dispatch; + this[kOriginalClose] = this.close.bind(this); + this.dispatch = buildMockDispatch.call(this); + this.close = this[kClose]; + } + get [Symbols.kConnected]() { + return this[kConnected]; + } + /** + * Sets up the base interceptor for mocking replies from undici. + */ + intercept(opts) { + return new MockInterceptor(opts, this[kDispatches]); + } + async [kClose]() { + await promisify2(this[kOriginalClose])(); + this[kConnected] = 0; + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); + } + }; + module2.exports = MockPool; } +}); - /** - * Get source of option value. See also .optsWithGlobals(). - * Expected values are default | config | env | cli | implied - * - * @param {string} key - * @return {string} - */ - - getOptionValueSourceWithGlobals(key) { - // global overwrites local, like optsWithGlobals - let source; - this._getCommandAndAncestors().forEach((cmd) => { - if (cmd.getOptionValueSource(key) !== undefined) { - source = cmd.getOptionValueSource(key); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/pluralizer.js +var require_pluralizer = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/pluralizer.js"(exports2, module2) { + "use strict"; + var singulars = { + pronoun: "it", + is: "is", + was: "was", + this: "this" + }; + var plurals = { + pronoun: "they", + is: "are", + was: "were", + this: "these" + }; + module2.exports = class Pluralizer { + constructor(singular, plural) { + this.singular = singular; + this.plural = plural; } - }); - return source; + pluralize(count) { + const one = count === 1; + const keys = one ? singulars : plurals; + const noun = one ? this.singular : this.plural; + return { ...keys, count, noun }; + } + }; } +}); - /** - * Get user arguments from implied or explicit arguments. - * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches. - * - * @private - */ - - _prepareUserArgs(argv, parseOptions) { - if (argv !== undefined && !Array.isArray(argv)) { - throw new Error('first parameter to parse must be array or undefined'); - } - parseOptions = parseOptions || {}; - - // auto-detect argument conventions if nothing supplied - if (argv === undefined && parseOptions.from === undefined) { - if (process.versions?.electron) { - parseOptions.from = 'electron'; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/pending-interceptors-formatter.js +var require_pending_interceptors_formatter = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports2, module2) { + "use strict"; + var { Transform } = __require("stream"); + var { Console: Console2 } = __require("console"); + module2.exports = class PendingInterceptorsFormatter { + constructor({ disableColors } = {}) { + this.transform = new Transform({ + transform(chunk, _enc, cb) { + cb(null, chunk); + } + }); + this.logger = new Console2({ + stdout: this.transform, + inspectOptions: { + colors: !disableColors && !process.env.CI + } + }); } - // check node specific options for scenarios where user CLI args follow executable without scriptname - const execArgv = process.execArgv ?? []; - if ( - execArgv.includes('-e') || - execArgv.includes('--eval') || - execArgv.includes('-p') || - execArgv.includes('--print') - ) { - parseOptions.from = 'eval'; // internal usage, not documented + format(pendingInterceptors) { + const withPrettyHeaders = pendingInterceptors.map( + ({ method, path: path2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path2, + "Status code": statusCode, + Persistent: persist ? "\u2705" : "\u274C", + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + }) + ); + this.logger.table(withPrettyHeaders); + return this.transform.read().toString(); } - } - - // default to using process.argv - if (argv === undefined) { - argv = process.argv; - } - this.rawArgs = argv.slice(); + }; + } +}); - // extract the user args and scriptPath - let userArgs; - switch (parseOptions.from) { - case undefined: - case 'node': - this._scriptPath = argv[1]; - userArgs = argv.slice(2); - break; - case 'electron': - // @ts-ignore: because defaultApp is an unknown property - if (process.defaultApp) { - this._scriptPath = argv[1]; - userArgs = argv.slice(2); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-agent.js +var require_mock_agent = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/mock/mock-agent.js"(exports2, module2) { + "use strict"; + var { kClients } = require_symbols3(); + var Agent3 = require_agent(); + var { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory + } = require_mock_symbols(); + var MockClient = require_mock_client(); + var MockPool = require_mock_pool(); + var { matchValue, buildMockOptions } = require_mock_utils(); + var { InvalidArgumentError, UndiciError } = require_errors3(); + var Dispatcher = require_dispatcher(); + var Pluralizer = require_pluralizer(); + var PendingInterceptorsFormatter = require_pending_interceptors_formatter(); + var FakeWeakRef = class { + constructor(value) { + this.value = value; + } + deref() { + return this.value; + } + }; + var MockAgent = class extends Dispatcher { + constructor(opts) { + super(opts); + this[kNetConnect] = true; + this[kIsMockActive] = true; + if (opts && opts.agent && typeof opts.agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument opts.agent must implement Agent"); + } + const agent = opts && opts.agent ? opts.agent : new Agent3(opts); + this[kAgent] = agent; + this[kClients] = agent[kClients]; + this[kOptions] = buildMockOptions(opts); + } + get(origin) { + let dispatcher = this[kMockAgentGet](origin); + if (!dispatcher) { + dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + } + return dispatcher; + } + dispatch(opts, handler2) { + this.get(opts.origin); + return this[kAgent].dispatch(opts, handler2); + } + async close() { + await this[kAgent].close(); + this[kClients].clear(); + } + deactivate() { + this[kIsMockActive] = false; + } + activate() { + this[kIsMockActive] = true; + } + enableNetConnect(matcher) { + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { + if (Array.isArray(this[kNetConnect])) { + this[kNetConnect].push(matcher); + } else { + this[kNetConnect] = [matcher]; + } + } else if (typeof matcher === "undefined") { + this[kNetConnect] = true; } else { - userArgs = argv.slice(1); + throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); } - break; - case 'user': - userArgs = argv.slice(0); - break; - case 'eval': - userArgs = argv.slice(1); - break; - default: - throw new Error( - `unexpected parse option { from: '${parseOptions.from}' }`, - ); - } - - // Find default name for program from arguments. - if (!this._name && this._scriptPath) - this.nameFromFilename(this._scriptPath); - this._name = this._name || 'program'; - - return userArgs; - } - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * Use parseAsync instead of parse if any of your action handlers are async. - * - * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! - * - * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`: - * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that - * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged - * - `'user'`: just user arguments - * - * @example - * program.parse(); // parse process.argv and auto-detect electron and special node flags - * program.parse(process.argv); // assume argv[0] is app and argv[1] is script - * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @param {string[]} [argv] - optional, defaults to process.argv - * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron - * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron' - * @return {Command} `this` command for chaining - */ - - parse(argv, parseOptions) { - const userArgs = this._prepareUserArgs(argv, parseOptions); - this._parseCommand([], userArgs); - - return this; - } - - /** - * Parse `argv`, setting options and invoking commands when defined. - * - * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode! - * - * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`: - * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that - * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged - * - `'user'`: just user arguments - * - * @example - * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags - * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script - * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] - * - * @param {string[]} [argv] - * @param {object} [parseOptions] - * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron' - * @return {Promise} - */ - - async parseAsync(argv, parseOptions) { - const userArgs = this._prepareUserArgs(argv, parseOptions); - await this._parseCommand([], userArgs); - - return this; - } - - /** - * Execute a sub-command executable. - * - * @private - */ - - _executeSubCommand(subcommand, args) { - args = args.slice(); - let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows. - const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs']; - - function findFile(baseDir, baseName) { - // Look for specified file - const localBin = path.resolve(baseDir, baseName); - if (fs.existsSync(localBin)) return localBin; - - // Stop looking if candidate already has an expected extension. - if (sourceExt.includes(path.extname(baseName))) return undefined; - - // Try all the extensions. - const foundExt = sourceExt.find((ext) => - fs.existsSync(`${localBin}${ext}`), - ); - if (foundExt) return `${localBin}${foundExt}`; - - return undefined; - } + } + disableNetConnect() { + this[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[kIsMockActive]; + } + [kMockAgentSet](origin, dispatcher) { + this[kClients].set(origin, new FakeWeakRef(dispatcher)); + } + [kFactory](origin) { + const mockOptions = Object.assign({ agent: this }, this[kOptions]); + return this[kOptions] && this[kOptions].connections === 1 ? new MockClient(origin, mockOptions) : new MockPool(origin, mockOptions); + } + [kMockAgentGet](origin) { + const ref = this[kClients].get(origin); + if (ref) { + return ref.deref(); + } + if (typeof origin !== "string") { + const dispatcher = this[kFactory]("http://localhost:9999"); + this[kMockAgentSet](origin, dispatcher); + return dispatcher; + } + for (const [keyMatcher, nonExplicitRef] of Array.from(this[kClients])) { + const nonExplicitDispatcher = nonExplicitRef.deref(); + if (nonExplicitDispatcher && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = nonExplicitDispatcher[kDispatches]; + return dispatcher; + } + } + } + [kGetNetConnect]() { + return this[kNetConnect]; + } + pendingInterceptors() { + const mockAgentClients = this[kClients]; + return Array.from(mockAgentClients.entries()).flatMap(([origin, scope]) => scope.deref()[kDispatches].map((dispatch) => ({ ...dispatch, origin }))).filter(({ pending }) => pending); + } + assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { + const pending = this.pendingInterceptors(); + if (pending.length === 0) { + return; + } + const pluralizer = new Pluralizer("interceptor", "interceptors").pluralize(pending.length); + throw new UndiciError(` +${pluralizer.count} ${pluralizer.noun} ${pluralizer.is} pending: - // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command. - this._checkForMissingMandatoryOptions(); - this._checkForConflictingOptions(); +${pendingInterceptorsFormatter.format(pending)} +`.trim()); + } + }; + module2.exports = MockAgent; + } +}); - // executableFile and executableDir might be full path, or just a name - let executableFile = - subcommand._executableFile || `${this._name}-${subcommand._name}`; - let executableDir = this._executableDir || ''; - if (this._scriptPath) { - let resolvedScriptPath; // resolve possible symlink for installed npm binary - try { - resolvedScriptPath = fs.realpathSync(this._scriptPath); - } catch (err) { - resolvedScriptPath = this._scriptPath; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/proxy-agent.js +var require_proxy_agent = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/proxy-agent.js"(exports2, module2) { + "use strict"; + var { kProxy, kClose, kDestroy, kInterceptors } = require_symbols3(); + var { URL: URL7 } = __require("url"); + var Agent3 = require_agent(); + var Pool = require_pool(); + var DispatcherBase = require_dispatcher_base(); + var { InvalidArgumentError, RequestAbortedError } = require_errors3(); + var buildConnector = require_connect(); + var kAgent = Symbol("proxy agent"); + var kClient = Symbol("proxy client"); + var kProxyHeaders = Symbol("proxy headers"); + var kRequestTls = Symbol("request tls settings"); + var kProxyTls = Symbol("proxy tls settings"); + var kConnectEndpoint = Symbol("connect endpoint function"); + function defaultProtocolPort(protocol) { + return protocol === "https:" ? 443 : 80; + } + function buildProxyOptions(opts) { + if (typeof opts === "string") { + opts = { uri: opts }; + } + if (!opts || !opts.uri) { + throw new InvalidArgumentError("Proxy opts.uri is mandatory"); } - executableDir = path.resolve( - path.dirname(resolvedScriptPath), - executableDir, - ); + return { + uri: opts.uri, + protocol: opts.protocol || "https" + }; } - - // Look for a local file in preference to a command in PATH. - if (executableDir) { - let localFile = findFile(executableDir, executableFile); - - // Legacy search using prefix of script name instead of command name - if (!localFile && !subcommand._executableFile && this._scriptPath) { - const legacyName = path.basename( - this._scriptPath, - path.extname(this._scriptPath), + function defaultFactory(origin, opts) { + return new Pool(origin, opts); + } + var ProxyAgent = class extends DispatcherBase { + constructor(opts) { + super(opts); + this[kProxy] = buildProxyOptions(opts); + this[kAgent] = new Agent3(opts); + this[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 InvalidArgumentError("Proxy opts.uri is mandatory"); + } + const { clientFactory = defaultFactory } = opts; + if (typeof clientFactory !== "function") { + throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); + } + this[kRequestTls] = opts.requestTls; + this[kProxyTls] = opts.proxyTls; + this[kProxyHeaders] = opts.headers || {}; + const resolvedUrl = new URL7(opts.uri); + const { origin, port, host, username, password } = resolvedUrl; + if (opts.auth && opts.token) { + throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + } else if (opts.auth) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + } else if (opts.token) { + this[kProxyHeaders]["proxy-authorization"] = opts.token; + } else if (username && password) { + this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; + } + const connect3 = buildConnector({ ...opts.proxyTls }); + this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); + this[kClient] = clientFactory(resolvedUrl, { connect: connect3 }); + this[kAgent] = new Agent3({ + ...opts, + connect: async (opts2, callback) => { + let requestedHost = opts2.host; + if (!opts2.port) { + requestedHost += `:${defaultProtocolPort(opts2.protocol)}`; + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts2.signal, + headers: { + ...this[kProxyHeaders], + host + } + }); + if (statusCode !== 200) { + socket.on("error", () => { + }).destroy(); + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); + } + if (opts2.protocol !== "https:") { + callback(null, socket); + return; + } + let servername; + if (this[kRequestTls]) { + servername = this[kRequestTls].servername; + } else { + servername = opts2.servername; + } + this[kConnectEndpoint]({ ...opts2, servername, httpSocket: socket }, callback); + } catch (err) { + callback(err); + } + } + }); + } + dispatch(opts, handler2) { + const { host } = new URL7(opts.origin); + const headers = buildHeaders(opts.headers); + throwIfProxyAuthIsSent(headers); + return this[kAgent].dispatch( + { + ...opts, + headers: { + ...headers, + host + } + }, + handler2 ); - if (legacyName !== this._name) { - localFile = findFile( - executableDir, - `${legacyName}-${subcommand._name}`, - ); + } + async [kClose]() { + await this[kAgent].close(); + await this[kClient].close(); + } + async [kDestroy]() { + await this[kAgent].destroy(); + await this[kClient].destroy(); + } + }; + function buildHeaders(headers) { + if (Array.isArray(headers)) { + const headersPair = {}; + for (let i = 0; i < headers.length; i += 2) { + headersPair[headers[i]] = headers[i + 1]; } + return headersPair; } - executableFile = localFile || executableFile; + return headers; } - - launchWithNode = sourceExt.includes(path.extname(executableFile)); - - let proc; - if (process.platform !== 'win32') { - if (launchWithNode) { - args.unshift(executableFile); - // add executable arguments to spawn - args = incrementNodeInspectorPort(process.execArgv).concat(args); - - proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' }); - } else { - proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' }); + function throwIfProxyAuthIsSent(headers) { + const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); + if (existProxyAuth) { + throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } - } else { - args.unshift(executableFile); - // add executable arguments to spawn - args = incrementNodeInspectorPort(process.execArgv).concat(args); - proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' }); } + module2.exports = ProxyAgent; + } +}); - if (!proc.killed) { - // testing mainly to avoid leak warnings during unit tests with mocked spawn - const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; - signals.forEach((signal) => { - process.on(signal, () => { - if (proc.killed === false && proc.exitCode === null) { - // @ts-ignore because signals not typed to known strings - proc.kill(signal); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/RetryHandler.js +var require_RetryHandler = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/RetryHandler.js"(exports2, module2) { + var assert = __require("assert"); + var { kRetryHandlerDefaultRetry } = require_symbols3(); + var { RequestRetryError } = require_errors3(); + var { isDisturbed, parseHeaders, parseRangeHeader } = require_util2(); + function calculateRetryAfterHeader(retryAfter) { + const current = Date.now(); + const diff = new Date(retryAfter).getTime() - current; + return diff; + } + var RetryHandler = class _RetryHandler { + constructor(opts, handlers2) { + const { retryOptions, ...dispatchOpts } = opts; + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {}; + this.dispatch = handlers2.dispatch; + this.handler = handlers2.handler; + this.opts = dispatchOpts; + this.abort = null; + this.aborted = false; + this.retryOpts = { + retry: retryFn ?? _RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1e3, + // 30s, + timeout: minTimeout ?? 500, + // .5s + 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; + this.handler.onConnect((reason) => { + this.aborted = true; + if (this.abort) { + this.abort(reason); + } else { + this.reason = reason; } }); - }); - } - - // By default terminate process when spawned process terminates. - const exitCallback = this._exitCallback; - proc.on('close', (code) => { - code = code ?? 1; // code is null if spawned process terminated due to a signal - if (!exitCallback) { - process.exit(code); - } else { - exitCallback( - new CommanderError( - code, - 'commander.executeSubCommandAsync', - '(close)', - ), - ); } - }); - proc.on('error', (err) => { - // @ts-ignore: because err.code is an unknown property - if (err.code === 'ENOENT') { - const executableDirMessage = executableDir - ? `searched for local subcommand relative to directory '${executableDir}'` - : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory'; - const executableMissing = `'${executableFile}' does not exist - - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead - - if the default executable name is not suitable, use the executableFile option to supply a custom name or path - - ${executableDirMessage}`; - throw new Error(executableMissing); - // @ts-ignore: because err.code is an unknown property - } else if (err.code === 'EACCES') { - throw new Error(`'${executableFile}' not executable`); + onRequestSent() { + if (this.handler.onRequestSent) { + this.handler.onRequestSent(); + } } - if (!exitCallback) { - process.exit(1); - } else { - const wrappedError = new CommanderError( - 1, - 'commander.executeSubCommandAsync', - '(error)', - ); - wrappedError.nestedError = err; - exitCallback(wrappedError); + onUpgrade(statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket); + } } - }); - - // Store the reference to the child process - this.runningCommand = proc; - } - - /** - * @private - */ - - _dispatchSubcommand(commandName, operands, unknown) { - const subCommand = this._findCommand(commandName); - if (!subCommand) this.help({ error: true }); - - let promiseChain; - promiseChain = this._chainOrCallSubCommandHook( - promiseChain, - subCommand, - 'preSubcommand', - ); - promiseChain = this._chainOrCall(promiseChain, () => { - if (subCommand._executableHandler) { - this._executeSubCommand(subCommand, operands.concat(unknown)); - } else { - return subCommand._parseCommand(operands, unknown); + onConnect(abort) { + if (this.aborted) { + abort(this.reason); + } else { + this.abort = abort; + } + } + onBodySent(chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + } + static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { + const { statusCode, code, headers } = err; + const { method, retryOptions } = opts; + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions; + let { counter, currentTimeout } = state; + currentTimeout = currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout; + if (code && code !== "UND_ERR_REQ_RETRY" && code !== "UND_ERR_SOCKET" && !errorCodes.includes(code)) { + cb(err); + return; + } + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err); + return; + } + if (statusCode != null && Array.isArray(statusCodes) && !statusCodes.includes(statusCode)) { + cb(err); + return; + } + if (counter > maxRetries) { + cb(err); + return; + } + let retryAfterHeader = headers != null && headers["retry-after"]; + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader); + retryAfterHeader = isNaN(retryAfterHeader) ? calculateRetryAfterHeader(retryAfterHeader) : retryAfterHeader * 1e3; + } + const retryTimeout = retryAfterHeader > 0 ? Math.min(retryAfterHeader, maxTimeout) : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout); + state.currentTimeout = retryTimeout; + setTimeout(() => cb(null), retryTimeout); + } + onHeaders(statusCode, rawHeaders, resume2, statusMessage) { + const headers = parseHeaders(rawHeaders); + this.retryCount += 1; + if (statusCode >= 300) { + this.abort( + new RequestRetryError("Request failed", statusCode, { + headers, + count: this.retryCount + }) + ); + return false; + } + if (this.resume != null) { + this.resume = null; + if (statusCode !== 206) { + return true; + } + const contentRange = parseRangeHeader(headers["content-range"]); + if (!contentRange) { + this.abort( + new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + count: this.retryCount + }) + ); + return false; + } + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError("ETag mismatch", statusCode, { + headers, + count: this.retryCount + }) + ); + return false; + } + const { start, size, end: end2 = size } = contentRange; + assert(this.start === start, "content-range mismatch"); + assert(this.end == null || this.end === end2, "content-range mismatch"); + this.resume = resume2; + return true; + } + if (this.end == null) { + if (statusCode === 206) { + const range = parseRangeHeader(headers["content-range"]); + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume2, + statusMessage + ); + } + const { start, size, end: end2 = size } = range; + assert( + start != null && Number.isFinite(start) && this.start !== start, + "content-range mismatch" + ); + assert(Number.isFinite(start)); + assert( + end2 != null && Number.isFinite(end2) && this.end !== end2, + "invalid content-length" + ); + this.start = start; + this.end = end2; + } + if (this.end == null) { + const contentLength = headers["content-length"]; + this.end = contentLength != null ? Number(contentLength) : null; + } + assert(Number.isFinite(this.start)); + assert( + this.end == null || Number.isFinite(this.end), + "invalid content-length" + ); + this.resume = resume2; + this.etag = headers.etag != null ? headers.etag : null; + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume2, + statusMessage + ); + } + const err = new RequestRetryError("Request failed", statusCode, { + 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); + } + onError(err) { + if (this.aborted || 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 } + }, + onRetry.bind(this) + ); + function onRetry(err2) { + if (err2 != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err2); + } + 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 (err3) { + this.handler.onError(err3); + } + } } - }); - return promiseChain; + }; + module2.exports = RetryHandler; } +}); - /** - * Invoke help directly if possible, or dispatch if necessary. - * e.g. help foo - * - * @private - */ - - _dispatchHelpCommand(subcommandName) { - if (!subcommandName) { - this.help(); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/global.js +var require_global2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/global.js"(exports2, module2) { + "use strict"; + var globalDispatcher = Symbol.for("undici.globalDispatcher.1"); + var { InvalidArgumentError } = require_errors3(); + var Agent3 = require_agent(); + if (getGlobalDispatcher() === void 0) { + setGlobalDispatcher(new Agent3()); + } + function setGlobalDispatcher(agent) { + if (!agent || typeof agent.dispatch !== "function") { + throw new InvalidArgumentError("Argument agent must implement Agent"); + } + Object.defineProperty(globalThis, globalDispatcher, { + value: agent, + writable: true, + enumerable: false, + configurable: false + }); } - const subCommand = this._findCommand(subcommandName); - if (subCommand && !subCommand._executableHandler) { - subCommand.help(); + function getGlobalDispatcher() { + return globalThis[globalDispatcher]; } - - // Fallback to parsing the help flag to invoke the help. - return this._dispatchSubcommand( - subcommandName, - [], - [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'], - ); + module2.exports = { + setGlobalDispatcher, + getGlobalDispatcher + }; } +}); - /** - * Check this.args against expected this.registeredArguments. - * - * @private - */ - - _checkNumberOfArguments() { - // too few - this.registeredArguments.forEach((arg, i) => { - if (arg.required && this.args[i] == null) { - this.missingArgument(arg.name()); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/DecoratorHandler.js +var require_DecoratorHandler = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/handler/DecoratorHandler.js"(exports2, module2) { + "use strict"; + module2.exports = class DecoratorHandler { + constructor(handler2) { + this.handler = handler2; } - }); - // too many - if ( - this.registeredArguments.length > 0 && - this.registeredArguments[this.registeredArguments.length - 1].variadic - ) { - return; - } - if (this.args.length > this.registeredArguments.length) { - this._excessArguments(this.args); - } - } - - /** - * Process this.args using this.registeredArguments and save as this.processedArgs! - * - * @private - */ - - _processArguments() { - const myParseArg = (argument, value, previous) => { - // Extra processing for nice error message on parsing failure. - let parsedValue = value; - if (value !== null && argument.parseArg) { - const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`; - parsedValue = this._callParseArg( - argument, - value, - previous, - invalidValueMessage, - ); + 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); } - return parsedValue; }; + } +}); - this._checkNumberOfArguments(); - - const processedArgs = []; - this.registeredArguments.forEach((declaredArg, index) => { - let value = declaredArg.defaultValue; - if (declaredArg.variadic) { - // Collect together remaining arguments for passing together as an array. - if (index < this.args.length) { - value = this.args.slice(index); - if (declaredArg.parseArg) { - value = value.reduce((processed, v) => { - return myParseArg(declaredArg, v, processed); - }, declaredArg.defaultValue); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/headers.js +var require_headers = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/headers.js"(exports2, module2) { + "use strict"; + var { kHeadersList, kConstruct } = require_symbols3(); + var { kGuard } = require_symbols4(); + var { kEnumerableProperty } = require_util2(); + var { + makeIterator, + isValidHeaderName, + isValidHeaderValue + } = require_util3(); + var { webidl } = require_webidl(); + var assert = __require("assert"); + var kHeadersMap = Symbol("headers map"); + var kHeadersSortedMap = Symbol("headers map sorted"); + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + function headerValueNormalize(potentialValue) { + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); + } + function fill2(headers, object) { + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) { + throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` + }); } - } else if (value === undefined) { - value = []; + appendHeader(headers, header[0], header[1]); } - } else if (index < this.args.length) { - value = this.args[index]; - if (declaredArg.parseArg) { - value = myParseArg(declaredArg, value, declaredArg.defaultValue); + } else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]); } - } - processedArgs[index] = value; - }); - this.processedArgs = processedArgs; - } - - /** - * Once we have a promise we chain, but call synchronously until then. - * - * @param {(Promise|undefined)} promise - * @param {Function} fn - * @return {(Promise|undefined)} - * @private - */ - - _chainOrCall(promise, fn) { - // thenable - if (promise && promise.then && typeof promise.then === 'function') { - // already have a promise, chain callback - return promise.then(() => fn()); - } - // callback might return a promise - return fn(); - } - - /** - * - * @param {(Promise|undefined)} promise - * @param {string} event - * @return {(Promise|undefined)} - * @private - */ - - _chainOrCallHooks(promise, event) { - let result = promise; - const hooks = []; - this._getCommandAndAncestors() - .reverse() - .filter((cmd) => cmd._lifeCycleHooks[event] !== undefined) - .forEach((hookedCommand) => { - hookedCommand._lifeCycleHooks[event].forEach((callback) => { - hooks.push({ hookedCommand, callback }); + } else { + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] }); - }); - if (event === 'postAction') { - hooks.reverse(); + } } - - hooks.forEach((hookDetail) => { - result = this._chainOrCall(result, () => { - return hookDetail.callback(hookDetail.hookedCommand, this); - }); - }); - return result; - } - - /** - * - * @param {(Promise|undefined)} promise - * @param {Command} subCommand - * @param {string} event - * @return {(Promise|undefined)} - * @private - */ - - _chainOrCallSubCommandHook(promise, subCommand, event) { - let result = promise; - if (this._lifeCycleHooks[event] !== undefined) { - this._lifeCycleHooks[event].forEach((hook) => { - result = this._chainOrCall(result, () => { - return hook(this, subCommand); + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" }); - }); - } - return result; - } - - /** - * Process arguments in context of this command. - * Returns action result, in case it is a promise. - * - * @private - */ - - _parseCommand(operands, unknown) { - const parsed = this.parseOptions(unknown); - this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env - this._parseOptionsImplied(); - operands = operands.concat(parsed.operands); - unknown = parsed.unknown; - this.args = operands.concat(unknown); - - if (operands && this._findCommand(operands[0])) { - return this._dispatchSubcommand(operands[0], operands.slice(1), unknown); - } - if ( - this._getHelpCommand() && - operands[0] === this._getHelpCommand().name() - ) { - return this._dispatchHelpCommand(operands[1]); - } - if (this._defaultCommandName) { - this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command - return this._dispatchSubcommand( - this._defaultCommandName, - operands, - unknown, - ); - } - if ( - this.commands.length && - this.args.length === 0 && - !this._actionHandler && - !this._defaultCommandName - ) { - // probably missing subcommand and no handler, user needs help (and exit) - this.help({ error: true }); - } - - this._outputHelpIfRequested(parsed.unknown); - this._checkForMissingMandatoryOptions(); - this._checkForConflictingOptions(); - - // We do not always call this check to avoid masking a "better" error, like unknown command. - const checkForUnknownOptions = () => { - if (parsed.unknown.length > 0) { - this.unknownOption(parsed.unknown[0]); - } - }; - - const commandEvent = `command:${this.name()}`; - if (this._actionHandler) { - checkForUnknownOptions(); - this._processArguments(); - - let promiseChain; - promiseChain = this._chainOrCallHooks(promiseChain, 'preAction'); - promiseChain = this._chainOrCall(promiseChain, () => - this._actionHandler(this.processedArgs), - ); - if (this.parent) { - promiseChain = this._chainOrCall(promiseChain, () => { - this.parent.emit(commandEvent, operands, unknown); // legacy + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" }); } - promiseChain = this._chainOrCallHooks(promiseChain, 'postAction'); - return promiseChain; - } - if (this.parent && this.parent.listenerCount(commandEvent)) { - checkForUnknownOptions(); - this._processArguments(); - this.parent.emit(commandEvent, operands, unknown); // legacy - } else if (operands.length) { - if (this._findCommand('*')) { - // legacy default command - return this._dispatchSubcommand('*', operands, unknown); - } - if (this.listenerCount('command:*')) { - // skip option check, emit event for possible misspelling suggestion - this.emit('command:*', operands, unknown); - } else if (this.commands.length) { - this.unknownCommand(); - } else { - checkForUnknownOptions(); - this._processArguments(); + if (headers[kGuard] === "immutable") { + throw new TypeError("immutable"); + } else if (headers[kGuard] === "request-no-cors") { } - } else if (this.commands.length) { - checkForUnknownOptions(); - // This command has subcommands and nothing hooked up at this level, so display help (and exit). - this.help({ error: true }); - } else { - checkForUnknownOptions(); - this._processArguments(); - // fall through for caller to handle after calling .parse() - } - } - - /** - * Find matching command. - * - * @private - * @return {Command | undefined} - */ - _findCommand(name) { - if (!name) return undefined; - return this.commands.find( - (cmd) => cmd._name === name || cmd._aliases.includes(name), - ); - } - - /** - * Return an option matching `arg` if any. - * - * @param {string} arg - * @return {Option} - * @package - */ - - _findOption(arg) { - return this.options.find((option) => option.is(arg)); - } - - /** - * Display an error message if a mandatory option does not have a value. - * Called after checking for help flags in leaf subcommand. - * - * @private - */ - - _checkForMissingMandatoryOptions() { - // Walk up hierarchy so can call in subcommand after checking for displaying help. - this._getCommandAndAncestors().forEach((cmd) => { - cmd.options.forEach((anOption) => { - if ( - anOption.mandatory && - cmd.getOptionValue(anOption.attributeName()) === undefined - ) { - cmd.missingMandatoryOptionValue(anOption); + return headers[kHeadersList].append(name, value); + } + var HeadersList = class _HeadersList { + /** @type {[string, string][]|null} */ + cookies = null; + constructor(init2) { + if (init2 instanceof _HeadersList) { + this[kHeadersMap] = new Map(init2[kHeadersMap]); + this[kHeadersSortedMap] = init2[kHeadersSortedMap]; + this.cookies = init2.cookies === null ? null : [...init2.cookies]; + } else { + this[kHeadersMap] = new Map(init2); + this[kHeadersSortedMap] = null; + } + } + // https://fetch.spec.whatwg.org/#header-list-contains + contains(name) { + name = name.toLowerCase(); + return this[kHeadersMap].has(name); + } + clear() { + this[kHeadersMap].clear(); + this[kHeadersSortedMap] = null; + this.cookies = null; + } + // https://fetch.spec.whatwg.org/#concept-header-list-append + append(name, value) { + this[kHeadersSortedMap] = null; + const lowercaseName = name.toLowerCase(); + const exists = this[kHeadersMap].get(lowercaseName); + if (exists) { + const delimiter = lowercaseName === "cookie" ? "; " : ", "; + this[kHeadersMap].set(lowercaseName, { + name: exists.name, + value: `${exists.value}${delimiter}${value}` + }); + } else { + this[kHeadersMap].set(lowercaseName, { name, value }); + } + if (lowercaseName === "set-cookie") { + this.cookies ??= []; + this.cookies.push(value); } - }); - }); - } - - /** - * Display an error message if conflicting options are used together in this. - * - * @private - */ - _checkForConflictingLocalOptions() { - const definedNonDefaultOptions = this.options.filter((option) => { - const optionKey = option.attributeName(); - if (this.getOptionValue(optionKey) === undefined) { - return false; } - return this.getOptionValueSource(optionKey) !== 'default'; - }); - - const optionsWithConflicting = definedNonDefaultOptions.filter( - (option) => option.conflictsWith.length > 0, - ); - - optionsWithConflicting.forEach((option) => { - const conflictingAndDefined = definedNonDefaultOptions.find((defined) => - option.conflictsWith.includes(defined.attributeName()), - ); - if (conflictingAndDefined) { - this._conflictingOption(option, conflictingAndDefined); + // https://fetch.spec.whatwg.org/#concept-header-list-set + set(name, value) { + this[kHeadersSortedMap] = null; + const lowercaseName = name.toLowerCase(); + if (lowercaseName === "set-cookie") { + this.cookies = [value]; + } + this[kHeadersMap].set(lowercaseName, { name, value }); } - }); - } - - /** - * Display an error message if conflicting options are used together. - * Called after checking for help flags in leaf subcommand. - * - * @private - */ - _checkForConflictingOptions() { - // Walk up hierarchy so can call in subcommand after checking for displaying help. - this._getCommandAndAncestors().forEach((cmd) => { - cmd._checkForConflictingLocalOptions(); - }); - } - - /** - * Parse options from `argv` removing known options, - * and return argv split into operands and unknown arguments. - * - * Examples: - * - * argv => operands, unknown - * --known kkk op => [op], [] - * op --known kkk => [op], [] - * sub --unknown uuu op => [sub], [--unknown uuu op] - * sub -- --unknown uuu op => [sub --unknown uuu op], [] - * - * @param {string[]} argv - * @return {{operands: string[], unknown: string[]}} - */ - - parseOptions(argv) { - const operands = []; // operands, not options or values - const unknown = []; // first unknown option and remaining unknown args - let dest = operands; - const args = argv.slice(); - - function maybeOption(arg) { - return arg.length > 1 && arg[0] === '-'; - } - - // parse options - let activeVariadicOption = null; - while (args.length) { - const arg = args.shift(); - - // literal - if (arg === '--') { - if (dest === unknown) dest.push(arg); - dest.push(...args); - break; + // https://fetch.spec.whatwg.org/#concept-header-list-delete + delete(name) { + this[kHeadersSortedMap] = null; + name = name.toLowerCase(); + if (name === "set-cookie") { + this.cookies = null; + } + this[kHeadersMap].delete(name); } - - if (activeVariadicOption && !maybeOption(arg)) { - this.emit(`option:${activeVariadicOption.name()}`, arg); - continue; + // https://fetch.spec.whatwg.org/#concept-header-list-get + get(name) { + const value = this[kHeadersMap].get(name.toLowerCase()); + return value === void 0 ? null : value.value; } - activeVariadicOption = null; - - if (maybeOption(arg)) { - const option = this._findOption(arg); - // recognised option, call listener to assign value with possible custom processing - if (option) { - if (option.required) { - const value = args.shift(); - if (value === undefined) this.optionMissingArgument(option); - this.emit(`option:${option.name()}`, value); - } else if (option.optional) { - let value = null; - // historical behaviour is optional value is following arg unless an option - if (args.length > 0 && !maybeOption(args[0])) { - value = args.shift(); - } - this.emit(`option:${option.name()}`, value); - } else { - // boolean flag - this.emit(`option:${option.name()}`); + *[Symbol.iterator]() { + for (const [name, { value }] of this[kHeadersMap]) { + yield [name, value]; + } + } + get entries() { + const headers = {}; + if (this[kHeadersMap].size) { + for (const { name, value } of this[kHeadersMap].values()) { + headers[name] = value; } - activeVariadicOption = option.variadic ? option : null; - continue; } + return headers; } - - // Look for combo options following single dash, eat first one if known. - if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') { - const option = this._findOption(`-${arg[1]}`); - if (option) { - if ( - option.required || - (option.optional && this._combineFlagAndOptionalValue) - ) { - // option with value following in same argument - this.emit(`option:${option.name()}`, arg.slice(2)); + }; + var Headers2 = class _Headers { + constructor(init2 = void 0) { + if (init2 === kConstruct) { + return; + } + this[kHeadersList] = new HeadersList(); + this[kGuard] = "none"; + if (init2 !== void 0) { + init2 = webidl.converters.HeadersInit(init2); + fill2(this, init2); + } + } + // https://fetch.spec.whatwg.org/#dom-headers-append + append(name, value) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); + name = webidl.converters.ByteString(name); + value = webidl.converters.ByteString(value); + return appendHeader(this, name, value); + } + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, { header: "Headers.delete" }); + name = webidl.converters.ByteString(name); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + } + if (this[kGuard] === "immutable") { + throw new TypeError("immutable"); + } else if (this[kGuard] === "request-no-cors") { + } + if (!this[kHeadersList].contains(name)) { + return; + } + this[kHeadersList].delete(name); + } + // https://fetch.spec.whatwg.org/#dom-headers-get + get(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, { header: "Headers.get" }); + name = webidl.converters.ByteString(name); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.get", + value: name, + type: "header name" + }); + } + return this[kHeadersList].get(name); + } + // https://fetch.spec.whatwg.org/#dom-headers-has + has(name) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 1, { header: "Headers.has" }); + name = webidl.converters.ByteString(name); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.has", + value: name, + type: "header name" + }); + } + return this[kHeadersList].contains(name); + } + // https://fetch.spec.whatwg.org/#dom-headers-set + set(name, value) { + webidl.brandCheck(this, _Headers); + webidl.argumentLengthCheck(arguments, 2, { header: "Headers.set" }); + name = webidl.converters.ByteString(name); + value = webidl.converters.ByteString(value); + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.set", + value: name, + type: "header name" + }); + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.set", + value, + type: "header value" + }); + } + if (this[kGuard] === "immutable") { + throw new TypeError("immutable"); + } else if (this[kGuard] === "request-no-cors") { + } + this[kHeadersList].set(name, value); + } + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie() { + webidl.brandCheck(this, _Headers); + const list = this[kHeadersList].cookies; + if (list) { + return [...list]; + } + return []; + } + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap]() { + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap]; + } + const headers = []; + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1); + const cookies = this[kHeadersList].cookies; + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i]; + if (name === "set-cookie") { + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]); + } } else { - // boolean option, emit and put back remainder of arg for further processing - this.emit(`option:${option.name()}`); - args.unshift(`-${arg.slice(2)}`); + assert(value !== null); + headers.push([name, value]); } - continue; } + this[kHeadersList][kHeadersSortedMap] = headers; + return headers; + } + keys() { + webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "key" + ); + } + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + "Headers", + "key" + ); } - - // Look for known long flag with value, like --foo=bar - if (/^--[^=]+=/.test(arg)) { - const index = arg.indexOf('='); - const option = this._findOption(arg.slice(0, index)); - if (option && (option.required || option.optional)) { - this.emit(`option:${option.name()}`, arg.slice(index + 1)); - continue; + values() { + webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "value" + ); } + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + "Headers", + "value" + ); } - - // Not a recognised option by this command. - // Might be a command-argument, or subcommand option, or unknown option, or help command or option. - - // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands. - if (maybeOption(arg)) { - dest = unknown; + entries() { + webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "key+value" + ); + } + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + "Headers", + "key+value" + ); } - - // If using positionalOptions, stop processing our options at subcommand. - if ( - (this._enablePositionalOptions || this._passThroughOptions) && - operands.length === 0 && - unknown.length === 0 - ) { - if (this._findCommand(arg)) { - operands.push(arg); - if (args.length > 0) unknown.push(...args); - break; - } else if ( - this._getHelpCommand() && - arg === this._getHelpCommand().name() - ) { - operands.push(arg); - if (args.length > 0) operands.push(...args); - break; - } else if (this._defaultCommandName) { - unknown.push(arg); - if (args.length > 0) unknown.push(...args); - break; + /** + * @param {(value: string, key: string, self: Headers) => void} callbackFn + * @param {unknown} thisArg + */ + forEach(callbackFn, thisArg = globalThis) { + webidl.brandCheck(this, _Headers); + 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 using passThroughOptions, stop processing options at first command-argument. - if (this._passThroughOptions) { - dest.push(arg); - if (args.length > 0) dest.push(...args); - break; + [Symbol.for("nodejs.util.inspect.custom")]() { + webidl.brandCheck(this, _Headers); + return this[kHeadersList]; } - - // add arg - dest.push(arg); - } - - return { operands, unknown }; - } - - /** - * Return an object containing local option values as key-value pairs. - * - * @return {object} - */ - opts() { - if (this._storeOptionsAsProperties) { - // Preserve original behaviour so backwards compatible when still using properties - const result = {}; - const len = this.options.length; - - for (let i = 0; i < len; i++) { - const key = this.options[i].attributeName(); - result[key] = - key === this._versionOptionName ? this._version : this[key]; + }; + Headers2.prototype[Symbol.iterator] = Headers2.prototype.entries; + Object.defineProperties(Headers2.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + keys: kEnumerableProperty, + values: kEnumerableProperty, + entries: kEnumerableProperty, + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: "Headers", + configurable: true } - return result; - } - - return this._optionValues; - } - - /** - * Return an object containing merged local and global option values as key-value pairs. - * - * @return {object} - */ - optsWithGlobals() { - // globals overwrite locals - return this._getCommandAndAncestors().reduce( - (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()), - {}, - ); - } - - /** - * Display error message and exit (or call exitOverride). - * - * @param {string} message - * @param {object} [errorOptions] - * @param {string} [errorOptions.code] - an id string representing the error - * @param {number} [errorOptions.exitCode] - used with process.exit - */ - error(message, errorOptions) { - // output handling - this._outputConfiguration.outputError( - `${message}\n`, - this._outputConfiguration.writeErr, - ); - if (typeof this._showHelpAfterError === 'string') { - this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`); - } else if (this._showHelpAfterError) { - this._outputConfiguration.writeErr('\n'); - this.outputHelp({ error: true }); - } - - // exit handling - const config = errorOptions || {}; - const exitCode = config.exitCode || 1; - const code = config.code || 'commander.error'; - this._exit(exitCode, code, message); - } - - /** - * Apply any option related environment variables, if option does - * not have a value from cli or client code. - * - * @private - */ - _parseOptionsEnv() { - this.options.forEach((option) => { - if (option.envVar && option.envVar in process.env) { - const optionKey = option.attributeName(); - // Priority check. Do not overwrite cli or options from unknown source (client-code). - if ( - this.getOptionValue(optionKey) === undefined || - ['default', 'config', 'env'].includes( - this.getOptionValueSource(optionKey), - ) - ) { - if (option.required || option.optional) { - // option can take a value - // keep very simple, optional always takes value - this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]); - } else { - // boolean - // keep very simple, only care that envVar defined and not the value - this.emit(`optionEnv:${option.name()}`); - } + }); + webidl.converters.HeadersInit = function(V) { + if (webidl.util.Type(V) === "Object") { + if (V[Symbol.iterator]) { + return webidl.converters["sequence>"](V); } + return webidl.converters["record"](V); } - }); - } - - /** - * Apply any implied option values, if option is undefined or default value. - * - * @private - */ - _parseOptionsImplied() { - const dualHelper = new DualOptions(this.options); - const hasCustomOptionValue = (optionKey) => { - return ( - this.getOptionValue(optionKey) !== undefined && - !['default', 'implied'].includes(this.getOptionValueSource(optionKey)) - ); - }; - this.options - .filter( - (option) => - option.implied !== undefined && - hasCustomOptionValue(option.attributeName()) && - dualHelper.valueFromOption( - this.getOptionValue(option.attributeName()), - option, - ), - ) - .forEach((option) => { - Object.keys(option.implied) - .filter((impliedKey) => !hasCustomOptionValue(impliedKey)) - .forEach((impliedKey) => { - this.setOptionValueWithSource( - impliedKey, - option.implied[impliedKey], - 'implied', - ); - }); + throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] }); + }; + module2.exports = { + fill: fill2, + Headers: Headers2, + HeadersList + }; } +}); - /** - * Argument `name` is missing. - * - * @param {string} name - * @private - */ - - missingArgument(name) { - const message = `error: missing required argument '${name}'`; - this.error(message, { code: 'commander.missingArgument' }); - } - - /** - * `Option` is missing an argument. - * - * @param {Option} option - * @private - */ - - optionMissingArgument(option) { - const message = `error: option '${option.flags}' argument missing`; - this.error(message, { code: 'commander.optionMissingArgument' }); - } - - /** - * `Option` does not have a value, and is a mandatory option. - * - * @param {Option} option - * @private - */ - - missingMandatoryOptionValue(option) { - const message = `error: required option '${option.flags}' not specified`; - this.error(message, { code: 'commander.missingMandatoryOptionValue' }); - } - - /** - * `Option` conflicts with another option. - * - * @param {Option} option - * @param {Option} conflictingOption - * @private - */ - _conflictingOption(option, conflictingOption) { - // The calling code does not know whether a negated option is the source of the - // value, so do some work to take an educated guess. - const findBestOptionFromValue = (option) => { - const optionKey = option.attributeName(); - const optionValue = this.getOptionValue(optionKey); - const negativeOption = this.options.find( - (target) => target.negate && optionKey === target.attributeName(), - ); - const positiveOption = this.options.find( - (target) => !target.negate && optionKey === target.attributeName(), - ); - if ( - negativeOption && - ((negativeOption.presetArg === undefined && optionValue === false) || - (negativeOption.presetArg !== undefined && - optionValue === negativeOption.presetArg)) - ) { - return negativeOption; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/response.js +var require_response2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/response.js"(exports2, module2) { + "use strict"; + var { Headers: Headers2, HeadersList, fill: fill2 } = require_headers(); + var { extractBody, cloneBody, mixinBody } = require_body(); + var util2 = require_util2(); + var { kEnumerableProperty } = util2; + var { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode + } = require_util3(); + var { + redirectStatusSet, + nullBodyStatus, + DOMException: DOMException2 + } = require_constants5(); + var { kState, kHeaders, kGuard, kRealm } = require_symbols4(); + var { webidl } = require_webidl(); + var { FormData } = require_formdata(); + var { getGlobalOrigin } = require_global(); + var { URLSerializer } = require_dataURL(); + var { kHeadersList, kConstruct } = require_symbols3(); + var assert = __require("assert"); + var { types: types2 } = __require("util"); + var ReadableStream = globalThis.ReadableStream || __require("stream/web").ReadableStream; + var textEncoder = new TextEncoder("utf-8"); + var Response2 = class _Response { + // Creates network error Response. + static error() { + const relevantRealm = { settingsObject: {} }; + const responseObject = new _Response(); + responseObject[kState] = makeNetworkError(); + responseObject[kRealm] = relevantRealm; + responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList; + responseObject[kHeaders][kGuard] = "immutable"; + responseObject[kHeaders][kRealm] = relevantRealm; + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response-json + static json(data, init2 = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: "Response.json" }); + if (init2 !== null) { + init2 = webidl.converters.ResponseInit(init2); + } + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ); + const body = extractBody(bytes); + const relevantRealm = { settingsObject: {} }; + const responseObject = new _Response(); + responseObject[kRealm] = relevantRealm; + responseObject[kHeaders][kGuard] = "response"; + responseObject[kHeaders][kRealm] = relevantRealm; + initializeResponse(responseObject, init2, { body: body[0], type: "application/json" }); + return responseObject; + } + // Creates a redirect Response that redirects to url with status status. + static redirect(url, status = 302) { + const relevantRealm = { settingsObject: {} }; + webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); + url = webidl.converters.USVString(url); + status = webidl.converters["unsigned short"](status); + let parsedURL; + try { + parsedURL = new URL(url, getGlobalOrigin()); + } catch (err) { + throw Object.assign(new TypeError("Failed to parse URL from " + url), { + cause: err + }); + } + if (!redirectStatusSet.has(status)) { + throw new RangeError("Invalid status code " + status); + } + const responseObject = new _Response(); + responseObject[kRealm] = relevantRealm; + responseObject[kHeaders][kGuard] = "immutable"; + responseObject[kHeaders][kRealm] = relevantRealm; + responseObject[kState].status = status; + const value = isomorphicEncode(URLSerializer(parsedURL)); + responseObject[kState].headersList.append("location", value); + return responseObject; + } + // https://fetch.spec.whatwg.org/#dom-response + constructor(body = null, init2 = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body); + } + init2 = webidl.converters.ResponseInit(init2); + this[kRealm] = { settingsObject: {} }; + this[kState] = makeResponse({}); + this[kHeaders] = new Headers2(kConstruct); + this[kHeaders][kGuard] = "response"; + this[kHeaders][kHeadersList] = this[kState].headersList; + this[kHeaders][kRealm] = this[kRealm]; + let bodyWithType = null; + if (body != null) { + const [extractedBody, type2] = extractBody(body); + bodyWithType = { body: extractedBody, type: type2 }; + } + initializeResponse(this, init2, bodyWithType); + } + // Returns response’s type, e.g., "cors". + get type() { + webidl.brandCheck(this, _Response); + return this[kState].type; + } + // Returns response’s URL, if it has one; otherwise the empty string. + get url() { + webidl.brandCheck(this, _Response); + const urlList = this[kState].urlList; + const url = urlList[urlList.length - 1] ?? null; + if (url === null) { + return ""; + } + return URLSerializer(url, true); + } + // Returns whether response was obtained through a redirect. + get redirected() { + webidl.brandCheck(this, _Response); + return this[kState].urlList.length > 1; + } + // Returns response’s status. + get status() { + webidl.brandCheck(this, _Response); + return this[kState].status; + } + // Returns whether response’s status is an ok status. + get ok() { + webidl.brandCheck(this, _Response); + return this[kState].status >= 200 && this[kState].status <= 299; + } + // Returns response’s status message. + get statusText() { + webidl.brandCheck(this, _Response); + return this[kState].statusText; + } + // Returns response’s headers as Headers. + get headers() { + webidl.brandCheck(this, _Response); + return this[kHeaders]; + } + get body() { + webidl.brandCheck(this, _Response); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Response); + return !!this[kState].body && util2.isDisturbed(this[kState].body.stream); + } + // Returns a clone of response. + clone() { + webidl.brandCheck(this, _Response); + if (this.bodyUsed || this.body && this.body.locked) { + throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); + } + const clonedResponse = cloneResponse(this[kState]); + const clonedResponseObject = new _Response(); + clonedResponseObject[kState] = clonedResponse; + clonedResponseObject[kRealm] = this[kRealm]; + clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList; + clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard]; + clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm]; + return clonedResponseObject; } - return positiveOption || option; }; - - const getErrorMessage = (option) => { - const bestOption = findBestOptionFromValue(option); - const optionKey = bestOption.attributeName(); - const source = this.getOptionValueSource(optionKey); - if (source === 'env') { - return `environment variable '${bestOption.envVar}'`; + mixinBody(Response2); + Object.defineProperties(Response2.prototype, { + type: kEnumerableProperty, + url: kEnumerableProperty, + status: kEnumerableProperty, + ok: kEnumerableProperty, + redirected: kEnumerableProperty, + statusText: kEnumerableProperty, + headers: kEnumerableProperty, + clone: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Response", + configurable: true } - return `option '${bestOption.flags}'`; - }; - - const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`; - this.error(message, { code: 'commander.conflictingOption' }); - } - - /** - * Unknown option `flag`. - * - * @param {string} flag - * @private - */ - - unknownOption(flag) { - if (this._allowUnknownOption) return; - let suggestion = ''; - - if (flag.startsWith('--') && this._showSuggestionAfterError) { - // Looping to pick up the global options too - let candidateFlags = []; - // eslint-disable-next-line @typescript-eslint/no-this-alias - let command = this; - do { - const moreFlags = command - .createHelp() - .visibleOptions(command) - .filter((option) => option.long) - .map((option) => option.long); - candidateFlags = candidateFlags.concat(moreFlags); - command = command.parent; - } while (command && !command._enablePositionalOptions); - suggestion = suggestSimilar(flag, candidateFlags); - } - - const message = `error: unknown option '${flag}'${suggestion}`; - this.error(message, { code: 'commander.unknownOption' }); - } - - /** - * Excess arguments, more than expected. - * - * @param {string[]} receivedArgs - * @private - */ - - _excessArguments(receivedArgs) { - if (this._allowExcessArguments) return; - - const expected = this.registeredArguments.length; - const s = expected === 1 ? '' : 's'; - const forSubcommand = this.parent ? ` for '${this.name()}'` : ''; - const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`; - this.error(message, { code: 'commander.excessArguments' }); - } - - /** - * Unknown command. - * - * @private - */ - - unknownCommand() { - const unknownName = this.args[0]; - let suggestion = ''; - - if (this._showSuggestionAfterError) { - const candidateNames = []; - this.createHelp() - .visibleCommands(this) - .forEach((command) => { - candidateNames.push(command.name()); - // just visible alias - if (command.alias()) candidateNames.push(command.alias()); - }); - suggestion = suggestSimilar(unknownName, candidateNames); - } - - const message = `error: unknown command '${unknownName}'${suggestion}`; - this.error(message, { code: 'commander.unknownCommand' }); - } - - /** - * Get or set the program version. - * - * This method auto-registers the "-V, --version" option which will print the version number. - * - * You can optionally supply the flags and description to override the defaults. - * - * @param {string} [str] - * @param {string} [flags] - * @param {string} [description] - * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments - */ - - version(str, flags, description) { - if (str === undefined) return this._version; - this._version = str; - flags = flags || '-V, --version'; - description = description || 'output the version number'; - const versionOption = this.createOption(flags, description); - this._versionOptionName = versionOption.attributeName(); - this._registerOption(versionOption); - - this.on('option:' + versionOption.name(), () => { - this._outputConfiguration.writeOut(`${str}\n`); - this._exit(0, 'commander.version', str); }); - return this; - } - - /** - * Set the description. - * - * @param {string} [str] - * @param {object} [argsDescription] - * @return {(string|Command)} - */ - description(str, argsDescription) { - if (str === undefined && argsDescription === undefined) - return this._description; - this._description = str; - if (argsDescription) { - this._argsDescription = argsDescription; - } - return this; - } - - /** - * Set the summary. Used when listed as subcommand of parent. - * - * @param {string} [str] - * @return {(string|Command)} - */ - summary(str) { - if (str === undefined) return this._summary; - this._summary = str; - return this; - } - - /** - * Set an alias for the command. - * - * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help. - * - * @param {string} [alias] - * @return {(string|Command)} - */ - - alias(alias) { - if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility - - /** @type {Command} */ - // eslint-disable-next-line @typescript-eslint/no-this-alias - let command = this; - if ( - this.commands.length !== 0 && - this.commands[this.commands.length - 1]._executableHandler - ) { - // assume adding alias for last added executable subcommand, rather than this - command = this.commands[this.commands.length - 1]; - } - - if (alias === command._name) - throw new Error("Command alias can't be the same as its name"); - const matchingCommand = this.parent?._findCommand(alias); - if (matchingCommand) { - // c.f. _registerCommand - const existingCmd = [matchingCommand.name()] - .concat(matchingCommand.aliases()) - .join('|'); - throw new Error( - `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`, - ); - } - - command._aliases.push(alias); - return this; - } - - /** - * Set aliases for the command. - * - * Only the first alias is shown in the auto-generated help. - * - * @param {string[]} [aliases] - * @return {(string[]|Command)} - */ - - aliases(aliases) { - // Getter for the array of aliases is the main reason for having aliases() in addition to alias(). - if (aliases === undefined) return this._aliases; - - aliases.forEach((alias) => this.alias(alias)); - return this; - } - - /** - * Set / get the command usage `str`. - * - * @param {string} [str] - * @return {(string|Command)} - */ - - usage(str) { - if (str === undefined) { - if (this._usage) return this._usage; - - const args = this.registeredArguments.map((arg) => { - return humanReadableArgName(arg); - }); - return [] - .concat( - this.options.length || this._helpOption !== null ? '[options]' : [], - this.commands.length ? '[command]' : [], - this.registeredArguments.length ? args : [], - ) - .join(' '); - } - - this._usage = str; - return this; - } - - /** - * Get or set the name of the command. - * - * @param {string} [str] - * @return {(string|Command)} - */ - - name(str) { - if (str === undefined) return this._name; - this._name = str; - return this; - } - - /** - * Set the name of the command from script filename, such as process.argv[1], - * or require.main.filename, or __filename. - * - * (Used internally and public although not documented in README.) - * - * @example - * program.nameFromFilename(require.main.filename); - * - * @param {string} filename - * @return {Command} - */ - - nameFromFilename(filename) { - this._name = path.basename(filename, path.extname(filename)); - - return this; - } - - /** - * Get or set the directory for searching for executable subcommands of this command. - * - * @example - * program.executableDir(__dirname); - * // or - * program.executableDir('subcommands'); - * - * @param {string} [path] - * @return {(string|null|Command)} - */ - - executableDir(path) { - if (path === undefined) return this._executableDir; - this._executableDir = path; - return this; - } - - /** - * Return program help documentation. - * - * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout - * @return {string} - */ - - helpInformation(contextOptions) { - const helper = this.createHelp(); - if (helper.helpWidth === undefined) { - helper.helpWidth = - contextOptions && contextOptions.error - ? this._outputConfiguration.getErrHelpWidth() - : this._outputConfiguration.getOutHelpWidth(); - } - return helper.formatHelp(this, helper); - } - - /** - * @private - */ - - _getHelpContext(contextOptions) { - contextOptions = contextOptions || {}; - const context = { error: !!contextOptions.error }; - let write; - if (context.error) { - write = (arg) => this._outputConfiguration.writeErr(arg); - } else { - write = (arg) => this._outputConfiguration.writeOut(arg); + Object.defineProperties(Response2, { + json: kEnumerableProperty, + redirect: kEnumerableProperty, + error: kEnumerableProperty + }); + function cloneResponse(response) { + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ); + } + const newResponse = makeResponse({ ...response, body: null }); + if (response.body != null) { + newResponse.body = cloneBody(response.body); + } + return newResponse; } - context.write = contextOptions.write || write; - context.command = this; - return context; - } - - /** - * Output help information for this command. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - * - * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout - */ - - outputHelp(contextOptions) { - let deprecatedCallback; - if (typeof contextOptions === 'function') { - deprecatedCallback = contextOptions; - contextOptions = undefined; + function makeResponse(init2) { + return { + aborted: false, + rangeRequested: false, + timingAllowPassed: false, + requestIncludesCredentials: false, + type: "default", + status: 200, + timingInfo: null, + cacheState: "", + statusText: "", + ...init2, + headersList: init2.headersList ? new HeadersList(init2.headersList) : new HeadersList(), + urlList: init2.urlList ? [...init2.urlList] : [] + }; } - const context = this._getHelpContext(contextOptions); - - this._getCommandAndAncestors() - .reverse() - .forEach((command) => command.emit('beforeAllHelp', context)); - this.emit('beforeHelp', context); - - let helpInformation = this.helpInformation(context); - if (deprecatedCallback) { - helpInformation = deprecatedCallback(helpInformation); - if ( - typeof helpInformation !== 'string' && - !Buffer.isBuffer(helpInformation) - ) { - throw new Error('outputHelp callback must return a string or a Buffer'); - } + function makeNetworkError(reason) { + const isError2 = isErrorLike(reason); + return makeResponse({ + type: "error", + status: 0, + error: isError2 ? reason : new Error(reason ? String(reason) : reason), + aborted: reason && reason.name === "AbortError" + }); } - context.write(helpInformation); - - if (this._getHelpOption()?.long) { - this.emit(this._getHelpOption().long); // deprecated + function 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) { + assert(!(p in state)); + target[p] = value; + return true; + } + }); } - this.emit('afterHelp', context); - this._getCommandAndAncestors().forEach((command) => - command.emit('afterAllHelp', context), - ); - } - - /** - * You can pass in flags and a description to customise the built-in help option. - * Pass in false to disable the built-in help option. - * - * @example - * program.helpOption('-?, --help' 'show help'); // customise - * program.helpOption(false); // disable - * - * @param {(string | boolean)} flags - * @param {string} [description] - * @return {Command} `this` command for chaining - */ - - helpOption(flags, description) { - // Support disabling built-in help option. - if (typeof flags === 'boolean') { - if (flags) { - this._helpOption = this._helpOption ?? undefined; // preserve existing option + function filterResponse(response, type2) { + if (type2 === "basic") { + return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + } else if (type2 === "cors") { + return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + } else if (type2 === "opaque") { + return makeFilteredResponse(response, { + type: "opaque", + urlList: Object.freeze([]), + status: 0, + statusText: "", + body: null + }); + } else if (type2 === "opaqueredirect") { + return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); } else { - this._helpOption = null; // disable + assert(false); } - return this; } - - // Customise flags and description. - flags = flags ?? '-h, --help'; - description = description ?? 'display help for command'; - this._helpOption = this.createOption(flags, description); - - return this; - } - - /** - * Lazy create help option. - * Returns null if has been disabled with .helpOption(false). - * - * @returns {(Option | null)} the help option - * @package - */ - _getHelpOption() { - // Lazy create help option on demand. - if (this._helpOption === undefined) { - this.helpOption(undefined, undefined); - } - return this._helpOption; - } - - /** - * Supply your own option to use for the built-in help option. - * This is an alternative to using helpOption() to customise the flags and description etc. - * - * @param {Option} option - * @return {Command} `this` command for chaining - */ - addHelpOption(option) { - this._helpOption = option; - return this; - } - - /** - * Output help information and exit. - * - * Outputs built-in help, and custom text added using `.addHelpText()`. - * - * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout - */ - - help(contextOptions) { - this.outputHelp(contextOptions); - let exitCode = process.exitCode || 0; - if ( - exitCode === 0 && - contextOptions && - typeof contextOptions !== 'function' && - contextOptions.error - ) { - exitCode = 1; - } - // message: do not have all displayed text available so only passing placeholder. - this._exit(exitCode, 'commander.help', '(outputHelp)'); - } - - /** - * Add additional text to be displayed with the built-in help. - * - * Position is 'before' or 'after' to affect just this command, - * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands. - * - * @param {string} position - before or after built-in help - * @param {(string | Function)} text - string to add, or a function returning a string - * @return {Command} `this` command for chaining - */ - addHelpText(position, text) { - const allowedValues = ['beforeAll', 'before', 'after', 'afterAll']; - if (!allowedValues.includes(position)) { - throw new Error(`Unexpected value for position to addHelpText. -Expecting one of '${allowedValues.join("', '")}'`); + function makeAppropriateNetworkError(fetchParams, err = null) { + assert(isCancelled(fetchParams)); + return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException2("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException2("Request was cancelled."), { cause: err })); } - const helpEvent = `${position}Help`; - this.on(helpEvent, (context) => { - let helpStr; - if (typeof text === 'function') { - helpStr = text({ error: context.error, command: context.command }); - } else { - helpStr = text; + function initializeResponse(response, init2, body) { + if (init2.status !== null && (init2.status < 200 || init2.status > 599)) { + throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.'); } - // Ignore falsy value when nothing to output. - if (helpStr) { - context.write(`${helpStr}\n`); - } - }); - return this; - } - - /** - * Output help information if help flags specified - * - * @param {Array} args - array of options to search for help flags - * @private - */ - - _outputHelpIfRequested(args) { - const helpOption = this._getHelpOption(); - const helpRequested = helpOption && args.find((arg) => helpOption.is(arg)); - if (helpRequested) { - this.outputHelp(); - // (Do not have all displayed text available so only passing placeholder.) - this._exit(0, 'commander.helpDisplayed', '(outputHelp)'); - } - } -} - -/** - * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command). - * - * @param {string[]} args - array of arguments from node.execArgv - * @returns {string[]} - * @private - */ - -function incrementNodeInspectorPort(args) { - // Testing for these options: - // --inspect[=[host:]port] - // --inspect-brk[=[host:]port] - // --inspect-port=[host:]port - return args.map((arg) => { - if (!arg.startsWith('--inspect')) { - return arg; - } - let debugOption; - let debugHost = '127.0.0.1'; - let debugPort = '9229'; - let match; - if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) { - // e.g. --inspect - debugOption = match[1]; - } else if ( - (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null - ) { - debugOption = match[1]; - if (/^\d+$/.test(match[3])) { - // e.g. --inspect=1234 - debugPort = match[3]; - } else { - // e.g. --inspect=localhost - debugHost = match[3]; + if ("statusText" in init2 && init2.statusText != null) { + if (!isValidReasonPhrase(String(init2.statusText))) { + throw new TypeError("Invalid statusText"); + } } - } else if ( - (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null - ) { - // e.g. --inspect=localhost:1234 - debugOption = match[1]; - debugHost = match[3]; - debugPort = match[4]; - } - - if (debugOption && debugPort !== '0') { - return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`; - } - return arg; - }); -} - -exports.Command = Command; - - -/***/ }), - -/***/ 24435: -/***/ ((__unused_webpack_module, exports) => { - -/** - * CommanderError class - */ -class CommanderError extends Error { - /** - * Constructs the CommanderError class - * @param {number} exitCode suggested exit code which could be used with process.exit - * @param {string} code an id string representing the error - * @param {string} message human-readable description of the error - */ - constructor(exitCode, code, message) { - super(message); - // properly capture stack trace in Node.js - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - this.code = code; - this.exitCode = exitCode; - this.nestedError = undefined; - } -} - -/** - * InvalidArgumentError class - */ -class InvalidArgumentError extends CommanderError { - /** - * Constructs the InvalidArgumentError class - * @param {string} [message] explanation of why argument is invalid - */ - constructor(message) { - super(1, 'commander.invalidArgument', message); - // properly capture stack trace in Node.js - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - } -} - -exports.CommanderError = CommanderError; -exports.InvalidArgumentError = InvalidArgumentError; - - -/***/ }), - -/***/ 1558: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const { humanReadableArgName } = __nccwpck_require__(42606); - -/** - * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS` - * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types - * @typedef { import("./argument.js").Argument } Argument - * @typedef { import("./command.js").Command } Command - * @typedef { import("./option.js").Option } Option - */ - -// Although this is a class, methods are static in style to allow override using subclass or just functions. -class Help { - constructor() { - this.helpWidth = undefined; - this.sortSubcommands = false; - this.sortOptions = false; - this.showGlobalOptions = false; - } - - /** - * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. - * - * @param {Command} cmd - * @returns {Command[]} - */ - - visibleCommands(cmd) { - const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden); - const helpCommand = cmd._getHelpCommand(); - if (helpCommand && !helpCommand._hidden) { - visibleCommands.push(helpCommand); - } - if (this.sortSubcommands) { - visibleCommands.sort((a, b) => { - // @ts-ignore: because overloaded return type - return a.name().localeCompare(b.name()); - }); - } - return visibleCommands; - } - - /** - * Compare options for sort. - * - * @param {Option} a - * @param {Option} b - * @returns {number} - */ - compareOptions(a, b) { - const getSortKey = (option) => { - // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated. - return option.short - ? option.short.replace(/^-/, '') - : option.long.replace(/^--/, ''); - }; - return getSortKey(a).localeCompare(getSortKey(b)); - } - - /** - * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. - * - * @param {Command} cmd - * @returns {Option[]} - */ - - visibleOptions(cmd) { - const visibleOptions = cmd.options.filter((option) => !option.hidden); - // Built-in help option. - const helpOption = cmd._getHelpOption(); - if (helpOption && !helpOption.hidden) { - // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs. - const removeShort = helpOption.short && cmd._findOption(helpOption.short); - const removeLong = helpOption.long && cmd._findOption(helpOption.long); - if (!removeShort && !removeLong) { - visibleOptions.push(helpOption); // no changes needed - } else if (helpOption.long && !removeLong) { - visibleOptions.push( - cmd.createOption(helpOption.long, helpOption.description), - ); - } else if (helpOption.short && !removeShort) { - visibleOptions.push( - cmd.createOption(helpOption.short, helpOption.description), - ); + if ("status" in init2 && init2.status != null) { + response[kState].status = init2.status; } - } - if (this.sortOptions) { - visibleOptions.sort(this.compareOptions); - } - return visibleOptions; - } - - /** - * Get an array of the visible global options. (Not including help.) - * - * @param {Command} cmd - * @returns {Option[]} - */ - - visibleGlobalOptions(cmd) { - if (!this.showGlobalOptions) return []; - - const globalOptions = []; - for ( - let ancestorCmd = cmd.parent; - ancestorCmd; - ancestorCmd = ancestorCmd.parent - ) { - const visibleOptions = ancestorCmd.options.filter( - (option) => !option.hidden, - ); - globalOptions.push(...visibleOptions); - } - if (this.sortOptions) { - globalOptions.sort(this.compareOptions); - } - return globalOptions; - } - - /** - * Get an array of the arguments if any have a description. - * - * @param {Command} cmd - * @returns {Argument[]} - */ - - visibleArguments(cmd) { - // Side effect! Apply the legacy descriptions before the arguments are displayed. - if (cmd._argsDescription) { - cmd.registeredArguments.forEach((argument) => { - argument.description = - argument.description || cmd._argsDescription[argument.name()] || ''; - }); - } - - // If there are any arguments with a description then return all the arguments. - if (cmd.registeredArguments.find((argument) => argument.description)) { - return cmd.registeredArguments; - } - return []; - } - - /** - * Get the command term to show in the list of subcommands. - * - * @param {Command} cmd - * @returns {string} - */ - - subcommandTerm(cmd) { - // Legacy. Ignores custom usage string, and nested commands. - const args = cmd.registeredArguments - .map((arg) => humanReadableArgName(arg)) - .join(' '); - return ( - cmd._name + - (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') + - (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option - (args ? ' ' + args : '') - ); - } - - /** - * Get the option term to show in the list of options. - * - * @param {Option} option - * @returns {string} - */ - - optionTerm(option) { - return option.flags; - } - - /** - * Get the argument term to show in the list of arguments. - * - * @param {Argument} argument - * @returns {string} - */ - - argumentTerm(argument) { - return argument.name(); - } - - /** - * Get the longest command term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestSubcommandTermLength(cmd, helper) { - return helper.visibleCommands(cmd).reduce((max, command) => { - return Math.max(max, helper.subcommandTerm(command).length); - }, 0); - } - - /** - * Get the longest option term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestOptionTermLength(cmd, helper) { - return helper.visibleOptions(cmd).reduce((max, option) => { - return Math.max(max, helper.optionTerm(option).length); - }, 0); - } - - /** - * Get the longest global option term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestGlobalOptionTermLength(cmd, helper) { - return helper.visibleGlobalOptions(cmd).reduce((max, option) => { - return Math.max(max, helper.optionTerm(option).length); - }, 0); - } - - /** - * Get the longest argument term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - longestArgumentTermLength(cmd, helper) { - return helper.visibleArguments(cmd).reduce((max, argument) => { - return Math.max(max, helper.argumentTerm(argument).length); - }, 0); - } - - /** - * Get the command usage to be displayed at the top of the built-in help. - * - * @param {Command} cmd - * @returns {string} - */ - - commandUsage(cmd) { - // Usage - let cmdName = cmd._name; - if (cmd._aliases[0]) { - cmdName = cmdName + '|' + cmd._aliases[0]; - } - let ancestorCmdNames = ''; - for ( - let ancestorCmd = cmd.parent; - ancestorCmd; - ancestorCmd = ancestorCmd.parent - ) { - ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames; - } - return ancestorCmdNames + cmdName + ' ' + cmd.usage(); - } - - /** - * Get the description for the command. - * - * @param {Command} cmd - * @returns {string} - */ - - commandDescription(cmd) { - // @ts-ignore: because overloaded return type - return cmd.description(); - } - - /** - * Get the subcommand summary to show in the list of subcommands. - * (Fallback to description for backwards compatibility.) - * - * @param {Command} cmd - * @returns {string} - */ - - subcommandDescription(cmd) { - // @ts-ignore: because overloaded return type - return cmd.summary() || cmd.description(); - } - - /** - * Get the option description to show in the list of options. - * - * @param {Option} option - * @return {string} - */ - - optionDescription(option) { - const extraInfo = []; - - if (option.argChoices) { - extraInfo.push( - // use stringify to match the display of the default value - `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`, - ); - } - if (option.defaultValue !== undefined) { - // default for boolean and negated more for programmer than end user, - // but show true/false for boolean option as may be for hand-rolled env or config processing. - const showDefault = - option.required || - option.optional || - (option.isBoolean() && typeof option.defaultValue === 'boolean'); - if (showDefault) { - extraInfo.push( - `default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`, - ); + if ("statusText" in init2 && init2.statusText != null) { + response[kState].statusText = init2.statusText; } - } - // preset for boolean and negated are more for programmer than end user - if (option.presetArg !== undefined && option.optional) { - extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`); - } - if (option.envVar !== undefined) { - extraInfo.push(`env: ${option.envVar}`); - } - if (extraInfo.length > 0) { - return `${option.description} (${extraInfo.join(', ')})`; - } - - return option.description; - } - - /** - * Get the argument description to show in the list of arguments. - * - * @param {Argument} argument - * @return {string} - */ - - argumentDescription(argument) { - const extraInfo = []; - if (argument.argChoices) { - extraInfo.push( - // use stringify to match the display of the default value - `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`, - ); - } - if (argument.defaultValue !== undefined) { - extraInfo.push( - `default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`, - ); - } - if (extraInfo.length > 0) { - const extraDescripton = `(${extraInfo.join(', ')})`; - if (argument.description) { - return `${argument.description} ${extraDescripton}`; - } - return extraDescripton; - } - return argument.description; - } - - /** - * Generate the built-in help text. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {string} - */ - - formatHelp(cmd, helper) { - const termWidth = helper.padWidth(cmd, helper); - const helpWidth = helper.helpWidth || 80; - const itemIndentWidth = 2; - const itemSeparatorWidth = 2; // between term and description - function formatItem(term, description) { - if (description) { - const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`; - return helper.wrap( - fullText, - helpWidth - itemIndentWidth, - termWidth + itemSeparatorWidth, - ); + if ("headers" in init2 && init2.headers != null) { + fill2(response[kHeaders], init2.headers); } - return term; - } - function formatList(textArray) { - return textArray.join('\n').replace(/^/gm, ' '.repeat(itemIndentWidth)); - } - - // Usage - let output = [`Usage: ${helper.commandUsage(cmd)}`, '']; - - // Description - const commandDescription = helper.commandDescription(cmd); - if (commandDescription.length > 0) { - output = output.concat([ - helper.wrap(commandDescription, helpWidth, 0), - '', - ]); - } - - // Arguments - const argumentList = helper.visibleArguments(cmd).map((argument) => { - return formatItem( - helper.argumentTerm(argument), - helper.argumentDescription(argument), - ); - }); - if (argumentList.length > 0) { - output = output.concat(['Arguments:', formatList(argumentList), '']); - } - - // Options - const optionList = helper.visibleOptions(cmd).map((option) => { - return formatItem( - helper.optionTerm(option), - helper.optionDescription(option), - ); - }); - if (optionList.length > 0) { - output = output.concat(['Options:', formatList(optionList), '']); - } - - if (this.showGlobalOptions) { - const globalOptionList = helper - .visibleGlobalOptions(cmd) - .map((option) => { - return formatItem( - helper.optionTerm(option), - helper.optionDescription(option), - ); - }); - if (globalOptionList.length > 0) { - output = output.concat([ - 'Global Options:', - formatList(globalOptionList), - '', - ]); + if (body) { + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: "Response constructor", + message: "Invalid response status code " + response.status + }); + } + response[kState].body = body.body; + if (body.type != null && !response[kState].headersList.contains("Content-Type")) { + response[kState].headersList.append("content-type", body.type); + } } } - - // Commands - const commandList = helper.visibleCommands(cmd).map((cmd) => { - return formatItem( - helper.subcommandTerm(cmd), - helper.subcommandDescription(cmd), - ); - }); - if (commandList.length > 0) { - output = output.concat(['Commands:', formatList(commandList), '']); - } - - return output.join('\n'); - } - - /** - * Calculate the pad width from the maximum term length. - * - * @param {Command} cmd - * @param {Help} helper - * @returns {number} - */ - - padWidth(cmd, helper) { - return Math.max( - helper.longestOptionTermLength(cmd, helper), - helper.longestGlobalOptionTermLength(cmd, helper), - helper.longestSubcommandTermLength(cmd, helper), - helper.longestArgumentTermLength(cmd, helper), + webidl.converters.ReadableStream = webidl.interfaceConverter( + ReadableStream ); - } - - /** - * Wrap the given string to width characters per line, with lines after the first indented. - * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted. - * - * @param {string} str - * @param {number} width - * @param {number} indent - * @param {number} [minColumnWidth=40] - * @return {string} - * - */ - - wrap(str, width, indent, minColumnWidth = 40) { - // Full \s characters, minus the linefeeds. - const indents = - ' \\f\\t\\v\u00a0\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff'; - // Detect manually wrapped and indented strings by searching for line break followed by spaces. - const manualIndent = new RegExp(`[\\n][${indents}]+`); - if (str.match(manualIndent)) return str; - // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line). - const columnWidth = width - indent; - if (columnWidth < minColumnWidth) return str; - - const leadingStr = str.slice(0, indent); - const columnText = str.slice(indent).replace('\r\n', '\n'); - const indentString = ' '.repeat(indent); - const zeroWidthSpace = '\u200B'; - const breaks = `\\s${zeroWidthSpace}`; - // Match line end (so empty lines don't collapse), - // or as much text as will fit in column, or excess text up to first break. - const regex = new RegExp( - `\n|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, - 'g', + webidl.converters.FormData = webidl.interfaceConverter( + FormData ); - const lines = columnText.match(regex) || []; - return ( - leadingStr + - lines - .map((line, i) => { - if (line === '\n') return ''; // preserve empty lines - return (i > 0 ? indentString : '') + line.trimEnd(); - }) - .join('\n') + webidl.converters.URLSearchParams = webidl.interfaceConverter( + URLSearchParams ); - } -} - -exports.Help = Help; - - -/***/ }), - -/***/ 71156: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const { InvalidArgumentError } = __nccwpck_require__(24435); - -class Option { - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} [description] - */ - - constructor(flags, description) { - this.flags = flags; - this.description = description || ''; - - this.required = flags.includes('<'); // A value must be supplied when the option is specified. - this.optional = flags.includes('['); // A value is optional when the option is specified. - // variadic test ignores et al which might be used to describe custom splitting of single argument - this.variadic = /\w\.\.\.[>\]]$/.test(flags); // The option can take multiple values. - this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line. - const optionFlags = splitOptionFlags(flags); - this.short = optionFlags.shortFlag; - this.long = optionFlags.longFlag; - this.negate = false; - if (this.long) { - this.negate = this.long.startsWith('--no-'); - } - this.defaultValue = undefined; - this.defaultValueDescription = undefined; - this.presetArg = undefined; - this.envVar = undefined; - this.parseArg = undefined; - this.hidden = false; - this.argChoices = undefined; - this.conflictsWith = []; - this.implied = undefined; - } - - /** - * Set the default value, and optionally supply the description to be displayed in the help. - * - * @param {*} value - * @param {string} [description] - * @return {Option} - */ - - default(value, description) { - this.defaultValue = value; - this.defaultValueDescription = description; - return this; - } - - /** - * Preset to use when option used without option-argument, especially optional but also boolean and negated. - * The custom processing (parseArg) is called. - * - * @example - * new Option('--color').default('GREYSCALE').preset('RGB'); - * new Option('--donate [amount]').preset('20').argParser(parseFloat); - * - * @param {*} arg - * @return {Option} - */ - - preset(arg) { - this.presetArg = arg; - return this; - } - - /** - * Add option name(s) that conflict with this option. - * An error will be displayed if conflicting options are found during parsing. - * - * @example - * new Option('--rgb').conflicts('cmyk'); - * new Option('--js').conflicts(['ts', 'jsx']); - * - * @param {(string | string[])} names - * @return {Option} - */ - - conflicts(names) { - this.conflictsWith = this.conflictsWith.concat(names); - return this; - } - - /** - * Specify implied option values for when this option is set and the implied options are not. - * - * The custom processing (parseArg) is not called on the implied values. - * - * @example - * program - * .addOption(new Option('--log', 'write logging information to file')) - * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' })); - * - * @param {object} impliedOptionValues - * @return {Option} - */ - implies(impliedOptionValues) { - let newImplied = impliedOptionValues; - if (typeof impliedOptionValues === 'string') { - // string is not documented, but easy mistake and we can do what user probably intended. - newImplied = { [impliedOptionValues]: true }; - } - this.implied = Object.assign(this.implied || {}, newImplied); - return this; - } - - /** - * Set environment variable to check for option value. - * - * An environment variable is only used if when processed the current option value is - * undefined, or the source of the current value is 'default' or 'config' or 'env'. - * - * @param {string} name - * @return {Option} - */ - - env(name) { - this.envVar = name; - return this; - } - - /** - * Set the custom handler for processing CLI option arguments into option values. - * - * @param {Function} [fn] - * @return {Option} - */ - - argParser(fn) { - this.parseArg = fn; - return this; - } - - /** - * Whether the option is mandatory and must have a value after parsing. - * - * @param {boolean} [mandatory=true] - * @return {Option} - */ - - makeOptionMandatory(mandatory = true) { - this.mandatory = !!mandatory; - return this; - } - - /** - * Hide option in help. - * - * @param {boolean} [hide=true] - * @return {Option} - */ - - hideHelp(hide = true) { - this.hidden = !!hide; - return this; - } - - /** - * @package - */ - - _concatValue(value, previous) { - if (previous === this.defaultValue || !Array.isArray(previous)) { - return [value]; - } - - return previous.concat(value); - } - - /** - * Only allow option value to be one of choices. - * - * @param {string[]} values - * @return {Option} - */ - - choices(values) { - this.argChoices = values.slice(); - this.parseArg = (arg, previous) => { - if (!this.argChoices.includes(arg)) { - throw new InvalidArgumentError( - `Allowed choices are ${this.argChoices.join(', ')}.`, - ); + webidl.converters.XMLHttpRequestBodyInit = function(V) { + if (typeof V === "string") { + return webidl.converters.USVString(V); + } + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }); } - if (this.variadic) { - return this._concatValue(arg, previous); + if (types2.isArrayBuffer(V) || types2.isTypedArray(V) || types2.isDataView(V)) { + return webidl.converters.BufferSource(V); } - return arg; + if (util2.isFormDataLike(V)) { + return webidl.converters.FormData(V, { strict: false }); + } + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V); + } + return webidl.converters.DOMString(V); + }; + webidl.converters.BodyInit = function(V) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V); + } + if (V == null ? void 0 : V[Symbol.asyncIterator]) { + return V; + } + return webidl.converters.XMLHttpRequestBodyInit(V); + }; + webidl.converters.ResponseInit = webidl.dictionaryConverter([ + { + key: "status", + converter: webidl.converters["unsigned short"], + defaultValue: 200 + }, + { + key: "statusText", + converter: webidl.converters.ByteString, + defaultValue: "" + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + } + ]); + module2.exports = { + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response: Response2, + cloneResponse }; - return this; - } - - /** - * Return option name. - * - * @return {string} - */ - - name() { - if (this.long) { - return this.long.replace(/^--/, ''); - } - return this.short.replace(/^-/, ''); - } - - /** - * Return option name, in a camelcase format that can be used - * as a object attribute key. - * - * @return {string} - */ - - attributeName() { - return camelcase(this.name().replace(/^no-/, '')); - } - - /** - * Check if `arg` matches the short or long flag. - * - * @param {string} arg - * @return {boolean} - * @package - */ - - is(arg) { - return this.short === arg || this.long === arg; - } - - /** - * Return whether a boolean option. - * - * Options are one of boolean, negated, required argument, or optional argument. - * - * @return {boolean} - * @package - */ - - isBoolean() { - return !this.required && !this.optional && !this.negate; } -} +}); -/** - * This class is to make it easier to work with dual options, without changing the existing - * implementation. We support separate dual options for separate positive and negative options, - * like `--build` and `--no-build`, which share a single option value. This works nicely for some - * use cases, but is tricky for others where we want separate behaviours despite - * the single shared option value. - */ -class DualOptions { - /** - * @param {Option[]} options - */ - constructor(options) { - this.positiveOptions = new Map(); - this.negativeOptions = new Map(); - this.dualOptions = new Set(); - options.forEach((option) => { - if (option.negate) { - this.negativeOptions.set(option.attributeName(), option); - } else { - this.positiveOptions.set(option.attributeName(), option); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/request.js +var require_request3 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/request.js"(exports2, module2) { + "use strict"; + var { extractBody, mixinBody, cloneBody } = require_body(); + var { Headers: Headers2, fill: fillHeaders, HeadersList } = require_headers(); + var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref()(); + var util2 = require_util2(); + var { + isValidHTTPToken, + sameOrigin, + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord + } = require_util3(); + var { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex + } = require_constants5(); + var { kEnumerableProperty } = util2; + var { kHeaders, kSignal, kState, kGuard, kRealm } = require_symbols4(); + var { webidl } = require_webidl(); + var { getGlobalOrigin } = require_global(); + var { URLSerializer } = require_dataURL(); + var { kHeadersList, kConstruct } = require_symbols3(); + var assert = __require("assert"); + var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __require("events"); + var TransformStream = globalThis.TransformStream; + var kAbortController = Symbol("abortController"); + var requestFinalizer = new FinalizationRegistry2(({ signal, abort }) => { + signal.removeEventListener("abort", abort); + }); + var Request2 = class _Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor(input, init2 = {}) { + var _a2, _b; + if (input === kConstruct) { + return; + } + webidl.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); + input = webidl.converters.RequestInfo(input); + init2 = webidl.converters.RequestInit(init2); + this[kRealm] = { + settingsObject: { + baseUrl: getGlobalOrigin(), + get origin() { + var _a3; + return (_a3 = this.baseUrl) == null ? void 0 : _a3.origin; + }, + policyContainer: makePolicyContainer() + } + }; + let request2 = null; + let fallbackMode = null; + const baseUrl = this[kRealm].settingsObject.baseUrl; + let signal = null; + if (typeof input === "string") { + let parsedURL; + try { + parsedURL = new URL(input, baseUrl); + } catch (err) { + throw new TypeError("Failed to parse URL from " + input, { cause: err }); + } + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + "Request cannot be constructed from a URL that includes credentials: " + input + ); + } + request2 = makeRequest({ urlList: [parsedURL] }); + fallbackMode = "cors"; + } else { + assert(input instanceof _Request); + request2 = input[kState]; + signal = input[kSignal]; + } + const origin = this[kRealm].settingsObject.origin; + let window2 = "client"; + if (((_b = (_a2 = request2.window) == null ? void 0 : _a2.constructor) == null ? void 0 : _b.name) === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) { + window2 = request2.window; + } + if (init2.window != null) { + throw new TypeError(`'window' option '${window2}' must be null`); + } + if ("window" in init2) { + window2 = "no-window"; + } + request2 = 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: request2.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request2.headersList, + // unsafe-request flag Set. + unsafeRequest: request2.unsafeRequest, + // client This’s relevant settings object. + client: this[kRealm].settingsObject, + // window window. + window: window2, + // priority request’s priority. + priority: request2.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: request2.origin, + // referrer request’s referrer. + referrer: request2.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request2.referrerPolicy, + // mode request’s mode. + mode: request2.mode, + // credentials mode request’s credentials mode. + credentials: request2.credentials, + // cache mode request’s cache mode. + cache: request2.cache, + // redirect mode request’s redirect mode. + redirect: request2.redirect, + // integrity metadata request’s integrity metadata. + integrity: request2.integrity, + // keepalive request’s keepalive. + keepalive: request2.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request2.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request2.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request2.urlList] + }); + const initHasKey = Object.keys(init2).length !== 0; + if (initHasKey) { + if (request2.mode === "navigate") { + request2.mode = "same-origin"; + } + request2.reloadNavigation = false; + request2.historyNavigation = false; + request2.origin = "client"; + request2.referrer = "client"; + request2.referrerPolicy = ""; + request2.url = request2.urlList[request2.urlList.length - 1]; + request2.urlList = [request2.url]; + } + if (init2.referrer !== void 0) { + const referrer = init2.referrer; + if (referrer === "") { + request2.referrer = "no-referrer"; + } else { + let parsedReferrer; + try { + parsedReferrer = new URL(referrer, baseUrl); + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); + } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) { + request2.referrer = "client"; + } else { + request2.referrer = parsedReferrer; + } + } + } + if (init2.referrerPolicy !== void 0) { + request2.referrerPolicy = init2.referrerPolicy; + } + let mode; + if (init2.mode !== void 0) { + mode = init2.mode; + } else { + mode = fallbackMode; + } + if (mode === "navigate") { + throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + } + if (mode != null) { + request2.mode = mode; + } + if (init2.credentials !== void 0) { + request2.credentials = init2.credentials; + } + if (init2.cache !== void 0) { + request2.cache = init2.cache; + } + if (request2.cache === "only-if-cached" && request2.mode !== "same-origin") { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ); + } + if (init2.redirect !== void 0) { + request2.redirect = init2.redirect; + } + if (init2.integrity != null) { + request2.integrity = String(init2.integrity); + } + if (init2.keepalive !== void 0) { + request2.keepalive = Boolean(init2.keepalive); + } + if (init2.method !== void 0) { + let method = init2.method; + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`); + } + if (forbiddenMethodsSet.has(method.toUpperCase())) { + throw new TypeError(`'${method}' HTTP method is unsupported.`); + } + method = normalizeMethodRecord[method] ?? normalizeMethod(method); + request2.method = method; + } + if (init2.signal !== void 0) { + signal = init2.signal; + } + this[kState] = request2; + const ac = new AbortController(); + this[kSignal] = ac.signal; + this[kSignal][kRealm] = this[kRealm]; + 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 { + this[kAbortController] = ac; + const acRef = new WeakRef(ac); + const abort = function() { + const ac2 = acRef.deref(); + if (ac2 !== void 0) { + ac2.abort(this.reason); + } + }; + try { + if (typeof getMaxListeners === "function" && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal); + } else if (getEventListeners(signal, "abort").length >= defaultMaxListeners) { + setMaxListeners(100, signal); + } + } catch { + } + util2.addAbortListener(signal, abort); + requestFinalizer.register(ac, { signal, abort }); + } + } + this[kHeaders] = new Headers2(kConstruct); + this[kHeaders][kHeadersList] = request2.headersList; + this[kHeaders][kGuard] = "request"; + this[kHeaders][kRealm] = this[kRealm]; + if (mode === "no-cors") { + if (!corsSafeListedMethodsSet.has(request2.method)) { + throw new TypeError( + `'${request2.method} is unsupported in no-cors mode.` + ); + } + this[kHeaders][kGuard] = "request-no-cors"; + } + if (initHasKey) { + const headersList = this[kHeaders][kHeadersList]; + const headers = init2.headers !== void 0 ? init2.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { + for (const [key, val] of headers) { + headersList.append(key, val); + } + headersList.cookies = headers.cookies; + } else { + fillHeaders(this[kHeaders], headers); + } + } + const inputBody = input instanceof _Request ? input[kState].body : null; + if ((init2.body != null || inputBody != null) && (request2.method === "GET" || request2.method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body."); + } + let initBody = null; + if (init2.body != null) { + const [extractedBody, contentType] = extractBody( + init2.body, + request2.keepalive + ); + initBody = extractedBody; + if (contentType && !this[kHeaders][kHeadersList].contains("content-type")) { + this[kHeaders].append("content-type", contentType); + } + } + const inputOrInitBody = initBody ?? inputBody; + if (inputOrInitBody != null && inputOrInitBody.source == null) { + if (initBody != null && init2.duplex == null) { + throw new TypeError("RequestInit: duplex option is required when sending a body."); + } + if (request2.mode !== "same-origin" && request2.mode !== "cors") { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ); + } + request2.useCORSPreflightFlag = true; + } + let finalBody = inputOrInitBody; + if (initBody == null && inputBody != null) { + if (util2.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + throw new TypeError( + "Cannot construct a Request with a Request object that has already been used." + ); + } + if (!TransformStream) { + TransformStream = __require("stream/web").TransformStream; + } + const identityTransform = new TransformStream(); + inputBody.stream.pipeThrough(identityTransform); + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + }; + } + this[kState].body = finalBody; + } + // Returns request’s HTTP method, which is "GET" by default. + get method() { + webidl.brandCheck(this, _Request); + return this[kState].method; + } + // Returns the URL of request as a string. + get url() { + webidl.brandCheck(this, _Request); + return URLSerializer(this[kState].url); + } + // 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() { + webidl.brandCheck(this, _Request); + return this[kHeaders]; + } + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination() { + webidl.brandCheck(this, _Request); + return this[kState].destination; + } + // 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() { + webidl.brandCheck(this, _Request); + if (this[kState].referrer === "no-referrer") { + return ""; + } + if (this[kState].referrer === "client") { + return "about:client"; + } + return this[kState].referrer.toString(); + } + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy() { + webidl.brandCheck(this, _Request); + return this[kState].referrerPolicy; + } + // 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() { + webidl.brandCheck(this, _Request); + return this[kState].mode; + } + // 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() { + return this[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() { + webidl.brandCheck(this, _Request); + return this[kState].cache; + } + // 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() { + webidl.brandCheck(this, _Request); + return this[kState].redirect; + } + // 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() { + webidl.brandCheck(this, _Request); + return this[kState].integrity; + } + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive() { + webidl.brandCheck(this, _Request); + return this[kState].keepalive; + } + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation() { + webidl.brandCheck(this, _Request); + return this[kState].reloadNavigation; + } + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-foward navigation). + get isHistoryNavigation() { + webidl.brandCheck(this, _Request); + return this[kState].historyNavigation; + } + // 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() { + webidl.brandCheck(this, _Request); + return this[kSignal]; + } + get body() { + webidl.brandCheck(this, _Request); + return this[kState].body ? this[kState].body.stream : null; + } + get bodyUsed() { + webidl.brandCheck(this, _Request); + return !!this[kState].body && util2.isDisturbed(this[kState].body.stream); + } + get duplex() { + webidl.brandCheck(this, _Request); + return "half"; + } + // Returns a clone of request. + clone() { + var _a2; + webidl.brandCheck(this, _Request); + if (this.bodyUsed || ((_a2 = this.body) == null ? void 0 : _a2.locked)) { + throw new TypeError("unusable"); + } + const clonedRequest = cloneRequest(this[kState]); + const clonedRequestObject = new _Request(kConstruct); + clonedRequestObject[kState] = clonedRequest; + clonedRequestObject[kRealm] = this[kRealm]; + clonedRequestObject[kHeaders] = new Headers2(kConstruct); + clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList; + clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]; + clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]; + const ac = new AbortController(); + if (this.signal.aborted) { + ac.abort(this.signal.reason); + } else { + util2.addAbortListener( + this.signal, + () => { + ac.abort(this.signal.reason); + } + ); + } + clonedRequestObject[kSignal] = ac.signal; + return clonedRequestObject; + } + }; + mixinBody(Request2); + function makeRequest(init2) { + const request2 = { + 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, + ...init2, + headersList: init2.headersList ? new HeadersList(init2.headersList) : new HeadersList() + }; + request2.url = request2.urlList[0]; + return request2; + } + function cloneRequest(request2) { + const newRequest = makeRequest({ ...request2, body: null }); + if (request2.body != null) { + newRequest.body = cloneBody(request2.body); + } + return newRequest; + } + Object.defineProperties(Request2.prototype, { + method: kEnumerableProperty, + url: kEnumerableProperty, + headers: kEnumerableProperty, + redirect: kEnumerableProperty, + clone: kEnumerableProperty, + signal: kEnumerableProperty, + duplex: kEnumerableProperty, + destination: kEnumerableProperty, + body: kEnumerableProperty, + bodyUsed: kEnumerableProperty, + isHistoryNavigation: kEnumerableProperty, + isReloadNavigation: kEnumerableProperty, + keepalive: kEnumerableProperty, + integrity: kEnumerableProperty, + cache: kEnumerableProperty, + credentials: kEnumerableProperty, + attribute: kEnumerableProperty, + referrerPolicy: kEnumerableProperty, + referrer: kEnumerableProperty, + mode: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "Request", + configurable: true } }); - this.negativeOptions.forEach((value, key) => { - if (this.positiveOptions.has(key)) { - this.dualOptions.add(key); + webidl.converters.Request = webidl.interfaceConverter( + Request2 + ); + webidl.converters.RequestInfo = function(V) { + if (typeof V === "string") { + return webidl.converters.USVString(V); + } + if (V instanceof Request2) { + return webidl.converters.Request(V); + } + return webidl.converters.USVString(V); + }; + webidl.converters.AbortSignal = webidl.interfaceConverter( + AbortSignal + ); + webidl.converters.RequestInit = webidl.dictionaryConverter([ + { + key: "method", + converter: webidl.converters.ByteString + }, + { + key: "headers", + converter: webidl.converters.HeadersInit + }, + { + key: "body", + converter: webidl.nullableConverter( + webidl.converters.BodyInit + ) + }, + { + key: "referrer", + converter: webidl.converters.USVString + }, + { + key: "referrerPolicy", + converter: webidl.converters.DOMString, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: "mode", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: "credentials", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: "cache", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: "redirect", + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: "integrity", + converter: webidl.converters.DOMString + }, + { + key: "keepalive", + converter: webidl.converters.boolean + }, + { + key: "signal", + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + { strict: false } + ) + ) + }, + { + key: "window", + converter: webidl.converters.any + }, + { + key: "duplex", + converter: webidl.converters.DOMString, + allowedValues: requestDuplex } - }); - } - - /** - * Did the value come from the option, and not from possible matching dual option? - * - * @param {*} value - * @param {Option} option - * @returns {boolean} - */ - valueFromOption(value, option) { - const optionKey = option.attributeName(); - if (!this.dualOptions.has(optionKey)) return true; - - // Use the value to deduce if (probably) came from the option. - const preset = this.negativeOptions.get(optionKey).presetArg; - const negativeValue = preset !== undefined ? preset : false; - return option.negate === (negativeValue === value); - } -} - -/** - * Convert string from kebab-case to camelCase. - * - * @param {string} str - * @return {string} - * @private - */ - -function camelcase(str) { - return str.split('-').reduce((str, word) => { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Split the short and long flag out of something like '-m,--mixed ' - * - * @private - */ - -function splitOptionFlags(flags) { - let shortFlag; - let longFlag; - // Use original very loose parsing to maintain backwards compatibility for now, - // which allowed for example unintended `-sw, --short-word` [sic]. - const flagParts = flags.split(/[ |,]+/); - if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) - shortFlag = flagParts.shift(); - longFlag = flagParts.shift(); - // Add support for lone short flag without significantly changing parsing! - if (!shortFlag && /^-[^-]$/.test(longFlag)) { - shortFlag = longFlag; - longFlag = undefined; - } - return { shortFlag, longFlag }; -} - -exports.Option = Option; -exports.DualOptions = DualOptions; - - -/***/ }), - -/***/ 80698: -/***/ ((__unused_webpack_module, exports) => { - -const maxDistance = 3; - -function editDistance(a, b) { - // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance - // Calculating optimal string alignment distance, no substring is edited more than once. - // (Simple implementation.) - - // Quick early exit, return worst case. - if (Math.abs(a.length - b.length) > maxDistance) - return Math.max(a.length, b.length); - - // distance between prefix substrings of a and b - const d = []; - - // pure deletions turn a into empty string - for (let i = 0; i <= a.length; i++) { - d[i] = [i]; - } - // pure insertions turn empty string into b - for (let j = 0; j <= b.length; j++) { - d[0][j] = j; + ]); + module2.exports = { Request: Request2, makeRequest }; } +}); - // fill matrix - for (let j = 1; j <= b.length; j++) { - for (let i = 1; i <= a.length; i++) { - let cost = 1; - if (a[i - 1] === b[j - 1]) { - cost = 0; - } else { - cost = 1; +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/index.js +var require_fetch = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fetch/index.js"(exports2, module2) { + "use strict"; + var { + Response: Response2, + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse + } = require_response2(); + var { Headers: Headers2 } = require_headers(); + var { Request: Request2, makeRequest } = require_request3(); + var zlib = __require("zlib"); + var { + bytesMatch, + makePolicyContainer, + clonePolicyContainer, + requestBadPort, + TAOCheck, + appendRequestOriginHeader, + responseLocationURL, + requestCurrentURL, + setRequestReferrerPolicyOnRedirect, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + createOpaqueTimingInfo, + appendFetchMetadata, + corsCheck, + crossOriginResourcePolicyCheck, + determineRequestsReferrer, + coarsenedSharedCurrentTime, + createDeferredPromise, + isBlobLike, + sameOrigin, + isCancelled, + isAborted, + isErrorLike, + fullyReadBody, + readableStreamClose, + isomorphicEncode, + urlIsLocal, + urlIsHttpHttpsScheme, + urlHasHttpsScheme + } = require_util3(); + var { kState, kHeaders, kGuard, kRealm } = require_symbols4(); + var assert = __require("assert"); + var { safelyExtractBody } = require_body(); + var { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + DOMException: DOMException2 + } = require_constants5(); + var { kHeadersList } = require_symbols3(); + var EE = __require("events"); + var { Readable: Readable2, pipeline } = __require("stream"); + var { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = require_util2(); + var { dataURLProcessor, serializeAMimeType } = require_dataURL(); + var { TransformStream } = __require("stream/web"); + var { getGlobalDispatcher } = require_global2(); + var { webidl } = require_webidl(); + var { STATUS_CODES } = __require("http"); + var GET_OR_HEAD = ["GET", "HEAD"]; + var resolveObjectURL; + var ReadableStream = globalThis.ReadableStream; + var Fetch = class extends EE { + constructor(dispatcher) { + super(); + this.dispatcher = dispatcher; + this.connection = null; + this.dump = false; + this.state = "ongoing"; + this.setMaxListeners(21); + } + terminate(reason) { + var _a2; + if (this.state !== "ongoing") { + return; + } + this.state = "terminated"; + (_a2 = this.connection) == null ? void 0 : _a2.destroy(reason); + this.emit("terminated", reason); } - d[i][j] = Math.min( - d[i - 1][j] + 1, // deletion - d[i][j - 1] + 1, // insertion - d[i - 1][j - 1] + cost, // substitution - ); - // transposition - if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) { - d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1); + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort(error) { + var _a2; + if (this.state !== "ongoing") { + return; + } + this.state = "aborted"; + if (!error) { + error = new DOMException2("The operation was aborted.", "AbortError"); + } + this.serializedAbortReason = error; + (_a2 = this.connection) == null ? void 0 : _a2.destroy(error); + this.emit("terminated", error); } + }; + function fetch(input, init2 = {}) { + var _a2; + webidl.argumentLengthCheck(arguments, 1, { header: "globalThis.fetch" }); + const p = createDeferredPromise(); + let requestObject; + try { + requestObject = new Request2(input, init2); + } catch (e) { + p.reject(e); + return p.promise; + } + const request2 = requestObject[kState]; + if (requestObject.signal.aborted) { + abortFetch(p, request2, null, requestObject.signal.reason); + return p.promise; + } + const globalObject = request2.client.globalObject; + if (((_a2 = globalObject == null ? void 0 : globalObject.constructor) == null ? void 0 : _a2.name) === "ServiceWorkerGlobalScope") { + request2.serviceWorkers = "none"; + } + let responseObject = null; + const relevantRealm = null; + let locallyAborted = false; + let controller = null; + addAbortListener( + requestObject.signal, + () => { + locallyAborted = true; + assert(controller != null); + controller.abort(requestObject.signal.reason); + abortFetch(p, request2, responseObject, requestObject.signal.reason); + } + ); + const handleFetchDone = (response) => finalizeAndReportTiming(response, "fetch"); + const processResponse = (response) => { + if (locallyAborted) { + return Promise.resolve(); + } + if (response.aborted) { + abortFetch(p, request2, responseObject, controller.serializedAbortReason); + return Promise.resolve(); + } + if (response.type === "error") { + p.reject( + Object.assign(new TypeError("fetch failed"), { cause: response.error }) + ); + return Promise.resolve(); + } + responseObject = new Response2(); + responseObject[kState] = response; + responseObject[kRealm] = relevantRealm; + responseObject[kHeaders][kHeadersList] = response.headersList; + responseObject[kHeaders][kGuard] = "immutable"; + responseObject[kHeaders][kRealm] = relevantRealm; + p.resolve(responseObject); + }; + controller = fetching({ + request: request2, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init2.dispatcher ?? getGlobalDispatcher() + // undici + }); + return p.promise; } - } - - return d[a.length][b.length]; -} - -/** - * Find close matches, restricted to same number of edits. - * - * @param {string} word - * @param {string[]} candidates - * @returns {string} - */ - -function suggestSimilar(word, candidates) { - if (!candidates || candidates.length === 0) return ''; - // remove possible duplicates - candidates = Array.from(new Set(candidates)); - - const searchingOptions = word.startsWith('--'); - if (searchingOptions) { - word = word.slice(2); - candidates = candidates.map((candidate) => candidate.slice(2)); - } - - let similar = []; - let bestDistance = maxDistance; - const minSimilarity = 0.4; - candidates.forEach((candidate) => { - if (candidate.length <= 1) return; // no one character guesses - - const distance = editDistance(word, candidate); - const length = Math.max(word.length, candidate.length); - const similarity = (length - distance) / length; - if (similarity > minSimilarity) { - if (distance < bestDistance) { - // better edit distance, throw away previous worse matches - bestDistance = distance; - similar = [candidate]; - } else if (distance === bestDistance) { - similar.push(candidate); + function finalizeAndReportTiming(response, initiatorType = "other") { + var _a2; + if (response.type === "error" && response.aborted) { + return; } + if (!((_a2 = response.urlList) == null ? void 0 : _a2.length)) { + return; + } + const originalURL = response.urlList[0]; + let timingInfo = response.timingInfo; + let cacheState = response.cacheState; + if (!urlIsHttpHttpsScheme(originalURL)) { + return; + } + if (timingInfo === null) { + return; + } + if (!response.timingAllowPassed) { + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }); + cacheState = ""; + } + timingInfo.endTime = coarsenedSharedCurrentTime(); + response.timingInfo = timingInfo; + markResourceTiming( + timingInfo, + originalURL, + initiatorType, + globalThis, + cacheState + ); } - }); - - similar.sort((a, b) => a.localeCompare(b)); - if (searchingOptions) { - similar = similar.map((candidate) => `--${candidate}`); - } - - if (similar.length > 1) { - return `\n(Did you mean one of ${similar.join(', ')}?)`; - } - if (similar.length === 1) { - return `\n(Did you mean ${similar[0]}?)`; - } - return ''; -} - -exports.suggestSimilar = suggestSimilar; - - -/***/ }), - -/***/ 11787: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { options: coloretteOptions } = __nccwpck_require__(14700) -const jmespath = __nccwpck_require__(19532) -const colors = __nccwpck_require__(44355) -const { ERROR_LIKE_KEYS, MESSAGE_KEY, TIMESTAMP_KEY } = __nccwpck_require__(2014) -const { - isObject, - prettifyErrorLog, - prettifyLevel, - prettifyMessage, - prettifyMetadata, - prettifyObject, - prettifyTime, - filterLog -} = __nccwpck_require__(66502) - -const bourne = __nccwpck_require__(90779) -const jsonParser = input => { - try { - return { value: bourne.parse(input, { protoAction: 'remove' }) } - } catch (err) { - return { err } - } -} - -const defaultOptions = { - colorize: coloretteOptions.enabled, - crlf: false, - errorLikeObjectKeys: ERROR_LIKE_KEYS, - errorProps: '', - levelFirst: false, - messageKey: MESSAGE_KEY, - messageFormat: false, - timestampKey: TIMESTAMP_KEY, - translateTime: false, - useMetadata: false, - outputStream: process.stdout, - customPrettifiers: {}, - hideObject: false, - singleLine: false -} - -function prettyFactory (options) { - const opts = Object.assign({}, defaultOptions, options) - const EOL = opts.crlf ? '\r\n' : '\n' - const IDENT = ' ' - const messageKey = opts.messageKey - const levelKey = opts.levelKey - const levelLabel = opts.levelLabel - const messageFormat = opts.messageFormat - const timestampKey = opts.timestampKey - const errorLikeObjectKeys = opts.errorLikeObjectKeys - const errorProps = opts.errorProps.split(',') - const customPrettifiers = opts.customPrettifiers - const ignoreKeys = opts.ignore ? new Set(opts.ignore.split(',')) : undefined - const hideObject = opts.hideObject - const singleLine = opts.singleLine - - const colorizer = colors(opts.colorize) - const search = opts.search - - return pretty - - function pretty (inputData) { - let log - if (!isObject(inputData)) { - const parsed = jsonParser(inputData) - if (parsed.err || !isObject(parsed.value)) { - // pass through - return inputData + EOL - } - log = parsed.value - } else { - log = inputData - } - - if (search && !jmespath.search(log, search)) { - return - } - - const prettifiedMessage = prettifyMessage({ log, messageKey, colorizer, messageFormat, levelLabel }) - - if (ignoreKeys) { - log = filterLog(log, ignoreKeys) - } - - const prettifiedLevel = prettifyLevel({ log, colorizer, levelKey }) - const prettifiedMetadata = prettifyMetadata({ log }) - const prettifiedTime = prettifyTime({ log, translateFormat: opts.translateTime, timestampKey }) - - let line = '' - if (opts.levelFirst && prettifiedLevel) { - line = `${prettifiedLevel}` - } - - if (prettifiedTime && line === '') { - line = `${prettifiedTime}` - } else if (prettifiedTime) { - line = `${line} ${prettifiedTime}` - } - - if (!opts.levelFirst && prettifiedLevel) { - if (line.length > 0) { - line = `${line} ${prettifiedLevel}` - } else { - line = prettifiedLevel + function markResourceTiming(timingInfo, originalURL, initiatorType, globalThis2, cacheState) { + if (nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 2) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - - if (prettifiedMetadata) { - if (line.length > 0) { - line = `${line} ${prettifiedMetadata}:` - } else { - line = prettifiedMetadata + function abortFetch(p, request2, responseObject, error) { + var _a2, _b; + if (!error) { + error = new DOMException2("The operation was aborted.", "AbortError"); + } + p.reject(error); + if (request2.body != null && isReadable((_a2 = request2.body) == null ? void 0 : _a2.stream)) { + request2.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + return; + } + throw err; + }); + } + if (responseObject == null) { + return; + } + const response = responseObject[kState]; + if (response.body != null && isReadable((_b = response.body) == null ? void 0 : _b.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") { + return; + } + throw err; + }); } } - - if (line.endsWith(':') === false && line !== '') { - line += ':' + function fetching({ + request: request2, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher + // undici + }) { + var _a2, _b, _c, _d; + let taskDestination = null; + let crossOriginIsolatedCapability = false; + if (request2.client != null) { + taskDestination = request2.client.globalObject; + crossOriginIsolatedCapability = request2.client.crossOriginIsolatedCapability; + } + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); + const timingInfo = createOpaqueTimingInfo({ + startTime: currenTime + }); + const fetchParams = { + controller: new Fetch(dispatcher), + request: request2, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + }; + assert(!request2.body || request2.body.stream); + if (request2.window === "client") { + request2.window = ((_c = (_b = (_a2 = request2.client) == null ? void 0 : _a2.globalObject) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) === "Window" ? request2.client : "no-window"; + } + if (request2.origin === "client") { + request2.origin = (_d = request2.client) == null ? void 0 : _d.origin; + } + if (request2.policyContainer === "client") { + if (request2.client != null) { + request2.policyContainer = clonePolicyContainer( + request2.client.policyContainer + ); + } else { + request2.policyContainer = makePolicyContainer(); + } + } + if (!request2.headersList.contains("accept")) { + const value = "*/*"; + request2.headersList.append("accept", value); + } + if (!request2.headersList.contains("accept-language")) { + request2.headersList.append("accept-language", "*"); + } + if (request2.priority === null) { + } + if (subresourceSet.has(request2.destination)) { + } + mainFetch(fetchParams).catch((err) => { + fetchParams.controller.terminate(err); + }); + return fetchParams.controller; } - - if (prettifiedMessage) { - if (line.length > 0) { - line = `${line} ${prettifiedMessage}` + async function mainFetch(fetchParams, recursive = false) { + const request2 = fetchParams.request; + let response = null; + if (request2.localURLsOnly && !urlIsLocal(requestCurrentURL(request2))) { + response = makeNetworkError("local URLs only"); + } + tryUpgradeRequestToAPotentiallyTrustworthyURL(request2); + if (requestBadPort(request2) === "blocked") { + response = makeNetworkError("bad port"); + } + if (request2.referrerPolicy === "") { + request2.referrerPolicy = request2.policyContainer.referrerPolicy; + } + if (request2.referrer !== "no-referrer") { + request2.referrer = determineRequestsReferrer(request2); + } + if (response === null) { + response = await (async () => { + const currentURL = requestCurrentURL(request2); + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + sameOrigin(currentURL, request2.url) && request2.responseTainting === "basic" || // request’s current URL’s scheme is "data" + currentURL.protocol === "data:" || // - request’s mode is "navigate" or "websocket" + (request2.mode === "navigate" || request2.mode === "websocket") + ) { + request2.responseTainting = "basic"; + return await schemeFetch(fetchParams); + } + if (request2.mode === "same-origin") { + return makeNetworkError('request mode cannot be "same-origin"'); + } + if (request2.mode === "no-cors") { + if (request2.redirect !== "follow") { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ); + } + request2.responseTainting = "opaque"; + return await schemeFetch(fetchParams); + } + if (!urlIsHttpHttpsScheme(requestCurrentURL(request2))) { + return makeNetworkError("URL scheme must be a HTTP(S) scheme"); + } + request2.responseTainting = "cors"; + return await httpFetch(fetchParams); + })(); + } + if (recursive) { + return response; + } + if (response.status !== 0 && !response.internalResponse) { + if (request2.responseTainting === "cors") { + } + if (request2.responseTainting === "basic") { + response = filterResponse(response, "basic"); + } else if (request2.responseTainting === "cors") { + response = filterResponse(response, "cors"); + } else if (request2.responseTainting === "opaque") { + response = filterResponse(response, "opaque"); + } else { + assert(false); + } + } + let internalResponse = response.status === 0 ? response : response.internalResponse; + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request2.urlList); + } + if (!request2.timingAllowFailed) { + response.timingAllowPassed = true; + } + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request2.headers.contains("range")) { + response = internalResponse = makeNetworkError(); + } + if (response.status !== 0 && (request2.method === "HEAD" || request2.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { + internalResponse.body = null; + fetchParams.controller.dump = true; + } + if (request2.integrity) { + const processBodyError = (reason) => fetchFinale(fetchParams, makeNetworkError(reason)); + if (request2.responseTainting === "opaque" || response.body == null) { + processBodyError(response.error); + return; + } + const processBody = (bytes) => { + if (!bytesMatch(bytes, request2.integrity)) { + processBodyError("integrity mismatch"); + return; + } + response.body = safelyExtractBody(bytes)[0]; + fetchFinale(fetchParams, response); + }; + await fullyReadBody(response.body, processBody, processBodyError); } else { - line = prettifiedMessage + fetchFinale(fetchParams, response); } } - - if (line.length > 0 && !singleLine) { - line += EOL - } - - if (log.type === 'Error' && log.stack) { - const prettifiedErrorLog = prettifyErrorLog({ - log, - errorLikeKeys: errorLikeObjectKeys, - errorProperties: errorProps, - ident: IDENT, - eol: EOL - }) - line += prettifiedErrorLog - } else if (!hideObject) { - const skipKeys = [messageKey, levelKey, timestampKey].filter(key => typeof log[key] === 'string' || typeof log[key] === 'number') - const prettifiedObject = prettifyObject({ - input: log, - skipKeys, - customPrettifiers, - errorLikeKeys: errorLikeObjectKeys, - eol: EOL, - ident: IDENT, - singleLine, - colorizer - }) - - // In single line mode, include a space only if prettified version isn't empty - if (singleLine && !/^\s$/.test(prettifiedObject)) { - line += ' ' + function schemeFetch(fetchParams) { + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)); + } + const { request: request2 } = fetchParams; + const { protocol: scheme } = requestCurrentURL(request2); + switch (scheme) { + case "about:": { + return Promise.resolve(makeNetworkError("about scheme is not supported")); + } + case "blob:": { + if (!resolveObjectURL) { + resolveObjectURL = __require("buffer").resolveObjectURL; + } + const blobURLEntry = requestCurrentURL(request2); + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); + } + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()); + if (request2.method !== "GET" || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError("invalid method")); + } + const bodyWithType = safelyExtractBody(blobURLEntryObject); + const body = bodyWithType[0]; + const length = isomorphicEncode(`${body.length}`); + const type2 = bodyWithType[1] ?? ""; + const response = makeResponse({ + statusText: "OK", + headersList: [ + ["content-length", { name: "Content-Length", value: length }], + ["content-type", { name: "Content-Type", value: type2 }] + ] + }); + response.body = body; + return Promise.resolve(response); + } + case "data:": { + const currentURL = requestCurrentURL(request2); + const dataURLStruct = dataURLProcessor(currentURL); + if (dataURLStruct === "failure") { + return Promise.resolve(makeNetworkError("failed to fetch the data URL")); + } + const mimeType = serializeAMimeType(dataURLStruct.mimeType); + return Promise.resolve(makeResponse({ + statusText: "OK", + headersList: [ + ["content-type", { name: "Content-Type", value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })); + } + case "file:": { + return Promise.resolve(makeNetworkError("not implemented... yet...")); + } + case "http:": + case "https:": { + return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + } + default: { + return Promise.resolve(makeNetworkError("unknown scheme")); + } } - line += prettifiedObject - } - - return line - } -} - -prettyFactory.prettyFactory = prettyFactory -prettyFactory.default = prettyFactory -module.exports = prettyFactory - - -/***/ }), - -/***/ 44355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { LEVELS, LEVEL_NAMES } = __nccwpck_require__(2014) - -const nocolor = input => input -const plain = { - default: nocolor, - 60: nocolor, - 50: nocolor, - 40: nocolor, - 30: nocolor, - 20: nocolor, - 10: nocolor, - message: nocolor, - greyMessage: nocolor -} - -const colorette = __nccwpck_require__(14700) -const colored = { - default: colorette.white, - 60: colorette.bgRed, - 50: colorette.red, - 40: colorette.yellow, - 30: colorette.green, - 20: colorette.blue, - 10: colorette.gray, - message: colorette.cyan, - greyMessage: colorette.gray -} - -function colorizeLevel (level, colorizer) { - if (Number.isInteger(+level)) { - return Object.prototype.hasOwnProperty.call(LEVELS, level) - ? colorizer[level](LEVELS[level]) - : colorizer.default(LEVELS.default) - } - const levelNum = LEVEL_NAMES[level.toLowerCase()] || 'default' - return colorizer[levelNum](LEVELS[levelNum]) -} - -function plainColorizer (level) { - return colorizeLevel(level, plain) -} -plainColorizer.message = plain.message -plainColorizer.greyMessage = plain.greyMessage - -function coloredColorizer (level) { - return colorizeLevel(level, colored) -} -coloredColorizer.message = colored.message -coloredColorizer.greyMessage = colored.greyMessage - -/** - * Factory function get a function to colorized levels. The returned function - * also includes a `.message(str)` method to colorize strings. - * - * @param {boolean} [useColors=false] When `true` a function that applies standard - * terminal colors is returned. - * - * @returns {function} `function (level) {}` has a `.message(str)` method to - * apply colorization to a string. The core function accepts either an integer - * `level` or a `string` level. The integer level will map to a known level - * string or to `USERLVL` if not known. The string `level` will map to the same - * colors as the integer `level` and will also default to `USERLVL` if the given - * string is not a recognized level name. - */ -module.exports = function getColorizer (useColors = false) { - return useColors ? coloredColorizer : plainColorizer -} - - -/***/ }), - -/***/ 2014: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - DATE_FORMAT: 'yyyy-mm-dd HH:MM:ss.l o', - - ERROR_LIKE_KEYS: ['err', 'error'], - - MESSAGE_KEY: 'msg', - - LEVEL_KEY: 'level', - - LEVEL_LABEL: 'levelLabel', - - TIMESTAMP_KEY: 'time', - - LEVELS: { - default: 'USERLVL', - 60: 'FATAL', - 50: 'ERROR', - 40: 'WARN', - 30: 'INFO', - 20: 'DEBUG', - 10: 'TRACE' - }, - - LEVEL_NAMES: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - - // Object keys that probably came from a logger like Pino or Bunyan. - LOGGER_KEYS: [ - 'pid', - 'hostname', - 'name', - 'level', - 'time', - 'timestamp', - 'caller' - ] -} - - -/***/ }), - -/***/ 66502: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const clone = __nccwpck_require__(73934)({ circles: true }) -const dateformat = __nccwpck_require__(1726) -const stringifySafe = __nccwpck_require__(30024) -const defaultColorizer = __nccwpck_require__(44355)() -const { - DATE_FORMAT, - ERROR_LIKE_KEYS, - MESSAGE_KEY, - LEVEL_KEY, - LEVEL_LABEL, - TIMESTAMP_KEY, - LOGGER_KEYS, - LEVELS -} = __nccwpck_require__(2014) - -module.exports = { - isObject, - prettifyErrorLog, - prettifyLevel, - prettifyMessage, - prettifyMetadata, - prettifyObject, - prettifyTime, - filterLog -} - -module.exports.internals = { - formatTime, - joinLinesWithIndentation, - prettifyError, - deleteLogProperty, - splitIgnoreKey, - createDate, - isValidDate -} - -/** - * Converts a given `epoch` to a desired display format. - * - * @param {number|string} epoch The time to convert. May be any value that is - * valid for `new Date()`. - * @param {boolean|string} [translateTime=false] When `false`, the given `epoch` - * will simply be returned. When `true`, the given `epoch` will be converted - * to a string at UTC using the `DATE_FORMAT` constant. If `translateTime` is - * a string, the following rules are available: - * - * - ``: The string is a literal format string. This format - * string will be used to interpret the `epoch` and return a display string - * at UTC. - * - `SYS:STANDARD`: The returned display string will follow the `DATE_FORMAT` - * constant at the system's local timezone. - * - `SYS:`: The returned display string will follow the given - * `` at the system's local timezone. - * - `UTC:`: The returned display string will follow the given - * `` at UTC. - * - * @returns {number|string} The formatted time. - */ -function formatTime (epoch, translateTime = false) { - if (translateTime === false) { - return epoch - } - - const instant = createDate(epoch) - - // If the Date is invalid, do not attempt to format - if (!isValidDate(instant)) { - return epoch - } - - if (translateTime === true) { - return dateformat(instant, 'UTC:' + DATE_FORMAT) - } - - const upperFormat = translateTime.toUpperCase() - if (upperFormat === 'SYS:STANDARD') { - return dateformat(instant, DATE_FORMAT) - } - - const prefix = upperFormat.substr(0, 4) - if (prefix === 'SYS:' || prefix === 'UTC:') { - if (prefix === 'UTC:') { - return dateformat(instant, translateTime) - } - return dateformat(instant, translateTime.slice(4)) - } - - return dateformat(instant, `UTC:${translateTime}`) -} - -/** - * Constructs a JS Date from a number or string. Accepts any single number - * or single string argument that is valid for the Date() constructor, - * or an epoch as a string. - * - * @param {string|number} epoch The representation of the Date. - * - * @returns {Date} The constructed Date. - */ -function createDate (epoch) { - // If epoch is already a valid argument, return the valid Date - let date = new Date(epoch) - if (isValidDate(date)) { - return date - } - - // Convert to a number to permit epoch as a string - date = new Date(+epoch) - return date -} - -/** - * Checks if the argument is a JS Date and not 'Invalid Date'. - * - * @param {Date} date The date to check. - * - * @returns {boolean} true if the argument is a JS Date and not 'Invalid Date'. - */ -function isValidDate (date) { - return date instanceof Date && !Number.isNaN(date.getTime()) -} - -function isObject (input) { - return Object.prototype.toString.apply(input) === '[object Object]' -} - -/** - * Given a string with line separators, either `\r\n` or `\n`, add indentation - * to all lines subsequent to the first line and rejoin the lines using an - * end of line sequence. - * - * @param {object} input - * @param {string} input.input The string to split and reformat. - * @param {string} [input.ident] The indentation string. Default: ` ` (4 spaces). - * @param {string} [input.eol] The end of line sequence to use when rejoining - * the lines. Default: `'\n'`. - * - * @returns {string} A string with lines subsequent to the first indented - * with the given indentation sequence. - */ -function joinLinesWithIndentation ({ input, ident = ' ', eol = '\n' }) { - const lines = input.split(/\r?\n/) - for (let i = 1; i < lines.length; i += 1) { - lines[i] = ident + lines[i] - } - return lines.join(eol) -} - -/** - * Given a log object that has a `type: 'Error'` key, prettify the object and - * return the result. In other - * - * @param {object} input - * @param {object} input.log The error log to prettify. - * @param {string} [input.messageKey] The name of the key that contains a - * general log message. This is not the error's message property but the logger - * messsage property. Default: `MESSAGE_KEY` constant. - * @param {string} [input.ident] The sequence to use for indentation. Default: `' '`. - * @param {string} [input.eol] The sequence to use for EOL. Default: `'\n'`. - * @param {string[]} [input.errorLikeKeys] A set of keys that should be considered - * to have error objects as values. Default: `ERROR_LIKE_KEYS` constant. - * @param {string[]} [input.errorProperties] A set of specific error object - * properties, that are not the value of `messageKey`, `type`, or `stack`, to - * include in the prettified result. The first entry in the list may be `'*'` - * to indicate that all sibiling properties should be prettified. Default: `[]`. - * - * @returns {string} A sring that represents the prettified error log. - */ -function prettifyErrorLog ({ - log, - messageKey = MESSAGE_KEY, - ident = ' ', - eol = '\n', - errorLikeKeys = ERROR_LIKE_KEYS, - errorProperties = [] -}) { - const stack = log.stack - const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol }) - let result = `${ident}${joinedLines}${eol}` - - if (errorProperties.length > 0) { - const excludeProperties = LOGGER_KEYS.concat(messageKey, 'type', 'stack') - let propertiesToPrint - if (errorProperties[0] === '*') { - // Print all sibling properties except for the standard exclusions. - propertiesToPrint = Object.keys(log).filter(k => excludeProperties.includes(k) === false) - } else { - // Print only specified properties unless the property is a standard exclusion. - propertiesToPrint = errorProperties.filter(k => excludeProperties.includes(k) === false) - } - - for (let i = 0; i < propertiesToPrint.length; i += 1) { - const key = propertiesToPrint[i] - if (key in log === false) continue - if (isObject(log[key])) { - // The nested object may have "logger" type keys but since they are not - // at the root level of the object being processed, we want to print them. - // Thus, we invoke with `excludeLoggerKeys: false`. - const prettifiedObject = prettifyObject({ input: log[key], errorLikeKeys, excludeLoggerKeys: false, eol, ident }) - result = `${result}${key}: {${eol}${prettifiedObject}}${eol}` - continue - } - result = `${result}${key}: ${log[key]}${eol}` - } - } - - return result -} - -/** - * Checks if the passed in log has a `level` value and returns a prettified - * string for that level if so. - * - * @param {object} input - * @param {object} input.log The log object. - * @param {function} [input.colorizer] A colorizer function that accepts a level - * value and returns a colorized string. Default: a no-op colorizer. - * @param {string} [levelKey='level'] The key to find the level under. - * - * @returns {undefined|string} If `log` does not have a `level` property then - * `undefined` will be returned. Otherwise, a string from the specified - * `colorizer` is returned. - */ -function prettifyLevel ({ log, colorizer = defaultColorizer, levelKey = LEVEL_KEY }) { - if (levelKey in log === false) return undefined - return colorizer(log[levelKey]) -} - -/** - * Prettifies a message string if the given `log` has a message property. - * - * @param {object} input - * @param {object} input.log The log object with the message to colorize. - * @param {string} [input.messageKey='msg'] The property of the `log` that is the - * message to be prettified. - * @param {string|function} [input.messageFormat=undefined] A format string or function that defines how the - * logged message should be formatted, e.g. `'{level} - {pid}'`. - * @param {function} [input.colorizer] A colorizer function that has a - * `.message(str)` method attached to it. This function should return a colorized - * string which will be the "prettified" message. Default: a no-op colorizer. - * - * @returns {undefined|string} If the message key is not found, or the message - * key is not a string, then `undefined` will be returned. Otherwise, a string - * that is the prettified message. - */ -function prettifyMessage ({ log, messageFormat, messageKey = MESSAGE_KEY, colorizer = defaultColorizer, levelLabel = LEVEL_LABEL }) { - if (messageFormat && typeof messageFormat === 'string') { - const message = String(messageFormat).replace(/{([^{}]+)}/g, function (match, p1) { - // return log level as string instead of int - if (p1 === levelLabel && log[LEVEL_KEY]) { - return LEVELS[log[LEVEL_KEY]] - } - // Parse nested key access, e.g. `{keyA.subKeyB}`. - return p1.split('.').reduce(function (prev, curr) { - if (prev && prev[curr]) { - return prev[curr] - } - return '' - }, log) - }) - return colorizer.message(message) - } - if (messageFormat && typeof messageFormat === 'function') { - const msg = messageFormat(log, messageKey, levelLabel) - return colorizer.message(msg) - } - if (messageKey in log === false) return undefined - if (typeof log[messageKey] !== 'string') return undefined - return colorizer.message(log[messageKey]) -} - -/** - * Prettifies metadata that is usually present in a Pino log line. It looks for - * fields `name`, `pid`, `hostname`, and `caller` and returns a formatted string using - * the fields it finds. - * - * @param {object} input - * @param {object} input.log The log that may or may not contain metadata to - * be prettified. - * - * @returns {undefined|string} If no metadata is found then `undefined` is - * returned. Otherwise, a string of prettified metadata is returned. - */ -function prettifyMetadata ({ log }) { - let line = '' - - if (log.name || log.pid || log.hostname) { - line += '(' - - if (log.name) { - line += log.name - } - - if (log.name && log.pid) { - line += '/' + log.pid - } else if (log.pid) { - line += log.pid } - - if (log.hostname) { - // If `pid` and `name` were in the ignore keys list then we don't need - // the leading space. - line += `${line === '(' ? 'on' : ' on'} ${log.hostname}` + function finalizeResponse(fetchParams, response) { + fetchParams.request.done = true; + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)); + } } - - line += ')' - } - - if (log.caller) { - line += `${line === '' ? '' : ' '}<${log.caller}>` - } - - if (line === '') { - return undefined - } else { - return line - } -} - -/** - * Prettifies a standard object. Special care is taken when processing the object - * to handle child objects that are attached to keys known to contain error - * objects. - * - * @param {object} input - * @param {object} input.input The object to prettify. - * @param {string} [input.ident] The identation sequence to use. Default: `' '`. - * @param {string} [input.eol] The EOL sequence to use. Default: `'\n'`. - * @param {string[]} [input.skipKeys] A set of object keys to exclude from the - * prettified result. Default: `[]`. - * @param {Object} [input.customPrettifiers] Dictionary of - * custom prettifiers. Default: `{}`. - * @param {string[]} [input.errorLikeKeys] A set of object keys that contain - * error objects. Default: `ERROR_LIKE_KEYS` constant. - * @param {boolean} [input.excludeLoggerKeys] Indicates if known logger specific - * keys should be excluded from prettification. Default: `true`. - * @param {boolean} [input.singleLine] Should non-error keys all be formatted - * on a single line? This does NOT apply to errors, which will still be - * multi-line. Default: `false` - * - * @returns {string} The prettified string. This can be as little as `''` if - * there was nothing to prettify. - */ -function prettifyObject ({ - input, - ident = ' ', - eol = '\n', - skipKeys = [], - customPrettifiers = {}, - errorLikeKeys = ERROR_LIKE_KEYS, - excludeLoggerKeys = true, - singleLine = false, - colorizer = defaultColorizer -}) { - const keysToIgnore = [].concat(skipKeys) - - if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS) - - let result = '' - - // Split object keys into two categories: error and non-error - const { plain, errors } = Object.entries(input).reduce(({ plain, errors }, [k, v]) => { - if (keysToIgnore.includes(k) === false) { - // Pre-apply custom prettifiers, because all 3 cases below will need this - const pretty = typeof customPrettifiers[k] === 'function' - ? customPrettifiers[k](v, k, input) - : v - if (errorLikeKeys.includes(k)) { - errors[k] = pretty + function fetchFinale(fetchParams, response) { + if (response.type === "error") { + response.urlList = [fetchParams.request.urlList[0]]; + response.timingInfo = createOpaqueTimingInfo({ + startTime: fetchParams.timingInfo.startTime + }); + } + const processResponseEndOfBody = () => { + fetchParams.request.done = true; + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + } + }; + if (fetchParams.processResponse != null) { + queueMicrotask(() => fetchParams.processResponse(response)); + } + if (response.body == null) { + processResponseEndOfBody(); } else { - plain[k] = pretty + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk); + }; + const transformStream = new TransformStream({ + start() { + }, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { + size() { + return 1; + } + }, { + size() { + return 1; + } + }); + response.body = { stream: response.body.stream.pipeThrough(transformStream) }; } - } - return { plain, errors } - }, { plain: {}, errors: {} }) - - if (singleLine) { - // Stringify the entire object as a single JSON line - if (Object.keys(plain).length > 0) { - result += colorizer.greyMessage(stringifySafe(plain)) - } - result += eol - } else { - // Put each object entry on its own line - Object.entries(plain).forEach(([keyName, keyValue]) => { - // custom prettifiers are already applied above, so we can skip it now - const lines = typeof customPrettifiers[keyName] === 'function' - ? keyValue - : stringifySafe(keyValue, null, 2) - - if (lines === undefined) return - - const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }) - result += `${ident}${keyName}: ${joinedLines}${eol}` - }) - } - - // Errors - Object.entries(errors).forEach(([keyName, keyValue]) => { - // custom prettifiers are already applied above, so we can skip it now - const lines = typeof customPrettifiers[keyName] === 'function' - ? keyValue - : stringifySafe(keyValue, null, 2) - - if (lines === undefined) return - - result += prettifyError({ keyName, lines, eol, ident }) - }) - - return result -} - -/** - * Prettifies a timestamp if the given `log` has either `time`, `timestamp` or custom specified timestamp - * property. - * - * @param {object} input - * @param {object} input.log The log object with the timestamp to be prettified. - * @param {string} [input.timestampKey='time'] The log property that should be used to resolve timestamp value - * @param {boolean|string} [input.translateFormat=undefined] When `true` the - * timestamp will be prettified into a string at UTC using the default - * `DATE_FORMAT`. If a string, then `translateFormat` will be used as the format - * string to determine the output; see the `formatTime` function for details. - * - * @returns {undefined|string} If a timestamp property cannot be found then - * `undefined` is returned. Otherwise, the prettified time is returned as a - * string. - */ -function prettifyTime ({ log, timestampKey = TIMESTAMP_KEY, translateFormat = undefined }) { - let time = null - - if (timestampKey in log) { - time = log[timestampKey] - } else if ('timestamp' in log) { - time = log.timestamp - } - - if (time === null) return undefined - if (translateFormat) { - return '[' + formatTime(time, translateFormat) + ']' - } - - return `[${time}]` -} - -/** - * Prettifies an error string into a multi-line format. - * @param {object} input - * @param {string} input.keyName The key assigned to this error in the log object - * @param {string} input.lines The STRINGIFIED error. If the error field has a - * custom prettifier, that should be pre-applied as well - * @param {string} input.ident The indentation sequence to use - * @param {string} input.eol The EOL sequence to use - */ -function prettifyError ({ keyName, lines, eol, ident }) { - let result = '' - const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }) - const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol) - - for (let j = 0; j < splitLines.length; j += 1) { - if (j !== 0) result += eol - - const line = splitLines[j] - if (/^\s*"stack"/.test(line)) { - const matches = /^(\s*"stack":)\s*(".*"),?$/.exec(line) - /* istanbul ignore else */ - if (matches && matches.length === 3) { - const indentSize = /^\s*/.exec(line)[0].length + 4 - const indentation = ' '.repeat(indentSize) - const stackMessage = matches[2] - result += matches[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation) + if (fetchParams.processResponseConsumeBody != null) { + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes); + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure); + if (response.body == null) { + queueMicrotask(() => processBody(null)); + } else { + return fullyReadBody(response.body, processBody, processBodyError); + } + return Promise.resolve(); } - } else { - result += line - } - } - - return result -} - -/** - * Splits the input key delimited by a dot character but not when it is preceded - * by a backslash. - * - * @param {string} key A string identifying the property. - * - * @returns {string[]} Returns a list of string containing each delimited property. - * e.g. `'prop2\.domain\.corp.prop2'` should return [ 'prop2.domain.com', 'prop2' ] - */ -function splitIgnoreKey (key) { - const result = [] - let backslash = false - let segment = '' - - for (let i = 0; i < key.length; i++) { - const c = key.charAt(i) - - if (c === '\\') { - backslash = true - continue - } - - if (backslash) { - backslash = false - segment += c - continue - } - - /* Non-escaped dot, push to result */ - if (c === '.') { - result.push(segment) - segment = '' - continue - } - - segment += c - } - - /* Push last entry to result */ - if (segment.length) { - result.push(segment) - } - - return result -} - -/** - * Deletes a specified property from a log object if it exists. - * This function mutates the passed in `log` object. - * - * @param {object} log The log object to be modified. - * @param {string} property A string identifying the property to be deleted from - * the log object. Accepts nested properties delimited by a `.` - * Delimiter can be escaped to preserve property names that contain the delimiter. - * e.g. `'prop1.prop2'` or `'prop2\.domain\.corp.prop2'` - */ -function deleteLogProperty (log, property) { - const props = splitIgnoreKey(property) - const propToDelete = props.pop() - - props.forEach((prop) => { - if (!Object.prototype.hasOwnProperty.call(log, prop)) { - return - } - log = log[prop] - }) - - delete log[propToDelete] -} - -/** - * Filter a log object by removing any ignored keys. - * - * @param {object} log The log object to be modified. - * @param {string} ignoreKeys An array of strings identifying the properties to be removed. - * - * @returns {object} A new `log` object instance that does not include the ignored keys. - */ -function filterLog (log, ignoreKeys) { - const logCopy = clone(log) - ignoreKeys.forEach((ignoreKey) => { - deleteLogProperty(logCopy, ignoreKey) - }) - return logCopy -} - - -/***/ }), - -/***/ 84285: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const errSerializer = __nccwpck_require__(22266) -const errWithCauseSerializer = __nccwpck_require__(81069) -const reqSerializers = __nccwpck_require__(53041) -const resSerializers = __nccwpck_require__(82639) - -module.exports = { - err: errSerializer, - errWithCause: errWithCauseSerializer, - mapHttpRequest: reqSerializers.mapHttpRequest, - mapHttpResponse: resSerializers.mapHttpResponse, - req: reqSerializers.reqSerializer, - res: resSerializers.resSerializer, - - wrapErrorSerializer: function wrapErrorSerializer (customSerializer) { - if (customSerializer === errSerializer) return customSerializer - return function wrapErrSerializer (err) { - return customSerializer(errSerializer(err)) - } - }, - - wrapRequestSerializer: function wrapRequestSerializer (customSerializer) { - if (customSerializer === reqSerializers.reqSerializer) return customSerializer - return function wrappedReqSerializer (req) { - return customSerializer(reqSerializers.reqSerializer(req)) } - }, - - wrapResponseSerializer: function wrapResponseSerializer (customSerializer) { - if (customSerializer === resSerializers.resSerializer) return customSerializer - return function wrappedResSerializer (res) { - return customSerializer(resSerializers.resSerializer(res)) - } - } -} - - -/***/ }), - -/***/ 734: -/***/ ((module) => { - -"use strict"; - - -// ************************************************************** -// * Code initially copied/adapted from "pony-cause" npm module * -// * Please upstream improvements there * -// ************************************************************** - -const isErrorLike = (err) => { - return err && typeof err.message === 'string' -} - -/** - * @param {Error|{ cause?: unknown|(()=>err)}} err - * @returns {Error|Object|undefined} - */ -const getErrorCause = (err) => { - if (!err) return - - /** @type {unknown} */ - // @ts-ignore - const cause = err.cause - - // VError / NError style causes - if (typeof cause === 'function') { - // @ts-ignore - const causeResult = err.cause() - - return isErrorLike(causeResult) - ? causeResult - : undefined - } else { - return isErrorLike(cause) - ? cause - : undefined - } -} - -/** - * Internal method that keeps a track of which error we have already added, to avoid circular recursion - * - * @private - * @param {Error} err - * @param {Set} seen - * @returns {string} - */ -const _stackWithCauses = (err, seen) => { - if (!isErrorLike(err)) return '' - - const stack = err.stack || '' - - // Ensure we don't go circular or crazily deep - if (seen.has(err)) { - return stack + '\ncauses have become circular...' - } - - const cause = getErrorCause(err) - - if (cause) { - seen.add(err) - return (stack + '\ncaused by: ' + _stackWithCauses(cause, seen)) - } else { - return stack - } -} - -/** - * @param {Error} err - * @returns {string} - */ -const stackWithCauses = (err) => _stackWithCauses(err, new Set()) - -/** - * Internal method that keeps a track of which error we have already added, to avoid circular recursion - * - * @private - * @param {Error} err - * @param {Set} seen - * @param {boolean} [skip] - * @returns {string} - */ -const _messageWithCauses = (err, seen, skip) => { - if (!isErrorLike(err)) return '' - - const message = skip ? '' : (err.message || '') - - // Ensure we don't go circular or crazily deep - if (seen.has(err)) { - return message + ': ...' - } - - const cause = getErrorCause(err) - - if (cause) { - seen.add(err) - - // @ts-ignore - const skipIfVErrorStyleCause = typeof err.cause === 'function' - - return (message + - (skipIfVErrorStyleCause ? '' : ': ') + - _messageWithCauses(cause, seen, skipIfVErrorStyleCause)) - } else { - return message - } -} - -/** - * @param {Error} err - * @returns {string} - */ -const messageWithCauses = (err) => _messageWithCauses(err, new Set()) - -module.exports = { - isErrorLike, - getErrorCause, - stackWithCauses, - messageWithCauses -} - - -/***/ }), - -/***/ 66813: -/***/ ((module) => { - -"use strict"; - - -const seen = Symbol('circular-ref-tag') -const rawSymbol = Symbol('pino-raw-err-ref') - -const pinoErrProto = Object.create({}, { - type: { - enumerable: true, - writable: true, - value: undefined - }, - message: { - enumerable: true, - writable: true, - value: undefined - }, - stack: { - enumerable: true, - writable: true, - value: undefined - }, - aggregateErrors: { - enumerable: true, - writable: true, - value: undefined - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val + async function httpFetch(fetchParams) { + const request2 = fetchParams.request; + let response = null; + let actualResponse = null; + const timingInfo = fetchParams.timingInfo; + if (request2.serviceWorkers === "all") { + } + if (response === null) { + if (request2.redirect === "follow") { + request2.serviceWorkers = "none"; + } + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); + if (request2.responseTainting === "cors" && corsCheck(request2, response) === "failure") { + return makeNetworkError("cors failure"); + } + if (TAOCheck(request2, response) === "failure") { + request2.timingAllowFailed = true; + } + } + if ((request2.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck( + request2.origin, + request2.client, + request2.destination, + actualResponse + ) === "blocked") { + return makeNetworkError("blocked"); + } + if (redirectStatusSet.has(actualResponse.status)) { + if (request2.redirect !== "manual") { + fetchParams.controller.connection.destroy(); + } + if (request2.redirect === "error") { + response = makeNetworkError("unexpected redirect"); + } else if (request2.redirect === "manual") { + response = actualResponse; + } else if (request2.redirect === "follow") { + response = await httpRedirectFetch(fetchParams, response); + } else { + assert(false); + } + } + response.timingInfo = timingInfo; + return response; } - } -}) -Object.defineProperty(pinoErrProto, rawSymbol, { - writable: true, - value: {} -}) - -module.exports = { - pinoErrProto, - pinoErrorSymbols: { - seen, - rawSymbol - } -} - - -/***/ }), - -/***/ 81069: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = errWithCauseSerializer - -const { isErrorLike } = __nccwpck_require__(734) -const { pinoErrProto, pinoErrorSymbols } = __nccwpck_require__(66813) -const { seen } = pinoErrorSymbols - -const { toString } = Object.prototype - -function errWithCauseSerializer (err) { - if (!isErrorLike(err)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = toString.call(err.constructor) === '[object Function]' - ? err.constructor.name - : err.name - _err.message = err.message - _err.stack = err.stack - - if (Array.isArray(err.errors)) { - _err.aggregateErrors = err.errors.map(err => errWithCauseSerializer(err)) - } - - if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) { - _err.cause = errWithCauseSerializer(err.cause) - } - - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (isErrorLike(val)) { - if (!Object.prototype.hasOwnProperty.call(val, seen)) { - _err[key] = errWithCauseSerializer(val) + function httpRedirectFetch(fetchParams, response) { + const request2 = fetchParams.request; + const actualResponse = response.internalResponse ? response.internalResponse : response; + let locationURL; + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request2).hash + ); + if (locationURL == null) { + return response; } + } catch (err) { + return Promise.resolve(makeNetworkError(err)); + } + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + } + if (request2.redirectCount === 20) { + return Promise.resolve(makeNetworkError("redirect count exceeded")); + } + request2.redirectCount += 1; + if (request2.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request2, locationURL)) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')); + } + if (request2.responseTainting === "cors" && (locationURL.username || locationURL.password)) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )); + } + if (actualResponse.status !== 303 && request2.body != null && request2.body.source == null) { + return Promise.resolve(makeNetworkError()); + } + if ([301, 302].includes(actualResponse.status) && request2.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request2.method)) { + request2.method = "GET"; + request2.body = null; + for (const headerName of requestBodyHeader) { + request2.headersList.delete(headerName); + } + } + if (!sameOrigin(requestCurrentURL(request2), locationURL)) { + request2.headersList.delete("authorization"); + request2.headersList.delete("proxy-authorization", true); + request2.headersList.delete("cookie"); + request2.headersList.delete("host"); + } + if (request2.body != null) { + assert(request2.body.source != null); + request2.body = safelyExtractBody(request2.body.source)[0]; + } + const timingInfo = fetchParams.timingInfo; + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime; + } + request2.urlList.push(locationURL); + setRequestReferrerPolicyOnRedirect(request2, actualResponse); + return mainFetch(fetchParams, true); + } + async function httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch = false, isNewConnectionFetch = false) { + const request2 = fetchParams.request; + let httpFetchParams = null; + let httpRequest = null; + let response = null; + const httpCache = null; + const revalidatingFlag = false; + if (request2.window === "no-window" && request2.redirect === "error") { + httpFetchParams = fetchParams; + httpRequest = request2; } else { - _err[key] = val + httpRequest = makeRequest(request2); + httpFetchParams = { ...fetchParams }; + httpFetchParams.request = httpRequest; + } + const includeCredentials = request2.credentials === "include" || request2.credentials === "same-origin" && request2.responseTainting === "basic"; + const contentLength = httpRequest.body ? httpRequest.body.length : null; + let contentLengthHeaderValue = null; + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { + contentLengthHeaderValue = "0"; + } + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + } + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append("content-length", contentLengthHeaderValue); + } + if (contentLength != null && httpRequest.keepalive) { + } + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href)); + } + appendRequestOriginHeader(httpRequest); + appendFetchMetadata(httpRequest); + if (!httpRequest.headersList.contains("user-agent")) { + httpRequest.headersList.append("user-agent", typeof esbuildDetection === "undefined" ? "undici" : "node"); + } + 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"; + } + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control")) { + httpRequest.headersList.append("cache-control", "max-age=0"); + } + if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { + if (!httpRequest.headersList.contains("pragma")) { + httpRequest.headersList.append("pragma", "no-cache"); + } + if (!httpRequest.headersList.contains("cache-control")) { + httpRequest.headersList.append("cache-control", "no-cache"); + } + } + if (httpRequest.headersList.contains("range")) { + httpRequest.headersList.append("accept-encoding", "identity"); + } + if (!httpRequest.headersList.contains("accept-encoding")) { + if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { + httpRequest.headersList.append("accept-encoding", "br, gzip, deflate"); + } else { + httpRequest.headersList.append("accept-encoding", "gzip, deflate"); + } + } + httpRequest.headersList.delete("host"); + if (includeCredentials) { + } + if (httpCache == null) { + httpRequest.cache = "no-store"; } + if (httpRequest.mode !== "no-store" && httpRequest.mode !== "reload") { + } + if (response == null) { + if (httpRequest.mode === "only-if-cached") { + return makeNetworkError("only if cached"); + } + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ); + if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) { + } + if (revalidatingFlag && forwardResponse.status === 304) { + } + if (response == null) { + response = forwardResponse; + } + } + response.urlList = [...httpRequest.urlList]; + if (httpRequest.headersList.contains("range")) { + response.rangeRequested = true; + } + response.requestIncludesCredentials = includeCredentials; + if (response.status === 407) { + if (request2.window === "no-window") { + return makeNetworkError(); + } + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + return makeNetworkError("proxy authentication required"); + } + 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 + (request2.body == null || request2.body.source != null) + ) { + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams); + } + fetchParams.controller.connection.destroy(); + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ); + } + if (isAuthenticationFetch) { + } + return response; } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} - - -/***/ }), - -/***/ 22266: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = errSerializer - -const { messageWithCauses, stackWithCauses, isErrorLike } = __nccwpck_require__(734) -const { pinoErrProto, pinoErrorSymbols } = __nccwpck_require__(66813) -const { seen } = pinoErrorSymbols - -const { toString } = Object.prototype - -function errSerializer (err) { - if (!isErrorLike(err)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = toString.call(err.constructor) === '[object Function]' - ? err.constructor.name - : err.name - _err.message = messageWithCauses(err) - _err.stack = stackWithCauses(err) - - if (Array.isArray(err.errors)) { - _err.aggregateErrors = err.errors.map(err => errSerializer(err)) - } - - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (isErrorLike(val)) { - // We append cause messages and stacks to _err, therefore skipping causes here - if (key !== 'cause' && !Object.prototype.hasOwnProperty.call(val, seen)) { - _err[key] = errSerializer(val) + async function httpNetworkFetch(fetchParams, includeCredentials = false, forceNewConnection = false) { + assert(!fetchParams.controller.connection || fetchParams.controller.connection.destroyed); + fetchParams.controller.connection = { + abort: null, + destroyed: false, + destroy(err) { + var _a2; + if (!this.destroyed) { + this.destroyed = true; + (_a2 = this.abort) == null ? void 0 : _a2.call(this, err ?? new DOMException2("The operation was aborted.", "AbortError")); + } } + }; + const request2 = fetchParams.request; + let response = null; + const timingInfo = fetchParams.timingInfo; + const httpCache = null; + if (httpCache == null) { + request2.cache = "no-store"; + } + const newConnection = forceNewConnection ? "yes" : "no"; + if (request2.mode === "websocket") { } else { - _err[key] = val - } - } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} - - -/***/ }), - -/***/ 53041: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - mapHttpRequest, - reqSerializer -} - -const rawSymbol = Symbol('pino-raw-req-ref') -const pinoReqProto = Object.create({}, { - id: { - enumerable: true, - writable: true, - value: '' - }, - method: { - enumerable: true, - writable: true, - value: '' - }, - url: { - enumerable: true, - writable: true, - value: '' - }, - query: { - enumerable: true, - writable: true, - value: '' - }, - params: { - enumerable: true, - writable: true, - value: '' - }, - headers: { - enumerable: true, - writable: true, - value: {} - }, - remoteAddress: { - enumerable: true, - writable: true, - value: '' - }, - remotePort: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoReqProto, rawSymbol, { - writable: true, - value: {} -}) - -function reqSerializer (req) { - // req.info is for hapi compat. - const connection = req.info || req.socket - const _req = Object.create(pinoReqProto) - _req.id = (typeof req.id === 'function' ? req.id() : (req.id || (req.info ? req.info.id : undefined))) - _req.method = req.method - // req.originalUrl is for expressjs compat. - if (req.originalUrl) { - _req.url = req.originalUrl - } else { - const path = req.path - // path for safe hapi compat. - _req.url = typeof path === 'string' ? path : (req.url ? req.url.path || req.url : undefined) - } - - if (req.query) { - _req.query = req.query + } + let requestBody = null; + if (request2.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()); + } else if (request2.body != null) { + const processBodyChunk = async function* (bytes) { + var _a2; + if (isCancelled(fetchParams)) { + return; + } + yield bytes; + (_a2 = fetchParams.processRequestBodyChunkLength) == null ? void 0 : _a2.call(fetchParams, bytes.byteLength); + }; + const processEndOfBody = () => { + if (isCancelled(fetchParams)) { + return; + } + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody(); + } + }; + const processBodyError = (e) => { + if (isCancelled(fetchParams)) { + return; + } + if (e.name === "AbortError") { + fetchParams.controller.abort(); + } else { + fetchParams.controller.terminate(e); + } + }; + requestBody = async function* () { + try { + for await (const bytes of request2.body.stream) { + yield* processBodyChunk(bytes); + } + processEndOfBody(); + } catch (err) { + processBodyError(err); + } + }(); + } + try { + const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); + if (socket) { + response = makeResponse({ status, statusText, headersList, socket }); + } else { + const iterator2 = body[Symbol.asyncIterator](); + fetchParams.controller.next = () => iterator2.next(); + response = makeResponse({ status, statusText, headersList }); + } + } catch (err) { + if (err.name === "AbortError") { + fetchParams.controller.connection.destroy(); + return makeAppropriateNetworkError(fetchParams, err); + } + return makeNetworkError(err); + } + const pullAlgorithm = () => { + fetchParams.controller.resume(); + }; + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason); + }; + if (!ReadableStream) { + ReadableStream = __require("stream/web").ReadableStream; + } + const stream = new 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; + } + } + ); + response.body = { stream }; + fetchParams.controller.on("terminated", onAborted); + fetchParams.controller.resume = async () => { + while (true) { + let bytes; + let isFailure; + try { + const { done, value } = await fetchParams.controller.next(); + if (isAborted(fetchParams)) { + break; + } + bytes = done ? void 0 : value; + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + bytes = void 0; + } else { + bytes = err; + isFailure = true; + } + } + if (bytes === void 0) { + readableStreamClose(fetchParams.controller.controller); + finalizeResponse(fetchParams, response); + return; + } + timingInfo.decodedBodySize += (bytes == null ? void 0 : bytes.byteLength) ?? 0; + if (isFailure) { + fetchParams.controller.terminate(bytes); + return; + } + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)); + if (isErrored(stream)) { + fetchParams.controller.terminate(); + return; + } + if (!fetchParams.controller.controller.desiredSize) { + return; + } + } + }; + function onAborted(reason) { + if (isAborted(fetchParams)) { + response.aborted = true; + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ); + } + } else { + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError("terminated", { + cause: isErrorLike(reason) ? reason : void 0 + })); + } + } + fetchParams.controller.connection.destroy(); + } + return response; + async function dispatch({ body }) { + const url = requestCurrentURL(request2); + const agent = fetchParams.controller.dispatcher; + return new Promise((resolve4, reject) => agent.dispatch( + { + path: url.pathname + url.search, + origin: url.origin, + method: request2.method, + body: fetchParams.controller.dispatcher.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body, + headers: request2.headersList.entries, + maxRedirections: 0, + upgrade: request2.mode === "websocket" ? "websocket" : void 0 + }, + { + body: null, + abort: null, + onConnect(abort) { + const { connection } = fetchParams.controller; + if (connection.destroyed) { + abort(new DOMException2("The operation was aborted.", "AbortError")); + } else { + fetchParams.controller.on("terminated", abort); + this.abort = connection.abort = abort; + } + }, + onHeaders(status, headersList, resume2, statusText) { + if (status < 200) { + return; + } + let codings = []; + let location = ""; + const headers = new Headers2(); + 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") { + codings = val.toLowerCase().split(",").map((x) => x.trim()); + } else if (key.toLowerCase() === "location") { + location = val; + } + headers[kHeadersList].append(key, val); + } + } else { + const keys = Object.keys(headersList); + for (const key of keys) { + const val = headersList[key]; + if (key.toLowerCase() === "content-encoding") { + codings = val.toLowerCase().split(",").map((x) => x.trim()).reverse(); + } else if (key.toLowerCase() === "location") { + location = val; + } + headers[kHeadersList].append(key, val); + } + } + this.body = new Readable2({ read: resume2 }); + const decoders = []; + const willFollow = request2.redirect === "follow" && location && redirectStatusSet.has(status); + if (request2.method !== "HEAD" && request2.method !== "CONNECT" && !nullBodyStatus.includes(status) && !willFollow) { + for (const coding of codings) { + if (coding === "x-gzip" || coding === "gzip") { + decoders.push(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: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })); + } else if (coding === "deflate") { + decoders.push(zlib.createInflate()); + } else if (coding === "br") { + decoders.push(zlib.createBrotliDecompress()); + } else { + decoders.length = 0; + break; + } + } + } + resolve4({ + status, + statusText, + headersList: headers[kHeadersList], + body: decoders.length ? pipeline(this.body, ...decoders, () => { + }) : this.body.on("error", () => { + }) + }); + return true; + }, + onData(chunk) { + if (fetchParams.controller.dump) { + return; + } + const bytes = chunk; + timingInfo.encodedBodySize += bytes.byteLength; + 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) { + var _a2; + if (this.abort) { + fetchParams.controller.off("terminated", this.abort); + } + (_a2 = this.body) == null ? void 0 : _a2.destroy(error); + fetchParams.controller.terminate(error); + reject(error); + }, + onUpgrade(status, headersList, socket) { + if (status !== 101) { + return; + } + const headers = new Headers2(); + for (let n = 0; n < headersList.length; n += 2) { + const key = headersList[n + 0].toString("latin1"); + const val = headersList[n + 1].toString("latin1"); + headers[kHeadersList].append(key, val); + } + resolve4({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }); + return true; + } + } + )); + } + } + module2.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming + }; } +}); - if (req.params) { - _req.params = req.params +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/symbols.js +var require_symbols5 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/symbols.js"(exports2, module2) { + "use strict"; + module2.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") + }; } +}); - _req.headers = req.headers - _req.remoteAddress = connection && connection.remoteAddress - _req.remotePort = connection && connection.remotePort - // req.raw is for hapi compat/equivalence - _req.raw = req.raw || req - return _req -} - -function mapHttpRequest (req) { - return { - req: reqSerializer(req) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/progressevent.js +var require_progressevent = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/progressevent.js"(exports2, module2) { + "use strict"; + var { webidl } = require_webidl(); + var kState = Symbol("ProgressEvent state"); + var ProgressEvent = class _ProgressEvent extends Event { + constructor(type2, eventInitDict = {}) { + type2 = webidl.converters.DOMString(type2); + eventInitDict = webidl.converters.ProgressEventInit(eventInitDict ?? {}); + super(type2, eventInitDict); + this[kState] = { + lengthComputable: eventInitDict.lengthComputable, + loaded: eventInitDict.loaded, + total: eventInitDict.total + }; + } + get lengthComputable() { + webidl.brandCheck(this, _ProgressEvent); + return this[kState].lengthComputable; + } + get loaded() { + webidl.brandCheck(this, _ProgressEvent); + return this[kState].loaded; + } + get total() { + webidl.brandCheck(this, _ProgressEvent); + return this[kState].total; + } + }; + webidl.converters.ProgressEventInit = webidl.dictionaryConverter([ + { + key: "lengthComputable", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "loaded", + converter: webidl.converters["unsigned long long"], + defaultValue: 0 + }, + { + key: "total", + converter: webidl.converters["unsigned long long"], + defaultValue: 0 + }, + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: false + } + ]); + module2.exports = { + ProgressEvent + }; } -} - - -/***/ }), - -/***/ 82639: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - mapHttpResponse, - resSerializer -} +}); -const rawSymbol = Symbol('pino-raw-res-ref') -const pinoResProto = Object.create({}, { - statusCode: { - enumerable: true, - writable: true, - value: 0 - }, - headers: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/encoding.js +var require_encoding2 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/encoding.js"(exports2, module2) { + "use strict"; + function getEncoding(label) { + if (!label) { + 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"; + } } + module2.exports = { + getEncoding + }; } -}) -Object.defineProperty(pinoResProto, rawSymbol, { - writable: true, - value: {} -}) - -function resSerializer (res) { - const _res = Object.create(pinoResProto) - _res.statusCode = res.headersSent ? res.statusCode : null - _res.headers = res.getHeaders ? res.getHeaders() : res._headers - _res.raw = res - return _res -} - -function mapHttpResponse (res) { - return { - res: resSerializer(res) - } -} - - -/***/ }), - -/***/ 74602: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const errSerializer = __nccwpck_require__(62557) -const errWithCauseSerializer = __nccwpck_require__(98244) -const reqSerializers = __nccwpck_require__(94478) -const resSerializers = __nccwpck_require__(95908) - -module.exports = { - err: errSerializer, - errWithCause: errWithCauseSerializer, - mapHttpRequest: reqSerializers.mapHttpRequest, - mapHttpResponse: resSerializers.mapHttpResponse, - req: reqSerializers.reqSerializer, - res: resSerializers.resSerializer, +}); - wrapErrorSerializer: function wrapErrorSerializer (customSerializer) { - if (customSerializer === errSerializer) return customSerializer - return function wrapErrSerializer (err) { - return customSerializer(errSerializer(err)) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/util.js +var require_util5 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/util.js"(exports2, module2) { + "use strict"; + var { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired + } = require_symbols5(); + var { ProgressEvent } = require_progressevent(); + var { getEncoding } = require_encoding2(); + var { DOMException: DOMException2 } = require_constants5(); + var { serializeAMimeType, parseMIMEType } = require_dataURL(); + var { types: types2 } = __require("util"); + var { StringDecoder } = __require("string_decoder"); + var { btoa: btoa10 } = __require("buffer"); + var staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + function readOperation(fr, blob, type2, encodingName) { + if (fr[kState] === "loading") { + throw new DOMException2("Invalid state", "InvalidStateError"); + } + fr[kState] = "loading"; + fr[kResult] = null; + fr[kError] = null; + const stream = blob.stream(); + const reader = stream.getReader(); + const bytes = []; + let chunkPromise = reader.read(); + let isFirstChunk = true; + (async () => { + while (!fr[kAborted]) { + try { + const { done, value } = await chunkPromise; + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent("loadstart", fr); + }); + } + isFirstChunk = false; + if (!done && types2.isUint8Array(value)) { + bytes.push(value); + if ((fr[kLastProgressEventFired] === void 0 || Date.now() - fr[kLastProgressEventFired] >= 50) && !fr[kAborted]) { + fr[kLastProgressEventFired] = Date.now(); + queueMicrotask(() => { + fireAProgressEvent("progress", fr); + }); + } + chunkPromise = reader.read(); + } else if (done) { + queueMicrotask(() => { + fr[kState] = "done"; + try { + const result = packageData(bytes, type2, blob.type, encodingName); + if (fr[kAborted]) { + return; + } + fr[kResult] = result; + fireAProgressEvent("load", fr); + } catch (error) { + fr[kError] = error; + fireAProgressEvent("error", fr); + } + if (fr[kState] !== "loading") { + fireAProgressEvent("loadend", fr); + } + }); + break; + } + } catch (error) { + if (fr[kAborted]) { + return; + } + queueMicrotask(() => { + fr[kState] = "done"; + fr[kError] = error; + fireAProgressEvent("error", fr); + if (fr[kState] !== "loading") { + fireAProgressEvent("loadend", fr); + } + }); + break; + } + } + })(); } - }, - - wrapRequestSerializer: function wrapRequestSerializer (customSerializer) { - if (customSerializer === reqSerializers.reqSerializer) return customSerializer - return function wrappedReqSerializer (req) { - return customSerializer(reqSerializers.reqSerializer(req)) + function fireAProgressEvent(e, reader) { + const event = new ProgressEvent(e, { + bubbles: false, + cancelable: false + }); + reader.dispatchEvent(event); + } + function packageData(bytes, type2, mimeType, encodingName) { + switch (type2) { + case "DataURL": { + let dataURL = "data:"; + const parsed = parseMIMEType(mimeType || "application/octet-stream"); + if (parsed !== "failure") { + dataURL += serializeAMimeType(parsed); + } + dataURL += ";base64,"; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) { + dataURL += btoa10(decoder.write(chunk)); + } + dataURL += btoa10(decoder.end()); + return dataURL; + } + case "Text": { + let encoding = "failure"; + if (encodingName) { + encoding = getEncoding(encodingName); + } + if (encoding === "failure" && mimeType) { + const type3 = parseMIMEType(mimeType); + if (type3 !== "failure") { + encoding = getEncoding(type3.parameters.get("charset")); + } + } + if (encoding === "failure") { + encoding = "UTF-8"; + } + return decode(bytes, encoding); + } + case "ArrayBuffer": { + const sequence = combineByteSequences(bytes); + return sequence.buffer; + } + case "BinaryString": { + let binaryString = ""; + const decoder = new StringDecoder("latin1"); + for (const chunk of bytes) { + binaryString += decoder.write(chunk); + } + binaryString += decoder.end(); + return binaryString; + } + } } - }, - - wrapResponseSerializer: function wrapResponseSerializer (customSerializer) { - if (customSerializer === resSerializers.resSerializer) return customSerializer - return function wrappedResSerializer (res) { - return customSerializer(resSerializers.resSerializer(res)) + function decode(ioQueue, encoding) { + const bytes = combineByteSequences(ioQueue); + const BOMEncoding = BOMSniffing(bytes); + let slice = 0; + if (BOMEncoding !== null) { + encoding = BOMEncoding; + slice = BOMEncoding === "UTF-8" ? 3 : 2; + } + const sliced = bytes.slice(slice); + return new TextDecoder(encoding).decode(sliced); } - } -} - - -/***/ }), - -/***/ 52397: -/***/ ((module) => { - -"use strict"; - - -// ************************************************************** -// * Code initially copied/adapted from "pony-cause" npm module * -// * Please upstream improvements there * -// ************************************************************** - -const isErrorLike = (err) => { - return err && typeof err.message === 'string' -} - -/** - * @param {Error|{ cause?: unknown|(()=>err)}} err - * @returns {Error|Object|undefined} - */ -const getErrorCause = (err) => { - if (!err) return - - /** @type {unknown} */ - // @ts-ignore - const cause = err.cause - - // VError / NError style causes - if (typeof cause === 'function') { - // @ts-ignore - const causeResult = err.cause() - - return isErrorLike(causeResult) - ? causeResult - : undefined - } else { - return isErrorLike(cause) - ? cause - : undefined - } -} - -/** - * Internal method that keeps a track of which error we have already added, to avoid circular recursion - * - * @private - * @param {Error} err - * @param {Set} seen - * @returns {string} - */ -const _stackWithCauses = (err, seen) => { - if (!isErrorLike(err)) return '' - - const stack = err.stack || '' - - // Ensure we don't go circular or crazily deep - if (seen.has(err)) { - return stack + '\ncauses have become circular...' - } - - const cause = getErrorCause(err) - - if (cause) { - seen.add(err) - return (stack + '\ncaused by: ' + _stackWithCauses(cause, seen)) - } else { - return stack - } -} - -/** - * @param {Error} err - * @returns {string} - */ -const stackWithCauses = (err) => _stackWithCauses(err, new Set()) - -/** - * Internal method that keeps a track of which error we have already added, to avoid circular recursion - * - * @private - * @param {Error} err - * @param {Set} seen - * @param {boolean} [skip] - * @returns {string} - */ -const _messageWithCauses = (err, seen, skip) => { - if (!isErrorLike(err)) return '' - - const message = skip ? '' : (err.message || '') - - // Ensure we don't go circular or crazily deep - if (seen.has(err)) { - return message + ': ...' - } - - const cause = getErrorCause(err) - - if (cause) { - seen.add(err) - - // @ts-ignore - const skipIfVErrorStyleCause = typeof err.cause === 'function' - - return (message + - (skipIfVErrorStyleCause ? '' : ': ') + - _messageWithCauses(cause, seen, skipIfVErrorStyleCause)) - } else { - return message - } -} - -/** - * @param {Error} err - * @returns {string} - */ -const messageWithCauses = (err) => _messageWithCauses(err, new Set()) - -module.exports = { - isErrorLike, - getErrorCause, - stackWithCauses, - messageWithCauses -} - - -/***/ }), - -/***/ 8874: -/***/ ((module) => { - -"use strict"; - - -const seen = Symbol('circular-ref-tag') -const rawSymbol = Symbol('pino-raw-err-ref') - -const pinoErrProto = Object.create({}, { - type: { - enumerable: true, - writable: true, - value: undefined - }, - message: { - enumerable: true, - writable: true, - value: undefined - }, - stack: { - enumerable: true, - writable: true, - value: undefined - }, - aggregateErrors: { - enumerable: true, - writable: true, - value: undefined - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val + function BOMSniffing(ioQueue) { + const [a, b, c] = ioQueue; + if (a === 239 && b === 187 && c === 191) { + return "UTF-8"; + } else if (a === 254 && b === 255) { + return "UTF-16BE"; + } else if (a === 255 && b === 254) { + return "UTF-16LE"; + } + return null; } + function 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)); + } + module2.exports = { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + }; } -}) -Object.defineProperty(pinoErrProto, rawSymbol, { - writable: true, - value: {} -}) - -module.exports = { - pinoErrProto, - pinoErrorSymbols: { - seen, - rawSymbol - } -} - - -/***/ }), - -/***/ 98244: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = errWithCauseSerializer - -const { isErrorLike } = __nccwpck_require__(52397) -const { pinoErrProto, pinoErrorSymbols } = __nccwpck_require__(8874) -const { seen } = pinoErrorSymbols - -const { toString } = Object.prototype - -function errWithCauseSerializer (err) { - if (!isErrorLike(err)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = toString.call(err.constructor) === '[object Function]' - ? err.constructor.name - : err.name - _err.message = err.message - _err.stack = err.stack - - if (Array.isArray(err.errors)) { - _err.aggregateErrors = err.errors.map(err => errWithCauseSerializer(err)) - } - - if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) { - _err.cause = errWithCauseSerializer(err.cause) - } +}); - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (isErrorLike(val)) { - if (!Object.prototype.hasOwnProperty.call(val, seen)) { - _err[key] = errWithCauseSerializer(val) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/filereader.js +var require_filereader = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/fileapi/filereader.js"(exports2, module2) { + "use strict"; + var { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent + } = require_util5(); + var { + kState, + kError, + kResult, + kEvents, + kAborted + } = require_symbols5(); + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util2(); + var FileReader = class _FileReader extends EventTarget { + constructor() { + super(); + this[kState] = "empty"; + this[kResult] = null; + this[kError] = null; + this[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) { + webidl.brandCheck(this, _FileReader); + webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsArrayBuffer" }); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "ArrayBuffer"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsBinaryString + * @param {import('buffer').Blob} blob + */ + readAsBinaryString(blob) { + webidl.brandCheck(this, _FileReader); + webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsBinaryString" }); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "BinaryString"); + } + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText(blob, encoding = void 0) { + webidl.brandCheck(this, _FileReader); + webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsText" }); + blob = webidl.converters.Blob(blob, { strict: false }); + if (encoding !== void 0) { + encoding = webidl.converters.DOMString(encoding); } - } else { - _err[key] = val + readOperation(this, blob, "Text", encoding); } - } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} - - -/***/ }), - -/***/ 62557: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -module.exports = errSerializer - -const { messageWithCauses, stackWithCauses, isErrorLike } = __nccwpck_require__(52397) -const { pinoErrProto, pinoErrorSymbols } = __nccwpck_require__(8874) -const { seen } = pinoErrorSymbols - -const { toString } = Object.prototype - -function errSerializer (err) { - if (!isErrorLike(err)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = toString.call(err.constructor) === '[object Function]' - ? err.constructor.name - : err.name - _err.message = messageWithCauses(err) - _err.stack = stackWithCauses(err) - - if (Array.isArray(err.errors)) { - _err.aggregateErrors = err.errors.map(err => errSerializer(err)) - } - - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (isErrorLike(val)) { - // We append cause messages and stacks to _err, therefore skipping causes here - if (key !== 'cause' && !Object.prototype.hasOwnProperty.call(val, seen)) { - _err[key] = errSerializer(val) + /** + * @see https://w3c.github.io/FileAPI/#dfn-readAsDataURL + * @param {import('buffer').Blob} blob + */ + readAsDataURL(blob) { + webidl.brandCheck(this, _FileReader); + webidl.argumentLengthCheck(arguments, 1, { header: "FileReader.readAsDataURL" }); + blob = webidl.converters.Blob(blob, { strict: false }); + readOperation(this, blob, "DataURL"); + } + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort() { + if (this[kState] === "empty" || this[kState] === "done") { + this[kResult] = null; + return; } - } else { - _err[key] = val - } - } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} - - -/***/ }), - -/***/ 94478: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - mapHttpRequest, - reqSerializer -} - -const rawSymbol = Symbol('pino-raw-req-ref') -const pinoReqProto = Object.create({}, { - id: { - enumerable: true, - writable: true, - value: '' - }, - method: { - enumerable: true, - writable: true, - value: '' - }, - url: { - enumerable: true, - writable: true, - value: '' - }, - query: { - enumerable: true, - writable: true, - value: '' - }, - params: { - enumerable: true, - writable: true, - value: '' - }, - headers: { - enumerable: true, - writable: true, - value: {} - }, - remoteAddress: { - enumerable: true, - writable: true, - value: '' - }, - remotePort: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoReqProto, rawSymbol, { - writable: true, - value: {} -}) - -function reqSerializer (req) { - // req.info is for hapi compat. - const connection = req.info || req.socket - const _req = Object.create(pinoReqProto) - _req.id = (typeof req.id === 'function' ? req.id() : (req.id || (req.info ? req.info.id : undefined))) - _req.method = req.method - // req.originalUrl is for expressjs compat. - if (req.originalUrl) { - _req.url = req.originalUrl - } else { - const path = req.path - // path for safe hapi compat. - _req.url = typeof path === 'string' ? path : (req.url ? req.url.path || req.url : undefined) - } - - if (req.query) { - _req.query = req.query - } - - if (req.params) { - _req.params = req.params - } - - _req.headers = req.headers - _req.remoteAddress = connection && connection.remoteAddress - _req.remotePort = connection && connection.remotePort - // req.raw is for hapi compat/equivalence - _req.raw = req.raw || req - return _req -} - -function mapHttpRequest (req) { - return { - req: reqSerializer(req) - } -} - - -/***/ }), - -/***/ 95908: -/***/ ((module) => { - -"use strict"; - - -module.exports = { - mapHttpResponse, - resSerializer -} - -const rawSymbol = Symbol('pino-raw-res-ref') -const pinoResProto = Object.create({}, { - statusCode: { - enumerable: true, - writable: true, - value: 0 - }, - headers: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoResProto, rawSymbol, { - writable: true, - value: {} -}) - -function resSerializer (res) { - const _res = Object.create(pinoResProto) - _res.statusCode = res.headersSent ? res.statusCode : null - _res.headers = res.getHeaders ? res.getHeaders() : res._headers - _res.raw = res - return _res -} - -function mapHttpResponse (res) { - return { - res: resSerializer(res) + if (this[kState] === "loading") { + this[kState] = "done"; + this[kResult] = null; + } + this[kAborted] = true; + fireAProgressEvent("abort", this); + if (this[kState] !== "loading") { + fireAProgressEvent("loadend", this); + } + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-readystate + */ + get readyState() { + webidl.brandCheck(this, _FileReader); + switch (this[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() { + webidl.brandCheck(this, _FileReader); + return this[kResult]; + } + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error() { + webidl.brandCheck(this, _FileReader); + return this[kError]; + } + get onloadend() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].loadend; + } + set onloadend(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].loadend) { + this.removeEventListener("loadend", this[kEvents].loadend); + } + if (typeof fn === "function") { + this[kEvents].loadend = fn; + this.addEventListener("loadend", fn); + } else { + this[kEvents].loadend = null; + } + } + get onerror() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].error; + } + set onerror(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].error) { + this.removeEventListener("error", this[kEvents].error); + } + if (typeof fn === "function") { + this[kEvents].error = fn; + this.addEventListener("error", fn); + } else { + this[kEvents].error = null; + } + } + get onloadstart() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].loadstart; + } + set onloadstart(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].loadstart) { + this.removeEventListener("loadstart", this[kEvents].loadstart); + } + if (typeof fn === "function") { + this[kEvents].loadstart = fn; + this.addEventListener("loadstart", fn); + } else { + this[kEvents].loadstart = null; + } + } + get onprogress() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].progress; + } + set onprogress(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].progress) { + this.removeEventListener("progress", this[kEvents].progress); + } + if (typeof fn === "function") { + this[kEvents].progress = fn; + this.addEventListener("progress", fn); + } else { + this[kEvents].progress = null; + } + } + get onload() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].load; + } + set onload(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].load) { + this.removeEventListener("load", this[kEvents].load); + } + if (typeof fn === "function") { + this[kEvents].load = fn; + this.addEventListener("load", fn); + } else { + this[kEvents].load = null; + } + } + get onabort() { + webidl.brandCheck(this, _FileReader); + return this[kEvents].abort; + } + set onabort(fn) { + webidl.brandCheck(this, _FileReader); + if (this[kEvents].abort) { + this.removeEventListener("abort", this[kEvents].abort); + } + if (typeof fn === "function") { + this[kEvents].abort = fn; + this.addEventListener("abort", fn); + } else { + this[kEvents].abort = null; + } + } + }; + FileReader.EMPTY = FileReader.prototype.EMPTY = 0; + FileReader.LOADING = FileReader.prototype.LOADING = 1; + FileReader.DONE = FileReader.prototype.DONE = 2; + Object.defineProperties(FileReader.prototype, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors, + readAsArrayBuffer: kEnumerableProperty, + readAsBinaryString: kEnumerableProperty, + readAsText: kEnumerableProperty, + readAsDataURL: kEnumerableProperty, + abort: kEnumerableProperty, + readyState: kEnumerableProperty, + result: kEnumerableProperty, + error: kEnumerableProperty, + onloadstart: kEnumerableProperty, + onprogress: kEnumerableProperty, + onload: kEnumerableProperty, + onabort: kEnumerableProperty, + onerror: kEnumerableProperty, + onloadend: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "FileReader", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(FileReader, { + EMPTY: staticPropertyDescriptors, + LOADING: staticPropertyDescriptors, + DONE: staticPropertyDescriptors + }); + module2.exports = { + FileReader + }; } -} - - -/***/ }), - -/***/ 94269: -/***/ ((module) => { - -"use strict"; - - -function noOpPrepareStackTrace (_, stack) { - return stack -} - -module.exports = function getCallers () { - const originalPrepare = Error.prepareStackTrace - Error.prepareStackTrace = noOpPrepareStackTrace - const stack = new Error().stack - Error.prepareStackTrace = originalPrepare +}); - if (!Array.isArray(stack)) { - return undefined +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/symbols.js +var require_symbols6 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/symbols.js"(exports2, module2) { + "use strict"; + module2.exports = { + kConstruct: require_symbols3().kConstruct + }; } +}); - const entries = stack.slice(2) - - const fileNames = [] - - for (const entry of entries) { - if (!entry) { - continue +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/util.js +var require_util6 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/util.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var { URLSerializer } = require_dataURL(); + var { isValidHeaderName } = require_util3(); + function urlEquals(A, B, excludeFragment = false) { + const serializedA = URLSerializer(A, excludeFragment); + const serializedB = URLSerializer(B, excludeFragment); + return serializedA === serializedB; + } + function fieldValues(header) { + assert(header !== null); + const values = []; + for (let value of header.split(",")) { + value = value.trim(); + if (!value.length) { + continue; + } else if (!isValidHeaderName(value)) { + continue; + } + values.push(value); + } + return values; } - - fileNames.push(entry.getFileName()) + module2.exports = { + urlEquals, + fieldValues + }; } +}); - return fileNames -} - - -/***/ }), - -/***/ 56389: -/***/ ((module) => { - -/** - * Represents default log level values - * - * @enum {number} - */ -const DEFAULT_LEVELS = { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60 -} - -/** - * Represents sort order direction: `ascending` or `descending` - * - * @enum {string} - */ -const SORTING_ORDER = { - ASC: 'ASC', - DESC: 'DESC' -} - -module.exports = { - DEFAULT_LEVELS, - SORTING_ORDER -} - - -/***/ }), - -/***/ 42389: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -/* eslint no-prototype-builtins: 0 */ -const { - lsCacheSym, - levelValSym, - useOnlyCustomLevelsSym, - streamSym, - formattersSym, - hooksSym, - levelCompSym -} = __nccwpck_require__(82897) -const { noop, genLog } = __nccwpck_require__(94011) -const { DEFAULT_LEVELS, SORTING_ORDER } = __nccwpck_require__(56389) - -const levelMethods = { - fatal: (hook) => { - const logFatal = genLog(DEFAULT_LEVELS.fatal, hook) - return function (...args) { - const stream = this[streamSym] - logFatal.call(this, ...args) - if (typeof stream.flushSync === 'function') { +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/cache.js +var require_cache = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/cache.js"(exports2, module2) { + "use strict"; + var { kConstruct } = require_symbols6(); + var { urlEquals, fieldValues: getFieldValues } = require_util6(); + var { kEnumerableProperty, isDisturbed } = require_util2(); + var { kHeadersList } = require_symbols3(); + var { webidl } = require_webidl(); + var { Response: Response2, cloneResponse } = require_response2(); + var { Request: Request2 } = require_request3(); + var { kState, kHeaders, kGuard, kRealm } = require_symbols4(); + var { fetching } = require_fetch(); + var { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = require_util3(); + var assert = __require("assert"); + var { getGlobalDispatcher } = require_global2(); + var Cache = class _Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList; + constructor() { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor(); + } + this.#relevantRequestResponseList = arguments[1]; + } + async match(request2, options2 = {}) { + webidl.brandCheck(this, _Cache); + webidl.argumentLengthCheck(arguments, 1, { header: "Cache.match" }); + request2 = webidl.converters.RequestInfo(request2); + options2 = webidl.converters.CacheQueryOptions(options2); + const p = await this.matchAll(request2, options2); + if (p.length === 0) { + return; + } + return p[0]; + } + async matchAll(request2 = void 0, options2 = {}) { + var _a2; + webidl.brandCheck(this, _Cache); + if (request2 !== void 0) request2 = webidl.converters.RequestInfo(request2); + options2 = webidl.converters.CacheQueryOptions(options2); + let r = null; + if (request2 !== void 0) { + if (request2 instanceof Request2) { + r = request2[kState]; + if (r.method !== "GET" && !options2.ignoreMethod) { + return []; + } + } else if (typeof request2 === "string") { + r = new Request2(request2)[kState]; + } + } + const responses = []; + if (request2 === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]); + } + } else { + const requestResponses = this.#queryCache(r, options2); + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]); + } + } + const responseList = []; + for (const response of responses) { + const responseObject = new Response2(((_a2 = response.body) == null ? void 0 : _a2.source) ?? null); + const body = responseObject[kState].body; + responseObject[kState] = response; + responseObject[kState].body = body; + responseObject[kHeaders][kHeadersList] = response.headersList; + responseObject[kHeaders][kGuard] = "immutable"; + responseList.push(responseObject); + } + return Object.freeze(responseList); + } + async add(request2) { + webidl.brandCheck(this, _Cache); + webidl.argumentLengthCheck(arguments, 1, { header: "Cache.add" }); + request2 = webidl.converters.RequestInfo(request2); + const requests = [request2]; + const responseArrayPromise = this.addAll(requests); + return await responseArrayPromise; + } + async addAll(requests) { + webidl.brandCheck(this, _Cache); + webidl.argumentLengthCheck(arguments, 1, { header: "Cache.addAll" }); + requests = webidl.converters["sequence"](requests); + const responsePromises = []; + const requestList = []; + for (const request2 of requests) { + if (typeof request2 === "string") { + continue; + } + const r = request2[kState]; + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { + throw webidl.errors.exception({ + header: "Cache.addAll", + message: "Expected http/s scheme when method is not GET." + }); + } + } + const fetchControllers = []; + for (const request2 of requests) { + const r = new Request2(request2)[kState]; + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: "Cache.addAll", + message: "Expected http/s scheme." + }); + } + r.initiator = "fetch"; + r.destination = "subresource"; + requestList.push(r); + const responsePromise = createDeferredPromise(); + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse(response) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + } else if (response.headersList.contains("vary")) { + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) { + controller.abort(); + } + return; + } + } + } + }, + processResponseEndOfBody(response) { + if (response.aborted) { + responsePromise.reject(new DOMException("aborted", "AbortError")); + return; + } + responsePromise.resolve(response); + } + })); + responsePromises.push(responsePromise.promise); + } + const p = Promise.all(responsePromises); + const responses = await p; + const operations = []; + let index = 0; + for (const response of responses) { + const operation = { + type: "put", + // 7.3.2 + request: requestList[index], + // 7.3.3 + response + // 7.3.4 + }; + operations.push(operation); + index++; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(void 0); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + async put(request2, response) { + webidl.brandCheck(this, _Cache); + webidl.argumentLengthCheck(arguments, 2, { header: "Cache.put" }); + request2 = webidl.converters.RequestInfo(request2); + response = webidl.converters.Response(response); + let innerRequest = null; + if (request2 instanceof Request2) { + innerRequest = request2[kState]; + } else { + innerRequest = new Request2(request2)[kState]; + } + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { + throw webidl.errors.exception({ + header: "Cache.put", + message: "Expected an http/s scheme when method is not GET" + }); + } + const innerResponse = response[kState]; + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: "Cache.put", + message: "Got 206 status" + }); + } + if (innerResponse.headersList.contains("vary")) { + const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + throw webidl.errors.exception({ + header: "Cache.put", + message: "Got * vary field value" + }); + } + } + } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: "Cache.put", + message: "Response body is locked or disturbed" + }); + } + const clonedResponse = cloneResponse(innerResponse); + const bodyReadPromise = createDeferredPromise(); + if (innerResponse.body != null) { + const stream = innerResponse.body.stream; + const reader = stream.getReader(); + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject); + } else { + bodyReadPromise.resolve(void 0); + } + const operations = []; + const operation = { + type: "put", + // 14. + request: innerRequest, + // 15. + response: clonedResponse + // 16. + }; + operations.push(operation); + const bytes = await bodyReadPromise.promise; + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes; + } + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + try { + this.#batchCacheOperations(operations); + } catch (e) { + errorData = e; + } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; + } + async delete(request2, options2 = {}) { + webidl.brandCheck(this, _Cache); + webidl.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); + request2 = webidl.converters.RequestInfo(request2); + options2 = webidl.converters.CacheQueryOptions(options2); + let r = null; + if (request2 instanceof Request2) { + r = request2[kState]; + if (r.method !== "GET" && !options2.ignoreMethod) { + return false; + } + } else { + assert(typeof request2 === "string"); + r = new Request2(request2)[kState]; + } + const operations = []; + const operation = { + type: "delete", + request: r, + options: options2 + }; + operations.push(operation); + const cacheJobPromise = createDeferredPromise(); + let errorData = null; + let requestResponses; try { - stream.flushSync() + requestResponses = this.#batchCacheOperations(operations); } catch (e) { - // https://github.com/pinojs/pino/pull/740#discussion_r346788313 + errorData = e; } + queueMicrotask(() => { + if (errorData === null) { + cacheJobPromise.resolve(!!(requestResponses == null ? void 0 : requestResponses.length)); + } else { + cacheJobPromise.reject(errorData); + } + }); + return cacheJobPromise.promise; } - } - }, - error: (hook) => genLog(DEFAULT_LEVELS.error, hook), - warn: (hook) => genLog(DEFAULT_LEVELS.warn, hook), - info: (hook) => genLog(DEFAULT_LEVELS.info, hook), - debug: (hook) => genLog(DEFAULT_LEVELS.debug, hook), - trace: (hook) => genLog(DEFAULT_LEVELS.trace, hook) -} - -const nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => { - o[DEFAULT_LEVELS[k]] = k - return o -}, {}) - -const initialLsCache = Object.keys(nums).reduce((o, k) => { - o[k] = '{"level":' + Number(k) - return o -}, {}) - -function genLsCache (instance) { - const formatter = instance[formattersSym].level - const { labels } = instance.levels - const cache = {} - for (const label in labels) { - const level = formatter(labels[label], Number(label)) - cache[label] = JSON.stringify(level).slice(0, -1) - } - instance[lsCacheSym] = cache - return instance -} - -function isStandardLevel (level, useOnlyCustomLevels) { - if (useOnlyCustomLevels) { - return false - } - - switch (level) { - case 'fatal': - case 'error': - case 'warn': - case 'info': - case 'debug': - case 'trace': - return true - default: - return false - } -} - -function setLevel (level) { - const { labels, values } = this.levels - if (typeof level === 'number') { - if (labels[level] === undefined) throw Error('unknown level value' + level) - level = labels[level] - } - if (values[level] === undefined) throw Error('unknown level ' + level) - const preLevelVal = this[levelValSym] - const levelVal = this[levelValSym] = values[level] - const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym] - const levelComparison = this[levelCompSym] - const hook = this[hooksSym].logMethod - - for (const key in values) { - if (levelComparison(values[key], levelVal) === false) { - this[key] = noop - continue - } - this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook) : genLog(values[key], hook) - } - - this.emit( - 'level-change', - level, - levelVal, - labels[preLevelVal], - preLevelVal, - this - ) -} - -function getLevel (level) { - const { levels, levelVal } = this - // protection against potential loss of Pino scope from serializers (edge case with circular refs - https://github.com/pinojs/pino/issues/833) - return (levels && levels.labels) ? levels.labels[levelVal] : '' -} - -function isLevelEnabled (logLevel) { - const { values } = this.levels - const logLevelVal = values[logLevel] - return logLevelVal !== undefined && this[levelCompSym](logLevelVal, this[levelValSym]) -} - -/** - * Determine if the given `current` level is enabled by comparing it - * against the current threshold (`expected`). - * - * @param {SORTING_ORDER} direction comparison direction "ASC" or "DESC" - * @param {number} current current log level number representation - * @param {number} expected threshold value to compare with - * @returns {boolean} - */ -function compareLevel (direction, current, expected) { - if (direction === SORTING_ORDER.DESC) { - return current <= expected - } - - return current >= expected -} - -/** - * Create a level comparison function based on `levelComparison` - * it could a default function which compares levels either in "ascending" or "descending" order or custom comparison function - * - * @param {SORTING_ORDER | Function} levelComparison sort levels order direction or custom comparison function - * @returns Function - */ -function genLevelComparison (levelComparison) { - if (typeof levelComparison === 'string') { - return compareLevel.bind(null, levelComparison) - } - - return levelComparison -} - -function mappings (customLevels = null, useOnlyCustomLevels = false) { - const customNums = customLevels - /* eslint-disable */ - ? Object.keys(customLevels).reduce((o, k) => { - o[customLevels[k]] = k - return o - }, {}) - : null - /* eslint-enable */ - - const labels = Object.assign( - Object.create(Object.prototype, { Infinity: { value: 'silent' } }), - useOnlyCustomLevels ? null : nums, - customNums - ) - const values = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : DEFAULT_LEVELS, - customLevels - ) - return { labels, values } -} - -function assertDefaultLevelFound (defaultLevel, customLevels, useOnlyCustomLevels) { - if (typeof defaultLevel === 'number') { - const values = [].concat( - Object.keys(customLevels || {}).map(key => customLevels[key]), - useOnlyCustomLevels ? [] : Object.keys(nums).map(level => +level), - Infinity - ) - if (!values.includes(defaultLevel)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } - return - } - - const labels = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : DEFAULT_LEVELS, - customLevels - ) - if (!(defaultLevel in labels)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } -} - -function assertNoLevelCollisions (levels, customLevels) { - const { labels, values } = levels - for (const k in customLevels) { - if (k in values) { - throw Error('levels cannot be overridden') - } - if (customLevels[k] in labels) { - throw Error('pre-existing level values cannot be used for new levels') - } - } -} - -/** - * Validates whether `levelComparison` is correct - * - * @throws Error - * @param {SORTING_ORDER | Function} levelComparison - value to validate - * @returns - */ -function assertLevelComparison (levelComparison) { - if (typeof levelComparison === 'function') { - return - } - - if (typeof levelComparison === 'string' && Object.values(SORTING_ORDER).includes(levelComparison)) { - return - } - - throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type') -} - -module.exports = { - initialLsCache, - genLsCache, - levelMethods, - getLevel, - setLevel, - isLevelEnabled, - mappings, - assertNoLevelCollisions, - assertDefaultLevelFound, - genLevelComparison, - assertLevelComparison -} - - -/***/ }), - -/***/ 42607: -/***/ ((module) => { - -"use strict"; - - -module.exports = { version: '8.21.0' } - - -/***/ }), - -/***/ 91069: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const metadata = Symbol.for('pino.metadata') -const { DEFAULT_LEVELS } = __nccwpck_require__(56389) - -const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info - -function multistream (streamsArray, opts) { - let counter = 0 - streamsArray = streamsArray || [] - opts = opts || { dedupe: false } - - const streamLevels = Object.create(DEFAULT_LEVELS) - streamLevels.silent = Infinity - if (opts.levels && typeof opts.levels === 'object') { - Object.keys(opts.levels).forEach(i => { - streamLevels[i] = opts.levels[i] - }) - } - - const res = { - write, - add, - emit, - flushSync, - end, - minLevel: 0, - streams: [], - clone, - [metadata]: true, - streamLevels - } - - if (Array.isArray(streamsArray)) { - streamsArray.forEach(add, res) - } else { - add.call(res, streamsArray) - } - - // clean this object up - // or it will stay allocated forever - // as it is closed on the following closures - streamsArray = null - - return res - - // we can exit early because the streams are ordered by level - function write (data) { - let dest - const level = this.lastLevel - const { streams } = this - // for handling situation when several streams has the same level - let recordedLevel = 0 - let stream - - // if dedupe set to true we send logs to the stream with the highest level - // therefore, we have to change sorting order - for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) { - dest = streams[i] - if (dest.level <= level) { - if (recordedLevel !== 0 && recordedLevel !== dest.level) { - break + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cache-keys + * @param {any} request + * @param {import('../../types/cache').CacheQueryOptions} options + * @returns {readonly Request[]} + */ + async keys(request2 = void 0, options2 = {}) { + webidl.brandCheck(this, _Cache); + if (request2 !== void 0) request2 = webidl.converters.RequestInfo(request2); + options2 = webidl.converters.CacheQueryOptions(options2); + let r = null; + if (request2 !== void 0) { + if (request2 instanceof Request2) { + r = request2[kState]; + if (r.method !== "GET" && !options2.ignoreMethod) { + return []; + } + } else if (typeof request2 === "string") { + r = new Request2(request2)[kState]; + } + } + const promise = createDeferredPromise(); + const requests = []; + if (request2 === void 0) { + for (const requestResponse of this.#relevantRequestResponseList) { + requests.push(requestResponse[0]); + } + } else { + const requestResponses = this.#queryCache(r, options2); + for (const requestResponse of requestResponses) { + requests.push(requestResponse[0]); + } + } + queueMicrotask(() => { + const requestList = []; + for (const request3 of requests) { + const requestObject = new Request2("https://a"); + requestObject[kState] = request3; + requestObject[kHeaders][kHeadersList] = request3.headersList; + requestObject[kHeaders][kGuard] = "immutable"; + requestObject[kRealm] = request3.client; + requestList.push(requestObject); + } + 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) { + const cache = this.#relevantRequestResponseList; + const backupCache = [...cache]; + const addedItems = []; + const resultList = []; + try { + for (const operation of operations) { + if (operation.type !== "delete" && operation.type !== "put") { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: 'operation type does not match "delete" or "put"' + }); + } + if (operation.type === "delete" && operation.response != null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + } + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException("???", "InvalidStateError"); + } + let requestResponses; + if (operation.type === "delete") { + requestResponses = this.#queryCache(operation.request, operation.options); + if (requestResponses.length === 0) { + return []; + } + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert(idx !== -1); + cache.splice(idx, 1); + } + } else if (operation.type === "put") { + if (operation.response == null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); + } + const r = operation.request; + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + } + if (r.method !== "GET") { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + } + if (operation.options != null) { + throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); + } + requestResponses = this.#queryCache(operation.request); + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse); + assert(idx !== -1); + cache.splice(idx, 1); + } + cache.push([operation.request, operation.response]); + addedItems.push([operation.request, operation.response]); + } + resultList.push([operation.request, operation.response]); + } + return resultList; + } catch (e) { + this.#relevantRequestResponseList.length = 0; + this.#relevantRequestResponseList = backupCache; + throw e; + } + } + /** + * @see https://w3c.github.io/ServiceWorker/#query-cache + * @param {any} requestQuery + * @param {import('../../types/cache').CacheQueryOptions} options + * @param {requestResponseList} targetStorage + * @returns {requestResponseList} + */ + #queryCache(requestQuery, options2, targetStorage) { + const resultList = []; + const storage = targetStorage ?? this.#relevantRequestResponseList; + for (const requestResponse of storage) { + const [cachedRequest, cachedResponse] = requestResponse; + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options2)) { + resultList.push(requestResponse); + } + } + return resultList; + } + /** + * @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, request2, response = null, options2) { + const queryURL = new URL(requestQuery.url); + const cachedURL = new URL(request2.url); + if (options2 == null ? void 0 : options2.ignoreSearch) { + cachedURL.search = ""; + queryURL.search = ""; + } + if (!urlEquals(queryURL, cachedURL, true)) { + return false; } - stream = dest.stream - if (stream[metadata]) { - const { lastTime, lastMsg, lastObj, lastLogger } = this - stream.lastLevel = level - stream.lastTime = lastTime - stream.lastMsg = lastMsg - stream.lastObj = lastObj - stream.lastLogger = lastLogger + if (response == null || (options2 == null ? void 0 : options2.ignoreVary) || !response.headersList.contains("vary")) { + return true; } - stream.write(data) - if (opts.dedupe) { - recordedLevel = dest.level + const fieldValues = getFieldValues(response.headersList.get("vary")); + for (const fieldValue of fieldValues) { + if (fieldValue === "*") { + return false; + } + const requestValue = request2.headersList.get(fieldValue); + const queryValue = requestQuery.headersList.get(fieldValue); + if (requestValue !== queryValue) { + return false; + } } - } else if (!opts.dedupe) { - break + return true; } - } - } - - function emit (...args) { - for (const { stream } of this.streams) { - if (typeof stream.emit === 'function') { - stream.emit(...args) + }; + Object.defineProperties(Cache.prototype, { + [Symbol.toStringTag]: { + value: "Cache", + configurable: true + }, + match: kEnumerableProperty, + matchAll: kEnumerableProperty, + add: kEnumerableProperty, + addAll: kEnumerableProperty, + put: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + var cacheQueryOptionConverters = [ + { + key: "ignoreSearch", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "ignoreMethod", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "ignoreVary", + converter: webidl.converters.boolean, + defaultValue: false } - } + ]; + webidl.converters.CacheQueryOptions = webidl.dictionaryConverter(cacheQueryOptionConverters); + webidl.converters.MultiCacheQueryOptions = webidl.dictionaryConverter([ + ...cacheQueryOptionConverters, + { + key: "cacheName", + converter: webidl.converters.DOMString + } + ]); + webidl.converters.Response = webidl.interfaceConverter(Response2); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.RequestInfo + ); + module2.exports = { + Cache + }; } +}); - function flushSync () { - for (const { stream } of this.streams) { - if (typeof stream.flushSync === 'function') { - stream.flushSync() +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/cachestorage.js +var require_cachestorage = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cache/cachestorage.js"(exports2, module2) { + "use strict"; + var { kConstruct } = require_symbols6(); + var { Cache } = require_cache(); + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util2(); + var CacheStorage = class _CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has(cacheName) { + webidl.brandCheck(this, _CacheStorage); + webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.has" }); + cacheName = webidl.converters.DOMString(cacheName); + return this.#caches.has(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open + * @param {string} cacheName + * @returns {Promise} + */ + async open(cacheName) { + webidl.brandCheck(this, _CacheStorage); + webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.open" }); + cacheName = webidl.converters.DOMString(cacheName); + if (this.#caches.has(cacheName)) { + const cache2 = this.#caches.get(cacheName); + return new Cache(kConstruct, cache2); + } + const cache = []; + this.#caches.set(cacheName, cache); + return new Cache(kConstruct, cache); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete + * @param {string} cacheName + * @returns {Promise} + */ + async delete(cacheName) { + webidl.brandCheck(this, _CacheStorage); + webidl.argumentLengthCheck(arguments, 1, { header: "CacheStorage.delete" }); + cacheName = webidl.converters.DOMString(cacheName); + return this.#caches.delete(cacheName); + } + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys() { + webidl.brandCheck(this, _CacheStorage); + const keys = this.#caches.keys(); + return [...keys]; + } + }; + Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: "CacheStorage", + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty + }); + module2.exports = { + CacheStorage + }; } +}); - function add (dest) { - if (!dest) { - return res - } +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/constants.js +var require_constants7 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/constants.js"(exports2, module2) { + "use strict"; + var maxAttributeValueSize = 1024; + var maxNameValuePairSize = 4096; + module2.exports = { + maxAttributeValueSize, + maxNameValuePairSize + }; + } +}); - // Check that dest implements either StreamEntry or DestinationStream - const isStream = typeof dest.write === 'function' || dest.stream - const stream_ = dest.write ? dest : dest.stream - // This is necessary to provide a meaningful error message, otherwise it throws somewhere inside write() - if (!isStream) { - throw Error('stream object needs to implement either StreamEntry or DestinationStream interface') +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/util.js +var require_util7 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/util.js"(exports2, module2) { + "use strict"; + var assert = __require("assert"); + var { kHeadersList } = require_symbols3(); + function isCTLExcludingHtab(value) { + if (value.length === 0) { + return false; + } + for (const char of value) { + const code = char.charCodeAt(0); + if (code >= 0 || code <= 8 || (code >= 10 || code <= 31) || code === 127) { + return false; + } + } } - - const { streams, streamLevels } = this - - let level - if (typeof dest.levelVal === 'number') { - level = dest.levelVal - } else if (typeof dest.level === 'string') { - level = streamLevels[dest.level] - } else if (typeof dest.level === 'number') { - level = dest.level - } else { - level = DEFAULT_INFO_LEVEL + function validateCookieName(name) { + for (const char of name) { + const code = char.charCodeAt(0); + if (code <= 32 || code > 127 || char === "(" || char === ")" || char === ">" || char === "<" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === '"' || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}") { + throw new Error("Invalid cookie name"); + } + } + } + function validateCookieValue(value) { + for (const char of value) { + const code = char.charCodeAt(0); + if (code < 33 || // exclude CTLs (0-31) + code === 34 || code === 44 || code === 59 || code === 92 || code > 126) { + throw new Error("Invalid header value"); + } + } + } + function validateCookiePath(path2) { + for (const char of path2) { + const code = char.charCodeAt(0); + if (code < 33 || char === ";") { + throw new Error("Invalid cookie path"); + } + } + } + function validateCookieDomain(domain2) { + if (domain2.startsWith("-") || domain2.endsWith(".") || domain2.endsWith("-")) { + throw new Error("Invalid cookie domain"); + } + } + function 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`; + } + function validateCookieMaxAge(maxAge) { + if (maxAge < 0) { + throw new Error("Invalid cookie max-age"); + } + } + function stringify(cookie) { + if (cookie.name.length === 0) { + return null; + } + validateCookieName(cookie.name); + validateCookieValue(cookie.value); + const out = [`${cookie.name}=${cookie.value}`]; + if (cookie.name.startsWith("__Secure-")) { + cookie.secure = true; + } + if (cookie.name.startsWith("__Host-")) { + cookie.secure = true; + cookie.domain = null; + cookie.path = "/"; + } + if (cookie.secure) { + out.push("Secure"); + } + if (cookie.httpOnly) { + out.push("HttpOnly"); + } + if (typeof cookie.maxAge === "number") { + validateCookieMaxAge(cookie.maxAge); + out.push(`Max-Age=${cookie.maxAge}`); + } + if (cookie.domain) { + validateCookieDomain(cookie.domain); + out.push(`Domain=${cookie.domain}`); + } + if (cookie.path) { + validateCookiePath(cookie.path); + out.push(`Path=${cookie.path}`); + } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") { + out.push(`Expires=${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("=")}`); + } + return out.join("; "); } - - const dest_ = { - stream: stream_, - level, - levelVal: undefined, - id: counter++ + var kHeadersListNode; + function getHeadersList(headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList]; + } + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === "headers list" + ); + assert(kHeadersListNode, "Headers cannot be parsed"); + } + const headersList = headers[kHeadersListNode]; + assert(headersList); + return headersList; } - - streams.unshift(dest_) - streams.sort(compareByLevel) - - this.minLevel = streams[0].level - - return res + module2.exports = { + isCTLExcludingHtab, + stringify, + getHeadersList + }; } +}); - function end () { - for (const { stream } of this.streams) { - if (typeof stream.flushSync === 'function') { - stream.flushSync() +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/parse.js +var require_parse3 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/parse.js"(exports2, module2) { + "use strict"; + var { maxNameValuePairSize, maxAttributeValueSize } = require_constants7(); + var { isCTLExcludingHtab } = require_util7(); + var { collectASequenceOfCodePointsFast } = require_dataURL(); + var assert = __require("assert"); + function parseSetCookie(header) { + if (isCTLExcludingHtab(header)) { + return null; + } + let nameValuePair = ""; + let unparsedAttributes = ""; + let name = ""; + let value = ""; + if (header.includes(";")) { + const position = { position: 0 }; + nameValuePair = collectASequenceOfCodePointsFast(";", header, position); + unparsedAttributes = header.slice(position.position); + } else { + nameValuePair = header; + } + if (!nameValuePair.includes("=")) { + value = nameValuePair; + } else { + const position = { position: 0 }; + name = collectASequenceOfCodePointsFast( + "=", + nameValuePair, + position + ); + value = nameValuePair.slice(position.position + 1); } - stream.end() + name = name.trim(); + value = value.trim(); + if (name.length + value.length > maxNameValuePairSize) { + return null; + } + return { + name, + value, + ...parseUnparsedAttributes(unparsedAttributes) + }; } - } - - function clone (level) { - const streams = new Array(this.streams.length) - - for (let i = 0; i < streams.length; i++) { - streams[i] = { - level, - stream: this.streams[i].stream + function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { + if (unparsedAttributes.length === 0) { + return cookieAttributeList; + } + assert(unparsedAttributes[0] === ";"); + unparsedAttributes = unparsedAttributes.slice(1); + let cookieAv = ""; + if (unparsedAttributes.includes(";")) { + cookieAv = collectASequenceOfCodePointsFast( + ";", + unparsedAttributes, + { position: 0 } + ); + unparsedAttributes = unparsedAttributes.slice(cookieAv.length); + } else { + cookieAv = unparsedAttributes; + unparsedAttributes = ""; + } + let attributeName = ""; + let attributeValue = ""; + if (cookieAv.includes("=")) { + const position = { position: 0 }; + attributeName = collectASequenceOfCodePointsFast( + "=", + cookieAv, + position + ); + attributeValue = cookieAv.slice(position.position + 1); + } else { + attributeName = cookieAv; + } + attributeName = attributeName.trim(); + attributeValue = attributeValue.trim(); + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + const attributeNameLowercase = attributeName.toLowerCase(); + if (attributeNameLowercase === "expires") { + const expiryTime = new Date(attributeValue); + cookieAttributeList.expires = expiryTime; + } else if (attributeNameLowercase === "max-age") { + const charCode = attributeValue.charCodeAt(0); + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + } + const deltaSeconds = Number(attributeValue); + cookieAttributeList.maxAge = deltaSeconds; + } else if (attributeNameLowercase === "domain") { + let cookieDomain = attributeValue; + if (cookieDomain[0] === ".") { + cookieDomain = cookieDomain.slice(1); + } + cookieDomain = cookieDomain.toLowerCase(); + cookieAttributeList.domain = cookieDomain; + } else if (attributeNameLowercase === "path") { + let cookiePath = ""; + if (attributeValue.length === 0 || attributeValue[0] !== "/") { + cookiePath = "/"; + } else { + cookiePath = attributeValue; + } + cookieAttributeList.path = cookiePath; + } else if (attributeNameLowercase === "secure") { + cookieAttributeList.secure = true; + } else if (attributeNameLowercase === "httponly") { + cookieAttributeList.httpOnly = true; + } else if (attributeNameLowercase === "samesite") { + let enforcement = "Default"; + const attributeValueLowercase = attributeValue.toLowerCase(); + if (attributeValueLowercase.includes("none")) { + enforcement = "None"; + } + if (attributeValueLowercase.includes("strict")) { + enforcement = "Strict"; + } + if (attributeValueLowercase.includes("lax")) { + enforcement = "Lax"; + } + cookieAttributeList.sameSite = enforcement; + } else { + cookieAttributeList.unparsed ??= []; + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`); } + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); } - - return { - write, - add, - minLevel: level, - streams, - clone, - emit, - flushSync, - [metadata]: true - } - } -} - -function compareByLevel (a, b) { - return a.level - b.level -} - -function initLoopVar (length, dedupe) { - return dedupe ? length - 1 : 0 -} - -function adjustLoopVar (i, dedupe) { - return dedupe ? i - 1 : i + 1 -} - -function checkLoopVar (i, length, dedupe) { - return dedupe ? i >= 0 : i < length -} - -module.exports = multistream - - -/***/ }), - -/***/ 8586: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* eslint no-prototype-builtins: 0 */ - -const { EventEmitter } = __nccwpck_require__(24434) -const { - lsCacheSym, - levelValSym, - setLevelSym, - getLevelSym, - chindingsSym, - parsedChindingsSym, - mixinSym, - asJsonSym, - writeSym, - mixinMergeStrategySym, - timeSym, - timeSliceIndexSym, - streamSym, - serializersSym, - formattersSym, - errorKeySym, - messageKeySym, - useOnlyCustomLevelsSym, - needsMetadataGsym, - redactFmtSym, - stringifySym, - formatOptsSym, - stringifiersSym, - msgPrefixSym -} = __nccwpck_require__(82897) -const { - getLevel, - setLevel, - isLevelEnabled, - mappings, - initialLsCache, - genLsCache, - assertNoLevelCollisions -} = __nccwpck_require__(42389) -const { - asChindings, - asJson, - buildFormatters, - stringify -} = __nccwpck_require__(94011) -const { - version -} = __nccwpck_require__(42607) -const redaction = __nccwpck_require__(34937) - -// note: use of class is satirical -// https://github.com/pinojs/pino/pull/433#pullrequestreview-127703127 -const constructor = class Pino {} -const prototype = { - constructor, - child, - bindings, - setBindings, - flush, - isLevelEnabled, - version, - get level () { return this[getLevelSym]() }, - set level (lvl) { this[setLevelSym](lvl) }, - get levelVal () { return this[levelValSym] }, - set levelVal (n) { throw Error('levelVal is read-only') }, - [lsCacheSym]: initialLsCache, - [writeSym]: write, - [asJsonSym]: asJson, - [getLevelSym]: getLevel, - [setLevelSym]: setLevel -} - -Object.setPrototypeOf(prototype, EventEmitter.prototype) - -// exporting and consuming the prototype object using factory pattern fixes scoping issues with getters when serializing -module.exports = function () { - return Object.create(prototype) -} - -const resetChildingsFormatter = bindings => bindings -function child (bindings, options) { - if (!bindings) { - throw Error('missing bindings for child Pino') - } - options = options || {} // default options to empty object - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const instance = Object.create(this) - - if (options.hasOwnProperty('serializers') === true) { - instance[serializersSym] = Object.create(null) - - for (const k in serializers) { - instance[serializersSym][k] = serializers[k] - } - const parentSymbols = Object.getOwnPropertySymbols(serializers) - /* eslint no-var: off */ - for (var i = 0; i < parentSymbols.length; i++) { - const ks = parentSymbols[i] - instance[serializersSym][ks] = serializers[ks] - } - - for (const bk in options.serializers) { - instance[serializersSym][bk] = options.serializers[bk] - } - const bindingsSymbols = Object.getOwnPropertySymbols(options.serializers) - for (var bi = 0; bi < bindingsSymbols.length; bi++) { - const bks = bindingsSymbols[bi] - instance[serializersSym][bks] = options.serializers[bks] - } - } else instance[serializersSym] = serializers - if (options.hasOwnProperty('formatters')) { - const { level, bindings: chindings, log } = options.formatters - instance[formattersSym] = buildFormatters( - level || formatters.level, - chindings || resetChildingsFormatter, - log || formatters.log - ) - } else { - instance[formattersSym] = buildFormatters( - formatters.level, - resetChildingsFormatter, - formatters.log - ) - } - if (options.hasOwnProperty('customLevels') === true) { - assertNoLevelCollisions(this.levels, options.customLevels) - instance.levels = mappings(options.customLevels, instance[useOnlyCustomLevelsSym]) - genLsCache(instance) - } - - // redact must place before asChindings and only replace if exist - if ((typeof options.redact === 'object' && options.redact !== null) || Array.isArray(options.redact)) { - instance.redact = options.redact // replace redact directly - const stringifiers = redaction(instance.redact, stringify) - const formatOpts = { stringify: stringifiers[redactFmtSym] } - instance[stringifySym] = stringify - instance[stringifiersSym] = stringifiers - instance[formatOptsSym] = formatOpts - } - - if (typeof options.msgPrefix === 'string') { - instance[msgPrefixSym] = (this[msgPrefixSym] || '') + options.msgPrefix + module2.exports = { + parseSetCookie, + parseUnparsedAttributes + }; } +}); - instance[chindingsSym] = asChindings(instance, bindings) - const childLevel = options.level || this.level - instance[setLevelSym](childLevel) - this.onChild(instance) - return instance -} - -function bindings () { - const chindings = this[chindingsSym] - const chindingsJson = `{${chindings.substr(1)}}` // at least contains ,"pid":7068,"hostname":"myMac" - const bindingsFromJson = JSON.parse(chindingsJson) - delete bindingsFromJson.pid - delete bindingsFromJson.hostname - return bindingsFromJson -} - -function setBindings (newBindings) { - const chindings = asChindings(this, newBindings) - this[chindingsSym] = chindings - delete this[parsedChindingsSym] -} - -/** - * Default strategy for creating `mergeObject` from arguments and the result from `mixin()`. - * Fields from `mergeObject` have higher priority in this strategy. - * - * @param {Object} mergeObject The object a user has supplied to the logging function. - * @param {Object} mixinObject The result of the `mixin` method. - * @return {Object} - */ -function defaultMixinMergeStrategy (mergeObject, mixinObject) { - return Object.assign(mixinObject, mergeObject) -} - -function write (_obj, msg, num) { - const t = this[timeSym]() - const mixin = this[mixinSym] - const errorKey = this[errorKeySym] - const messageKey = this[messageKeySym] - const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy - let obj - - if (_obj === undefined || _obj === null) { - obj = {} - } else if (_obj instanceof Error) { - obj = { [errorKey]: _obj } - if (msg === undefined) { - msg = _obj.message +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/index.js +var require_cookies = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/cookies/index.js"(exports2, module2) { + "use strict"; + var { parseSetCookie } = require_parse3(); + var { stringify, getHeadersList } = require_util7(); + var { webidl } = require_webidl(); + var { Headers: Headers2 } = require_headers(); + function getCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, { header: "getCookies" }); + webidl.brandCheck(headers, Headers2, { 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; + } + function deleteCookie(headers, name, attributes) { + webidl.argumentLengthCheck(arguments, 2, { header: "deleteCookie" }); + webidl.brandCheck(headers, Headers2, { strict: false }); + name = webidl.converters.DOMString(name); + attributes = webidl.converters.DeleteCookieAttributes(attributes); + setCookie(headers, { + name, + value: "", + expires: /* @__PURE__ */ new Date(0), + ...attributes + }); } - } else { - obj = _obj - if (msg === undefined && _obj[messageKey] === undefined && _obj[errorKey]) { - msg = _obj[errorKey].message + function getSetCookies(headers) { + webidl.argumentLengthCheck(arguments, 1, { header: "getSetCookies" }); + webidl.brandCheck(headers, Headers2, { strict: false }); + const cookies = getHeadersList(headers).cookies; + if (!cookies) { + return []; + } + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)); + } + function setCookie(headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); + webidl.brandCheck(headers, Headers2, { strict: false }); + cookie = webidl.converters.Cookie(cookie); + const str2 = stringify(cookie); + if (str2) { + headers.append("Set-Cookie", stringify(cookie)); + } } + webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([ + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: null + } + ]); + webidl.converters.Cookie = webidl.dictionaryConverter([ + { + converter: webidl.converters.DOMString, + key: "name" + }, + { + converter: webidl.converters.DOMString, + key: "value" + }, + { + converter: webidl.nullableConverter((value) => { + if (typeof value === "number") { + return webidl.converters["unsigned long long"](value); + } + return new Date(value); + }), + key: "expires", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters["long long"]), + key: "maxAge", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "domain", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.DOMString), + key: "path", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "secure", + defaultValue: null + }, + { + converter: webidl.nullableConverter(webidl.converters.boolean), + key: "httpOnly", + defaultValue: null + }, + { + converter: webidl.converters.USVString, + key: "sameSite", + allowedValues: ["Strict", "Lax", "None"] + }, + { + converter: webidl.sequenceConverter(webidl.converters.DOMString), + key: "unparsed", + defaultValue: [] + } + ]); + module2.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie + }; } +}); - if (mixin) { - obj = mixinMergeStrategy(obj, mixin(obj, num, this)) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/constants.js +var require_constants8 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/constants.js"(exports2, module2) { + "use strict"; + var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; + var staticPropertyDescriptors = { + enumerable: true, + writable: false, + configurable: false + }; + var states = { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }; + var opcodes = { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }; + var maxUnsigned16Bit = 2 ** 16 - 1; + var parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }; + var emptyBuffer = Buffer.allocUnsafe(0); + module2.exports = { + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer + }; } +}); - const s = this[asJsonSym](obj, msg, num, t) - - const stream = this[streamSym] - if (stream[needsMetadataGsym] === true) { - stream.lastLevel = num - stream.lastObj = obj - stream.lastMsg = msg - stream.lastTime = t.slice(this[timeSliceIndexSym]) - stream.lastLogger = this // for child loggers +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/symbols.js +var require_symbols7 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/symbols.js"(exports2, module2) { + "use strict"; + module2.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") + }; } - stream.write(s) -} - -function noop () {} +}); -function flush (cb) { - if (cb != null && typeof cb !== 'function') { - throw Error('callback must be a function') +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/events.js +var require_events = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/events.js"(exports2, module2) { + "use strict"; + var { webidl } = require_webidl(); + var { kEnumerableProperty } = require_util2(); + var { MessagePort } = __require("worker_threads"); + var MessageEvent = class _MessageEvent extends Event { + #eventInit; + constructor(type2, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent constructor" }); + type2 = webidl.converters.DOMString(type2); + eventInitDict = webidl.converters.MessageEventInit(eventInitDict); + super(type2, eventInitDict); + this.#eventInit = eventInitDict; + } + get data() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.data; + } + get origin() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.origin; + } + get lastEventId() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.lastEventId; + } + get source() { + webidl.brandCheck(this, _MessageEvent); + return this.#eventInit.source; + } + get ports() { + webidl.brandCheck(this, _MessageEvent); + if (!Object.isFrozen(this.#eventInit.ports)) { + Object.freeze(this.#eventInit.ports); + } + return this.#eventInit.ports; + } + initMessageEvent(type2, bubbles = false, cancelable = false, data = null, origin = "", lastEventId2 = "", source = null, ports = []) { + webidl.brandCheck(this, _MessageEvent); + webidl.argumentLengthCheck(arguments, 1, { header: "MessageEvent.initMessageEvent" }); + return new _MessageEvent(type2, { + bubbles, + cancelable, + data, + origin, + lastEventId: lastEventId2, + source, + ports + }); + } + }; + var CloseEvent = class _CloseEvent extends Event { + #eventInit; + constructor(type2, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: "CloseEvent constructor" }); + type2 = webidl.converters.DOMString(type2); + eventInitDict = webidl.converters.CloseEventInit(eventInitDict); + super(type2, eventInitDict); + this.#eventInit = eventInitDict; + } + get wasClean() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.wasClean; + } + get code() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.code; + } + get reason() { + webidl.brandCheck(this, _CloseEvent); + return this.#eventInit.reason; + } + }; + var ErrorEvent2 = class _ErrorEvent extends Event { + #eventInit; + constructor(type2, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: "ErrorEvent constructor" }); + super(type2, eventInitDict); + type2 = webidl.converters.DOMString(type2); + eventInitDict = webidl.converters.ErrorEventInit(eventInitDict ?? {}); + this.#eventInit = eventInitDict; + } + get message() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.message; + } + get filename() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.filename; + } + get lineno() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.lineno; + } + get colno() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.colno; + } + get error() { + webidl.brandCheck(this, _ErrorEvent); + return this.#eventInit.error; + } + }; + Object.defineProperties(MessageEvent.prototype, { + [Symbol.toStringTag]: { + value: "MessageEvent", + configurable: true + }, + data: kEnumerableProperty, + origin: kEnumerableProperty, + lastEventId: kEnumerableProperty, + source: kEnumerableProperty, + ports: kEnumerableProperty, + initMessageEvent: kEnumerableProperty + }); + Object.defineProperties(CloseEvent.prototype, { + [Symbol.toStringTag]: { + value: "CloseEvent", + configurable: true + }, + reason: kEnumerableProperty, + code: kEnumerableProperty, + wasClean: kEnumerableProperty + }); + Object.defineProperties(ErrorEvent2.prototype, { + [Symbol.toStringTag]: { + value: "ErrorEvent", + configurable: true + }, + message: kEnumerableProperty, + filename: kEnumerableProperty, + lineno: kEnumerableProperty, + colno: kEnumerableProperty, + error: kEnumerableProperty + }); + webidl.converters.MessagePort = webidl.interfaceConverter(MessagePort); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.MessagePort + ); + var eventInit = [ + { + key: "bubbles", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "cancelable", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "composed", + converter: webidl.converters.boolean, + defaultValue: false + } + ]; + webidl.converters.MessageEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "data", + converter: webidl.converters.any, + defaultValue: null + }, + { + key: "origin", + converter: webidl.converters.USVString, + defaultValue: "" + }, + { + key: "lastEventId", + converter: webidl.converters.DOMString, + defaultValue: "" + }, + { + key: "source", + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: "ports", + converter: webidl.converters["sequence"], + get defaultValue() { + return []; + } + } + ]); + webidl.converters.CloseEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "wasClean", + converter: webidl.converters.boolean, + defaultValue: false + }, + { + key: "code", + converter: webidl.converters["unsigned short"], + defaultValue: 0 + }, + { + key: "reason", + converter: webidl.converters.USVString, + defaultValue: "" + } + ]); + webidl.converters.ErrorEventInit = webidl.dictionaryConverter([ + ...eventInit, + { + key: "message", + converter: webidl.converters.DOMString, + defaultValue: "" + }, + { + key: "filename", + converter: webidl.converters.USVString, + defaultValue: "" + }, + { + key: "lineno", + converter: webidl.converters["unsigned long"], + defaultValue: 0 + }, + { + key: "colno", + converter: webidl.converters["unsigned long"], + defaultValue: 0 + }, + { + key: "error", + converter: webidl.converters.any + } + ]); + module2.exports = { + MessageEvent, + CloseEvent, + ErrorEvent: ErrorEvent2 + }; } +}); - const stream = this[streamSym] - - if (typeof stream.flush === 'function') { - stream.flush(cb || noop) - } else if (cb) cb() -} - - -/***/ }), - -/***/ 34937: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fastRedact = __nccwpck_require__(35440) -const { redactFmtSym, wildcardFirstSym } = __nccwpck_require__(82897) -const { rx, validator } = fastRedact - -const validate = validator({ - ERR_PATHS_MUST_BE_STRINGS: () => 'pino – redacted paths must be strings', - ERR_INVALID_PATH: (s) => `pino – redact paths array contains an invalid path (${s})` -}) - -const CENSOR = '[Redacted]' -const strict = false // TODO should this be configurable? - -function redaction (opts, serialize) { - const { paths, censor } = handle(opts) - - const shape = paths.reduce((o, str) => { - rx.lastIndex = 0 - const first = rx.exec(str) - const next = rx.exec(str) - - // ns is the top-level path segment, brackets + quoting removed. - let ns = first[1] !== undefined - ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, '$1') - : first[0] - - if (ns === '*') { - ns = wildcardFirstSym +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/util.js +var require_util8 = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/util.js"(exports2, module2) { + "use strict"; + var { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = require_symbols7(); + var { states, opcodes } = require_constants8(); + var { MessageEvent, ErrorEvent: ErrorEvent2 } = require_events(); + function isEstablished(ws) { + return ws[kReadyState] === states.OPEN; } - - // top level key: - if (next === null) { - o[ns] = null - return o + function isClosing(ws) { + return ws[kReadyState] === states.CLOSING; } - - // path with at least two segments: - // if ns is already redacted at the top level, ignore lower level redactions - if (o[ns] === null) { - return o + function isClosed(ws) { + return ws[kReadyState] === states.CLOSED; } - - const { index } = next - const nextPath = `${str.substr(index, str.length - 1)}` - - o[ns] = o[ns] || [] - - // shape is a mix of paths beginning with literal values and wildcard - // paths [ "a.b.c", "*.b.z" ] should reduce to a shape of - // { "a": [ "b.c", "b.z" ], *: [ "b.z" ] } - // note: "b.z" is in both "a" and * arrays because "a" matches the wildcard. - // (* entry has wildcardFirstSym as key) - if (ns !== wildcardFirstSym && o[ns].length === 0) { - // first time ns's get all '*' redactions so far - o[ns].push(...(o[wildcardFirstSym] || [])) + function fireEvent(e, target, eventConstructor = Event, eventInitDict) { + const event = new eventConstructor(e, eventInitDict); + target.dispatchEvent(event); } - - if (ns === wildcardFirstSym) { - // new * path gets added to all previously registered literal ns's. - Object.keys(o).forEach(function (k) { - if (o[k]) { - o[k].push(nextPath) + function websocketMessageReceived(ws, type2, data) { + if (ws[kReadyState] !== states.OPEN) { + return; + } + let dataForEvent; + if (type2 === opcodes.TEXT) { + try { + dataForEvent = new TextDecoder("utf-8", { fatal: true }).decode(data); + } catch { + failWebsocketConnection(ws, "Received invalid UTF-8 in text frame."); + return; } - }) + } else if (type2 === opcodes.BINARY) { + if (ws[kBinaryType] === "blob") { + dataForEvent = new Blob([data]); + } else { + dataForEvent = new Uint8Array(data).buffer; + } + } + fireEvent("message", ws, MessageEvent, { + origin: ws[kWebSocketURL].origin, + data: dataForEvent + }); } - - o[ns].push(nextPath) - return o - }, {}) - - // the redactor assigned to the format symbol key - // provides top level redaction for instances where - // an object is interpolated into the msg string - const result = { - [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) + function isValidSubprotocol(protocol) { + if (protocol.length === 0) { + return false; + } + for (const char of protocol) { + const code = char.charCodeAt(0); + if (code < 33 || code > 126 || char === "(" || char === ")" || char === "<" || char === ">" || char === "@" || char === "," || char === ";" || char === ":" || char === "\\" || char === '"' || char === "/" || char === "[" || char === "]" || char === "?" || char === "=" || char === "{" || char === "}" || code === 32 || // SP + code === 9) { + return false; + } + } + return true; + } + function isValidStatusCode(code) { + if (code >= 1e3 && code < 1015) { + return code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006; + } + return code >= 3e3 && code <= 4999; + } + function failWebsocketConnection(ws, reason) { + const { [kController]: controller, [kResponse]: response } = ws; + controller.abort(); + if ((response == null ? void 0 : response.socket) && !response.socket.destroyed) { + response.socket.destroy(); + } + if (reason) { + fireEvent("error", ws, ErrorEvent2, { + error: new Error(reason) + }); + } + } + module2.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived + }; } +}); - const topCensor = (...args) => { - return typeof censor === 'function' ? serialize(censor(...args)) : serialize(censor) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/connection.js +var require_connection = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/connection.js"(exports2, module2) { + "use strict"; + var diagnosticsChannel = __require("diagnostics_channel"); + var { uid, states } = require_constants8(); + var { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose + } = require_symbols7(); + var { fireEvent, failWebsocketConnection } = require_util8(); + var { CloseEvent } = require_events(); + var { makeRequest } = require_request3(); + var { fetching } = require_fetch(); + var { Headers: Headers2 } = require_headers(); + var { getGlobalDispatcher } = require_global2(); + var { kHeadersList } = require_symbols3(); + var channels = {}; + channels.open = diagnosticsChannel.channel("undici:websocket:open"); + channels.close = diagnosticsChannel.channel("undici:websocket:close"); + channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); + var crypto2; + try { + crypto2 = __require("crypto"); + } catch { + } + function establishWebSocketConnection(url, protocols, ws, onEstablish, options2) { + const requestURL = url; + requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + const request2 = makeRequest({ + urlList: [requestURL], + serviceWorkers: "none", + referrer: "no-referrer", + mode: "websocket", + credentials: "include", + cache: "no-store", + redirect: "error" + }); + if (options2.headers) { + const headersList = new Headers2(options2.headers)[kHeadersList]; + request2.headersList = headersList; + } + const keyValue = crypto2.randomBytes(16).toString("base64"); + request2.headersList.append("sec-websocket-key", keyValue); + request2.headersList.append("sec-websocket-version", "13"); + for (const protocol of protocols) { + request2.headersList.append("sec-websocket-protocol", protocol); + } + const permessageDeflate = ""; + const controller = fetching({ + request: request2, + useParallelQueue: true, + dispatcher: options2.dispatcher ?? getGlobalDispatcher(), + processResponse(response) { + var _a2, _b; + if (response.type === "error" || response.status !== 101) { + failWebsocketConnection(ws, "Received network error or non-101 status code."); + return; + } + if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Server did not respond with sent protocols."); + return; + } + if (((_a2 = response.headersList.get("Upgrade")) == null ? void 0 : _a2.toLowerCase()) !== "websocket") { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".'); + return; + } + if (((_b = response.headersList.get("Connection")) == null ? void 0 : _b.toLowerCase()) !== "upgrade") { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".'); + return; + } + const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); + const digest = crypto2.createHash("sha1").update(keyValue + uid).digest("base64"); + if (secWSAccept !== digest) { + failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); + return; + } + const secExtension = response.headersList.get("Sec-WebSocket-Extensions"); + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, "Received different permessage-deflate than the one set."); + return; + } + const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); + if (secProtocol !== null && secProtocol !== request2.headersList.get("Sec-WebSocket-Protocol")) { + failWebsocketConnection(ws, "Protocol was not set in the opening handshake."); + return; + } + response.socket.on("data", onSocketData); + response.socket.on("close", onSocketClose); + response.socket.on("error", onSocketError); + if (channels.open.hasSubscribers) { + channels.open.publish({ + address: response.socket.address(), + protocol: secProtocol, + extensions: secExtension + }); + } + onEstablish(response); + } + }); + return controller; + } + function onSocketData(chunk) { + if (!this.ws[kByteParser].write(chunk)) { + this.pause(); + } + } + function onSocketClose() { + const { ws } = this; + const wasClean = ws[kSentClose] && ws[kReceivedClose]; + let code = 1005; + let reason = ""; + const result = ws[kByteParser].closingInfo; + if (result) { + code = result.code ?? 1005; + reason = result.reason; + } else if (!ws[kSentClose]) { + code = 1006; + } + ws[kReadyState] = states.CLOSED; + fireEvent("close", ws, CloseEvent, { + wasClean, + code, + reason + }); + if (channels.close.hasSubscribers) { + channels.close.publish({ + websocket: ws, + code, + reason + }); + } + } + function onSocketError(error) { + const { ws } = this; + ws[kReadyState] = states.CLOSING; + if (channels.socketError.hasSubscribers) { + channels.socketError.publish(error); + } + this.destroy(); + } + module2.exports = { + establishWebSocketConnection + }; } +}); - return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { - // top level key: - if (shape[k] === null) { - o[k] = (value) => topCensor(value, [k]) - } else { - const wrappedCensor = typeof censor === 'function' - ? (value, path) => { - return censor(value, [k, ...path]) - } - : censor - o[k] = fastRedact({ - paths: shape[k], - censor: wrappedCensor, - serialize, - strict - }) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/frame.js +var require_frame = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/frame.js"(exports2, module2) { + "use strict"; + var { maxUnsigned16Bit } = require_constants8(); + var crypto2; + try { + crypto2 = __require("crypto"); + } catch { } - return o - }, result) -} - -function handle (opts) { - if (Array.isArray(opts)) { - opts = { paths: opts, censor: CENSOR } - validate(opts) - return opts - } - let { paths, censor = CENSOR, remove } = opts - if (Array.isArray(paths) === false) { throw Error('pino – redact must contain an array of strings') } - if (remove === true) censor = undefined - validate({ paths, censor }) - - return { paths, censor } -} - -module.exports = redaction - - -/***/ }), - -/***/ 82897: -/***/ ((module) => { - -"use strict"; - - -const setLevelSym = Symbol('pino.setLevel') -const getLevelSym = Symbol('pino.getLevel') -const levelValSym = Symbol('pino.levelVal') -const levelCompSym = Symbol('pino.levelComp') -const useLevelLabelsSym = Symbol('pino.useLevelLabels') -const useOnlyCustomLevelsSym = Symbol('pino.useOnlyCustomLevels') -const mixinSym = Symbol('pino.mixin') - -const lsCacheSym = Symbol('pino.lsCache') -const chindingsSym = Symbol('pino.chindings') - -const asJsonSym = Symbol('pino.asJson') -const writeSym = Symbol('pino.write') -const redactFmtSym = Symbol('pino.redactFmt') - -const timeSym = Symbol('pino.time') -const timeSliceIndexSym = Symbol('pino.timeSliceIndex') -const streamSym = Symbol('pino.stream') -const stringifySym = Symbol('pino.stringify') -const stringifySafeSym = Symbol('pino.stringifySafe') -const stringifiersSym = Symbol('pino.stringifiers') -const endSym = Symbol('pino.end') -const formatOptsSym = Symbol('pino.formatOpts') -const messageKeySym = Symbol('pino.messageKey') -const errorKeySym = Symbol('pino.errorKey') -const nestedKeySym = Symbol('pino.nestedKey') -const nestedKeyStrSym = Symbol('pino.nestedKeyStr') -const mixinMergeStrategySym = Symbol('pino.mixinMergeStrategy') -const msgPrefixSym = Symbol('pino.msgPrefix') - -const wildcardFirstSym = Symbol('pino.wildcardFirst') - -// public symbols, no need to use the same pino -// version for these -const serializersSym = Symbol.for('pino.serializers') -const formattersSym = Symbol.for('pino.formatters') -const hooksSym = Symbol.for('pino.hooks') -const needsMetadataGsym = Symbol.for('pino.metadata') - -module.exports = { - setLevelSym, - getLevelSym, - levelValSym, - levelCompSym, - useLevelLabelsSym, - mixinSym, - lsCacheSym, - chindingsSym, - asJsonSym, - writeSym, - serializersSym, - redactFmtSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifySafeSym, - stringifiersSym, - endSym, - formatOptsSym, - messageKeySym, - errorKeySym, - nestedKeySym, - wildcardFirstSym, - needsMetadataGsym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym, - nestedKeyStrSym, - mixinMergeStrategySym, - msgPrefixSym -} - - -/***/ }), - -/***/ 88323: -/***/ ((module) => { - -"use strict"; + var WebsocketFrameSend = class { + /** + * @param {Buffer|undefined} data + */ + constructor(data) { + this.frameData = data; + this.maskKey = crypto2.randomBytes(4); + } + createFrame(opcode) { + var _a2; + const bodyLength = ((_a2 = this.frameData) == null ? void 0 : _a2.byteLength) ?? 0; + let payloadLength = bodyLength; + let offset = 6; + if (bodyLength > maxUnsigned16Bit) { + offset += 8; + payloadLength = 127; + } else if (bodyLength > 125) { + offset += 2; + payloadLength = 126; + } + const buffer = Buffer.allocUnsafe(bodyLength + offset); + buffer[0] = buffer[1] = 0; + buffer[0] |= 128; + buffer[0] = (buffer[0] & 240) + opcode; + buffer[offset - 4] = this.maskKey[0]; + buffer[offset - 3] = this.maskKey[1]; + buffer[offset - 2] = this.maskKey[2]; + buffer[offset - 1] = this.maskKey[3]; + buffer[1] = payloadLength; + if (payloadLength === 126) { + buffer.writeUInt16BE(bodyLength, 2); + } else if (payloadLength === 127) { + buffer[2] = buffer[3] = 0; + buffer.writeUIntBE(bodyLength, 4, 6); + } + buffer[1] |= 128; + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4]; + } + return buffer; + } + }; + module2.exports = { + WebsocketFrameSend + }; + } +}); +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/receiver.js +var require_receiver = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/receiver.js"(exports2, module2) { + "use strict"; + var { Writable } = __require("stream"); + var diagnosticsChannel = __require("diagnostics_channel"); + var { parserStates, opcodes, states, emptyBuffer } = require_constants8(); + var { kReadyState, kSentClose, kResponse, kReceivedClose } = require_symbols7(); + var { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = require_util8(); + var { WebsocketFrameSend } = require_frame(); + var channels = {}; + channels.ping = diagnosticsChannel.channel("undici:websocket:ping"); + channels.pong = diagnosticsChannel.channel("undici:websocket:pong"); + var ByteParser = class extends Writable { + #buffers = []; + #byteOffset = 0; + #state = parserStates.INFO; + #info = {}; + #fragments = []; + constructor(ws) { + super(); + this.ws = ws; + } + /** + * @param {Buffer} chunk + * @param {() => void} callback + */ + _write(chunk, _, callback) { + this.#buffers.push(chunk); + this.#byteOffset += chunk.length; + this.run(callback); + } + /** + * 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 (true) { + if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) { + return callback(); + } + const buffer = this.consume(2); + this.#info.fin = (buffer[0] & 128) !== 0; + this.#info.opcode = buffer[0] & 15; + this.#info.originalOpcode ??= this.#info.opcode; + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION; + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + failWebsocketConnection(this.ws, "Invalid frame type was fragmented."); + return; + } + const payloadLength = buffer[1] & 127; + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; + this.#state = parserStates.READ_DATA; + } else if (payloadLength === 126) { + this.#state = parserStates.PAYLOADLENGTH_16; + } else if (payloadLength === 127) { + this.#state = parserStates.PAYLOADLENGTH_64; + } + if (this.#info.fragmented && payloadLength > 125) { + failWebsocketConnection(this.ws, "Fragmented frame exceeded 125 bytes."); + return; + } else if ((this.#info.opcode === opcodes.PING || this.#info.opcode === opcodes.PONG || this.#info.opcode === opcodes.CLOSE) && payloadLength > 125) { + failWebsocketConnection(this.ws, "Payload length for control frame exceeded 125 bytes."); + return; + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(this.ws, "Received close frame with a 1-byte body."); + return; + } + const body = this.consume(payloadLength); + this.#info.closeInfo = this.parseCloseBody(false, body); + if (!this.ws[kSentClose]) { + const body2 = Buffer.allocUnsafe(2); + body2.writeUInt16BE(this.#info.closeInfo.code, 0); + const closeFrame = new WebsocketFrameSend(body2); + this.ws[kResponse].socket.write( + closeFrame.createFrame(opcodes.CLOSE), + (err) => { + if (!err) { + this.ws[kSentClose] = true; + } + } + ); + } + this.ws[kReadyState] = states.CLOSING; + this.ws[kReceivedClose] = true; + this.end(); + return; + } else if (this.#info.opcode === opcodes.PING) { + const body = this.consume(payloadLength); + if (!this.ws[kReceivedClose]) { + const frame = new WebsocketFrameSend(body); + this.ws[kResponse].socket.write(frame.createFrame(opcodes.PONG)); + if (channels.ping.hasSubscribers) { + channels.ping.publish({ + payload: body + }); + } + } + this.#state = parserStates.INFO; + if (this.#byteOffset > 0) { + continue; + } else { + callback(); + return; + } + } else if (this.#info.opcode === opcodes.PONG) { + const body = this.consume(payloadLength); + if (channels.pong.hasSubscribers) { + channels.pong.publish({ + payload: body + }); + } + if (this.#byteOffset > 0) { + continue; + } else { + callback(); + return; + } + } + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) { + return callback(); + } + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) { + return callback(); + } + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.ws, "Received payload length > 2^31 bytes."); + return; + } + const lower = buffer.readUInt32BE(4); + this.#info.payloadLength = (upper << 8) + lower; + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) { + return callback(); + } else if (this.#byteOffset >= this.#info.payloadLength) { + const body = this.consume(this.#info.payloadLength); + this.#fragments.push(body); + if (!this.#info.fragmented || this.#info.fin && this.#info.opcode === opcodes.CONTINUATION) { + const fullMessage = Buffer.concat(this.#fragments); + websocketMessageReceived(this.ws, this.#info.originalOpcode, fullMessage); + this.#info = {}; + this.#fragments.length = 0; + } + this.#state = parserStates.INFO; + } + } + if (this.#byteOffset > 0) { + continue; + } else { + callback(); + break; + } + } + } + /** + * Take n bytes from the buffered Buffers + * @param {number} n + * @returns {Buffer|null} + */ + consume(n) { + if (n > this.#byteOffset) { + return null; + } else if (n === 0) { + return 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 } = 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; + } + parseCloseBody(onlyCode, data) { + let code; + if (data.length >= 2) { + code = data.readUInt16BE(0); + } + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null; + } + return { code }; + } + let reason = data.subarray(2); + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) { + reason = reason.subarray(3); + } + if (code !== void 0 && !isValidStatusCode(code)) { + return null; + } + try { + reason = new TextDecoder("utf-8", { fatal: true }).decode(reason); + } catch { + return null; + } + return { code, reason }; + } + get closingInfo() { + return this.#info.closeInfo; + } + }; + module2.exports = { + ByteParser + }; + } +}); -const nullTime = () => '' - -const epochTime = () => `,"time":${Date.now()}` - -const unixTime = () => `,"time":${Math.round(Date.now() / 1000.0)}` - -const isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"` // using Date.now() for testability - -module.exports = { nullTime, epochTime, unixTime, isoTime } - - -/***/ }), - -/***/ 94011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* eslint no-prototype-builtins: 0 */ - -const format = __nccwpck_require__(56698) -const { mapHttpRequest, mapHttpResponse } = __nccwpck_require__(84285) -const SonicBoom = __nccwpck_require__(88525) -const onExit = __nccwpck_require__(25861) -const { - lsCacheSym, - chindingsSym, - writeSym, - serializersSym, - formatOptsSym, - endSym, - stringifiersSym, - stringifySym, - stringifySafeSym, - wildcardFirstSym, - nestedKeySym, - formattersSym, - messageKeySym, - errorKeySym, - nestedKeyStrSym, - msgPrefixSym -} = __nccwpck_require__(82897) -const { isMainThread } = __nccwpck_require__(28167) -const transport = __nccwpck_require__(27757) - -function noop () { -} - -function genLog (level, hook) { - if (!hook) return LOG - - return function hookWrappedLog (...args) { - hook.call(this, args, LOG, level) - } - - function LOG (o, ...n) { - if (typeof o === 'object') { - let msg = o - if (o !== null) { - if (o.method && o.headers && o.socket) { - o = mapHttpRequest(o) - } else if (typeof o.setHeader === 'function') { - o = mapHttpResponse(o) +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/websocket.js +var require_websocket = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/lib/websocket/websocket.js"(exports2, module2) { + "use strict"; + var { webidl } = require_webidl(); + var { DOMException: DOMException2 } = require_constants5(); + var { URLSerializer } = require_dataURL(); + var { getGlobalOrigin } = require_global(); + var { staticPropertyDescriptors, states, opcodes, emptyBuffer } = require_constants8(); + var { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser + } = require_symbols7(); + var { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = require_util8(); + var { establishWebSocketConnection } = require_connection(); + var { WebsocketFrameSend } = require_frame(); + var { ByteParser } = require_receiver(); + var { kEnumerableProperty, isBlobLike } = require_util2(); + var { getGlobalDispatcher } = require_global2(); + var { types: types2 } = __require("util"); + var experimentalWarned = false; + var WebSocket = class _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(); + webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); + if (!experimentalWarned) { + experimentalWarned = true; + process.emitWarning("WebSockets are experimental, expect them to change at any time.", { + code: "UNDICI-WS" + }); + } + const options2 = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); + url = webidl.converters.USVString(url); + protocols = options2.protocols; + const baseURL = getGlobalOrigin(); + let urlRecord; + try { + urlRecord = new URL(url, baseURL); + } catch (e) { + throw new DOMException2(e, "SyntaxError"); + } + if (urlRecord.protocol === "http:") { + urlRecord.protocol = "ws:"; + } else if (urlRecord.protocol === "https:") { + urlRecord.protocol = "wss:"; + } + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") { + throw new DOMException2( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + "SyntaxError" + ); + } + if (urlRecord.hash || urlRecord.href.endsWith("#")) { + throw new DOMException2("Got fragment", "SyntaxError"); + } + if (typeof protocols === "string") { + protocols = [protocols]; + } + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { + throw new DOMException2("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { + throw new DOMException2("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + } + this[kWebSocketURL] = new URL(urlRecord.href); + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options2 + ); + this[kReadyState] = _WebSocket.CONNECTING; + this[kBinaryType] = "blob"; + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close(code = void 0, reason = void 0) { + webidl.brandCheck(this, _WebSocket); + if (code !== void 0) { + code = webidl.converters["unsigned short"](code, { clamp: true }); + } + if (reason !== void 0) { + reason = webidl.converters.USVString(reason); + } + if (code !== void 0) { + if (code !== 1e3 && (code < 3e3 || code > 4999)) { + throw new DOMException2("invalid code", "InvalidAccessError"); + } + } + let reasonByteLength = 0; + if (reason !== void 0) { + reasonByteLength = Buffer.byteLength(reason); + if (reasonByteLength > 123) { + throw new DOMException2( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + "SyntaxError" + ); + } + } + if (this[kReadyState] === _WebSocket.CLOSING || this[kReadyState] === _WebSocket.CLOSED) { + } else if (!isEstablished(this)) { + failWebsocketConnection(this, "Connection was closed before it was established."); + this[kReadyState] = _WebSocket.CLOSING; + } else if (!isClosing(this)) { + const frame = new WebsocketFrameSend(); + if (code !== void 0 && reason === void 0) { + frame.frameData = Buffer.allocUnsafe(2); + frame.frameData.writeUInt16BE(code, 0); + } else if (code !== void 0 && reason !== void 0) { + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength); + frame.frameData.writeUInt16BE(code, 0); + frame.frameData.write(reason, 2, "utf-8"); + } else { + frame.frameData = emptyBuffer; + } + const socket = this[kResponse].socket; + socket.write(frame.createFrame(opcodes.CLOSE), (err) => { + if (!err) { + this[kSentClose] = true; + } + }); + this[kReadyState] = states.CLOSING; + } else { + this[kReadyState] = _WebSocket.CLOSING; + } + } + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-send + * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data + */ + send(data) { + webidl.brandCheck(this, _WebSocket); + webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket.send" }); + data = webidl.converters.WebSocketSendData(data); + if (this[kReadyState] === _WebSocket.CONNECTING) { + throw new DOMException2("Sent before connected.", "InvalidStateError"); + } + if (!isEstablished(this) || isClosing(this)) { + return; + } + const socket = this[kResponse].socket; + if (typeof data === "string") { + const value = Buffer.from(data); + const frame = new WebsocketFrameSend(value); + const buffer = frame.createFrame(opcodes.TEXT); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + } else if (types2.isArrayBuffer(data)) { + const value = Buffer.from(data); + const frame = new WebsocketFrameSend(value); + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + } else if (ArrayBuffer.isView(data)) { + const ab = Buffer.from(data, data.byteOffset, data.byteLength); + const frame = new WebsocketFrameSend(ab); + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += ab.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= ab.byteLength; + }); + } else if (isBlobLike(data)) { + const frame = new WebsocketFrameSend(); + data.arrayBuffer().then((ab) => { + const value = Buffer.from(ab); + frame.frameData = value; + const buffer = frame.createFrame(opcodes.BINARY); + this.#bufferedAmount += value.byteLength; + socket.write(buffer, () => { + this.#bufferedAmount -= value.byteLength; + }); + }); + } + } + get readyState() { + webidl.brandCheck(this, _WebSocket); + return this[kReadyState]; + } + get bufferedAmount() { + webidl.brandCheck(this, _WebSocket); + return this.#bufferedAmount; + } + get url() { + webidl.brandCheck(this, _WebSocket); + return URLSerializer(this[kWebSocketURL]); + } + get extensions() { + webidl.brandCheck(this, _WebSocket); + return this.#extensions; + } + get protocol() { + webidl.brandCheck(this, _WebSocket); + return this.#protocol; + } + get onopen() { + webidl.brandCheck(this, _WebSocket); + return this.#events.open; + } + set onopen(fn) { + webidl.brandCheck(this, _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() { + webidl.brandCheck(this, _WebSocket); + return this.#events.error; + } + set onerror(fn) { + webidl.brandCheck(this, _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() { + webidl.brandCheck(this, _WebSocket); + return this.#events.close; + } + set onclose(fn) { + webidl.brandCheck(this, _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() { + webidl.brandCheck(this, _WebSocket); + return this.#events.message; + } + set onmessage(fn) { + webidl.brandCheck(this, _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() { + webidl.brandCheck(this, _WebSocket); + return this[kBinaryType]; + } + set binaryType(type2) { + webidl.brandCheck(this, _WebSocket); + if (type2 !== "blob" && type2 !== "arraybuffer") { + this[kBinaryType] = "blob"; + } else { + this[kBinaryType] = type2; + } + } + /** + * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol + */ + #onConnectionEstablished(response) { + this[kResponse] = response; + const parser2 = new ByteParser(this); + parser2.on("drain", function onParserDrain() { + this.ws[kResponse].socket.resume(); + }); + response.socket.ws = this; + this[kByteParser] = parser2; + this[kReadyState] = states.OPEN; + const extensions = response.headersList.get("sec-websocket-extensions"); + if (extensions !== null) { + this.#extensions = extensions; + } + const protocol = response.headersList.get("sec-websocket-protocol"); + if (protocol !== null) { + this.#protocol = protocol; + } + fireEvent("open", this); + } + }; + WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING; + WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN; + WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING; + WebSocket.CLOSED = WebSocket.prototype.CLOSED = states.CLOSED; + Object.defineProperties(WebSocket.prototype, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors, + url: kEnumerableProperty, + readyState: kEnumerableProperty, + bufferedAmount: kEnumerableProperty, + onopen: kEnumerableProperty, + onerror: kEnumerableProperty, + onclose: kEnumerableProperty, + close: kEnumerableProperty, + onmessage: kEnumerableProperty, + binaryType: kEnumerableProperty, + send: kEnumerableProperty, + extensions: kEnumerableProperty, + protocol: kEnumerableProperty, + [Symbol.toStringTag]: { + value: "WebSocket", + writable: false, + enumerable: false, + configurable: true + } + }); + Object.defineProperties(WebSocket, { + CONNECTING: staticPropertyDescriptors, + OPEN: staticPropertyDescriptors, + CLOSING: staticPropertyDescriptors, + CLOSED: staticPropertyDescriptors + }); + webidl.converters["sequence"] = webidl.sequenceConverter( + webidl.converters.DOMString + ); + webidl.converters["DOMString or sequence"] = function(V) { + if (webidl.util.Type(V) === "Object" && Symbol.iterator in V) { + return webidl.converters["sequence"](V); + } + return webidl.converters.DOMString(V); + }; + webidl.converters.WebSocketInit = webidl.dictionaryConverter([ + { + key: "protocols", + converter: webidl.converters["DOMString or sequence"], + get defaultValue() { + return []; + } + }, + { + key: "dispatcher", + converter: (V) => V, + get defaultValue() { + return getGlobalDispatcher(); } + }, + { + key: "headers", + converter: webidl.nullableConverter(webidl.converters.HeadersInit) } - let formatParams - if (msg === null && n.length === 0) { - formatParams = [null] - } else { - msg = n.shift() - formatParams = n - } - // We do not use a coercive check for `msg` as it is - // measurably slower than the explicit checks. - if (typeof this[msgPrefixSym] === 'string' && msg !== undefined && msg !== null) { - msg = this[msgPrefixSym] + msg + ]); + webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { + if (webidl.util.Type(V) === "Object" && !(Symbol.iterator in V)) { + return webidl.converters.WebSocketInit(V); } - this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level) - } else { - let msg = o === undefined ? n.shift() : o - - // We do not use a coercive check for `msg` as it is - // measurably slower than the explicit checks. - if (typeof this[msgPrefixSym] === 'string' && msg !== undefined && msg !== null) { - msg = this[msgPrefixSym] + msg + return { protocols: webidl.converters["DOMString or sequence"](V) }; + }; + webidl.converters.WebSocketSendData = function(V) { + if (webidl.util.Type(V) === "Object") { + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }); + } + if (ArrayBuffer.isView(V) || types2.isAnyArrayBuffer(V)) { + return webidl.converters.BufferSource(V); + } } - this[writeSym](null, format(msg, n, this[formatOptsSym]), level) - } - } -} - -// magically escape strings for json -// relying on their charCodeAt -// everything below 32 needs JSON.stringify() -// 34 and 92 happens all the time, so we -// have a fast case for them -function asString (str) { - let result = '' - let last = 0 - let found = false - let point = 255 - const l = str.length - if (l > 100) { - return JSON.stringify(str) - } - for (var i = 0; i < l && point >= 32; i++) { - point = str.charCodeAt(i) - if (point === 34 || point === 92) { - result += str.slice(last, i) + '\\' - last = i - found = true - } - } - if (!found) { - result = str - } else { - result += str.slice(last) - } - return point < 32 ? JSON.stringify(str) : '"' + result + '"' -} - -function asJson (obj, msg, num, time) { - const stringify = this[stringifySym] - const stringifySafe = this[stringifySafeSym] - const stringifiers = this[stringifiersSym] - const end = this[endSym] - const chindings = this[chindingsSym] - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const messageKey = this[messageKeySym] - const errorKey = this[errorKeySym] - let data = this[lsCacheSym][num] + time - - // we need the child bindings added to the output first so instance logged - // objects can take precedence when JSON.parse-ing the resulting log line - data = data + chindings - - let value - if (formatters.log) { - obj = formatters.log(obj) - } - const wildcardStringifier = stringifiers[wildcardFirstSym] - let propStr = '' - for (const key in obj) { - value = obj[key] - if (Object.prototype.hasOwnProperty.call(obj, key) && value !== undefined) { - if (serializers[key]) { - value = serializers[key](value) - } else if (key === errorKey && serializers.err) { - value = serializers.err(value) - } - - const stringifier = stringifiers[key] || wildcardStringifier - - switch (typeof value) { - case 'undefined': - case 'function': - continue - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - break - case 'string': - value = (stringifier || asString)(value) - break - default: - value = (stringifier || stringify)(value, stringifySafe) - } - if (value === undefined) continue - const strKey = asString(key) - propStr += ',' + strKey + ':' + value - } - } - - let msgStr = '' - if (msg !== undefined) { - value = serializers[messageKey] ? serializers[messageKey](msg) : msg - const stringifier = stringifiers[messageKey] || wildcardStringifier - - switch (typeof value) { - case 'function': - break - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - msgStr = ',"' + messageKey + '":' + value - break - case 'string': - value = (stringifier || asString)(value) - msgStr = ',"' + messageKey + '":' + value - break - default: - value = (stringifier || stringify)(value, stringifySafe) - msgStr = ',"' + messageKey + '":' + value - } - } - - if (this[nestedKeySym] && propStr) { - // place all the obj properties under the specified key - // the nested key is already formatted from the constructor - return data + this[nestedKeyStrSym] + propStr.slice(1) + '}' + msgStr + end - } else { - return data + propStr + msgStr + end - } -} - -function asChindings (instance, bindings) { - let value - let data = instance[chindingsSym] - const stringify = instance[stringifySym] - const stringifySafe = instance[stringifySafeSym] - const stringifiers = instance[stringifiersSym] - const wildcardStringifier = stringifiers[wildcardFirstSym] - const serializers = instance[serializersSym] - const formatter = instance[formattersSym].bindings - bindings = formatter(bindings) - - for (const key in bindings) { - value = bindings[key] - const valid = key !== 'level' && - key !== 'serializers' && - key !== 'formatters' && - key !== 'customLevels' && - bindings.hasOwnProperty(key) && - value !== undefined - if (valid === true) { - value = serializers[key] ? serializers[key](value) : value - value = (stringifiers[key] || wildcardStringifier || stringify)(value, stringifySafe) - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - return data -} - -function hasBeenTampered (stream) { - return stream.write !== stream.constructor.prototype.write -} - -const hasNodeCodeCoverage = process.env.NODE_V8_COVERAGE || process.env.V8_COVERAGE - -function buildSafeSonicBoom (opts) { - const stream = new SonicBoom(opts) - stream.on('error', filterBrokenPipe) - // If we are sync: false, we must flush on exit - // We must disable this if there is node code coverage due to - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308. - if (!hasNodeCodeCoverage && !opts.sync && isMainThread) { - onExit.register(stream, autoEnd) - - stream.on('close', function () { - onExit.unregister(stream) - }) + return webidl.converters.USVString(V); + }; + module2.exports = { + WebSocket + }; } - return stream +}); - function filterBrokenPipe (err) { - // Impossible to replicate across all operating systems - /* istanbul ignore next */ - if (err.code === 'EPIPE') { - // If we get EPIPE, we should stop logging here - // however we have no control to the consumer of - // SonicBoom, so we just overwrite the write method - stream.write = noop - stream.end = noop - stream.flushSync = noop - stream.destroy = noop - return +// node_modules/.pnpm/undici@5.28.4/node_modules/undici/index.js +var require_undici = __commonJS({ + "node_modules/.pnpm/undici@5.28.4/node_modules/undici/index.js"(exports2, module2) { + "use strict"; + var Client = require_client(); + var Dispatcher = require_dispatcher(); + var errors = require_errors3(); + var Pool = require_pool(); + var BalancedPool = require_balanced_pool(); + var Agent3 = require_agent(); + var util2 = require_util2(); + var { InvalidArgumentError } = errors; + var api = require_api(); + var buildConnector = require_connect(); + var MockClient = require_mock_client(); + var MockAgent = require_mock_agent(); + var MockPool = require_mock_pool(); + var mockErrors = require_mock_errors(); + var ProxyAgent = require_proxy_agent(); + var RetryHandler = require_RetryHandler(); + var { getGlobalDispatcher, setGlobalDispatcher } = require_global2(); + var DecoratorHandler = require_DecoratorHandler(); + var RedirectHandler = require_RedirectHandler(); + var createRedirectInterceptor = require_redirectInterceptor(); + var hasCrypto; + try { + __require("crypto"); + hasCrypto = true; + } catch { + hasCrypto = false; + } + Object.assign(Dispatcher.prototype, api); + module2.exports.Dispatcher = Dispatcher; + module2.exports.Client = Client; + module2.exports.Pool = Pool; + module2.exports.BalancedPool = BalancedPool; + module2.exports.Agent = Agent3; + module2.exports.ProxyAgent = ProxyAgent; + module2.exports.RetryHandler = RetryHandler; + module2.exports.DecoratorHandler = DecoratorHandler; + module2.exports.RedirectHandler = RedirectHandler; + module2.exports.createRedirectInterceptor = createRedirectInterceptor; + module2.exports.buildConnector = buildConnector; + module2.exports.errors = errors; + function makeDispatcher(fn) { + return (url, opts, handler2) => { + if (typeof opts === "function") { + handler2 = opts; + opts = null; + } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + throw new InvalidArgumentError("invalid url"); + } + if (opts != null && typeof opts !== "object") { + throw new InvalidArgumentError("invalid opts"); + } + if (opts && opts.path != null) { + if (typeof opts.path !== "string") { + throw new InvalidArgumentError("invalid opts.path"); + } + let path2 = opts.path; + if (!opts.path.startsWith("/")) { + path2 = `/${path2}`; + } + url = new URL(util2.parseOrigin(url).origin + path2); + } else { + if (!opts) { + opts = typeof url === "object" ? url : {}; + } + url = util2.parseURL(url); + } + const { agent, dispatcher = getGlobalDispatcher() } = opts; + if (agent) { + throw new 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") + }, handler2); + }; } - stream.removeListener('error', filterBrokenPipe) - stream.emit('error', err) - } -} - -function autoEnd (stream, eventName) { - // This check is needed only on some platforms - /* istanbul ignore next */ - if (stream.destroyed) { - return - } - - if (eventName === 'beforeExit') { - // We still have an event loop, let's use it - stream.flush() - stream.on('drain', function () { - stream.end() - }) - } else { - // For some reason istanbul is not detecting this, but it's there - /* istanbul ignore next */ - // We do not have an event loop, so flush synchronously - stream.flushSync() + module2.exports.setGlobalDispatcher = setGlobalDispatcher; + module2.exports.getGlobalDispatcher = getGlobalDispatcher; + if (util2.nodeMajor > 16 || util2.nodeMajor === 16 && util2.nodeMinor >= 8) { + let fetchImpl = null; + module2.exports.fetch = async function fetch(resource) { + if (!fetchImpl) { + fetchImpl = require_fetch().fetch; + } + try { + return await fetchImpl(...arguments); + } catch (err) { + if (typeof err === "object") { + Error.captureStackTrace(err, this); + } + throw err; + } + }; + module2.exports.Headers = require_headers().Headers; + module2.exports.Response = require_response2().Response; + module2.exports.Request = require_request3().Request; + module2.exports.FormData = require_formdata().FormData; + module2.exports.File = require_file().File; + module2.exports.FileReader = require_filereader().FileReader; + const { setGlobalOrigin, getGlobalOrigin } = require_global(); + module2.exports.setGlobalOrigin = setGlobalOrigin; + module2.exports.getGlobalOrigin = getGlobalOrigin; + const { CacheStorage } = require_cachestorage(); + const { kConstruct } = require_symbols6(); + module2.exports.caches = new CacheStorage(kConstruct); + } + if (util2.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = require_cookies(); + module2.exports.deleteCookie = deleteCookie; + module2.exports.getCookies = getCookies; + module2.exports.getSetCookies = getSetCookies; + module2.exports.setCookie = setCookie; + const { parseMIMEType, serializeAMimeType } = require_dataURL(); + module2.exports.parseMIMEType = parseMIMEType; + module2.exports.serializeAMimeType = serializeAMimeType; + } + if (util2.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = require_websocket(); + module2.exports.WebSocket = WebSocket; + } + module2.exports.request = makeDispatcher(api.request); + module2.exports.stream = makeDispatcher(api.stream); + module2.exports.pipeline = makeDispatcher(api.pipeline); + module2.exports.connect = makeDispatcher(api.connect); + module2.exports.upgrade = makeDispatcher(api.upgrade); + module2.exports.MockClient = MockClient; + module2.exports.MockPool = MockPool; + module2.exports.MockAgent = MockAgent; + module2.exports.mockErrors = mockErrors; } -} +}); -function createArgsNormalizer (defaultOptions) { - return function normalizeArgs (instance, caller, opts = {}, stream) { - // support stream as a string - if (typeof opts === 'string') { - stream = buildSafeSonicBoom({ dest: opts }) - opts = {} - } else if (typeof stream === 'string') { - if (opts && opts.transport) { - throw Error('only one of option.transport or stream can be specified') +// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js +var require_lib7 = __commonJS({ + "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); } - stream = buildSafeSonicBoom({ dest: stream }) - } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { - stream = opts - opts = {} - } else if (opts.transport) { - if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) { - throw Error('option.transport do not allow stream, please pass to option directly. e.g. pino(transport)') + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === 'function') { - throw Error('option.transport.targets do not allow custom level formatters') + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; + var http4 = __importStar(__require("http")); + var https2 = __importStar(__require("https")); + var pm = __importStar(require_proxy()); + var tunnel = __importStar(require_tunnel2()); + var undici_1 = require_undici(); + var HttpCodes; + (function(HttpCodes2) { + HttpCodes2[HttpCodes2["OK"] = 200] = "OK"; + HttpCodes2[HttpCodes2["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes2[HttpCodes2["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes2[HttpCodes2["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes2[HttpCodes2["SeeOther"] = 303] = "SeeOther"; + HttpCodes2[HttpCodes2["NotModified"] = 304] = "NotModified"; + HttpCodes2[HttpCodes2["UseProxy"] = 305] = "UseProxy"; + HttpCodes2[HttpCodes2["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes2[HttpCodes2["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes2[HttpCodes2["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes2[HttpCodes2["BadRequest"] = 400] = "BadRequest"; + HttpCodes2[HttpCodes2["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes2[HttpCodes2["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes2[HttpCodes2["Forbidden"] = 403] = "Forbidden"; + HttpCodes2[HttpCodes2["NotFound"] = 404] = "NotFound"; + HttpCodes2[HttpCodes2["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes2[HttpCodes2["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes2[HttpCodes2["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes2[HttpCodes2["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes2[HttpCodes2["Conflict"] = 409] = "Conflict"; + HttpCodes2[HttpCodes2["Gone"] = 410] = "Gone"; + HttpCodes2[HttpCodes2["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes2[HttpCodes2["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes2[HttpCodes2["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes2[HttpCodes2["BadGateway"] = 502] = "BadGateway"; + HttpCodes2[HttpCodes2["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes2[HttpCodes2["GatewayTimeout"] = 504] = "GatewayTimeout"; + })(HttpCodes || (exports2.HttpCodes = HttpCodes = {})); + var Headers2; + (function(Headers3) { + Headers3["Accept"] = "accept"; + Headers3["ContentType"] = "content-type"; + })(Headers2 || (exports2.Headers = Headers2 = {})); + var MediaTypes; + (function(MediaTypes2) { + MediaTypes2["ApplicationJson"] = "application/json"; + })(MediaTypes || (exports2.MediaTypes = MediaTypes = {})); + function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ""; + } + exports2.getProxyUrl = getProxyUrl; + var HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect + ]; + var HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout + ]; + var RetryableHttpVerbs = ["OPTIONS", "GET", "DELETE", "HEAD"]; + var ExponentialBackoffCeiling = 10; + var ExponentialBackoffTimeSlice = 5; + var HttpClientError = class _HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = "HttpClientError"; + this.statusCode = statusCode; + Object.setPrototypeOf(this, _HttpClientError.prototype); } - - let customLevels - if (opts.customLevels) { - customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels) + }; + exports2.HttpClientError = HttpClientError; + var HttpClientResponse = class { + constructor(message) { + this.message = message; } - stream = transport({ caller, ...opts.transport, levels: customLevels }) - } - opts = Object.assign({}, defaultOptions, opts) - opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers) - opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters) - - if (opts.prettyPrint) { - throw new Error('prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)') - } - - const { enabled, onChild } = opts - if (enabled === false) opts.level = 'silent' - if (!onChild) opts.onChild = noop - if (!stream) { - if (!hasBeenTampered(process.stdout)) { - // If process.stdout.fd is undefined, it means that we are running - // in a worker thread. Let's assume we are logging to file descriptor 1. - stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 }) - } else { - stream = process.stdout + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve4) => __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", () => { + resolve4(output.toString()); + }); + })); + }); } - } - return { opts, stream } - } -} - -function stringify (obj, stringifySafeFn) { - try { - return JSON.stringify(obj) - } catch (_) { - try { - const stringify = stringifySafeFn || this[stringifySafeSym] - return stringify(obj) - } catch (_) { - return '"[unable to serialize, circular reference is too complex to analyze]"' - } - } -} - -function buildFormatters (level, bindings, log) { - return { - level, - bindings, - log - } -} - -/** - * Convert a string integer file descriptor to a proper native integer - * file descriptor. - * - * @param {string} destination The file descriptor string to attempt to convert. - * - * @returns {Number} - */ -function normalizeDestFileDescriptor (destination) { - const fd = Number(destination) - if (typeof destination === 'string' && Number.isFinite(fd)) { - return fd - } - // destination could be undefined if we are in a worker - if (destination === undefined) { - // This is stdout in UNIX systems - return 1 - } - return destination -} - -module.exports = { - noop, - buildSafeSonicBoom, - asChindings, - asJson, - genLog, - createArgsNormalizer, - stringify, - buildFormatters, - normalizeDestFileDescriptor -} - - -/***/ }), - -/***/ 27757: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { createRequire } = __nccwpck_require__(73339) -const getCallers = __nccwpck_require__(94269) -const { join, isAbsolute, sep } = __nccwpck_require__(16928) -const sleep = __nccwpck_require__(12793) -const onExit = __nccwpck_require__(25861) -const ThreadStream = __nccwpck_require__(83921) - -function setupOnExit (stream) { - // This is leak free, it does not leave event handlers - onExit.register(stream, autoEnd) - onExit.registerBeforeExit(stream, flush) - - stream.on('close', function () { - onExit.unregister(stream) - }) -} - -function buildStream (filename, workerData, workerOpts) { - const stream = new ThreadStream({ - filename, - workerData, - workerOpts - }) - - stream.on('ready', onReady) - stream.on('close', function () { - process.removeListener('exit', onExit) - }) - - process.on('exit', onExit) - - function onReady () { - process.removeListener('exit', onExit) - stream.unref() - - if (workerOpts.autoEnd !== false) { - setupOnExit(stream) - } - } - - function onExit () { - /* istanbul ignore next */ - if (stream.closed) { - return - } - stream.flushSync() - // Apparently there is a very sporadic race condition - // that in certain OS would prevent the messages to be flushed - // because the thread might not have been created still. - // Unfortunately we need to sleep(100) in this case. - sleep(100) - stream.end() - } - - return stream -} - -function autoEnd (stream) { - stream.ref() - stream.flushSync() - stream.end() - stream.once('close', function () { - stream.unref() - }) -} - -function flush (stream) { - stream.flushSync() -} - -function transport (fullOptions) { - const { pipeline, targets, levels, dedupe, options = {}, worker = {}, caller = getCallers() } = fullOptions - - // Backwards compatibility - const callers = typeof caller === 'string' ? [caller] : caller - - // This will be eventually modified by bundlers - const bundlerOverrides = '__bundlerPathsOverrides' in globalThis ? globalThis.__bundlerPathsOverrides : {} - - let target = fullOptions.target - - if (target && targets) { - throw new Error('only one of target or targets can be specified') - } - - if (targets) { - target = bundlerOverrides['pino-worker'] || __nccwpck_require__.ab + "worker.js" - options.targets = targets.map((dest) => { - return { - ...dest, - target: fixTarget(dest.target) + readBodyBuffer() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve4) => __awaiter(this, void 0, void 0, function* () { + const chunks = []; + this.message.on("data", (chunk) => { + chunks.push(chunk); + }); + this.message.on("end", () => { + resolve4(Buffer.concat(chunks)); + }); + })); + }); } - }) - } else if (pipeline) { - target = bundlerOverrides['pino-pipeline-worker'] || __nccwpck_require__.ab + "worker-pipeline.js" - options.targets = pipeline.map((dest) => { - return { - ...dest, - target: fixTarget(dest.target) + }; + exports2.HttpClientResponse = HttpClientResponse; + function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === "https:"; + } + exports2.isHttps = isHttps; + var HttpClient2 = class { + constructor(userAgent2, handlers2, 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 = userAgent2; + this.handlers = handlers2 || []; + 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; + } + } } - }) - } - - if (levels) { - options.levels = levels - } - - if (dedupe) { - options.dedupe = dedupe - } - - options.pinoWillSendConfig = true - - return buildStream(fixTarget(target), options, worker) - - function fixTarget (origin) { - origin = bundlerOverrides[origin] || origin - - if (isAbsolute(origin) || origin.indexOf('file://') === 0) { - return origin - } - - if (origin === 'pino/file') { - return __nccwpck_require__.ab + "file.js" - } - - let fixTarget - - for (const filePath of callers) { - try { - const context = filePath === 'node:repl' - ? process.cwd() + sep - : filePath - - fixTarget = createRequire(context).resolve(origin) - break - } catch (err) { - // Silent catch - continue - } - } - - if (!fixTarget) { - throw new Error(`unable to determine transport target for "${origin}"`) - } - - return fixTarget - } -} - -module.exports = transport - - -/***/ }), - -/***/ 6014: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -/* eslint no-prototype-builtins: 0 */ -const os = __nccwpck_require__(70857) -const stdSerializers = __nccwpck_require__(84285) -const caller = __nccwpck_require__(94269) -const redaction = __nccwpck_require__(34937) -const time = __nccwpck_require__(88323) -const proto = __nccwpck_require__(8586) -const symbols = __nccwpck_require__(82897) -const { configure } = __nccwpck_require__(39195) -const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __nccwpck_require__(42389) -const { DEFAULT_LEVELS, SORTING_ORDER } = __nccwpck_require__(56389) -const { - createArgsNormalizer, - asChindings, - buildSafeSonicBoom, - buildFormatters, - stringify, - normalizeDestFileDescriptor, - noop -} = __nccwpck_require__(94011) -const { version } = __nccwpck_require__(42607) -const { - chindingsSym, - redactFmtSym, - serializersSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifySafeSym, - stringifiersSym, - setLevelSym, - endSym, - formatOptsSym, - messageKeySym, - errorKeySym, - nestedKeySym, - mixinSym, - levelCompSym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym, - nestedKeyStrSym, - mixinMergeStrategySym, - msgPrefixSym -} = symbols -const { epochTime, nullTime } = time -const { pid } = process -const hostname = os.hostname() -const defaultErrorSerializer = stdSerializers.err -const defaultOptions = { - level: 'info', - levelComparison: SORTING_ORDER.ASC, - levels: DEFAULT_LEVELS, - messageKey: 'msg', - errorKey: 'err', - nestedKey: null, - enabled: true, - base: { pid, hostname }, - serializers: Object.assign(Object.create(null), { - err: defaultErrorSerializer - }), - formatters: Object.assign(Object.create(null), { - bindings (bindings) { - return bindings - }, - level (label, number) { - return { level: number } - } - }), - hooks: { - logMethod: undefined - }, - timestamp: epochTime, - name: undefined, - redact: null, - customLevels: null, - useOnlyCustomLevels: false, - depthLimit: 5, - edgeLimit: 100 -} - -const normalize = createArgsNormalizer(defaultOptions) - -const serializers = Object.assign(Object.create(null), stdSerializers) - -function pino (...args) { - const instance = {} - const { opts, stream } = normalize(instance, caller(), ...args) - const { - redact, - crlf, - serializers, - timestamp, - messageKey, - errorKey, - nestedKey, - base, - name, - level, - customLevels, - levelComparison, - mixin, - mixinMergeStrategy, - useOnlyCustomLevels, - formatters, - hooks, - depthLimit, - edgeLimit, - onChild, - msgPrefix - } = opts - - const stringifySafe = configure({ - maximumDepth: depthLimit, - maximumBreadth: edgeLimit - }) - - const allFormatters = buildFormatters( - formatters.level, - formatters.bindings, - formatters.log - ) - - const stringifyFn = stringify.bind({ - [stringifySafeSym]: stringifySafe - }) - const stringifiers = redact ? redaction(redact, stringifyFn) : {} - const formatOpts = redact - ? { stringify: stringifiers[redactFmtSym] } - : { stringify: stringifyFn } - const end = '}' + (crlf ? '\r\n' : '\n') - const coreChindings = asChindings.bind(null, { - [chindingsSym]: '', - [serializersSym]: serializers, - [stringifiersSym]: stringifiers, - [stringifySym]: stringify, - [stringifySafeSym]: stringifySafe, - [formattersSym]: allFormatters - }) - - let chindings = '' - if (base !== null) { - if (name === undefined) { - chindings = coreChindings(base) - } else { - chindings = coreChindings(Object.assign({}, base, { name })) - } - } - - const time = (timestamp instanceof Function) - ? timestamp - : (timestamp ? epochTime : nullTime) - const timeSliceIndex = time().indexOf(':') + 1 - - if (useOnlyCustomLevels && !customLevels) throw Error('customLevels is required if useOnlyCustomLevels is set true') - if (mixin && typeof mixin !== 'function') throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`) - if (msgPrefix && typeof msgPrefix !== 'string') throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`) - - assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels) - const levels = mappings(customLevels, useOnlyCustomLevels) - - if (typeof stream.emit === 'function') { - stream.emit('message', { code: 'PINO_CONFIG', config: { levels, messageKey, errorKey } }) - } - - assertLevelComparison(levelComparison) - const levelCompFunc = genLevelComparison(levelComparison) - - Object.assign(instance, { - levels, - [levelCompSym]: levelCompFunc, - [useOnlyCustomLevelsSym]: useOnlyCustomLevels, - [streamSym]: stream, - [timeSym]: time, - [timeSliceIndexSym]: timeSliceIndex, - [stringifySym]: stringify, - [stringifySafeSym]: stringifySafe, - [stringifiersSym]: stringifiers, - [endSym]: end, - [formatOptsSym]: formatOpts, - [messageKeySym]: messageKey, - [errorKeySym]: errorKey, - [nestedKeySym]: nestedKey, - // protect against injection - [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : '', - [serializersSym]: serializers, - [mixinSym]: mixin, - [mixinMergeStrategySym]: mixinMergeStrategy, - [chindingsSym]: chindings, - [formattersSym]: allFormatters, - [hooksSym]: hooks, - silent: noop, - onChild, - [msgPrefixSym]: msgPrefix - }) - - Object.setPrototypeOf(instance, proto()) - - genLsCache(instance) - - instance[setLevelSym](level) - - return instance -} - -module.exports = pino - -module.exports.destination = (dest = process.stdout.fd) => { - if (typeof dest === 'object') { - dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd) - return buildSafeSonicBoom(dest) - } else { - return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 }) - } -} - -module.exports.transport = __nccwpck_require__(27757) -module.exports.multistream = __nccwpck_require__(91069) - -module.exports.levels = mappings() -module.exports.stdSerializers = serializers -module.exports.stdTimeFunctions = Object.assign({}, time) -module.exports.symbols = symbols -module.exports.version = version - -// Enables default and name export with TypeScript and Babel -module.exports["default"] = pino -module.exports.pino = pino - - -/***/ }), - -/***/ 21860: -/***/ ((module) => { - -"use strict"; - - -function noOpPrepareStackTrace (_, stack) { - return stack -} - -module.exports = function getCallers () { - const originalPrepare = Error.prepareStackTrace - Error.prepareStackTrace = noOpPrepareStackTrace - const stack = new Error().stack - Error.prepareStackTrace = originalPrepare - - if (!Array.isArray(stack)) { - return undefined - } - - const entries = stack.slice(2) - - const fileNames = [] - - for (const entry of entries) { - if (!entry) { - continue - } - - fileNames.push(entry.getFileName()) - } - - return fileNames -} - - -/***/ }), - -/***/ 12590: -/***/ ((module) => { - -/** - * Represents default log level values - * - * @enum {number} - */ -const DEFAULT_LEVELS = { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60 -} - -/** - * Represents sort order direction: `ascending` or `descending` - * - * @enum {string} - */ -const SORTING_ORDER = { - ASC: 'ASC', - DESC: 'DESC' -} - -module.exports = { - DEFAULT_LEVELS, - SORTING_ORDER -} - - -/***/ }), - -/***/ 86364: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -/* eslint no-prototype-builtins: 0 */ -const { - lsCacheSym, - levelValSym, - useOnlyCustomLevelsSym, - streamSym, - formattersSym, - hooksSym, - levelCompSym -} = __nccwpck_require__(76222) -const { noop, genLog } = __nccwpck_require__(11056) -const { DEFAULT_LEVELS, SORTING_ORDER } = __nccwpck_require__(12590) - -const levelMethods = { - fatal: (hook) => { - const logFatal = genLog(DEFAULT_LEVELS.fatal, hook) - return function (...args) { - const stream = this[streamSym] - logFatal.call(this, ...args) - if (typeof stream.flushSync === 'function') { - try { - stream.flushSync() - } catch (e) { - // https://github.com/pinojs/pino/pull/740#discussion_r346788313 + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("GET", requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("DELETE", requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("POST", requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PATCH", requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("PUT", requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request("HEAD", requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * 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 __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * 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 __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); + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler2 of this.handlers) { + if (handler2.canHandleAuthentication(response)) { + authenticationHandler = handler2; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } else { + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && 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."); + } + yield response.readBody(); + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + if (header.toLowerCase() === "authorization") { + delete headers[header]; + } + } + } + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); } + this._disposed = true; } - } - }, - error: (hook) => genLog(DEFAULT_LEVELS.error, hook), - warn: (hook) => genLog(DEFAULT_LEVELS.warn, hook), - info: (hook) => genLog(DEFAULT_LEVELS.info, hook), - debug: (hook) => genLog(DEFAULT_LEVELS.debug, hook), - trace: (hook) => genLog(DEFAULT_LEVELS.trace, hook) -} - -const nums = Object.keys(DEFAULT_LEVELS).reduce((o, k) => { - o[DEFAULT_LEVELS[k]] = k - return o -}, {}) - -const initialLsCache = Object.keys(nums).reduce((o, k) => { - o[k] = '{"level":' + Number(k) - return o -}, {}) - -function genLsCache (instance) { - const formatter = instance[formattersSym].level - const { labels } = instance.levels - const cache = {} - for (const label in labels) { - const level = formatter(labels[label], Number(label)) - cache[label] = JSON.stringify(level).slice(0, -1) - } - instance[lsCacheSym] = cache - return instance -} - -function isStandardLevel (level, useOnlyCustomLevels) { - if (useOnlyCustomLevels) { - return false - } - - switch (level) { - case 'fatal': - case 'error': - case 'warn': - case 'info': - case 'debug': - case 'trace': - return true - default: - return false - } -} - -function setLevel (level) { - const { labels, values } = this.levels - if (typeof level === 'number') { - if (labels[level] === undefined) throw Error('unknown level value' + level) - level = labels[level] - } - if (values[level] === undefined) throw Error('unknown level ' + level) - const preLevelVal = this[levelValSym] - const levelVal = this[levelValSym] = values[level] - const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym] - const levelComparison = this[levelCompSym] - const hook = this[hooksSym].logMethod - - for (const key in values) { - if (levelComparison(values[key], levelVal) === false) { - this[key] = noop - continue - } - this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key](hook) : genLog(values[key], hook) - } - - this.emit( - 'level-change', - level, - levelVal, - labels[preLevelVal], - preLevelVal, - this - ) -} - -function getLevel (level) { - const { levels, levelVal } = this - // protection against potential loss of Pino scope from serializers (edge case with circular refs - https://github.com/pinojs/pino/issues/833) - return (levels && levels.labels) ? levels.labels[levelVal] : '' -} - -function isLevelEnabled (logLevel) { - const { values } = this.levels - const logLevelVal = values[logLevel] - return logLevelVal !== undefined && this[levelCompSym](logLevelVal, this[levelValSym]) -} - -/** - * Determine if the given `current` level is enabled by comparing it - * against the current threshold (`expected`). - * - * @param {SORTING_ORDER} direction comparison direction "ASC" or "DESC" - * @param {number} current current log level number representation - * @param {number} expected threshold value to compare with - * @returns {boolean} - */ -function compareLevel (direction, current, expected) { - if (direction === SORTING_ORDER.DESC) { - return current <= expected - } - - return current >= expected -} - -/** - * Create a level comparison function based on `levelComparison` - * it could a default function which compares levels either in "ascending" or "descending" order or custom comparison function - * - * @param {SORTING_ORDER | Function} levelComparison sort levels order direction or custom comparison function - * @returns Function - */ -function genLevelComparison (levelComparison) { - if (typeof levelComparison === 'string') { - return compareLevel.bind(null, levelComparison) - } - - return levelComparison -} - -function mappings (customLevels = null, useOnlyCustomLevels = false) { - const customNums = customLevels - /* eslint-disable */ - ? Object.keys(customLevels).reduce((o, k) => { - o[customLevels[k]] = k - return o - }, {}) - : null - /* eslint-enable */ - - const labels = Object.assign( - Object.create(Object.prototype, { Infinity: { value: 'silent' } }), - useOnlyCustomLevels ? null : nums, - customNums - ) - const values = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : DEFAULT_LEVELS, - customLevels - ) - return { labels, values } -} - -function assertDefaultLevelFound (defaultLevel, customLevels, useOnlyCustomLevels) { - if (typeof defaultLevel === 'number') { - const values = [].concat( - Object.keys(customLevels || {}).map(key => customLevels[key]), - useOnlyCustomLevels ? [] : Object.keys(nums).map(level => +level), - Infinity - ) - if (!values.includes(defaultLevel)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } - return - } - - const labels = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : DEFAULT_LEVELS, - customLevels - ) - if (!(defaultLevel in labels)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } -} - -function assertNoLevelCollisions (levels, customLevels) { - const { labels, values } = levels - for (const k in customLevels) { - if (k in values) { - throw Error('levels cannot be overridden') - } - if (customLevels[k] in labels) { - throw Error('pre-existing level values cannot be used for new levels') - } - } -} - -/** - * Validates whether `levelComparison` is correct - * - * @throws Error - * @param {SORTING_ORDER | Function} levelComparison - value to validate - * @returns - */ -function assertLevelComparison (levelComparison) { - if (typeof levelComparison === 'function') { - return - } - - if (typeof levelComparison === 'string' && Object.values(SORTING_ORDER).includes(levelComparison)) { - return - } - - throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type') -} - -module.exports = { - initialLsCache, - genLsCache, - levelMethods, - getLevel, - setLevel, - isLevelEnabled, - mappings, - assertNoLevelCollisions, - assertDefaultLevelFound, - genLevelComparison, - assertLevelComparison -} - - -/***/ }), - -/***/ 98710: -/***/ ((module) => { - -"use strict"; - - -module.exports = { version: '9.5.0' } - - -/***/ }), - -/***/ 6878: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const metadata = Symbol.for('pino.metadata') -const { DEFAULT_LEVELS } = __nccwpck_require__(12590) - -const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info - -function multistream (streamsArray, opts) { - let counter = 0 - streamsArray = streamsArray || [] - opts = opts || { dedupe: false } - - const streamLevels = Object.create(DEFAULT_LEVELS) - streamLevels.silent = Infinity - if (opts.levels && typeof opts.levels === 'object') { - Object.keys(opts.levels).forEach(i => { - streamLevels[i] = opts.levels[i] - }) - } - - const res = { - write, - add, - emit, - flushSync, - end, - minLevel: 0, - streams: [], - clone, - [metadata]: true, - streamLevels - } - - if (Array.isArray(streamsArray)) { - streamsArray.forEach(add, res) - } else { - add.call(res, streamsArray) - } - - // clean this object up - // or it will stay allocated forever - // as it is closed on the following closures - streamsArray = null - - return res - - // we can exit early because the streams are ordered by level - function write (data) { - let dest - const level = this.lastLevel - const { streams } = this - // for handling situation when several streams has the same level - let recordedLevel = 0 - let stream - - // if dedupe set to true we send logs to the stream with the highest level - // therefore, we have to change sorting order - for (let i = initLoopVar(streams.length, opts.dedupe); checkLoopVar(i, streams.length, opts.dedupe); i = adjustLoopVar(i, opts.dedupe)) { - dest = streams[i] - if (dest.level <= level) { - if (recordedLevel !== 0 && recordedLevel !== dest.level) { - break + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } else if (!res) { + reject(new Error("Unknown error")); + } else { + resolve4(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * 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 HttpClientResponse(msg); + handleResult(void 0, res); + }); + let socket; + req.on("socket", (sock) => { + socket = sock; + }); + req.setTimeout(this._socketTimeout || 3 * 6e4, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on("error", function(err) { + 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(); + } + } + /** + * 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); + } + getAgentDispatcher(serverUrl) { + const parsedUrl = new URL(serverUrl); + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (!useProxy) { + return; + } + return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === "https:"; + info.httpModule = usingSsl ? https2 : http4; + 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); + if (this.handlers) { + for (const handler2 of this.handlers) { + handler2.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys2(this.requestOptions.headers), lowercaseKeys2(headers || {})); + } + return lowercaseKeys2(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default2) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys2(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default2; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (!useProxy) { + agent = this._agent; + } + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === "https:"; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http4.globalAgent.maxSockets; + } + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + 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 ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + if (!agent) { + const options2 = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https2.Agent(options2) : new http4.Agent(options2); + this._agent = agent; + } + if (usingSsl && this._ignoreSslError) { + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; } - stream = dest.stream - if (stream[metadata]) { - const { lastTime, lastMsg, lastObj, lastLogger } = this - stream.lastLevel = level - stream.lastTime = lastTime - stream.lastMsg = lastMsg - stream.lastObj = lastObj - stream.lastLogger = lastLogger + if (proxyAgent) { + return proxyAgent; } - stream.write(data) - if (opts.dedupe) { - recordedLevel = dest.level + const usingSsl = parsedUrl.protocol === "https:"; + proxyAgent = new undici_1.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) { + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); } - } else if (!opts.dedupe) { - break + return proxyAgent; } - } - } - - function emit (...args) { - for (const { stream } of this.streams) { - if (typeof stream.emit === 'function') { - stream.emit(...args) + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); + }); } - } - } - - function flushSync () { - for (const { stream } of this.streams) { - if (typeof stream.flushSync === 'function') { - stream.flushSync() + _processResponse(res, options2) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve4, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + if (statusCode === HttpCodes.NotFound) { + resolve4(response); + } + 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 (options2 && options2.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } catch (err) { + } + if (statusCode > 299) { + let msg; + if (obj && obj.message) { + msg = obj.message; + } else if (contents && contents.length > 0) { + msg = contents; + } else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } else { + resolve4(response); + } + })); + }); } - } - } - - function add (dest) { - if (!dest) { - return res - } - - // Check that dest implements either StreamEntry or DestinationStream - const isStream = typeof dest.write === 'function' || dest.stream - const stream_ = dest.write ? dest : dest.stream - // This is necessary to provide a meaningful error message, otherwise it throws somewhere inside write() - if (!isStream) { - throw Error('stream object needs to implement either StreamEntry or DestinationStream interface') - } - - const { streams, streamLevels } = this - - let level - if (typeof dest.levelVal === 'number') { - level = dest.levelVal - } else if (typeof dest.level === 'string') { - level = streamLevels[dest.level] - } else if (typeof dest.level === 'number') { - level = dest.level - } else { - level = DEFAULT_INFO_LEVEL - } - - const dest_ = { - stream: stream_, - level, - levelVal: undefined, - id: counter++ - } - - streams.unshift(dest_) - streams.sort(compareByLevel) - - this.minLevel = streams[0].level - - return res + }; + exports2.HttpClient = HttpClient2; + var lowercaseKeys2 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); } +}); - function end () { - for (const { stream } of this.streams) { - if (typeof stream.flushSync === 'function') { - stream.flushSync() +// node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js +var require_auth2 = __commonJS({ + "node_modules/.pnpm/@actions+http-client@2.2.3/node_modules/@actions/http-client/lib/auth.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - stream.end() - } - } - - function clone (level) { - const streams = new Array(this.streams.length) - - for (let i = 0; i < streams.length; i++) { - streams[i] = { - level, - stream: this.streams[i].stream + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; + var BasicCredentialHandler = class { + constructor(username, password) { + this.username = username; + this.password = password; } - } - - return { - write, - add, - minLevel: level, - streams, - clone, - emit, - flushSync, - [metadata]: true - } - } -} - -function compareByLevel (a, b) { - return a.level - b.level -} - -function initLoopVar (length, dedupe) { - return dedupe ? length - 1 : 0 -} - -function adjustLoopVar (i, dedupe) { - return dedupe ? i - 1 : i + 1 -} - -function checkLoopVar (i, length, dedupe) { - return dedupe ? i >= 0 : i < length -} - -module.exports = multistream - - -/***/ }), - -/***/ 18681: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* eslint no-prototype-builtins: 0 */ - -const { EventEmitter } = __nccwpck_require__(78474) -const { - lsCacheSym, - levelValSym, - setLevelSym, - getLevelSym, - chindingsSym, - parsedChindingsSym, - mixinSym, - asJsonSym, - writeSym, - mixinMergeStrategySym, - timeSym, - timeSliceIndexSym, - streamSym, - serializersSym, - formattersSym, - errorKeySym, - messageKeySym, - useOnlyCustomLevelsSym, - needsMetadataGsym, - redactFmtSym, - stringifySym, - formatOptsSym, - stringifiersSym, - msgPrefixSym -} = __nccwpck_require__(76222) -const { - getLevel, - setLevel, - isLevelEnabled, - mappings, - initialLsCache, - genLsCache, - assertNoLevelCollisions -} = __nccwpck_require__(86364) -const { - asChindings, - asJson, - buildFormatters, - stringify -} = __nccwpck_require__(11056) -const { - version -} = __nccwpck_require__(98710) -const redaction = __nccwpck_require__(46678) - -// note: use of class is satirical -// https://github.com/pinojs/pino/pull/433#pullrequestreview-127703127 -const constructor = class Pino {} -const prototype = { - constructor, - child, - bindings, - setBindings, - flush, - isLevelEnabled, - version, - get level () { return this[getLevelSym]() }, - set level (lvl) { this[setLevelSym](lvl) }, - get levelVal () { return this[levelValSym] }, - set levelVal (n) { throw Error('levelVal is read-only') }, - [lsCacheSym]: initialLsCache, - [writeSym]: write, - [asJsonSym]: asJson, - [getLevelSym]: getLevel, - [setLevelSym]: setLevel -} - -Object.setPrototypeOf(prototype, EventEmitter.prototype) - -// exporting and consuming the prototype object using factory pattern fixes scoping issues with getters when serializing -module.exports = function () { - return Object.create(prototype) -} - -const resetChildingsFormatter = bindings => bindings -function child (bindings, options) { - if (!bindings) { - throw Error('missing bindings for child Pino') - } - options = options || {} // default options to empty object - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const instance = Object.create(this) - - if (options.hasOwnProperty('serializers') === true) { - instance[serializersSym] = Object.create(null) - - for (const k in serializers) { - instance[serializersSym][k] = serializers[k] - } - const parentSymbols = Object.getOwnPropertySymbols(serializers) - /* eslint no-var: off */ - for (var i = 0; i < parentSymbols.length; i++) { - const ks = parentSymbols[i] - instance[serializersSym][ks] = serializers[ks] - } - - for (const bk in options.serializers) { - instance[serializersSym][bk] = options.serializers[bk] - } - const bindingsSymbols = Object.getOwnPropertySymbols(options.serializers) - for (var bi = 0; bi < bindingsSymbols.length; bi++) { - const bks = bindingsSymbols[bi] - instance[serializersSym][bks] = options.serializers[bks] - } - } else instance[serializersSym] = serializers - if (options.hasOwnProperty('formatters')) { - const { level, bindings: chindings, log } = options.formatters - instance[formattersSym] = buildFormatters( - level || formatters.level, - chindings || resetChildingsFormatter, - log || formatters.log - ) - } else { - instance[formattersSym] = buildFormatters( - formatters.level, - resetChildingsFormatter, - formatters.log - ) - } - if (options.hasOwnProperty('customLevels') === true) { - assertNoLevelCollisions(this.levels, options.customLevels) - instance.levels = mappings(options.customLevels, instance[useOnlyCustomLevelsSym]) - genLsCache(instance) - } - - // redact must place before asChindings and only replace if exist - if ((typeof options.redact === 'object' && options.redact !== null) || Array.isArray(options.redact)) { - instance.redact = options.redact // replace redact directly - const stringifiers = redaction(instance.redact, stringify) - const formatOpts = { stringify: stringifiers[redactFmtSym] } - instance[stringifySym] = stringify - instance[stringifiersSym] = stringifiers - instance[formatOptsSym] = formatOpts - } - - if (typeof options.msgPrefix === 'string') { - instance[msgPrefixSym] = (this[msgPrefixSym] || '') + options.msgPrefix - } - - instance[chindingsSym] = asChindings(instance, bindings) - const childLevel = options.level || this.level - instance[setLevelSym](childLevel) - this.onChild(instance) - return instance -} - -function bindings () { - const chindings = this[chindingsSym] - const chindingsJson = `{${chindings.substr(1)}}` // at least contains ,"pid":7068,"hostname":"myMac" - const bindingsFromJson = JSON.parse(chindingsJson) - delete bindingsFromJson.pid - delete bindingsFromJson.hostname - return bindingsFromJson -} - -function setBindings (newBindings) { - const chindings = asChindings(this, newBindings) - this[chindingsSym] = chindings - delete this[parsedChindingsSym] -} - -/** - * Default strategy for creating `mergeObject` from arguments and the result from `mixin()`. - * Fields from `mergeObject` have higher priority in this strategy. - * - * @param {Object} mergeObject The object a user has supplied to the logging function. - * @param {Object} mixinObject The result of the `mixin` method. - * @return {Object} - */ -function defaultMixinMergeStrategy (mergeObject, mixinObject) { - return Object.assign(mixinObject, mergeObject) -} - -function write (_obj, msg, num) { - const t = this[timeSym]() - const mixin = this[mixinSym] - const errorKey = this[errorKeySym] - const messageKey = this[messageKeySym] - const mixinMergeStrategy = this[mixinMergeStrategySym] || defaultMixinMergeStrategy - let obj - - if (_obj === undefined || _obj === null) { - obj = {} - } else if (_obj instanceof Error) { - obj = { [errorKey]: _obj } - if (msg === undefined) { - msg = _obj.message - } - } else { - obj = _obj - if (msg === undefined && _obj[messageKey] === undefined && _obj[errorKey]) { - msg = _obj[errorKey].message - } - } - - if (mixin) { - obj = mixinMergeStrategy(obj, mixin(obj, num, this)) - } - - const s = this[asJsonSym](obj, msg, num, t) - - const stream = this[streamSym] - if (stream[needsMetadataGsym] === true) { - stream.lastLevel = num - stream.lastObj = obj - stream.lastMsg = msg - stream.lastTime = t.slice(this[timeSliceIndexSym]) - stream.lastLogger = this // for child loggers - } - stream.write(s) -} - -function noop () {} - -function flush (cb) { - if (cb != null && typeof cb !== 'function') { - throw Error('callback must be a function') - } - - const stream = this[streamSym] - - if (typeof stream.flush === 'function') { - stream.flush(cb || noop) - } else if (cb) cb() -} - - -/***/ }), - -/***/ 46678: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fastRedact = __nccwpck_require__(35440) -const { redactFmtSym, wildcardFirstSym } = __nccwpck_require__(76222) -const { rx, validator } = fastRedact - -const validate = validator({ - ERR_PATHS_MUST_BE_STRINGS: () => 'pino – redacted paths must be strings', - ERR_INVALID_PATH: (s) => `pino – redact paths array contains an invalid path (${s})` -}) - -const CENSOR = '[Redacted]' -const strict = false // TODO should this be configurable? - -function redaction (opts, serialize) { - const { paths, censor } = handle(opts) - - const shape = paths.reduce((o, str) => { - rx.lastIndex = 0 - const first = rx.exec(str) - const next = rx.exec(str) - - // ns is the top-level path segment, brackets + quoting removed. - let ns = first[1] !== undefined - ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, '$1') - : first[0] - - if (ns === '*') { - ns = wildcardFirstSym - } - - // top level key: - if (next === null) { - o[ns] = null - return o - } - - // path with at least two segments: - // if ns is already redacted at the top level, ignore lower level redactions - if (o[ns] === null) { - return o - } - - const { index } = next - const nextPath = `${str.substr(index, str.length - 1)}` - - o[ns] = o[ns] || [] - - // shape is a mix of paths beginning with literal values and wildcard - // paths [ "a.b.c", "*.b.z" ] should reduce to a shape of - // { "a": [ "b.c", "b.z" ], *: [ "b.z" ] } - // note: "b.z" is in both "a" and * arrays because "a" matches the wildcard. - // (* entry has wildcardFirstSym as key) - if (ns !== wildcardFirstSym && o[ns].length === 0) { - // first time ns's get all '*' redactions so far - o[ns].push(...(o[wildcardFirstSym] || [])) - } - - if (ns === wildcardFirstSym) { - // new * path gets added to all previously registered literal ns's. - Object.keys(o).forEach(function (k) { - if (o[k]) { - o[k].push(nextPath) + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); } - }) - } - - o[ns].push(nextPath) - return o - }, {}) - - // the redactor assigned to the format symbol key - // provides top level redaction for instances where - // an object is interpolated into the msg string - const result = { - [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) - } - - const topCensor = (...args) => { - return typeof censor === 'function' ? serialize(censor(...args)) : serialize(censor) - } - - return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { - // top level key: - if (shape[k] === null) { - o[k] = (value) => topCensor(value, [k]) - } else { - const wrappedCensor = typeof censor === 'function' - ? (value, path) => { - return censor(value, [k, ...path]) - } - : censor - o[k] = fastRedact({ - paths: shape[k], - censor: wrappedCensor, - serialize, - strict - }) - } - return o - }, result) -} - -function handle (opts) { - if (Array.isArray(opts)) { - opts = { paths: opts, censor: CENSOR } - validate(opts) - return opts - } - let { paths, censor = CENSOR, remove } = opts - if (Array.isArray(paths) === false) { throw Error('pino – redact must contain an array of strings') } - if (remove === true) censor = undefined - validate({ paths, censor }) - - return { paths, censor } -} - -module.exports = redaction - - -/***/ }), - -/***/ 76222: -/***/ ((module) => { - -"use strict"; - - -const setLevelSym = Symbol('pino.setLevel') -const getLevelSym = Symbol('pino.getLevel') -const levelValSym = Symbol('pino.levelVal') -const levelCompSym = Symbol('pino.levelComp') -const useLevelLabelsSym = Symbol('pino.useLevelLabels') -const useOnlyCustomLevelsSym = Symbol('pino.useOnlyCustomLevels') -const mixinSym = Symbol('pino.mixin') - -const lsCacheSym = Symbol('pino.lsCache') -const chindingsSym = Symbol('pino.chindings') - -const asJsonSym = Symbol('pino.asJson') -const writeSym = Symbol('pino.write') -const redactFmtSym = Symbol('pino.redactFmt') - -const timeSym = Symbol('pino.time') -const timeSliceIndexSym = Symbol('pino.timeSliceIndex') -const streamSym = Symbol('pino.stream') -const stringifySym = Symbol('pino.stringify') -const stringifySafeSym = Symbol('pino.stringifySafe') -const stringifiersSym = Symbol('pino.stringifiers') -const endSym = Symbol('pino.end') -const formatOptsSym = Symbol('pino.formatOpts') -const messageKeySym = Symbol('pino.messageKey') -const errorKeySym = Symbol('pino.errorKey') -const nestedKeySym = Symbol('pino.nestedKey') -const nestedKeyStrSym = Symbol('pino.nestedKeyStr') -const mixinMergeStrategySym = Symbol('pino.mixinMergeStrategy') -const msgPrefixSym = Symbol('pino.msgPrefix') - -const wildcardFirstSym = Symbol('pino.wildcardFirst') - -// public symbols, no need to use the same pino -// version for these -const serializersSym = Symbol.for('pino.serializers') -const formattersSym = Symbol.for('pino.formatters') -const hooksSym = Symbol.for('pino.hooks') -const needsMetadataGsym = Symbol.for('pino.metadata') - -module.exports = { - setLevelSym, - getLevelSym, - levelValSym, - levelCompSym, - useLevelLabelsSym, - mixinSym, - lsCacheSym, - chindingsSym, - asJsonSym, - writeSym, - serializersSym, - redactFmtSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifySafeSym, - stringifiersSym, - endSym, - formatOptsSym, - messageKeySym, - errorKeySym, - nestedKeySym, - wildcardFirstSym, - needsMetadataGsym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym, - nestedKeyStrSym, - mixinMergeStrategySym, - msgPrefixSym -} - - -/***/ }), - -/***/ 80642: -/***/ ((module) => { - -"use strict"; - - -const nullTime = () => '' - -const epochTime = () => `,"time":${Date.now()}` - -const unixTime = () => `,"time":${Math.round(Date.now() / 1000.0)}` - -const isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"` // using Date.now() for testability - -module.exports = { nullTime, epochTime, unixTime, isoTime } - - -/***/ }), - -/***/ 11056: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -/* eslint no-prototype-builtins: 0 */ - -const format = __nccwpck_require__(56698) -const { mapHttpRequest, mapHttpResponse } = __nccwpck_require__(74602) -const SonicBoom = __nccwpck_require__(91265) -const onExit = __nccwpck_require__(25861) -const { - lsCacheSym, - chindingsSym, - writeSym, - serializersSym, - formatOptsSym, - endSym, - stringifiersSym, - stringifySym, - stringifySafeSym, - wildcardFirstSym, - nestedKeySym, - formattersSym, - messageKeySym, - errorKeySym, - nestedKeyStrSym, - msgPrefixSym -} = __nccwpck_require__(76222) -const { isMainThread } = __nccwpck_require__(28167) -const transport = __nccwpck_require__(91494) - -function noop () { -} - -function genLog (level, hook) { - if (!hook) return LOG - - return function hookWrappedLog (...args) { - hook.call(this, args, LOG, level) - } - - function LOG (o, ...n) { - if (typeof o === 'object') { - let msg = o - if (o !== null) { - if (o.method && o.headers && o.socket) { - o = mapHttpRequest(o) - } else if (typeof o.setHeader === 'function') { - o = mapHttpResponse(o) + options2.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.BasicCredentialHandler = BasicCredentialHandler; + var BearerCredentialHandler = class { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); } + options2.headers["Authorization"] = `Bearer ${this.token}`; } - let formatParams - if (msg === null && n.length === 0) { - formatParams = [null] - } else { - msg = n.shift() - formatParams = n + // This handler cannot handle 401 + canHandleAuthentication() { + return false; } - // We do not use a coercive check for `msg` as it is - // measurably slower than the explicit checks. - if (typeof this[msgPrefixSym] === 'string' && msg !== undefined && msg !== null) { - msg = this[msgPrefixSym] + msg + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); } - this[writeSym](o, format(msg, formatParams, this[formatOptsSym]), level) - } else { - let msg = o === undefined ? n.shift() : o - - // We do not use a coercive check for `msg` as it is - // measurably slower than the explicit checks. - if (typeof this[msgPrefixSym] === 'string' && msg !== undefined && msg !== null) { - msg = this[msgPrefixSym] + msg + }; + exports2.BearerCredentialHandler = BearerCredentialHandler; + var PersonalAccessTokenCredentialHandler = class { + constructor(token) { + this.token = token; } - this[writeSym](null, format(msg, n, this[formatOptsSym]), level) - } - } -} - -// magically escape strings for json -// relying on their charCodeAt -// everything below 32 needs JSON.stringify() -// 34 and 92 happens all the time, so we -// have a fast case for them -function asString (str) { - let result = '' - let last = 0 - let found = false - let point = 255 - const l = str.length - if (l > 100) { - return JSON.stringify(str) - } - for (var i = 0; i < l && point >= 32; i++) { - point = str.charCodeAt(i) - if (point === 34 || point === 92) { - result += str.slice(last, i) + '\\' - last = i - found = true - } - } - if (!found) { - result = str - } else { - result += str.slice(last) - } - return point < 32 ? JSON.stringify(str) : '"' + result + '"' -} - -function asJson (obj, msg, num, time) { - const stringify = this[stringifySym] - const stringifySafe = this[stringifySafeSym] - const stringifiers = this[stringifiersSym] - const end = this[endSym] - const chindings = this[chindingsSym] - const serializers = this[serializersSym] - const formatters = this[formattersSym] - const messageKey = this[messageKeySym] - const errorKey = this[errorKeySym] - let data = this[lsCacheSym][num] + time - - // we need the child bindings added to the output first so instance logged - // objects can take precedence when JSON.parse-ing the resulting log line - data = data + chindings - - let value - if (formatters.log) { - obj = formatters.log(obj) - } - const wildcardStringifier = stringifiers[wildcardFirstSym] - let propStr = '' - for (const key in obj) { - value = obj[key] - if (Object.prototype.hasOwnProperty.call(obj, key) && value !== undefined) { - if (serializers[key]) { - value = serializers[key](value) - } else if (key === errorKey && serializers.err) { - value = serializers.err(value) - } - - const stringifier = stringifiers[key] || wildcardStringifier - - switch (typeof value) { - case 'undefined': - case 'function': - continue - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - break - case 'string': - value = (stringifier || asString)(value) - break - default: - value = (stringifier || stringify)(value, stringifySafe) - } - if (value === undefined) continue - const strKey = asString(key) - propStr += ',' + strKey + ':' + value - } - } - - let msgStr = '' - if (msg !== undefined) { - value = serializers[messageKey] ? serializers[messageKey](msg) : msg - const stringifier = stringifiers[messageKey] || wildcardStringifier - - switch (typeof value) { - case 'function': - break - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicitly falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - msgStr = ',"' + messageKey + '":' + value - break - case 'string': - value = (stringifier || asString)(value) - msgStr = ',"' + messageKey + '":' + value - break - default: - value = (stringifier || stringify)(value, stringifySafe) - msgStr = ',"' + messageKey + '":' + value - } - } - - if (this[nestedKeySym] && propStr) { - // place all the obj properties under the specified key - // the nested key is already formatted from the constructor - return data + this[nestedKeyStrSym] + propStr.slice(1) + '}' + msgStr + end - } else { - return data + propStr + msgStr + end - } -} - -function asChindings (instance, bindings) { - let value - let data = instance[chindingsSym] - const stringify = instance[stringifySym] - const stringifySafe = instance[stringifySafeSym] - const stringifiers = instance[stringifiersSym] - const wildcardStringifier = stringifiers[wildcardFirstSym] - const serializers = instance[serializersSym] - const formatter = instance[formattersSym].bindings - bindings = formatter(bindings) - - for (const key in bindings) { - value = bindings[key] - const valid = key !== 'level' && - key !== 'serializers' && - key !== 'formatters' && - key !== 'customLevels' && - bindings.hasOwnProperty(key) && - value !== undefined - if (valid === true) { - value = serializers[key] ? serializers[key](value) : value - value = (stringifiers[key] || wildcardStringifier || stringify)(value, stringifySafe) - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - return data -} - -function hasBeenTampered (stream) { - return stream.write !== stream.constructor.prototype.write -} - -const hasNodeCodeCoverage = process.env.NODE_V8_COVERAGE || process.env.V8_COVERAGE - -function buildSafeSonicBoom (opts) { - const stream = new SonicBoom(opts) - stream.on('error', filterBrokenPipe) - // If we are sync: false, we must flush on exit - // We must disable this if there is node code coverage due to - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308. - if (!hasNodeCodeCoverage && !opts.sync && isMainThread) { - onExit.register(stream, autoEnd) - - stream.on('close', function () { - onExit.unregister(stream) - }) - } - return stream - - function filterBrokenPipe (err) { - // Impossible to replicate across all operating systems - /* istanbul ignore next */ - if (err.code === 'EPIPE') { - // If we get EPIPE, we should stop logging here - // however we have no control to the consumer of - // SonicBoom, so we just overwrite the write method - stream.write = noop - stream.end = noop - stream.flushSync = noop - stream.destroy = noop - return - } - stream.removeListener('error', filterBrokenPipe) - stream.emit('error', err) - } -} - -function autoEnd (stream, eventName) { - // This check is needed only on some platforms - /* istanbul ignore next */ - if (stream.destroyed) { - return - } - - if (eventName === 'beforeExit') { - // We still have an event loop, let's use it - stream.flush() - stream.on('drain', function () { - stream.end() - }) - } else { - // For some reason istanbul is not detecting this, but it's there - /* istanbul ignore next */ - // We do not have an event loop, so flush synchronously - stream.flushSync() + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options2) { + if (!options2.headers) { + throw Error("The request has no headers"); + } + options2.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("not implemented"); + }); + } + }; + exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; } -} +}); -function createArgsNormalizer (defaultOptions) { - return function normalizeArgs (instance, caller, opts = {}, stream) { - // support stream as a string - if (typeof opts === 'string') { - stream = buildSafeSonicBoom({ dest: opts }) - opts = {} - } else if (typeof stream === 'string') { - if (opts && opts.transport) { - throw Error('only one of option.transport or stream can be specified') +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js +var require_oidc_utils = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/oidc-utils.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - stream = buildSafeSonicBoom({ dest: stream }) - } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { - stream = opts - opts = {} - } else if (opts.transport) { - if (opts.transport instanceof SonicBoom || opts.transport.writable || opts.transport._writableState) { - throw Error('option.transport do not allow stream, please pass to option directly. e.g. pino(transport)') + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OidcClient = void 0; + var http_client_1 = require_lib7(); + var auth_1 = require_auth2(); + var core_1 = require_core2(); + var OidcClient = class _OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); } - if (opts.transport.targets && opts.transport.targets.length && opts.formatters && typeof opts.formatters.level === 'function') { - throw Error('option.transport.targets do not allow custom level formatters') + 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; } - - let customLevels - if (opts.customLevels) { - customLevels = opts.useOnlyCustomLevels ? opts.customLevels : Object.assign({}, opts.levels, opts.customLevels) + 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; } - stream = transport({ caller, ...opts.transport, levels: customLevels }) - } - opts = Object.assign({}, defaultOptions, opts) - opts.serializers = Object.assign({}, defaultOptions.serializers, opts.serializers) - opts.formatters = Object.assign({}, defaultOptions.formatters, opts.formatters) - - if (opts.prettyPrint) { - throw new Error('prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)') - } - - const { enabled, onChild } = opts - if (enabled === false) opts.level = 'silent' - if (!onChild) opts.onChild = noop - if (!stream) { - if (!hasBeenTampered(process.stdout)) { - // If process.stdout.fd is undefined, it means that we are running - // in a worker thread. Let's assume we are logging to file descriptor 1. - stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 }) - } else { - stream = process.stdout + static getCall(id_token_url) { + var _a2; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = _OidcClient.createHttpClient(); + const res = yield httpclient.getJson(id_token_url).catch((error) => { + throw new Error(`Failed to get ID Token. + + Error Code : ${error.statusCode} + + Error Message: ${error.message}`); + }); + const id_token = (_a2 = res.result) === null || _a2 === void 0 ? void 0 : _a2.value; + if (!id_token) { + throw new Error("Response json body do not have ID Token field"); + } + return id_token; + }); } - } - return { opts, stream } - } -} - -function stringify (obj, stringifySafeFn) { - try { - return JSON.stringify(obj) - } catch (_) { - try { - const stringify = stringifySafeFn || this[stringifySafeSym] - return stringify(obj) - } catch (_) { - return '"[unable to serialize, circular reference is too complex to analyze]"' - } - } -} - -function buildFormatters (level, bindings, log) { - return { - level, - bindings, - log - } -} - -/** - * Convert a string integer file descriptor to a proper native integer - * file descriptor. - * - * @param {string} destination The file descriptor string to attempt to convert. - * - * @returns {Number} - */ -function normalizeDestFileDescriptor (destination) { - const fd = Number(destination) - if (typeof destination === 'string' && Number.isFinite(fd)) { - return fd - } - // destination could be undefined if we are in a worker - if (destination === undefined) { - // This is stdout in UNIX systems - return 1 - } - return destination -} - -module.exports = { - noop, - buildSafeSonicBoom, - asChindings, - asJson, - genLog, - createArgsNormalizer, - stringify, - buildFormatters, - normalizeDestFileDescriptor -} - - -/***/ }), - -/***/ 91494: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { createRequire } = __nccwpck_require__(73339) -const getCallers = __nccwpck_require__(21860) -const { join, isAbsolute, sep } = __nccwpck_require__(76760) -const sleep = __nccwpck_require__(12793) -const onExit = __nccwpck_require__(25861) -const ThreadStream = __nccwpck_require__(77370) - -function setupOnExit (stream) { - // This is leak free, it does not leave event handlers - onExit.register(stream, autoEnd) - onExit.registerBeforeExit(stream, flush) - - stream.on('close', function () { - onExit.unregister(stream) - }) -} - -function buildStream (filename, workerData, workerOpts, sync) { - const stream = new ThreadStream({ - filename, - workerData, - workerOpts, - sync - }) - - stream.on('ready', onReady) - stream.on('close', function () { - process.removeListener('exit', onExit) - }) - - process.on('exit', onExit) - - function onReady () { - process.removeListener('exit', onExit) - stream.unref() - - if (workerOpts.autoEnd !== false) { - setupOnExit(stream) - } - } - - function onExit () { - /* istanbul ignore next */ - if (stream.closed) { - return - } - stream.flushSync() - // Apparently there is a very sporadic race condition - // that in certain OS would prevent the messages to be flushed - // because the thread might not have been created still. - // Unfortunately we need to sleep(100) in this case. - sleep(100) - stream.end() - } - - return stream -} - -function autoEnd (stream) { - stream.ref() - stream.flushSync() - stream.end() - stream.once('close', function () { - stream.unref() - }) -} - -function flush (stream) { - stream.flushSync() -} - -function transport (fullOptions) { - const { pipeline, targets, levels, dedupe, worker = {}, caller = getCallers(), sync = false } = fullOptions - - const options = { - ...fullOptions.options - } - - // Backwards compatibility - const callers = typeof caller === 'string' ? [caller] : caller - - // This will be eventually modified by bundlers - const bundlerOverrides = '__bundlerPathsOverrides' in globalThis ? globalThis.__bundlerPathsOverrides : {} - - let target = fullOptions.target - - if (target && targets) { - throw new Error('only one of target or targets can be specified') + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + let id_token_url = _OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + (0, core_1.debug)(`ID token url is ${id_token_url}`); + const id_token = yield _OidcClient.getCall(id_token_url); + (0, core_1.setSecret)(id_token); + return id_token; + } catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } + }; + exports2.OidcClient = OidcClient; } +}); - if (targets) { - target = bundlerOverrides['pino-worker'] || join(__dirname, 'worker.js') - options.targets = targets.filter(dest => dest.target).map((dest) => { - return { - ...dest, - target: fixTarget(dest.target) +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js +var require_summary = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/summary.js"(exports2) { + "use strict"; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - }) - options.pipelines = targets.filter(dest => dest.pipeline).map((dest) => { - return dest.pipeline.map((t) => { - return { - ...t, - level: dest.level, // duplicate the pipeline `level` property defined in the upper level - target: fixTarget(t.target) + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - }) - }) - } else if (pipeline) { - target = bundlerOverrides['pino-worker'] || join(__dirname, 'worker.js') - options.pipelines = [pipeline.map((dest) => { - return { - ...dest, - target: fixTarget(dest.target) + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; + var os_1 = __require("os"); + var fs_1 = __require("fs"); + var { access, appendFile, writeFile } = fs_1.promises; + exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; + exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; + var Summary = class { + constructor() { + this._buffer = ""; } - })] - } - - if (levels) { - options.levels = levels - } - - if (dedupe) { - options.dedupe = dedupe - } - - options.pinoWillSendConfig = true - - return buildStream(fixTarget(target), options, worker, sync) - - function fixTarget (origin) { - origin = bundlerOverrides[origin] || origin - - if (isAbsolute(origin) || origin.indexOf('file://') === 0) { - return origin - } - - if (origin === 'pino/file') { - return join(__dirname, '..', 'file.js') - } - - let fixTarget - - for (const filePath of callers) { - try { - const context = filePath === 'node:repl' - ? process.cwd() + sep - : filePath - - fixTarget = createRequire(context).resolve(origin) - break - } catch (err) { - // Silent catch - continue - } - } - - if (!fixTarget) { - throw new Error(`unable to determine transport target for "${origin}"`) - } - - return fixTarget - } -} - -module.exports = transport - - -/***/ }), - -/***/ 78535: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const os = __nccwpck_require__(48161) -const stdSerializers = __nccwpck_require__(74602) -const caller = __nccwpck_require__(21860) -const redaction = __nccwpck_require__(46678) -const time = __nccwpck_require__(80642) -const proto = __nccwpck_require__(18681) -const symbols = __nccwpck_require__(76222) -const { configure } = __nccwpck_require__(39195) -const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __nccwpck_require__(86364) -const { DEFAULT_LEVELS, SORTING_ORDER } = __nccwpck_require__(12590) -const { - createArgsNormalizer, - asChindings, - buildSafeSonicBoom, - buildFormatters, - stringify, - normalizeDestFileDescriptor, - noop -} = __nccwpck_require__(11056) -const { version } = __nccwpck_require__(98710) -const { - chindingsSym, - redactFmtSym, - serializersSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifySafeSym, - stringifiersSym, - setLevelSym, - endSym, - formatOptsSym, - messageKeySym, - errorKeySym, - nestedKeySym, - mixinSym, - levelCompSym, - useOnlyCustomLevelsSym, - formattersSym, - hooksSym, - nestedKeyStrSym, - mixinMergeStrategySym, - msgPrefixSym -} = symbols -const { epochTime, nullTime } = time -const { pid } = process -const hostname = os.hostname() -const defaultErrorSerializer = stdSerializers.err -const defaultOptions = { - level: 'info', - levelComparison: SORTING_ORDER.ASC, - levels: DEFAULT_LEVELS, - messageKey: 'msg', - errorKey: 'err', - nestedKey: null, - enabled: true, - base: { pid, hostname }, - serializers: Object.assign(Object.create(null), { - err: defaultErrorSerializer - }), - formatters: Object.assign(Object.create(null), { - bindings (bindings) { - return bindings - }, - level (label, number) { - return { level: number } - } - }), - hooks: { - logMethod: undefined - }, - timestamp: epochTime, - name: undefined, - redact: null, - customLevels: null, - useOnlyCustomLevels: false, - depthLimit: 5, - edgeLimit: 100 -} - -const normalize = createArgsNormalizer(defaultOptions) - -const serializers = Object.assign(Object.create(null), stdSerializers) - -function pino (...args) { - const instance = {} - const { opts, stream } = normalize(instance, caller(), ...args) - - if (opts.level && typeof opts.level === 'string' && DEFAULT_LEVELS[opts.level.toLowerCase()] !== undefined) opts.level = opts.level.toLowerCase() - - const { - redact, - crlf, - serializers, - timestamp, - messageKey, - errorKey, - nestedKey, - base, - name, - level, - customLevels, - levelComparison, - mixin, - mixinMergeStrategy, - useOnlyCustomLevels, - formatters, - hooks, - depthLimit, - edgeLimit, - onChild, - msgPrefix - } = opts - - const stringifySafe = configure({ - maximumDepth: depthLimit, - maximumBreadth: edgeLimit - }) - - const allFormatters = buildFormatters( - formatters.level, - formatters.bindings, - formatters.log - ) - - const stringifyFn = stringify.bind({ - [stringifySafeSym]: stringifySafe - }) - const stringifiers = redact ? redaction(redact, stringifyFn) : {} - const formatOpts = redact - ? { stringify: stringifiers[redactFmtSym] } - : { stringify: stringifyFn } - const end = '}' + (crlf ? '\r\n' : '\n') - const coreChindings = asChindings.bind(null, { - [chindingsSym]: '', - [serializersSym]: serializers, - [stringifiersSym]: stringifiers, - [stringifySym]: stringify, - [stringifySafeSym]: stringifySafe, - [formattersSym]: allFormatters - }) - - let chindings = '' - if (base !== null) { - if (name === undefined) { - chindings = coreChindings(base) - } else { - chindings = coreChindings(Object.assign({}, base, { name })) - } - } - - const time = (timestamp instanceof Function) - ? timestamp - : (timestamp ? epochTime : nullTime) - const timeSliceIndex = time().indexOf(':') + 1 - - if (useOnlyCustomLevels && !customLevels) throw Error('customLevels is required if useOnlyCustomLevels is set true') - if (mixin && typeof mixin !== 'function') throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`) - if (msgPrefix && typeof msgPrefix !== 'string') throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`) - - assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels) - const levels = mappings(customLevels, useOnlyCustomLevels) - - if (typeof stream.emit === 'function') { - stream.emit('message', { code: 'PINO_CONFIG', config: { levels, messageKey, errorKey } }) - } - - assertLevelComparison(levelComparison) - const levelCompFunc = genLevelComparison(levelComparison) - - Object.assign(instance, { - levels, - [levelCompSym]: levelCompFunc, - [useOnlyCustomLevelsSym]: useOnlyCustomLevels, - [streamSym]: stream, - [timeSym]: time, - [timeSliceIndexSym]: timeSliceIndex, - [stringifySym]: stringify, - [stringifySafeSym]: stringifySafe, - [stringifiersSym]: stringifiers, - [endSym]: end, - [formatOptsSym]: formatOpts, - [messageKeySym]: messageKey, - [errorKeySym]: errorKey, - [nestedKeySym]: nestedKey, - // protect against injection - [nestedKeyStrSym]: nestedKey ? `,${JSON.stringify(nestedKey)}:{` : '', - [serializersSym]: serializers, - [mixinSym]: mixin, - [mixinMergeStrategySym]: mixinMergeStrategy, - [chindingsSym]: chindings, - [formattersSym]: allFormatters, - [hooksSym]: hooks, - silent: noop, - onChild, - [msgPrefixSym]: msgPrefix - }) - - Object.setPrototypeOf(instance, proto()) - - genLsCache(instance) - - instance[setLevelSym](level) - - return instance -} - -module.exports = pino - -module.exports.destination = (dest = process.stdout.fd) => { - if (typeof dest === 'object') { - dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd) - return buildSafeSonicBoom(dest) - } else { - return buildSafeSonicBoom({ dest: normalizeDestFileDescriptor(dest), minLength: 0 }) + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } catch (_a2) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options2) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options2 === null || options2 === void 0 ? void 0 : options2.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ""; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, lang && { lang }); + const element = this.wrap("pre", this.wrap("code", code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? "ol" : "ul"; + const listItems = items.map((item) => this.wrap("li", item)).join(""); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows.map((row) => { + const cells = row.map((cell) => { + if (typeof cell === "string") { + return this.wrap("td", cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? "th" : "td"; + const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); + return this.wrap(tag, data, attrs); + }).join(""); + return this.wrap("tr", cells); + }).join(""); + const element = this.wrap("table", tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap("details", this.wrap("summary", label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options2) { + const { width, height } = options2 || {}; + const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); + const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap("hr", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap("br", null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, cite && { cite }); + const element = this.wrap("blockquote", text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap("a", text, { href }); + return this.addRaw(element).addEOL(); + } + }; + var _summary = new Summary(); + exports2.markdownSummary = _summary; + exports2.summary = _summary; } -} - -module.exports.transport = __nccwpck_require__(91494) -module.exports.multistream = __nccwpck_require__(6878) - -module.exports.levels = mappings() -module.exports.stdSerializers = serializers -module.exports.stdTimeFunctions = Object.assign({}, time) -module.exports.symbols = symbols -module.exports.version = version - -// Enables default and name export with TypeScript and Babel -module.exports["default"] = pino -module.exports.pino = pino - - -/***/ }), - -/***/ 88525: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(79896) -const EventEmitter = __nccwpck_require__(24434) -const inherits = (__nccwpck_require__(39023).inherits) -const path = __nccwpck_require__(16928) -const sleep = __nccwpck_require__(12793) - -const BUSY_WRITE_TIMEOUT = 100 -const kEmptyBuffer = Buffer.allocUnsafe(0) - -// 16 KB. Don't write more than docker buffer size. -// https://github.com/moby/moby/blob/513ec73831269947d38a644c278ce3cac36783b2/daemon/logger/copier.go#L13 -const MAX_WRITE = 16 * 1024 - -const kContentModeBuffer = 'buffer' -const kContentModeUtf8 = 'utf8' - -function openFile (file, sonic) { - sonic._opening = true - sonic._writing = true - sonic._asyncDrainScheduled = false - - // NOTE: 'error' and 'ready' events emitted below only relevant when sonic.sync===false - // for sync mode, there is no way to add a listener that will receive these - - function fileOpened (err, fd) { - if (err) { - sonic._reopening = false - sonic._writing = false - sonic._opening = false +}); - if (sonic.sync) { - process.nextTick(() => { - if (sonic.listenerCount('error') > 0) { - sonic.emit('error', err) - } - }) - } else { - sonic.emit('error', err) +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js +var require_path_utils = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/path-utils.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); } - return - } - - const reopening = sonic._reopening - - sonic.fd = fd - sonic.file = file - sonic._reopening = false - sonic._opening = false - sonic._writing = false - - if (sonic.sync) { - process.nextTick(() => sonic.emit('ready')) - } else { - sonic.emit('ready') - } - - if (sonic.destroyed) { - return + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; + var path2 = __importStar(__require("path")); + function toPosixPath(pth) { + return pth.replace(/[\\]/g, "/"); } - - // start - if ((!sonic._writing && sonic._len > sonic.minLength) || sonic._flushPending) { - sonic._actualWrite() - } else if (reopening) { - process.nextTick(() => sonic.emit('drain')) + exports2.toPosixPath = toPosixPath; + function toWin32Path(pth) { + return pth.replace(/[/]/g, "\\"); } - } - - const flags = sonic.append ? 'a' : 'w' - const mode = sonic.mode - - if (sonic.sync) { - try { - if (sonic.mkdir) fs.mkdirSync(path.dirname(file), { recursive: true }) - const fd = fs.openSync(file, flags, mode) - fileOpened(null, fd) - } catch (err) { - fileOpened(err) - throw err + exports2.toWin32Path = toWin32Path; + function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path2.sep); } - } else if (sonic.mkdir) { - fs.mkdir(path.dirname(file), { recursive: true }, (err) => { - if (err) return fileOpened(err) - fs.open(file, flags, mode, fileOpened) - }) - } else { - fs.open(file, flags, mode, fileOpened) - } -} - -function SonicBoom (opts) { - if (!(this instanceof SonicBoom)) { - return new SonicBoom(opts) - } - - let { fd, dest, minLength, maxLength, maxWrite, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {} - - fd = fd || dest - - this._len = 0 - this.fd = -1 - this._bufs = [] - this._lens = [] - this._writing = false - this._ending = false - this._reopening = false - this._asyncDrainScheduled = false - this._flushPending = false - this._hwm = Math.max(minLength || 0, 16387) - this.file = null - this.destroyed = false - this.minLength = minLength || 0 - this.maxLength = maxLength || 0 - this.maxWrite = maxWrite || MAX_WRITE - this.sync = sync || false - this.writable = true - this._fsync = fsync || false - this.append = append || false - this.mode = mode - this.retryEAGAIN = retryEAGAIN || (() => true) - this.mkdir = mkdir || false - - let fsWriteSync - let fsWrite - if (contentMode === kContentModeBuffer) { - this._writingBuf = kEmptyBuffer - this.write = writeBuffer - this.flush = flushBuffer - this.flushSync = flushBufferSync - this._actualWrite = actualWriteBuffer - fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf) - fsWrite = () => fs.write(this.fd, this._writingBuf, this.release) - } else if (contentMode === undefined || contentMode === kContentModeUtf8) { - this._writingBuf = '' - this.write = write - this.flush = flush - this.flushSync = flushSync - this._actualWrite = actualWrite - fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf, 'utf8') - fsWrite = () => fs.write(this.fd, this._writingBuf, 'utf8', this.release) - } else { - throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`) - } - - if (typeof fd === 'number') { - this.fd = fd - process.nextTick(() => this.emit('ready')) - } else if (typeof fd === 'string') { - openFile(fd, this) - } else { - throw new Error('SonicBoom supports only file descriptors and files') - } - if (this.minLength >= this.maxWrite) { - throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`) + exports2.toPlatformPath = toPlatformPath; } +}); - this.release = (err, n) => { - if (err) { - if ((err.code === 'EAGAIN' || err.code === 'EBUSY') && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { - if (this.sync) { - // This error code should not happen in sync mode, because it is - // not using the underlining operating system asynchronous functions. - // However it happens, and so we handle it. - // Ref: https://github.com/pinojs/pino/issues/783 +// node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ + "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { try { - sleep(BUSY_WRITE_TIMEOUT) - this.release(undefined, 0) - } catch (err) { - this.release(err) + step(generator.next(value)); + } catch (e) { + reject(e); } - } else { - // Let's give the destination some time to process the chunk. - setTimeout(fsWrite, BUSY_WRITE_TIMEOUT) } - } else { - this._writing = false - - this.emit('error', err) - } - return - } - - this.emit('write', n) - const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n) - this._len = releasedBufObj.len - this._writingBuf = releasedBufObj.writingBuf - - if (this._writingBuf.length) { - if (!this.sync) { - fsWrite() - return - } - - try { - do { - const n = fsWriteSync() - const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n) - this._len = releasedBufObj.len - this._writingBuf = releasedBufObj.writingBuf - } while (this._writingBuf.length) - } catch (err) { - this.release(err) - return - } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a2; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar(__require("fs")); + var path2 = __importStar(__require("path")); + _a2 = fs2.promises, exports2.chmod = _a2.chmod, exports2.copyFile = _a2.copyFile, exports2.lstat = _a2.lstat, exports2.mkdir = _a2.mkdir, exports2.open = _a2.open, exports2.readdir = _a2.readdir, exports2.readlink = _a2.readlink, exports2.rename = _a2.rename, exports2.rm = _a2.rm, exports2.rmdir = _a2.rmdir, exports2.stat = _a2.stat, exports2.symlink = _a2.symlink, exports2.unlink = _a2.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); } - - if (this._fsync) { - fs.fsyncSync(this.fd) + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); } - - const len = this._len - if (this._reopening) { - this._writing = false - this._reopening = false - this.reopen() - } else if (len > this.minLength) { - this._actualWrite() - } else if (this._ending) { - if (len > 0) { - this._actualWrite() - } else { - this._writing = false - actualClose(this) + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); } - } else { - this._writing = false - if (this.sync) { - if (!this._asyncDrainScheduled) { - this._asyncDrainScheduled = true - process.nextTick(emitDrain, this) - } - } else { - this.emit('drain') + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); } + return p.startsWith("/"); } - } - - this.on('newListener', function (name) { - if (name === 'drain') { - this._asyncDrainScheduled = false - } - }) -} - -/** - * Release the writingBuf after fs.write n bytes data - * @param {string | Buffer} writingBuf - currently writing buffer, usually be instance._writingBuf. - * @param {number} len - currently buffer length, usually be instance._len. - * @param {number} n - number of bytes fs already written - * @returns {{writingBuf: string | Buffer, len: number}} released writingBuf and length - */ -function releaseWritingBuf (writingBuf, len, n) { - // if Buffer.byteLength is equal to n, that means writingBuf contains no multi-byte character - if (typeof writingBuf === 'string' && Buffer.byteLength(writingBuf) !== n) { - // Since the fs.write callback parameter `n` means how many bytes the passed of string - // We calculate the original string length for avoiding the multi-byte character issue - n = Buffer.from(writingBuf).subarray(0, n).toString().length - } - len = Math.max(len - n, 0) - writingBuf = writingBuf.slice(n) - return { writingBuf, len } -} - -function emitDrain (sonic) { - const hasListeners = sonic.listenerCount('drain') > 0 - if (!hasListeners) return - sonic._asyncDrainScheduled = false - sonic.emit('drain') -} - -inherits(SonicBoom, EventEmitter) - -function mergeBuf (bufs, len) { - if (bufs.length === 0) { - return kEmptyBuffer - } - - if (bufs.length === 1) { - return bufs[0] - } - - return Buffer.concat(bufs, len) -} - -function write (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - const len = this._len + data.length - const bufs = this._bufs - - if (this.maxLength && len > this.maxLength) { - this.emit('drop', data) - return this._len < this._hwm - } - - if ( - bufs.length === 0 || - bufs[bufs.length - 1].length + data.length > this.maxWrite - ) { - bufs.push('' + data) - } else { - bufs[bufs.length - 1] += data - } - - this._len = len - - if (!this._writing && this._len >= this.minLength) { - this._actualWrite() - } - - return this._len < this._hwm -} - -function writeBuffer (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - const len = this._len + data.length - const bufs = this._bufs - const lens = this._lens - - if (this.maxLength && len > this.maxLength) { - this.emit('drop', data) - return this._len < this._hwm - } - - if ( - bufs.length === 0 || - lens[lens.length - 1] + data.length > this.maxWrite - ) { - bufs.push([data]) - lens.push(data.length) - } else { - bufs[bufs.length - 1].push(data) - lens[lens.length - 1] += data.length - } - - this._len = len - - if (!this._writing && this._len >= this.minLength) { - this._actualWrite() - } - - return this._len < this._hwm -} - -function callFlushCallbackOnDrain (cb) { - this._flushPending = true - const onDrain = () => { - // only if _fsync is false to avoid double fsync - if (!this._fsync) { - fs.fsync(this.fd, (err) => { - this._flushPending = false - cb(err) - }) - } else { - this._flushPending = false - cb() + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); } - this.off('error', onError) - } - const onError = (err) => { - this._flushPending = false - cb(err) - this.off('drain', onDrain) - } - - this.once('drain', onDrain) - this.once('error', onError) -} - -function flush (cb) { - if (cb != null && typeof cb !== 'function') { - throw new Error('flush cb must be a function') - } - - if (this.destroyed) { - const error = new Error('SonicBoom destroyed') - if (cb) { - cb(error) - return + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); } - - throw error - } - - if (this.minLength <= 0) { - cb?.() - return - } - - if (cb) { - callFlushCallbackOnDrain.call(this, cb) - } - - if (this._writing) { - return - } - - if (this._bufs.length === 0) { - this._bufs.push('') - } - - this._actualWrite() -} - -function flushBuffer (cb) { - if (cb != null && typeof cb !== 'function') { - throw new Error('flush cb must be a function') - } - - if (this.destroyed) { - const error = new Error('SonicBoom destroyed') - if (cb) { - cb(error) - return + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); } - - throw error - } - - if (this.minLength <= 0) { - cb?.() - return - } - - if (cb) { - callFlushCallbackOnDrain.call(this, cb) - } - - if (this._writing) { - return - } - - if (this._bufs.length === 0) { - this._bufs.push([]) - this._lens.push(0) - } - - this._actualWrite() -} - -SonicBoom.prototype.reopen = function (file) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.reopen(file) - }) - return - } - - if (this._ending) { - return - } - - if (!this.file) { - throw new Error('Unable to reopen a file descriptor, you must pass a file to SonicBoom') - } - - if (file) { - this.file = file - } - this._reopening = true - - if (this._writing) { - return - } - - const fd = this.fd - this.once('ready', () => { - if (fd !== this.fd) { - fs.close(fd, (err) => { - if (err) { - return this.emit('error', err) - } - }) + function getCmdPath() { + var _a3; + return (_a3 = process.env["COMSPEC"]) !== null && _a3 !== void 0 ? _a3 : `cmd.exe`; } - }) - - openFile(this.file, this) -} - -SonicBoom.prototype.end = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.end() - }) - return - } - - if (this._ending) { - return - } - - this._ending = true - - if (this._writing) { - return - } - - if (this._len > 0 && this.fd >= 0) { - this._actualWrite() - } else { - actualClose(this) - } -} - -function flushSync () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - if (!this._writing && this._writingBuf.length > 0) { - this._bufs.unshift(this._writingBuf) - this._writingBuf = '' + exports2.getCmdPath = getCmdPath; } +}); - let buf = '' - while (this._bufs.length || buf) { - if (buf.length <= 0) { - buf = this._bufs[0] - } - try { - const n = fs.writeSync(this.fd, buf, 'utf8') - const releasedBufObj = releaseWritingBuf(buf, this._len, n) - buf = releasedBufObj.writingBuf - this._len = releasedBufObj.len - if (buf.length <= 0) { - this._bufs.shift() +// node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ + "node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - } catch (err) { - const shouldRetry = err.code === 'EAGAIN' || err.code === 'EBUSY' - if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { - throw err + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - - sleep(BUSY_WRITE_TIMEOUT) + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = __require("assert"); + var path2 = __importStar(__require("path")); + var ioUtil = __importStar(require_io_util()); + function cp(source, dest, options2 = {}) { + return __awaiter(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options2); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); } - } - - try { - fs.fsyncSync(this.fd) - } catch { - // Skip the error. The fd might not support fsync. - } -} - -function flushBufferSync () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - if (!this._writing && this._writingBuf.length > 0) { - this._bufs.unshift([this._writingBuf]) - this._writingBuf = kEmptyBuffer - } - - let buf = kEmptyBuffer - while (this._bufs.length || buf.length) { - if (buf.length <= 0) { - buf = mergeBuf(this._bufs[0], this._lens[0]) + exports2.cp = cp; + function mv(source, dest, options2 = {}) { + return __awaiter(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options2.force == null || options2.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); } - try { - const n = fs.writeSync(this.fd, buf) - buf = buf.subarray(n) - this._len = Math.max(this._len - n, 0) - if (buf.length <= 0) { - this._bufs.shift() - this._lens.shift() - } - } catch (err) { - const shouldRetry = err.code === 'EAGAIN' || err.code === 'EBUSY' - if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { - throw err - } - - sleep(BUSY_WRITE_TIMEOUT) + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); } - } -} - -SonicBoom.prototype.destroy = function () { - if (this.destroyed) { - return - } - actualClose(this) -} - -function actualWrite () { - const release = this.release - this._writing = true - this._writingBuf = this._writingBuf || this._bufs.shift() || '' - - if (this.sync) { - try { - const written = fs.writeSync(this.fd, this._writingBuf, 'utf8') - release(null, written) - } catch (err) { - release(err) + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); } - } else { - fs.write(this.fd, this._writingBuf, 'utf8', release) - } -} - -function actualWriteBuffer () { - const release = this.release - this._writing = true - this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()) - - if (this.sync) { - try { - const written = fs.writeSync(this.fd, this._writingBuf) - release(null, written) - } catch (err) { - release(err) + exports2.mkdirP = mkdirP; + function which(tool, check) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); } - } else { - fs.write(this.fd, this._writingBuf, release) - } -} - -function actualClose (sonic) { - if (sonic.fd === -1) { - sonic.once('ready', actualClose.bind(null, sonic)) - return - } - - sonic.destroyed = true - sonic._bufs = [] - sonic._lens = [] - - fs.fsync(sonic.fd, closeWrapped) - - function closeWrapped () { - // We skip errors in fsync - - if (sonic.fd !== 1 && sonic.fd !== 2) { - fs.close(sonic.fd, done) - } else { - done() + exports2.which = which; + function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); } - } - - function done (err) { - if (err) { - sonic.emit('error', err) - return + exports2.findInPath = findInPath; + function readCopyOptions(options2) { + const force = options2.force == null ? true : options2.force; + const recursive = Boolean(options2.recursive); + const copySourceDirectory = options2.copySourceDirectory == null ? true : Boolean(options2.copySourceDirectory); + return { force, recursive, copySourceDirectory }; } - - if (sonic._ending && !sonic._writing) { - sonic.emit('finish') + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); } - sonic.emit('close') } -} - -/** - * These export configurations enable JS and TS developers - * to consumer SonicBoom in whatever way best suits their needs. - * Some examples of supported import syntax includes: - * - `const SonicBoom = require('SonicBoom')` - * - `const { SonicBoom } = require('SonicBoom')` - * - `import * as SonicBoom from 'SonicBoom'` - * - `import { SonicBoom } from 'SonicBoom'` - * - `import SonicBoom from 'SonicBoom'` - */ -SonicBoom.SonicBoom = SonicBoom -SonicBoom.default = SonicBoom -module.exports = SonicBoom - - -/***/ }), - -/***/ 91265: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = __nccwpck_require__(79896) -const EventEmitter = __nccwpck_require__(24434) -const inherits = (__nccwpck_require__(39023).inherits) -const path = __nccwpck_require__(16928) -const sleep = __nccwpck_require__(12793) -const assert = __nccwpck_require__(42613) - -const BUSY_WRITE_TIMEOUT = 100 -const kEmptyBuffer = Buffer.allocUnsafe(0) - -// 16 KB. Don't write more than docker buffer size. -// https://github.com/moby/moby/blob/513ec73831269947d38a644c278ce3cac36783b2/daemon/logger/copier.go#L13 -const MAX_WRITE = 16 * 1024 - -const kContentModeBuffer = 'buffer' -const kContentModeUtf8 = 'utf8' - -const [major, minor] = (process.versions.node || '0.0').split('.').map(Number) -const kCopyBuffer = major >= 22 && minor >= 7 - -function openFile (file, sonic) { - sonic._opening = true - sonic._writing = true - sonic._asyncDrainScheduled = false - - // NOTE: 'error' and 'ready' events emitted below only relevant when sonic.sync===false - // for sync mode, there is no way to add a listener that will receive these - - function fileOpened (err, fd) { - if (err) { - sonic._reopening = false - sonic._writing = false - sonic._opening = false +}); - if (sonic.sync) { - process.nextTick(() => { - if (sonic.listenerCount('error') > 0) { - sonic.emit('error', err) +// node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ + "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os3 = __importStar(__require("os")); + var events = __importStar(__require("events")); + var child = __importStar(__require("child_process")); + var path2 = __importStar(__require("path")); + var io = __importStar(require_io()); + var ioUtil = __importStar(require_io_util()); + var timers_1 = __require("timers"); + var IS_WINDOWS = process.platform === "win32"; + var ToolRunner = class extends events.EventEmitter { + constructor(toolPath, args, options2) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options2 || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options2, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options2); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options2.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os3.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os3.EOL.length); + n = s.indexOf(os3.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options2) { + if (IS_WINDOWS) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options2.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str2, end2) { + return str2.endsWith(end2); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; + } + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; + } + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options2) { + options2 = options2 || {}; + const result = { + cwd: options2.cwd || process.cwd(), + env: options2.env || process.env, + silent: options2.silent || false, + windowsVerbatimArguments: options2.windowsVerbatimArguments || false, + failOnStdErr: options2.failOnStdErr || false, + ignoreReturnCode: options2.ignoreReturnCode || false, + delay: options2.delay || 1e4 + }; + result.outStream = options2.outStream || process.stdout; + result.errStream = options2.errStream || process.stderr; + return result; + } + _getSpawnOptions(options2, toolPath) { + options2 = options2 || {}; + const result = {}; + result.cwd = options2.cwd; + result.env = options2.env; + result["windowsVerbatimArguments"] = options2.windowsVerbatimArguments || this._isCmdFile(); + if (options2.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { + this.toolPath = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } - }) - } else { - sonic.emit('error', err) + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve4, reject) => __awaiter(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os3.EOL); + } + const state = new ExecState(optionsNonNull, this.toolPath); + state.on("debug", (message) => { + this._debug(message); + }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); + } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); + } + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); + }); + } + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); + } + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } + }); + }); + } + cp.on("error", (err) => { + state.processError = err.message; + state.processExited = true; + state.processClosed = true; + state.CheckComplete(); + }); + cp.on("exit", (code) => { + state.processExitCode = code; + state.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state.CheckComplete(); + }); + cp.on("close", (code) => { + state.processExitCode = code; + state.processExited = true; + state.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state.CheckComplete(); + }); + state.on("done", (error, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error) { + reject(error); + } else { + resolve4(exitCode); + } + }); + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); + } + })); + }); } - return - } - - const reopening = sonic._reopening - - sonic.fd = fd - sonic.file = file - sonic._reopening = false - sonic._opening = false - sonic._writing = false - - if (sonic.sync) { - process.nextTick(() => sonic.emit('ready')) - } else { - sonic.emit('ready') - } - - if (sonic.destroyed) { - return - } - - // start - if ((!sonic._writing && sonic._len > sonic.minLength) || sonic._flushPending) { - sonic._actualWrite() - } else if (reopening) { - process.nextTick(() => sonic.emit('drain')) - } - } - - const flags = sonic.append ? 'a' : 'w' - const mode = sonic.mode - - if (sonic.sync) { - try { - if (sonic.mkdir) fs.mkdirSync(path.dirname(file), { recursive: true }) - const fd = fs.openSync(file, flags, mode) - fileOpened(null, fd) - } catch (err) { - fileOpened(err) - throw err - } - } else if (sonic.mkdir) { - fs.mkdir(path.dirname(file), { recursive: true }, (err) => { - if (err) return fileOpened(err) - fs.open(file, flags, mode, fileOpened) - }) - } else { - fs.open(file, flags, mode, fileOpened) - } -} - -function SonicBoom (opts) { - if (!(this instanceof SonicBoom)) { - return new SonicBoom(opts) - } - - let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {} - - fd = fd || dest - - this._len = 0 - this.fd = -1 - this._bufs = [] - this._lens = [] - this._writing = false - this._ending = false - this._reopening = false - this._asyncDrainScheduled = false - this._flushPending = false - this._hwm = Math.max(minLength || 0, 16387) - this.file = null - this.destroyed = false - this.minLength = minLength || 0 - this.maxLength = maxLength || 0 - this.maxWrite = maxWrite || MAX_WRITE - this._periodicFlush = periodicFlush || 0 - this._periodicFlushTimer = undefined - this.sync = sync || false - this.writable = true - this._fsync = fsync || false - this.append = append || false - this.mode = mode - this.retryEAGAIN = retryEAGAIN || (() => true) - this.mkdir = mkdir || false - - let fsWriteSync - let fsWrite - if (contentMode === kContentModeBuffer) { - this._writingBuf = kEmptyBuffer - this.write = writeBuffer - this.flush = flushBuffer - this.flushSync = flushBufferSync - this._actualWrite = actualWriteBuffer - fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf) - fsWrite = () => fs.write(this.fd, this._writingBuf, this.release) - } else if (contentMode === undefined || contentMode === kContentModeUtf8) { - this._writingBuf = '' - this.write = write - this.flush = flush - this.flushSync = flushSync - this._actualWrite = actualWrite - fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf, 'utf8') - fsWrite = () => fs.write(this.fd, this._writingBuf, 'utf8', this.release) - } else { - throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`) - } - - if (typeof fd === 'number') { - this.fd = fd - process.nextTick(() => this.emit('ready')) - } else if (typeof fd === 'string') { - openFile(fd, this) - } else { - throw new Error('SonicBoom supports only file descriptors and files') - } - if (this.minLength >= this.maxWrite) { - throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`) - } - - this.release = (err, n) => { - if (err) { - if ((err.code === 'EAGAIN' || err.code === 'EBUSY') && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { - if (this.sync) { - // This error code should not happen in sync mode, because it is - // not using the underlining operating system asynchronous functions. - // However it happens, and so we handle it. - // Ref: https://github.com/pinojs/pino/issues/783 - try { - sleep(BUSY_WRITE_TIMEOUT) - this.release(undefined, 0) - } catch (err) { - this.release(err) + }; + exports2.ToolRunner = ToolRunner; + function argStringToArray(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); } - } else { - // Let's give the destination some time to process the chunk. - setTimeout(fsWrite, BUSY_WRITE_TIMEOUT) + continue; } - } else { - this._writing = false - - this.emit('error', err) + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; + } + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); } - return + return args; } - - this.emit('write', n) - const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n) - this._len = releasedBufObj.len - this._writingBuf = releasedBufObj.writingBuf - - if (this._writingBuf.length) { - if (!this.sync) { - fsWrite() - return + exports2.argStringToArray = argStringToArray; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options2, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options2; + this.toolPath = toolPath; + if (options2.delay) { + this.delay = options2.delay; + } } - - try { - do { - const n = fsWriteSync() - const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n) - this._len = releasedBufObj.len - this._writingBuf = releasedBufObj.writingBuf - } while (this._writingBuf.length) - } catch (err) { - this.release(err) - return + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } } - } - - if (this._fsync) { - fs.fsyncSync(this.fd) - } - - const len = this._len - if (this._reopening) { - this._writing = false - this._reopening = false - this.reopen() - } else if (len > this.minLength) { - this._actualWrite() - } else if (this._ending) { - if (len > 0) { - this._actualWrite() - } else { - this._writing = false - actualClose(this) + _debug(message) { + this.emit("debug", message); } - } else { - this._writing = false - if (this.sync) { - if (!this._asyncDrainScheduled) { - this._asyncDrainScheduled = true - process.nextTick(emitDrain, this) + _setResult() { + let error; + if (this.processExited) { + if (this.processError) { + error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); + } } - } else { - this.emit('drain') + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error, this.processExitCode); } - } - } - - this.on('newListener', function (name) { - if (name === 'drain') { - this._asyncDrainScheduled = false - } - }) - - if (this._periodicFlush !== 0) { - this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush) - this._periodicFlushTimer.unref() - } -} - -/** - * Release the writingBuf after fs.write n bytes data - * @param {string | Buffer} writingBuf - currently writing buffer, usually be instance._writingBuf. - * @param {number} len - currently buffer length, usually be instance._len. - * @param {number} n - number of bytes fs already written - * @returns {{writingBuf: string | Buffer, len: number}} released writingBuf and length - */ -function releaseWritingBuf (writingBuf, len, n) { - // if Buffer.byteLength is equal to n, that means writingBuf contains no multi-byte character - if (typeof writingBuf === 'string' && Buffer.byteLength(writingBuf) !== n) { - // Since the fs.write callback parameter `n` means how many bytes the passed of string - // We calculate the original string length for avoiding the multi-byte character issue - n = Buffer.from(writingBuf).subarray(0, n).toString().length - } - len = Math.max(len - n, 0) - writingBuf = writingBuf.slice(n) - return { writingBuf, len } -} - -function emitDrain (sonic) { - const hasListeners = sonic.listenerCount('drain') > 0 - if (!hasListeners) return - sonic._asyncDrainScheduled = false - sonic.emit('drain') -} - -inherits(SonicBoom, EventEmitter) - -function mergeBuf (bufs, len) { - if (bufs.length === 0) { - return kEmptyBuffer - } - - if (bufs.length === 1) { - return bufs[0] - } - - return Buffer.concat(bufs, len) -} - -function write (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - const len = this._len + data.length - const bufs = this._bufs - - if (this.maxLength && len > this.maxLength) { - this.emit('drop', data) - return this._len < this._hwm - } - - if ( - bufs.length === 0 || - bufs[bufs.length - 1].length + data.length > this.maxWrite - ) { - bufs.push('' + data) - } else { - bufs[bufs.length - 1] += data - } - - this._len = len - - if (!this._writing && this._len >= this.minLength) { - this._actualWrite() - } - - return this._len < this._hwm -} - -function writeBuffer (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - const len = this._len + data.length - const bufs = this._bufs - const lens = this._lens - - if (this.maxLength && len > this.maxLength) { - this.emit('drop', data) - return this._len < this._hwm - } - - if ( - bufs.length === 0 || - lens[lens.length - 1] + data.length > this.maxWrite - ) { - bufs.push([data]) - lens.push(data.length) - } else { - bufs[bufs.length - 1].push(data) - lens[lens.length - 1] += data.length - } - - this._len = len - - if (!this._writing && this._len >= this.minLength) { - this._actualWrite() - } - - return this._len < this._hwm -} - -function callFlushCallbackOnDrain (cb) { - this._flushPending = true - const onDrain = () => { - // only if _fsync is false to avoid double fsync - if (!this._fsync) { - try { - fs.fsync(this.fd, (err) => { - this._flushPending = false - cb(err) - }) - } catch (err) { - cb(err) + static HandleTimeout(state) { + if (state.done) { + return; + } + if (!state.processClosed && state.processExited) { + const message = `The STDIO streams did not close within ${state.delay / 1e3} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state._debug(message); + } + state._setResult(); } - } else { - this._flushPending = false - cb() - } - this.off('error', onError) - } - const onError = (err) => { - this._flushPending = false - cb(err) - this.off('drain', onDrain) - } - - this.once('drain', onDrain) - this.once('error', onError) -} - -function flush (cb) { - if (cb != null && typeof cb !== 'function') { - throw new Error('flush cb must be a function') + }; } +}); - if (this.destroyed) { - const error = new Error('SonicBoom destroyed') - if (cb) { - cb(error) - return +// node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = __require("string_decoder"); + var tr = __importStar(require_toolrunner()); + function exec(commandLine, args, options2) { + return __awaiter(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options2); + return runner.exec(); + }); } - - throw error - } - - if (this.minLength <= 0) { - cb?.() - return - } - - if (cb) { - callFlushCallbackOnDrain.call(this, cb) - } - - if (this._writing) { - return - } - - if (this._bufs.length === 0) { - this._bufs.push('') - } - - this._actualWrite() -} - -function flushBuffer (cb) { - if (cb != null && typeof cb !== 'function') { - throw new Error('flush cb must be a function') - } - - if (this.destroyed) { - const error = new Error('SonicBoom destroyed') - if (cb) { - cb(error) - return + exports2.exec = exec; + function getExecOutput(commandLine, args, options2) { + var _a2, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a2 = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _a2 === void 0 ? void 0 : _a2.stdout; + const originalStdErrListener = (_b = options2 === null || options2 === void 0 ? void 0 : options2.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options2 === null || options2 === void 0 ? void 0 : options2.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options2), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); } - - throw error - } - - if (this.minLength <= 0) { - cb?.() - return - } - - if (cb) { - callFlushCallbackOnDrain.call(this, cb) - } - - if (this._writing) { - return - } - - if (this._bufs.length === 0) { - this._bufs.push([]) - this._lens.push(0) - } - - this._actualWrite() -} - -SonicBoom.prototype.reopen = function (file) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.reopen(file) - }) - return - } - - if (this._ending) { - return - } - - if (!this.file) { - throw new Error('Unable to reopen a file descriptor, you must pass a file to SonicBoom') - } - - if (file) { - this.file = file - } - this._reopening = true - - if (this._writing) { - return + exports2.getExecOutput = getExecOutput; } +}); - const fd = this.fd - this.once('ready', () => { - if (fd !== this.fd) { - fs.close(fd, (err) => { - if (err) { - return this.emit('error', err) +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js +var require_platform = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/platform.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; + var os_1 = __importDefault(__require("os")); + var exec = __importStar(require_exec()); + var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + silent: true + }); + const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + silent: true + }); + return { + name: name.trim(), + version: version.trim() + }; + }); + var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { + var _a2, _b, _c, _d; + const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + silent: true + }); + const version = (_b = (_a2 = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a2 === void 0 ? void 0 : _a2[1]) !== null && _b !== void 0 ? _b : ""; + const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; + return { + name, + version + }; + }); + var getLinuxInfo2 = () => __awaiter(void 0, void 0, void 0, function* () { + const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + silent: true + }); + const [name, version] = stdout.trim().split("\n"); + return { + name, + version + }; + }); + exports2.platform = os_1.default.platform(); + exports2.arch = os_1.default.arch(); + exports2.isWindows = exports2.platform === "win32"; + exports2.isMacOS = exports2.platform === "darwin"; + exports2.isLinux = exports2.platform === "linux"; + function getDetails() { + return __awaiter(this, void 0, void 0, function* () { + return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo2()), { + platform: exports2.platform, + arch: exports2.arch, + isWindows: exports2.isWindows, + isMacOS: exports2.isMacOS, + isLinux: exports2.isLinux + }); + }); } - }) - - openFile(this.file, this) -} - -SonicBoom.prototype.end = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.end() - }) - return - } - - if (this._ending) { - return - } - - this._ending = true - - if (this._writing) { - return - } - - if (this._len > 0 && this.fd >= 0) { - this._actualWrite() - } else { - actualClose(this) - } -} - -function flushSync () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - if (!this._writing && this._writingBuf.length > 0) { - this._bufs.unshift(this._writingBuf) - this._writingBuf = '' + exports2.getDetails = getDetails; } +}); - let buf = '' - while (this._bufs.length || buf) { - if (buf.length <= 0) { - buf = this._bufs[0] - } - try { - const n = fs.writeSync(this.fd, buf, 'utf8') - const releasedBufObj = releaseWritingBuf(buf, this._len, n) - buf = releasedBufObj.writingBuf - this._len = releasedBufObj.len - if (buf.length <= 0) { - this._bufs.shift() +// node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js +var require_core2 = __commonJS({ + "node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__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)) __createBinding(result, mod, k); } - } catch (err) { - const shouldRetry = err.code === 'EAGAIN' || err.code === 'EBUSY' - if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { - throw err + __setModuleDefault(result, mod); + return result; + }; + var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); } - - sleep(BUSY_WRITE_TIMEOUT) - } - } - - try { - fs.fsyncSync(this.fd) - } catch { - // Skip the error. The fd might not support fsync. - } -} - -function flushBufferSync () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - if (!this._writing && this._writingBuf.length > 0) { - this._bufs.unshift([this._writingBuf]) - this._writingBuf = kEmptyBuffer - } - - let buf = kEmptyBuffer - while (this._bufs.length || buf.length) { - if (buf.length <= 0) { - buf = mergeBuf(this._bufs[0], this._lens[0]) + return new (P || (P = Promise))(function(resolve4, 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 ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; + var command_1 = require_command2(); + var file_command_1 = require_file_command(); + var utils_1 = require_utils6(); + var os3 = __importStar(__require("os")); + var path2 = __importStar(__require("path")); + var oidc_utils_1 = require_oidc_utils(); + var ExitCode; + (function(ExitCode2) { + ExitCode2[ExitCode2["Success"] = 0] = "Success"; + ExitCode2[ExitCode2["Failure"] = 1] = "Failure"; + })(ExitCode || (exports2.ExitCode = ExitCode = {})); + function exportVariable(name, val) { + const convertedVal = (0, utils_1.toCommandValue)(val); + process.env[name] = convertedVal; + const filePath = process.env["GITHUB_ENV"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); + } + (0, command_1.issueCommand)("set-env", { name }, convertedVal); + } + exports2.exportVariable = exportVariable; + function setSecret(secret) { + (0, command_1.issueCommand)("add-mask", {}, secret); + } + exports2.setSecret = setSecret; + function addPath(inputPath) { + const filePath = process.env["GITHUB_PATH"] || ""; + if (filePath) { + (0, file_command_1.issueFileCommand)("PATH", inputPath); + } else { + (0, command_1.issueCommand)("add-path", {}, inputPath); + } + process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; } - try { - const n = fs.writeSync(this.fd, buf) - buf = buf.subarray(n) - this._len = Math.max(this._len - n, 0) - if (buf.length <= 0) { - this._bufs.shift() - this._lens.shift() + exports2.addPath = addPath; + function getInput(name, options2) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options2 && options2.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); } - } catch (err) { - const shouldRetry = err.code === 'EAGAIN' || err.code === 'EBUSY' - if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { - throw err + if (options2 && options2.trimWhitespace === false) { + return val; } - - sleep(BUSY_WRITE_TIMEOUT) - } - } -} - -SonicBoom.prototype.destroy = function () { - if (this.destroyed) { - return - } - actualClose(this) -} - -function actualWrite () { - const release = this.release - this._writing = true - this._writingBuf = this._writingBuf || this._bufs.shift() || '' - - if (this.sync) { - try { - const written = fs.writeSync(this.fd, this._writingBuf, 'utf8') - release(null, written) - } catch (err) { - release(err) + return val.trim(); } - } else { - fs.write(this.fd, this._writingBuf, 'utf8', release) - } -} - -function actualWriteBuffer () { - const release = this.release - this._writing = true - this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()) - - if (this.sync) { - try { - const written = fs.writeSync(this.fd, this._writingBuf) - release(null, written) - } catch (err) { - release(err) + exports2.getInput = getInput; + function getMultilineInput(name, options2) { + const inputs = getInput(name, options2).split("\n").filter((x) => x !== ""); + if (options2 && options2.trimWhitespace === false) { + return inputs; + } + return inputs.map((input) => input.trim()); } - } else { - // fs.write will need to copy string to buffer anyway so - // we do it here to avoid the overhead of calculating the buffer size - // in releaseWritingBuf. - if (kCopyBuffer) { - this._writingBuf = Buffer.from(this._writingBuf) + exports2.getMultilineInput = getMultilineInput; + function getBooleanInput(name, options2) { + const trueValue = ["true", "True", "TRUE"]; + const falseValue = ["false", "False", "FALSE"]; + const val = getInput(name, options2); + 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} +Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); + } + exports2.getBooleanInput = getBooleanInput; + function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + process.stdout.write(os3.EOL); + (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); + } + exports2.setOutput = setOutput; + function setCommandEcho(enabled) { + (0, command_1.issue)("echo", enabled ? "on" : "off"); + } + exports2.setCommandEcho = setCommandEcho; + function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); + } + exports2.setFailed = setFailed; + function isDebug() { + return process.env["RUNNER_DEBUG"] === "1"; + } + exports2.isDebug = isDebug; + function debug3(message) { + (0, command_1.issueCommand)("debug", {}, message); + } + exports2.debug = debug3; + function error(message, properties = {}) { + (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.error = error; + function warning(message, properties = {}) { + (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.warning = warning; + function notice(message, properties = {}) { + (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); + } + exports2.notice = notice; + function info(message) { + process.stdout.write(message + os3.EOL); + } + exports2.info = info; + function startGroup(name) { + (0, command_1.issue)("group", name); + } + exports2.startGroup = startGroup; + function endGroup() { + (0, command_1.issue)("endgroup"); + } + exports2.endGroup = endGroup; + function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } finally { + endGroup(); + } + return result; + }); } - fs.write(this.fd, this._writingBuf, release) - } -} - -function actualClose (sonic) { - if (sonic.fd === -1) { - sonic.once('ready', actualClose.bind(null, sonic)) - return - } - - if (sonic._periodicFlushTimer !== undefined) { - clearInterval(sonic._periodicFlushTimer) - } - - sonic.destroyed = true - sonic._bufs = [] - sonic._lens = [] - - assert(typeof sonic.fd === 'number', `sonic.fd must be a number, got ${typeof sonic.fd}`) - try { - fs.fsync(sonic.fd, closeWrapped) - } catch { - } - - function closeWrapped () { - // We skip errors in fsync - - if (sonic.fd !== 1 && sonic.fd !== 2) { - fs.close(sonic.fd, done) - } else { - done() + exports2.group = group; + function saveState(name, value) { + const filePath = process.env["GITHUB_STATE"] || ""; + if (filePath) { + return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); + } + (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); } - } - - function done (err) { - if (err) { - sonic.emit('error', err) - return + exports2.saveState = saveState; + function getState2(name) { + return process.env[`STATE_${name}`] || ""; } - - if (sonic._ending && !sonic._writing) { - sonic.emit('finish') + exports2.getState = getState2; + function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); } - sonic.emit('close') + exports2.getIDToken = getIDToken; + var summary_1 = require_summary(); + Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { + return summary_1.summary; + } }); + var summary_2 = require_summary(); + Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { + return summary_2.markdownSummary; + } }); + var path_utils_1 = require_path_utils(); + Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { + return path_utils_1.toPosixPath; + } }); + Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { + return path_utils_1.toWin32Path; + } }); + Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { + return path_utils_1.toPlatformPath; + } }); + exports2.platform = __importStar(require_platform()); } -} - -/** - * These export configurations enable JS and TS developers - * to consumer SonicBoom in whatever way best suits their needs. - * Some examples of supported import syntax includes: - * - `const SonicBoom = require('SonicBoom')` - * - `const { SonicBoom } = require('SonicBoom')` - * - `import * as SonicBoom from 'SonicBoom'` - * - `import { SonicBoom } from 'SonicBoom'` - * - `import SonicBoom from 'SonicBoom'` - */ -SonicBoom.SonicBoom = SonicBoom -SonicBoom.default = SonicBoom -module.exports = SonicBoom - - -/***/ }), - -/***/ 14700: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const tty = __nccwpck_require__(52018) - -const env = process.env - -const isDisabled = "NO_COLOR" in env -const isForced = "FORCE_COLOR" in env -const isWindows = process.platform === "win32" - -const isCompatibleTerminal = - tty && tty.isatty(1) && env.TERM && env.TERM !== "dumb" - -const isCI = - "CI" in env && - ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env) - -let enabled = - !isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI) - -const raw = (open, close, searchRegex, replaceValue) => (s) => - enabled - ? open + - (~(s += "").indexOf(close, 4) // skip opening \x1b[ - ? s.replace(searchRegex, replaceValue) - : s) + - close - : s - -const init = (open, close) => { - return raw( - `\x1b[${open}m`, - `\x1b[${close}m`, - new RegExp(`\\x1b\\[${close}m`, "g"), - `\x1b[${open}m` - ) -} +}); -exports.options = Object.defineProperty({}, "enabled", { - get: () => enabled, - set: (value) => (enabled = value), -}) - -exports.reset = init(0, 0) -exports.bold = raw("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m") -exports.dim = raw("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m") -exports.italic = init(3, 23) -exports.underline = init(4, 24) -exports.inverse = init(7, 27) -exports.hidden = init(8, 28) -exports.strikethrough = init(9, 29) -exports.black = init(30, 39) -exports.red = init(31, 39) -exports.green = init(32, 39) -exports.yellow = init(33, 39) -exports.blue = init(34, 39) -exports.magenta = init(35, 39) -exports.cyan = init(36, 39) -exports.white = init(37, 39) -exports.gray = init(90, 39) -exports.bgBlack = init(40, 49) -exports.bgRed = init(41, 49) -exports.bgGreen = init(42, 49) -exports.bgYellow = init(43, 49) -exports.bgBlue = init(44, 49) -exports.bgMagenta = init(45, 49) -exports.bgCyan = init(46, 49) -exports.bgWhite = init(47, 49) -exports.blackBright = init(90, 39) -exports.redBright = init(91, 39) -exports.greenBright = init(92, 39) -exports.yellowBright = init(93, 39) -exports.blueBright = init(94, 39) -exports.magentaBright = init(95, 39) -exports.cyanBright = init(96, 39) -exports.whiteBright = init(97, 39) -exports.bgBlackBright = init(100, 49) -exports.bgRedBright = init(101, 49) -exports.bgGreenBright = init(102, 49) -exports.bgYellowBright = init(103, 49) -exports.bgBlueBright = init(104, 49) -exports.bgMagentaBright = init(105, 49) -exports.bgCyanBright = init(106, 49) -exports.bgWhiteBright = init(107, 49) - - -/***/ }), - -/***/ 94825: -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { - -"use strict"; -// ESM COMPAT FLAG -__nccwpck_require__.r(__webpack_exports__); - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - Context: () => (/* reexport */ lib.Context), - Probot: () => (/* reexport */ lib.Probot), - ProbotOctokit: () => (/* reexport */ lib.ProbotOctokit), - Server: () => (/* reexport */ lib.Server), - __esModule: () => (/* reexport */ /* __esModule */true), - createNodeMiddleware: () => (/* reexport */ lib.createNodeMiddleware), - createProbot: () => (/* reexport */ lib.createProbot), - run: () => (/* binding */ run) -}); - -// EXTERNAL MODULE: ./node_modules/.pnpm/probot@13.4.0/node_modules/probot/lib/index.js -var lib = __nccwpck_require__(43778); -// EXTERNAL MODULE: ./node_modules/.pnpm/pino@8.21.0/node_modules/pino/pino.js -var pino = __nccwpck_require__(6014); -// EXTERNAL MODULE: external "node:fs" -var external_node_fs_ = __nccwpck_require__(73024); -// EXTERNAL MODULE: external "util" -var external_util_ = __nccwpck_require__(39023); -// EXTERNAL MODULE: ./node_modules/.pnpm/through2@4.0.2/node_modules/through2/through2.js -var through2 = __nccwpck_require__(31267); -// EXTERNAL MODULE: ./node_modules/.pnpm/@actions+core@1.11.1/node_modules/@actions/core/lib/core.js -var core = __nccwpck_require__(59999); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@probot+adapter-github-actions@4.0.0/node_modules/@probot/adapter-github-actions/pino-transport-github-actions.js - - - - - - -const LEVEL_TO_ACTIONS_CORE_LOG_METHOD = { +// node_modules/.pnpm/@probot+adapter-github-actions@4.0.0/node_modules/@probot/adapter-github-actions/index.js +var adapter_github_actions_exports = {}; +__export(adapter_github_actions_exports, { + run: () => run +}); +__reExport(adapter_github_actions_exports, __toESM(require_lib6(), 1)); +var import_probot = __toESM(require_lib6(), 1); +var import_pino2 = __toESM(require_pino3(), 1); +import { readFileSync as readFileSync3 } from "node:fs"; + +// node_modules/.pnpm/@probot+adapter-github-actions@4.0.0/node_modules/@probot/adapter-github-actions/pino-transport-github-actions.js +var import_through2 = __toESM(require_through2(), 1); +var import_core38 = __toESM(require_core2(), 1); +var import_pino = __toESM(require_pino3(), 1); +import { inspect } from "util"; +var LEVEL_TO_ACTIONS_CORE_LOG_METHOD = { trace: "debug", debug: "debug", info: "info", warn: "warning", error: "error", - fatal: "error", + fatal: "error" }; - -const transport = through2.obj(function (chunk, enc, cb) { - const { level, hostname, pid, msg, time, ...meta } = JSON.parse(chunk); - const levelLabel = pino.levels.labels[level] || level; +var transport = import_through2.default.obj(function(chunk, enc, cb) { + const { level, hostname: hostname2, pid, msg, time, ...meta } = JSON.parse(chunk); + const levelLabel = import_pino.default.levels.labels[level] || level; const logMethodName = LEVEL_TO_ACTIONS_CORE_LOG_METHOD[levelLabel]; - const output = [ msg, - Object.keys(meta).length ? (0,external_util_.inspect)(meta, { depth: Infinity }) : "", - ] - .join("\n") - .trim(); - - if (logMethodName in core) { - core[logMethodName](output); + Object.keys(meta).length ? inspect(meta, { depth: Infinity }) : "" + ].join("\n").trim(); + if (logMethodName in import_core38.default) { + import_core38.default[logMethodName](output); } else { - core.error(`"${level}" is not a known log level - ${output}`); + import_core38.default.error(`"${level}" is not a known log level - ${output}`); } - cb(); }); -;// CONCATENATED MODULE: ./node_modules/.pnpm/@probot+adapter-github-actions@4.0.0/node_modules/@probot/adapter-github-actions/index.js - - - - - - - +// node_modules/.pnpm/@probot+adapter-github-actions@4.0.0/node_modules/@probot/adapter-github-actions/index.js async function run(app) { - const log = pino({}, transport); - - const githubToken = - process.env.GITHUB_TOKEN || - process.env.INPUT_GITHUB_TOKEN || - process.env.INPUT_TOKEN; - + const log2 = (0, import_pino2.default)({}, transport); + const githubToken = process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN || process.env.INPUT_TOKEN; if (!githubToken) { - log.error( + log2.error( "[probot/adapter-github-actions] a token must be passed as `env.GITHUB_TOKEN` or `with.GITHUB_TOKEN` or `with.token`, see https://github.com/probot/adapter-github-actions#usage" ); return; } - const envVariablesMissing = [ "GITHUB_RUN_ID", "GITHUB_EVENT_NAME", - "GITHUB_EVENT_PATH", + "GITHUB_EVENT_PATH" ].filter((name) => !process.env[name]); - if (envVariablesMissing.length) { - log.error( + log2.error( `[probot/adapter-github-actions] GitHub Action default environment variables missing: ${envVariablesMissing.join( ", " )}. See https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables` ); return; } - - const probot = (0,lib.createProbot)({ + const probot = (0, import_probot.createProbot)({ overrides: { githubToken, - log, - }, + log: log2 + } }); - await probot.load(app); - - return probot - .receive({ - id: process.env.GITHUB_RUN_ID, - name: process.env.GITHUB_EVENT_NAME, - payload: JSON.parse((0,external_node_fs_.readFileSync)(process.env.GITHUB_EVENT_PATH)), - }) - .catch((error) => { - probot.log.error(error); - }); + return probot.receive({ + id: process.env.GITHUB_RUN_ID, + name: process.env.GITHUB_EVENT_NAME, + payload: JSON.parse(readFileSync3(process.env.GITHUB_EVENT_PATH)) + }).catch((error) => { + probot.log.error(error); + }); } +// app.js +var app_default = (app) => { + app.on("issues.opened", async (context) => { + return context.octokit.issues.createComment(context.issue({ body: "Hello, World!" })); + }); +}; -/***/ }), - -/***/ 8148: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"acl":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"bgrewriteaof":{"arity":1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"blpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","noscript","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","noscript","blocking"],"keyStart":1,"keyStop":2,"step":1},"bzmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"bzpopmax":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","noscript","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"cluster":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"command":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"config":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"eval_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"evalsha_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"expire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"fcall":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"fcall_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"function":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hrandfield":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keys":{"arity":2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"lastsave":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"lcs":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":2,"step":1},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"migrate":{"arity":-6,"flags":["write","movablekeys"],"keyStart":3,"keyStop":3,"step":1},"module":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"readonly":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly"],"keyStart":0,"keyStop":0,"step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"sdiff":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale","no_multi","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"smembers":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"sort_ro":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"spublish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"ssubscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sunsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"step":1},"ttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"wait":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xinfo":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}'); - -/***/ }), - -/***/ 79583: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"blacklist_client.lua":"local blacklist = ARGV[num_static_argv + 1]\\n\\nif redis.call(\'zscore\', client_last_seen_key, blacklist) then\\n redis.call(\'zadd\', client_last_seen_key, 0, blacklist)\\nend\\n\\n\\nreturn {}\\n","check.lua":"local weight = tonumber(ARGV[num_static_argv + 1])\\n\\nlocal capacity = process_tick(now, false)[\'capacity\']\\nlocal nextRequest = tonumber(redis.call(\'hget\', settings_key, \'nextRequest\'))\\n\\nreturn conditions_check(capacity, weight) and nextRequest - now <= 0\\n","conditions_check.lua":"local conditions_check = function (capacity, weight)\\n return capacity == nil or weight <= capacity\\nend\\n","current_reservoir.lua":"return process_tick(now, false)[\'reservoir\']\\n","done.lua":"process_tick(now, false)\\n\\nreturn tonumber(redis.call(\'hget\', settings_key, \'done\'))\\n","free.lua":"local index = ARGV[num_static_argv + 1]\\n\\nredis.call(\'zadd\', job_expirations_key, 0, index)\\n\\nreturn process_tick(now, false)[\'running\']\\n","get_time.lua":"redis.replicate_commands()\\n\\nlocal get_time = function ()\\n local time = redis.call(\'time\')\\n\\n return tonumber(time[1]..string.sub(time[2], 1, 3))\\nend\\n","group_check.lua":"return not (redis.call(\'exists\', settings_key) == 1)\\n","heartbeat.lua":"process_tick(now, true)\\n","increment_reservoir.lua":"local incr = tonumber(ARGV[num_static_argv + 1])\\n\\nredis.call(\'hincrby\', settings_key, \'reservoir\', incr)\\n\\nlocal reservoir = process_tick(now, true)[\'reservoir\']\\n\\nlocal groupTimeout = tonumber(redis.call(\'hget\', settings_key, \'groupTimeout\'))\\nrefresh_expiration(0, 0, groupTimeout)\\n\\nreturn reservoir\\n","init.lua":"local clear = tonumber(ARGV[num_static_argv + 1])\\nlocal limiter_version = ARGV[num_static_argv + 2]\\nlocal num_local_argv = num_static_argv + 2\\n\\nif clear == 1 then\\n redis.call(\'del\', unpack(KEYS))\\nend\\n\\nif redis.call(\'exists\', settings_key) == 0 then\\n -- Create\\n local args = {\'hmset\', settings_key}\\n\\n for i = num_local_argv + 1, #ARGV do\\n table.insert(args, ARGV[i])\\n end\\n\\n redis.call(unpack(args))\\n redis.call(\'hmset\', settings_key,\\n \'nextRequest\', now,\\n \'lastReservoirRefresh\', now,\\n \'lastReservoirIncrease\', now,\\n \'running\', 0,\\n \'done\', 0,\\n \'unblockTime\', 0,\\n \'capacityPriorityCounter\', 0\\n )\\n\\nelse\\n -- Apply migrations\\n local settings = redis.call(\'hmget\', settings_key,\\n \'id\',\\n \'version\'\\n )\\n local id = settings[1]\\n local current_version = settings[2]\\n\\n if current_version ~= limiter_version then\\n local version_digits = {}\\n for k, v in string.gmatch(current_version, \\"([^.]+)\\") do\\n table.insert(version_digits, tonumber(k))\\n end\\n\\n -- 2.10.0\\n if version_digits[2] < 10 then\\n redis.call(\'hsetnx\', settings_key, \'reservoirRefreshInterval\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'reservoirRefreshAmount\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'lastReservoirRefresh\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'done\', 0)\\n redis.call(\'hset\', settings_key, \'version\', \'2.10.0\')\\n end\\n\\n -- 2.11.1\\n if version_digits[2] < 11 or (version_digits[2] == 11 and version_digits[3] < 1) then\\n if redis.call(\'hstrlen\', settings_key, \'lastReservoirRefresh\') == 0 then\\n redis.call(\'hmset\', settings_key,\\n \'lastReservoirRefresh\', now,\\n \'version\', \'2.11.1\'\\n )\\n end\\n end\\n\\n -- 2.14.0\\n if version_digits[2] < 14 then\\n local old_running_key = \'b_\'..id..\'_running\'\\n local old_executing_key = \'b_\'..id..\'_executing\'\\n\\n if redis.call(\'exists\', old_running_key) == 1 then\\n redis.call(\'rename\', old_running_key, job_weights_key)\\n end\\n if redis.call(\'exists\', old_executing_key) == 1 then\\n redis.call(\'rename\', old_executing_key, job_expirations_key)\\n end\\n redis.call(\'hset\', settings_key, \'version\', \'2.14.0\')\\n end\\n\\n -- 2.15.2\\n if version_digits[2] < 15 or (version_digits[2] == 15 and version_digits[3] < 2) then\\n redis.call(\'hsetnx\', settings_key, \'capacityPriorityCounter\', 0)\\n redis.call(\'hset\', settings_key, \'version\', \'2.15.2\')\\n end\\n\\n -- 2.17.0\\n if version_digits[2] < 17 then\\n redis.call(\'hsetnx\', settings_key, \'clientTimeout\', 10000)\\n redis.call(\'hset\', settings_key, \'version\', \'2.17.0\')\\n end\\n\\n -- 2.18.0\\n if version_digits[2] < 18 then\\n redis.call(\'hsetnx\', settings_key, \'reservoirIncreaseInterval\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'reservoirIncreaseAmount\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'reservoirIncreaseMaximum\', \'\')\\n redis.call(\'hsetnx\', settings_key, \'lastReservoirIncrease\', now)\\n redis.call(\'hset\', settings_key, \'version\', \'2.18.0\')\\n end\\n\\n end\\n\\n process_tick(now, false)\\nend\\n\\nlocal groupTimeout = tonumber(redis.call(\'hget\', settings_key, \'groupTimeout\'))\\nrefresh_expiration(0, 0, groupTimeout)\\n\\nreturn {}\\n","process_tick.lua":"local process_tick = function (now, always_publish)\\n\\n local compute_capacity = function (maxConcurrent, running, reservoir)\\n if maxConcurrent ~= nil and reservoir ~= nil then\\n return math.min((maxConcurrent - running), reservoir)\\n elseif maxConcurrent ~= nil then\\n return maxConcurrent - running\\n elseif reservoir ~= nil then\\n return reservoir\\n else\\n return nil\\n end\\n end\\n\\n local settings = redis.call(\'hmget\', settings_key,\\n \'id\',\\n \'maxConcurrent\',\\n \'running\',\\n \'reservoir\',\\n \'reservoirRefreshInterval\',\\n \'reservoirRefreshAmount\',\\n \'lastReservoirRefresh\',\\n \'reservoirIncreaseInterval\',\\n \'reservoirIncreaseAmount\',\\n \'reservoirIncreaseMaximum\',\\n \'lastReservoirIncrease\',\\n \'capacityPriorityCounter\',\\n \'clientTimeout\'\\n )\\n local id = settings[1]\\n local maxConcurrent = tonumber(settings[2])\\n local running = tonumber(settings[3])\\n local reservoir = tonumber(settings[4])\\n local reservoirRefreshInterval = tonumber(settings[5])\\n local reservoirRefreshAmount = tonumber(settings[6])\\n local lastReservoirRefresh = tonumber(settings[7])\\n local reservoirIncreaseInterval = tonumber(settings[8])\\n local reservoirIncreaseAmount = tonumber(settings[9])\\n local reservoirIncreaseMaximum = tonumber(settings[10])\\n local lastReservoirIncrease = tonumber(settings[11])\\n local capacityPriorityCounter = tonumber(settings[12])\\n local clientTimeout = tonumber(settings[13])\\n\\n local initial_capacity = compute_capacity(maxConcurrent, running, reservoir)\\n\\n --\\n -- Process \'running\' changes\\n --\\n local expired = redis.call(\'zrangebyscore\', job_expirations_key, \'-inf\', \'(\'..now)\\n\\n if #expired > 0 then\\n redis.call(\'zremrangebyscore\', job_expirations_key, \'-inf\', \'(\'..now)\\n\\n local flush_batch = function (batch, acc)\\n local weights = redis.call(\'hmget\', job_weights_key, unpack(batch))\\n redis.call(\'hdel\', job_weights_key, unpack(batch))\\n local clients = redis.call(\'hmget\', job_clients_key, unpack(batch))\\n redis.call(\'hdel\', job_clients_key, unpack(batch))\\n\\n -- Calculate sum of removed weights\\n for i = 1, #weights do\\n acc[\'total\'] = acc[\'total\'] + (tonumber(weights[i]) or 0)\\n end\\n\\n -- Calculate sum of removed weights by client\\n local client_weights = {}\\n for i = 1, #clients do\\n local removed = tonumber(weights[i]) or 0\\n if removed > 0 then\\n acc[\'client_weights\'][clients[i]] = (acc[\'client_weights\'][clients[i]] or 0) + removed\\n end\\n end\\n end\\n\\n local acc = {\\n [\'total\'] = 0,\\n [\'client_weights\'] = {}\\n }\\n local batch_size = 1000\\n\\n -- Compute changes to Zsets and apply changes to Hashes\\n for i = 1, #expired, batch_size do\\n local batch = {}\\n for j = i, math.min(i + batch_size - 1, #expired) do\\n table.insert(batch, expired[j])\\n end\\n\\n flush_batch(batch, acc)\\n end\\n\\n -- Apply changes to Zsets\\n if acc[\'total\'] > 0 then\\n redis.call(\'hincrby\', settings_key, \'done\', acc[\'total\'])\\n running = tonumber(redis.call(\'hincrby\', settings_key, \'running\', -acc[\'total\']))\\n end\\n\\n for client, weight in pairs(acc[\'client_weights\']) do\\n redis.call(\'zincrby\', client_running_key, -weight, client)\\n end\\n end\\n\\n --\\n -- Process \'reservoir\' changes\\n --\\n local reservoirRefreshActive = reservoirRefreshInterval ~= nil and reservoirRefreshAmount ~= nil\\n if reservoirRefreshActive and now >= lastReservoirRefresh + reservoirRefreshInterval then\\n reservoir = reservoirRefreshAmount\\n redis.call(\'hmset\', settings_key,\\n \'reservoir\', reservoir,\\n \'lastReservoirRefresh\', now\\n )\\n end\\n\\n local reservoirIncreaseActive = reservoirIncreaseInterval ~= nil and reservoirIncreaseAmount ~= nil\\n if reservoirIncreaseActive and now >= lastReservoirIncrease + reservoirIncreaseInterval then\\n local num_intervals = math.floor((now - lastReservoirIncrease) / reservoirIncreaseInterval)\\n local incr = reservoirIncreaseAmount * num_intervals\\n if reservoirIncreaseMaximum ~= nil then\\n incr = math.min(incr, reservoirIncreaseMaximum - (reservoir or 0))\\n end\\n if incr > 0 then\\n reservoir = (reservoir or 0) + incr\\n end\\n redis.call(\'hmset\', settings_key,\\n \'reservoir\', reservoir,\\n \'lastReservoirIncrease\', lastReservoirIncrease + (num_intervals * reservoirIncreaseInterval)\\n )\\n end\\n\\n --\\n -- Clear unresponsive clients\\n --\\n local unresponsive = redis.call(\'zrangebyscore\', client_last_seen_key, \'-inf\', (now - clientTimeout))\\n local unresponsive_lookup = {}\\n local terminated_clients = {}\\n for i = 1, #unresponsive do\\n unresponsive_lookup[unresponsive[i]] = true\\n if tonumber(redis.call(\'zscore\', client_running_key, unresponsive[i])) == 0 then\\n table.insert(terminated_clients, unresponsive[i])\\n end\\n end\\n if #terminated_clients > 0 then\\n redis.call(\'zrem\', client_running_key, unpack(terminated_clients))\\n redis.call(\'hdel\', client_num_queued_key, unpack(terminated_clients))\\n redis.call(\'zrem\', client_last_registered_key, unpack(terminated_clients))\\n redis.call(\'zrem\', client_last_seen_key, unpack(terminated_clients))\\n end\\n\\n --\\n -- Broadcast capacity changes\\n --\\n local final_capacity = compute_capacity(maxConcurrent, running, reservoir)\\n\\n if always_publish or (initial_capacity ~= nil and final_capacity == nil) then\\n -- always_publish or was not unlimited, now unlimited\\n redis.call(\'publish\', \'b_\'..id, \'capacity:\'..(final_capacity or \'\'))\\n\\n elseif initial_capacity ~= nil and final_capacity ~= nil and final_capacity > initial_capacity then\\n -- capacity was increased\\n -- send the capacity message to the limiter having the lowest number of running jobs\\n -- the tiebreaker is the limiter having not registered a job in the longest time\\n\\n local lowest_concurrency_value = nil\\n local lowest_concurrency_clients = {}\\n local lowest_concurrency_last_registered = {}\\n local client_concurrencies = redis.call(\'zrange\', client_running_key, 0, -1, \'withscores\')\\n\\n for i = 1, #client_concurrencies, 2 do\\n local client = client_concurrencies[i]\\n local concurrency = tonumber(client_concurrencies[i+1])\\n\\n if (\\n lowest_concurrency_value == nil or lowest_concurrency_value == concurrency\\n ) and (\\n not unresponsive_lookup[client]\\n ) and (\\n tonumber(redis.call(\'hget\', client_num_queued_key, client)) > 0\\n ) then\\n lowest_concurrency_value = concurrency\\n table.insert(lowest_concurrency_clients, client)\\n local last_registered = tonumber(redis.call(\'zscore\', client_last_registered_key, client))\\n table.insert(lowest_concurrency_last_registered, last_registered)\\n end\\n end\\n\\n if #lowest_concurrency_clients > 0 then\\n local position = 1\\n local earliest = lowest_concurrency_last_registered[1]\\n\\n for i,v in ipairs(lowest_concurrency_last_registered) do\\n if v < earliest then\\n position = i\\n earliest = v\\n end\\n end\\n\\n local next_client = lowest_concurrency_clients[position]\\n redis.call(\'publish\', \'b_\'..id,\\n \'capacity-priority:\'..(final_capacity or \'\')..\\n \':\'..next_client..\\n \':\'..capacityPriorityCounter\\n )\\n redis.call(\'hincrby\', settings_key, \'capacityPriorityCounter\', \'1\')\\n else\\n redis.call(\'publish\', \'b_\'..id, \'capacity:\'..(final_capacity or \'\'))\\n end\\n end\\n\\n return {\\n [\'capacity\'] = final_capacity,\\n [\'running\'] = running,\\n [\'reservoir\'] = reservoir\\n }\\nend\\n","queued.lua":"local clientTimeout = tonumber(redis.call(\'hget\', settings_key, \'clientTimeout\'))\\nlocal valid_clients = redis.call(\'zrangebyscore\', client_last_seen_key, (now - clientTimeout), \'inf\')\\nlocal client_queued = redis.call(\'hmget\', client_num_queued_key, unpack(valid_clients))\\n\\nlocal sum = 0\\nfor i = 1, #client_queued do\\n sum = sum + tonumber(client_queued[i])\\nend\\n\\nreturn sum\\n","refresh_expiration.lua":"local refresh_expiration = function (now, nextRequest, groupTimeout)\\n\\n if groupTimeout ~= nil then\\n local ttl = (nextRequest + groupTimeout) - now\\n\\n for i = 1, #KEYS do\\n redis.call(\'pexpire\', KEYS[i], ttl)\\n end\\n end\\n\\nend\\n","refs.lua":"local settings_key = KEYS[1]\\nlocal job_weights_key = KEYS[2]\\nlocal job_expirations_key = KEYS[3]\\nlocal job_clients_key = KEYS[4]\\nlocal client_running_key = KEYS[5]\\nlocal client_num_queued_key = KEYS[6]\\nlocal client_last_registered_key = KEYS[7]\\nlocal client_last_seen_key = KEYS[8]\\n\\nlocal now = tonumber(ARGV[1])\\nlocal client = ARGV[2]\\n\\nlocal num_static_argv = 2\\n","register.lua":"local index = ARGV[num_static_argv + 1]\\nlocal weight = tonumber(ARGV[num_static_argv + 2])\\nlocal expiration = tonumber(ARGV[num_static_argv + 3])\\n\\nlocal state = process_tick(now, false)\\nlocal capacity = state[\'capacity\']\\nlocal reservoir = state[\'reservoir\']\\n\\nlocal settings = redis.call(\'hmget\', settings_key,\\n \'nextRequest\',\\n \'minTime\',\\n \'groupTimeout\'\\n)\\nlocal nextRequest = tonumber(settings[1])\\nlocal minTime = tonumber(settings[2])\\nlocal groupTimeout = tonumber(settings[3])\\n\\nif conditions_check(capacity, weight) then\\n\\n redis.call(\'hincrby\', settings_key, \'running\', weight)\\n redis.call(\'hset\', job_weights_key, index, weight)\\n if expiration ~= nil then\\n redis.call(\'zadd\', job_expirations_key, now + expiration, index)\\n end\\n redis.call(\'hset\', job_clients_key, index, client)\\n redis.call(\'zincrby\', client_running_key, weight, client)\\n redis.call(\'hincrby\', client_num_queued_key, client, -1)\\n redis.call(\'zadd\', client_last_registered_key, now, client)\\n\\n local wait = math.max(nextRequest - now, 0)\\n local newNextRequest = now + wait + minTime\\n\\n if reservoir == nil then\\n redis.call(\'hset\', settings_key,\\n \'nextRequest\', newNextRequest\\n )\\n else\\n reservoir = reservoir - weight\\n redis.call(\'hmset\', settings_key,\\n \'reservoir\', reservoir,\\n \'nextRequest\', newNextRequest\\n )\\n end\\n\\n refresh_expiration(now, newNextRequest, groupTimeout)\\n\\n return {true, wait, reservoir}\\n\\nelse\\n return {false}\\nend\\n","register_client.lua":"local queued = tonumber(ARGV[num_static_argv + 1])\\n\\n-- Could have been re-registered concurrently\\nif not redis.call(\'zscore\', client_last_seen_key, client) then\\n redis.call(\'zadd\', client_running_key, 0, client)\\n redis.call(\'hset\', client_num_queued_key, client, queued)\\n redis.call(\'zadd\', client_last_registered_key, 0, client)\\nend\\n\\nredis.call(\'zadd\', client_last_seen_key, now, client)\\n\\nreturn {}\\n","running.lua":"return process_tick(now, false)[\'running\']\\n","submit.lua":"local queueLength = tonumber(ARGV[num_static_argv + 1])\\nlocal weight = tonumber(ARGV[num_static_argv + 2])\\n\\nlocal capacity = process_tick(now, false)[\'capacity\']\\n\\nlocal settings = redis.call(\'hmget\', settings_key,\\n \'id\',\\n \'maxConcurrent\',\\n \'highWater\',\\n \'nextRequest\',\\n \'strategy\',\\n \'unblockTime\',\\n \'penalty\',\\n \'minTime\',\\n \'groupTimeout\'\\n)\\nlocal id = settings[1]\\nlocal maxConcurrent = tonumber(settings[2])\\nlocal highWater = tonumber(settings[3])\\nlocal nextRequest = tonumber(settings[4])\\nlocal strategy = tonumber(settings[5])\\nlocal unblockTime = tonumber(settings[6])\\nlocal penalty = tonumber(settings[7])\\nlocal minTime = tonumber(settings[8])\\nlocal groupTimeout = tonumber(settings[9])\\n\\nif maxConcurrent ~= nil and weight > maxConcurrent then\\n return redis.error_reply(\'OVERWEIGHT:\'..weight..\':\'..maxConcurrent)\\nend\\n\\nlocal reachedHWM = (highWater ~= nil and queueLength == highWater\\n and not (\\n conditions_check(capacity, weight)\\n and nextRequest - now <= 0\\n )\\n)\\n\\nlocal blocked = strategy == 3 and (reachedHWM or unblockTime >= now)\\n\\nif blocked then\\n local computedPenalty = penalty\\n if computedPenalty == nil then\\n if minTime == 0 then\\n computedPenalty = 5000\\n else\\n computedPenalty = 15 * minTime\\n end\\n end\\n\\n local newNextRequest = now + computedPenalty + minTime\\n\\n redis.call(\'hmset\', settings_key,\\n \'unblockTime\', now + computedPenalty,\\n \'nextRequest\', newNextRequest\\n )\\n\\n local clients_queued_reset = redis.call(\'hkeys\', client_num_queued_key)\\n local queued_reset = {}\\n for i = 1, #clients_queued_reset do\\n table.insert(queued_reset, clients_queued_reset[i])\\n table.insert(queued_reset, 0)\\n end\\n redis.call(\'hmset\', client_num_queued_key, unpack(queued_reset))\\n\\n redis.call(\'publish\', \'b_\'..id, \'blocked:\')\\n\\n refresh_expiration(now, newNextRequest, groupTimeout)\\nend\\n\\nif not blocked and not reachedHWM then\\n redis.call(\'hincrby\', client_num_queued_key, client, 1)\\nend\\n\\nreturn {reachedHWM, blocked, strategy}\\n","update_settings.lua":"local args = {\'hmset\', settings_key}\\n\\nfor i = num_static_argv + 1, #ARGV do\\n table.insert(args, ARGV[i])\\nend\\n\\nredis.call(unpack(args))\\n\\nprocess_tick(now, true)\\n\\nlocal groupTimeout = tonumber(redis.call(\'hget\', settings_key, \'groupTimeout\'))\\nrefresh_expiration(0, 0, groupTimeout)\\n\\nreturn {}\\n","validate_client.lua":"if not redis.call(\'zscore\', client_last_seen_key, client) then\\n return redis.error_reply(\'UNKNOWN_CLIENT\')\\nend\\n\\nredis.call(\'zadd\', client_last_seen_key, now, client)\\n","validate_keys.lua":"if not (redis.call(\'exists\', settings_key) == 1) then\\n return redis.error_reply(\'SETTINGS_KEY_NOT_FOUND\')\\nend\\n"}'); - -/***/ }), - -/***/ 96701: -/***/ ((module) => { - -"use strict"; -module.exports = {"r":"2.19.5"}; - -/***/ }), - -/***/ 89396: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"dotenv","version":"16.4.5","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","test:coverage":"tap --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}'); - -/***/ }), - -/***/ 31479: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]]'); - -/***/ }), - -/***/ 51716: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]'); - -/***/ }), - -/***/ 95578: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"ⅰ",9],["a5b0","Ⅰ",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆЪĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]]'); - -/***/ }), - -/***/ 29856: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]]'); - -/***/ }), - -/***/ 99594: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","0",9],["a3c1","A",25],["a3e1","a",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"Ⅰ",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","ⅰ",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]]'); - -/***/ }), - -/***/ 71565: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}'); - -/***/ }), - -/***/ 18174: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc",""],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93]]'); - -/***/ }), - -/***/ 94227: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('[["0","\\u0000",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","0",9],["8260","A",25],["8281","a",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"Ⅰ",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","ⅰ",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]]'); - -/***/ }), - -/***/ 47080: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}'); - -/***/ }), - -/***/ 1226: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}'); - -/***/ }), - -/***/ 81033: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}'); - -/***/ }), - -/***/ 24129: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"thread-stream","version":"2.7.0","description":"A streaming way to send data to a Node.js Worker Thread","main":"index.js","types":"index.d.ts","dependencies":{"real-require":"^0.2.0"},"devDependencies":{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5","desm":"^1.3.0","fastbench":"^1.0.1","husky":"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^3.0.0","standard":"^17.0.0","tap":"^16.2.0","ts-node":"^10.8.0","typescript":"^5.3.2","why-is-node-running":"^2.2.2"},"scripts":{"test":"standard && npm run transpile && tap \\"test/**/*.test.*js\\" && tap --ts test/*.test.*ts","test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":"tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \\"test/**/*.test.*js\\"","test:ci:ts":"tap --ts --no-check-coverage --coverage-report=lcovonly \\"test/**/*.test.*ts\\"","test:yarn":"npm run transpile && tap \\"test/**/*.test.js\\" --no-check-coverage","transpile":"sh ./test/ts/transpile.sh","prepare":"husky install"},"standard":{"ignore":["test/ts/**/*"]},"repository":{"type":"git","url":"git+https://github.com/mcollina/thread-stream.git"},"keywords":["worker","thread","threads","stream"],"author":"Matteo Collina ","license":"MIT","bugs":{"url":"https://github.com/mcollina/thread-stream/issues"},"homepage":"https://github.com/mcollina/thread-stream#readme"}'); - -/***/ }), - -/***/ 57010: -/***/ ((module) => { - -"use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"thread-stream","version":"3.1.0","description":"A streaming way to send data to a Node.js Worker Thread","main":"index.js","types":"index.d.ts","dependencies":{"real-require":"^0.2.0"},"devDependencies":{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5","desm":"^1.3.0","fastbench":"^1.0.1","husky":"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1","standard":"^17.0.0","tap":"^16.2.0","ts-node":"^10.8.0","typescript":"^5.3.2","why-is-node-running":"^2.2.2"},"scripts":{"build":"tsc --noEmit","test":"standard && npm run build && npm run transpile && tap \\"test/**/*.test.*js\\" && tap --ts test/*.test.*ts","test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":"tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \\"test/**/*.test.*js\\"","test:ci:ts":"tap --ts --no-check-coverage --coverage-report=lcovonly \\"test/**/*.test.*ts\\"","test:yarn":"npm run transpile && tap \\"test/**/*.test.js\\" --no-check-coverage","transpile":"sh ./test/ts/transpile.sh","prepare":"husky install"},"standard":{"ignore":["test/ts/**/*","test/syntax-error.mjs"]},"repository":{"type":"git","url":"git+https://github.com/mcollina/thread-stream.git"},"keywords":["worker","thread","threads","stream"],"author":"Matteo Collina ","license":"MIT","bugs":{"url":"https://github.com/mcollina/thread-stream/issues"},"homepage":"https://github.com/mcollina/thread-stream#readme"}'); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ id: moduleId, -/******/ loaded: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __nccwpck_require__.m = __webpack_modules__; -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/create fake namespace object */ -/******/ (() => { -/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__); -/******/ var leafPrototypes; -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 16: return value when it's Promise-like -/******/ // mode & 8|1: behave like require -/******/ __nccwpck_require__.t = function(value, mode) { -/******/ if(mode & 1) value = this(value); -/******/ if(mode & 8) return value; -/******/ if(typeof value === 'object' && value) { -/******/ if((mode & 4) && value.__esModule) return value; -/******/ if((mode & 16) && typeof value.then === 'function') return value; -/******/ } -/******/ var ns = Object.create(null); -/******/ __nccwpck_require__.r(ns); -/******/ var def = {}; -/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)]; -/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) { -/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key]))); -/******/ } -/******/ def['default'] = () => (value); -/******/ __nccwpck_require__.d(ns, def); -/******/ return ns; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/ensure chunk */ -/******/ (() => { -/******/ __nccwpck_require__.f = {}; -/******/ // This file contains only the entry chunk. -/******/ // The chunk loading function for additional chunks -/******/ __nccwpck_require__.e = (chunkId) => { -/******/ return Promise.all(Object.keys(__nccwpck_require__.f).reduce((promises, key) => { -/******/ __nccwpck_require__.f[key](chunkId, promises); -/******/ return promises; -/******/ }, [])); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/get javascript chunk filename */ -/******/ (() => { -/******/ // This function allow to reference async chunks -/******/ __nccwpck_require__.u = (chunkId) => { -/******/ // return url for filenames based on template -/******/ return "" + chunkId + ".index.js"; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/node module decorator */ -/******/ (() => { -/******/ __nccwpck_require__.nmd = (module) => { -/******/ module.paths = []; -/******/ if (!module.children) module.children = []; -/******/ return module; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; -/******/ -/******/ /* webpack/runtime/require chunk loading */ -/******/ (() => { -/******/ // no baseURI -/******/ -/******/ // object to store loaded chunks -/******/ // "1" means "loaded", otherwise not loaded yet -/******/ var installedChunks = { -/******/ 792: 1 -/******/ }; -/******/ -/******/ // no on chunks loaded -/******/ -/******/ var installChunk = (chunk) => { -/******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime; -/******/ for(var moduleId in moreModules) { -/******/ if(__nccwpck_require__.o(moreModules, moduleId)) { -/******/ __nccwpck_require__.m[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(runtime) runtime(__nccwpck_require__); -/******/ for(var i = 0; i < chunkIds.length; i++) -/******/ installedChunks[chunkIds[i]] = 1; -/******/ -/******/ }; -/******/ -/******/ // require() chunk loading for javascript -/******/ __nccwpck_require__.f.require = (chunkId, promises) => { -/******/ // "1" is the signal for "already loaded" -/******/ if(!installedChunks[chunkId]) { -/******/ if(true) { // all chunks have JS -/******/ installChunk(require("./" + __nccwpck_require__.u(chunkId))); -/******/ } else installedChunks[chunkId] = 1; -/******/ } -/******/ }; -/******/ -/******/ // no external install chunk -/******/ -/******/ // no HMR -/******/ -/******/ // no HMR manifest -/******/ })(); -/******/ -/************************************************************************/ -var __webpack_exports__ = {}; -const {run} = __nccwpck_require__(94825); -const app = __nccwpck_require__(75445); - -run(app); - -module.exports = __webpack_exports__; -/******/ })() -; \ No newline at end of file +// index.js +run(app_default); +/*! Bundled license information: + +safe-buffer/index.js: + (*! safe-buffer. MIT License. Feross Aboukhadijeh *) + +@sentry/node/esm/integrations/anr/worker-script.js: + (*! @sentry/node 7.120.0 (611282e) | https://github.com/getsentry/sentry-javascript *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) + +depd/index.js: + (*! + * depd + * Copyright(c) 2014-2018 Douglas Christopher Wilson + * MIT Licensed + *) + +bytes/index.js: + (*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson + * MIT Licensed + *) + +content-type/index.js: + (*! + * content-type + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +statuses/index.js: + (*! + * statuses + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +toidentifier/index.js: + (*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +http-errors/index.js: + (*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +destroy/index.js: + (*! + * destroy + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +unpipe/index.js: + (*! + * unpipe + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +raw-body/index.js: + (*! + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +ee-first/index.js: + (*! + * ee-first + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + *) + +on-finished/index.js: + (*! + * on-finished + * Copyright(c) 2013 Jonathan Ong + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/read.js: + (*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +media-typer/index.js: + (*! + * media-typer + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-db/index.js: + (*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +mime-types/index.js: + (*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +type-is/index.js: + (*! + * type-is + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/types/json.js: + (*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/types/raw.js: + (*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/types/text.js: + (*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/lib/types/urlencoded.js: + (*! + * body-parser + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +body-parser/index.js: + (*! + * body-parser + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +merge-descriptors/index.js: + (*! + * merge-descriptors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +encodeurl/index.js: + (*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +escape-html/index.js: + (*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + *) + +parseurl/index.js: + (*! + * parseurl + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +finalhandler/index.js: + (*! + * finalhandler + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/router/layer.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +methods/index.js: + (*! + * methods + * Copyright(c) 2013-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/router/route.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/router/index.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/middleware/init.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/middleware/query.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/view.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +content-disposition/index.js: + (*! + * content-disposition + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +encodeurl/index.js: + (*! + * encodeurl + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + *) + +etag/index.js: + (*! + * etag + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +fresh/index.js: + (*! + * fresh + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2016-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +range-parser/index.js: + (*! + * range-parser + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +send/index.js: + (*! + * send + * Copyright(c) 2012 TJ Holowaychuk + * Copyright(c) 2014-2022 Douglas Christopher Wilson + * MIT Licensed + *) + +forwarded/index.js: + (*! + * forwarded + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +proxy-addr/index.js: + (*! + * proxy-addr + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/utils.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/application.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +negotiator/index.js: + (*! + * negotiator + * Copyright(c) 2012 Federico Romero + * Copyright(c) 2012-2014 Isaac Z. Schlueter + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +accepts/index.js: + (*! + * accepts + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/request.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +cookie/index.js: + (*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + *) + +vary/index.js: + (*! + * vary + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/response.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +serve-static/index.js: + (*! + * serve-static + * Copyright(c) 2010 Sencha Inc. + * Copyright(c) 2011 TJ Holowaychuk + * Copyright(c) 2014-2016 Douglas Christopher Wilson + * MIT Licensed + *) + +express/lib/express.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +express/index.js: + (*! + * express + * Copyright(c) 2009-2013 TJ Holowaychuk + * Copyright(c) 2013 Roman Shtylman + * Copyright(c) 2014-2015 Douglas Christopher Wilson + * MIT Licensed + *) + +undici/lib/fetch/body.js: + (*! formdata-polyfill. MIT License. Jimmy Wärting *) + +undici/lib/websocket/frame.js: + (*! ws. MIT License. Einar Otto Stangvik *) +*/ diff --git a/dist/worker-pipeline.js b/dist/worker-pipeline.js deleted file mode 100644 index 76cb3b8..0000000 --- a/dist/worker-pipeline.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -const EE = require('events') -const loadTransportStreamBuilder = require('./transport-stream') -const { pipeline, PassThrough } = require('stream') - -// This file is not checked by the code coverage tool, -// as it is not reliable. - -/* istanbul ignore file */ - -module.exports = async function ({ targets }) { - const streams = await Promise.all(targets.map(async (t) => { - const fn = await loadTransportStreamBuilder(t.target) - const stream = await fn(t.options) - return stream - })) - const ee = new EE() - - const stream = new PassThrough({ - autoDestroy: true, - destroy (_, cb) { - ee.on('error', cb) - ee.on('closed', cb) - } - }) - - pipeline(stream, ...streams, function (err) { - if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - ee.emit('error', err) - return - } - - ee.emit('closed') - }) - - return stream -} diff --git a/dist/worker.js b/dist/worker.js deleted file mode 100644 index c20c19a..0000000 --- a/dist/worker.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict' - -const pino = require('../pino.js') -const build = require('pino-abstract-transport') -const loadTransportStreamBuilder = require('./transport-stream') - -// This file is not checked by the code coverage tool, -// as it is not reliable. - -/* istanbul ignore file */ - -module.exports = async function ({ targets, levels, dedupe }) { - targets = await Promise.all(targets.map(async (t) => { - const fn = await loadTransportStreamBuilder(t.target) - const stream = await fn(t.options) - return { - level: t.level, - stream - } - })) - return build(process, { - parse: 'lines', - metadata: true, - close (err, cb) { - let expected = 0 - for (const transport of targets) { - expected++ - transport.stream.on('close', closeCb) - transport.stream.end() - } - - function closeCb () { - if (--expected === 0) { - cb(err) - } - } - } - }) - - function process (stream) { - const multi = pino.multistream(targets, { levels, dedupe }) - // TODO manage backpressure - stream.on('data', function (chunk) { - const { lastTime, lastMsg, lastObj, lastLevel } = this - multi.lastLevel = lastLevel - multi.lastTime = lastTime - multi.lastMsg = lastMsg - multi.lastObj = lastObj - - // TODO handle backpressure - multi.write(chunk + '\n') - }) - } -} diff --git a/dist/worker1.js b/dist/worker1.js deleted file mode 100644 index 198a957..0000000 --- a/dist/worker1.js +++ /dev/null @@ -1,171 +0,0 @@ -'use strict' - -const { realImport, realRequire } = require('real-require') -const { workerData, parentPort } = require('worker_threads') -const { WRITE_INDEX, READ_INDEX } = require('./indexes') -const { waitDiff } = require('./wait') - -const { - dataBuf, - filename, - stateBuf -} = workerData - -let destination - -const state = new Int32Array(stateBuf) -const data = Buffer.from(dataBuf) - -async function start () { - let worker - try { - if (filename.endsWith('.ts') || filename.endsWith('.cts')) { - // TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ). - if (!process[Symbol.for('ts-node.register.instance')]) { - realRequire('ts-node/register') - } else if (process.env.TS_NODE_DEV) { - realRequire('ts-node-dev') - } - // TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees. - // Remove extra forwardslash on Windows - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } else { - worker = (await realImport(filename)) - } - } catch (error) { - // A yarn user that tries to start a ThreadStream for an external module - // provides a filename pointing to a zip file. - // eg. require.resolve('pino-elasticsearch') // returns /foo/pino-elasticsearch-npm-6.1.0-0c03079478-6915435172.zip/bar.js - // The `import` will fail to try to load it. - // This catch block executes the `require` fallback to load the module correctly. - // In fact, yarn modifies the `require` function to manage the zipped path. - // More details at https://github.com/pinojs/pino/pull/1113 - // The error codes may change based on the node.js version (ENOTDIR > 12, ERR_MODULE_NOT_FOUND <= 12 ) - if ((error.code === 'ENOTDIR' || error.code === 'ERR_MODULE_NOT_FOUND') && - filename.startsWith('file://')) { - worker = realRequire(decodeURIComponent(filename.replace('file://', ''))) - } else if (error.code === undefined || error.code === 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') { - // When bundled with pkg, an undefined error is thrown when called with realImport - // When bundled with pkg and using node v20, an ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error is thrown when called with realImport - // More info at: https://github.com/pinojs/thread-stream/issues/143 - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } else { - throw error - } - } - - // Depending on how the default export is performed, and on how the code is - // transpiled, we may find cases of two nested "default" objects. - // See https://github.com/pinojs/pino/issues/1243#issuecomment-982774762 - if (typeof worker === 'object') worker = worker.default - if (typeof worker === 'object') worker = worker.default - - destination = await worker(workerData.workerData) - - destination.on('error', function (err) { - Atomics.store(state, WRITE_INDEX, -2) - Atomics.notify(state, WRITE_INDEX) - - Atomics.store(state, READ_INDEX, -2) - Atomics.notify(state, READ_INDEX) - - parentPort.postMessage({ - code: 'ERROR', - err - }) - }) - - destination.on('close', function () { - // process._rawDebug('worker close emitted') - const end = Atomics.load(state, WRITE_INDEX) - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(() => { - process.exit(0) - }) - }) -} - -// No .catch() handler, -// in case there is an error it goes -// to unhandledRejection -start().then(function () { - parentPort.postMessage({ - code: 'READY' - }) - - process.nextTick(run) -}) - -function run () { - const current = Atomics.load(state, READ_INDEX) - const end = Atomics.load(state, WRITE_INDEX) - - // process._rawDebug(`pre state ${current} ${end}`) - - if (end === current) { - if (end === data.length) { - waitDiff(state, READ_INDEX, end, Infinity, run) - } else { - waitDiff(state, WRITE_INDEX, end, Infinity, run) - } - return - } - - // process._rawDebug(`post state ${current} ${end}`) - - if (end === -1) { - // process._rawDebug('end') - destination.end() - return - } - - const toWrite = data.toString('utf8', current, end) - // process._rawDebug('worker writing: ' + toWrite) - - const res = destination.write(toWrite) - - if (res) { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(run) - } else { - destination.once('drain', function () { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - run() - }) - } -} - -process.on('unhandledRejection', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.on('uncaughtException', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.once('exit', exitCode => { - if (exitCode !== 0) { - process.exit(exitCode) - return - } - - if (destination?.writableNeedDrain && !destination?.writableEnded) { - parentPort.postMessage({ - code: 'WARNING', - err: new Error('ThreadStream: process exited before destination stream was drained. this may indicate that the destination stream try to write to a another missing stream') - }) - } - - process.exit(0) -}) diff --git a/dist/worker2.js b/dist/worker2.js deleted file mode 100644 index 6f0825c..0000000 --- a/dist/worker2.js +++ /dev/null @@ -1,174 +0,0 @@ -'use strict' - -const { realImport, realRequire } = require('real-require') -const { workerData, parentPort } = require('worker_threads') -const { WRITE_INDEX, READ_INDEX } = require('./indexes') -const { waitDiff } = require('./wait') - -const { - dataBuf, - filename, - stateBuf -} = workerData - -let destination - -const state = new Int32Array(stateBuf) -const data = Buffer.from(dataBuf) - -async function start () { - let worker - try { - if (filename.endsWith('.ts') || filename.endsWith('.cts')) { - // TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ). - if (!process[Symbol.for('ts-node.register.instance')]) { - realRequire('ts-node/register') - } else if (process.env.TS_NODE_DEV) { - realRequire('ts-node-dev') - } - // TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees. - // Remove extra forwardslash on Windows - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } else { - worker = (await realImport(filename)) - } - } catch (error) { - // A yarn user that tries to start a ThreadStream for an external module - // provides a filename pointing to a zip file. - // eg. require.resolve('pino-elasticsearch') // returns /foo/pino-elasticsearch-npm-6.1.0-0c03079478-6915435172.zip/bar.js - // The `import` will fail to try to load it. - // This catch block executes the `require` fallback to load the module correctly. - // In fact, yarn modifies the `require` function to manage the zipped path. - // More details at https://github.com/pinojs/pino/pull/1113 - // The error codes may change based on the node.js version (ENOTDIR > 12, ERR_MODULE_NOT_FOUND <= 12 ) - if ((error.code === 'ENOTDIR' || error.code === 'ERR_MODULE_NOT_FOUND') && - filename.startsWith('file://')) { - worker = realRequire(decodeURIComponent(filename.replace('file://', ''))) - } else if (error.code === undefined || error.code === 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') { - // When bundled with pkg, an undefined error is thrown when called with realImport - // When bundled with pkg and using node v20, an ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error is thrown when called with realImport - // More info at: https://github.com/pinojs/thread-stream/issues/143 - try { - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } catch { - throw error - } - } else { - throw error - } - } - - // Depending on how the default export is performed, and on how the code is - // transpiled, we may find cases of two nested "default" objects. - // See https://github.com/pinojs/pino/issues/1243#issuecomment-982774762 - if (typeof worker === 'object') worker = worker.default - if (typeof worker === 'object') worker = worker.default - - destination = await worker(workerData.workerData) - - destination.on('error', function (err) { - Atomics.store(state, WRITE_INDEX, -2) - Atomics.notify(state, WRITE_INDEX) - - Atomics.store(state, READ_INDEX, -2) - Atomics.notify(state, READ_INDEX) - - parentPort.postMessage({ - code: 'ERROR', - err - }) - }) - - destination.on('close', function () { - // process._rawDebug('worker close emitted') - const end = Atomics.load(state, WRITE_INDEX) - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(() => { - process.exit(0) - }) - }) -} - -// No .catch() handler, -// in case there is an error it goes -// to unhandledRejection -start().then(function () { - parentPort.postMessage({ - code: 'READY' - }) - - process.nextTick(run) -}) - -function run () { - const current = Atomics.load(state, READ_INDEX) - const end = Atomics.load(state, WRITE_INDEX) - - // process._rawDebug(`pre state ${current} ${end}`) - - if (end === current) { - if (end === data.length) { - waitDiff(state, READ_INDEX, end, Infinity, run) - } else { - waitDiff(state, WRITE_INDEX, end, Infinity, run) - } - return - } - - // process._rawDebug(`post state ${current} ${end}`) - - if (end === -1) { - // process._rawDebug('end') - destination.end() - return - } - - const toWrite = data.toString('utf8', current, end) - // process._rawDebug('worker writing: ' + toWrite) - - const res = destination.write(toWrite) - - if (res) { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(run) - } else { - destination.once('drain', function () { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - run() - }) - } -} - -process.on('unhandledRejection', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.on('uncaughtException', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.once('exit', exitCode => { - if (exitCode !== 0) { - process.exit(exitCode) - return - } - if (destination?.writableNeedDrain && !destination?.writableEnded) { - parentPort.postMessage({ - code: 'WARNING', - err: new Error('ThreadStream: process exited before destination stream was drained. this may indicate that the destination stream try to write to a another missing stream') - }) - } - - process.exit(0) -}) diff --git a/dist/worker3.js b/dist/worker3.js deleted file mode 100644 index 6f0825c..0000000 --- a/dist/worker3.js +++ /dev/null @@ -1,174 +0,0 @@ -'use strict' - -const { realImport, realRequire } = require('real-require') -const { workerData, parentPort } = require('worker_threads') -const { WRITE_INDEX, READ_INDEX } = require('./indexes') -const { waitDiff } = require('./wait') - -const { - dataBuf, - filename, - stateBuf -} = workerData - -let destination - -const state = new Int32Array(stateBuf) -const data = Buffer.from(dataBuf) - -async function start () { - let worker - try { - if (filename.endsWith('.ts') || filename.endsWith('.cts')) { - // TODO: add support for the TSM modules loader ( https://github.com/lukeed/tsm ). - if (!process[Symbol.for('ts-node.register.instance')]) { - realRequire('ts-node/register') - } else if (process.env.TS_NODE_DEV) { - realRequire('ts-node-dev') - } - // TODO: Support ES imports once tsc, tap & ts-node provide better compatibility guarantees. - // Remove extra forwardslash on Windows - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } else { - worker = (await realImport(filename)) - } - } catch (error) { - // A yarn user that tries to start a ThreadStream for an external module - // provides a filename pointing to a zip file. - // eg. require.resolve('pino-elasticsearch') // returns /foo/pino-elasticsearch-npm-6.1.0-0c03079478-6915435172.zip/bar.js - // The `import` will fail to try to load it. - // This catch block executes the `require` fallback to load the module correctly. - // In fact, yarn modifies the `require` function to manage the zipped path. - // More details at https://github.com/pinojs/pino/pull/1113 - // The error codes may change based on the node.js version (ENOTDIR > 12, ERR_MODULE_NOT_FOUND <= 12 ) - if ((error.code === 'ENOTDIR' || error.code === 'ERR_MODULE_NOT_FOUND') && - filename.startsWith('file://')) { - worker = realRequire(decodeURIComponent(filename.replace('file://', ''))) - } else if (error.code === undefined || error.code === 'ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING') { - // When bundled with pkg, an undefined error is thrown when called with realImport - // When bundled with pkg and using node v20, an ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING error is thrown when called with realImport - // More info at: https://github.com/pinojs/thread-stream/issues/143 - try { - worker = realRequire(decodeURIComponent(filename.replace(process.platform === 'win32' ? 'file:///' : 'file://', ''))) - } catch { - throw error - } - } else { - throw error - } - } - - // Depending on how the default export is performed, and on how the code is - // transpiled, we may find cases of two nested "default" objects. - // See https://github.com/pinojs/pino/issues/1243#issuecomment-982774762 - if (typeof worker === 'object') worker = worker.default - if (typeof worker === 'object') worker = worker.default - - destination = await worker(workerData.workerData) - - destination.on('error', function (err) { - Atomics.store(state, WRITE_INDEX, -2) - Atomics.notify(state, WRITE_INDEX) - - Atomics.store(state, READ_INDEX, -2) - Atomics.notify(state, READ_INDEX) - - parentPort.postMessage({ - code: 'ERROR', - err - }) - }) - - destination.on('close', function () { - // process._rawDebug('worker close emitted') - const end = Atomics.load(state, WRITE_INDEX) - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(() => { - process.exit(0) - }) - }) -} - -// No .catch() handler, -// in case there is an error it goes -// to unhandledRejection -start().then(function () { - parentPort.postMessage({ - code: 'READY' - }) - - process.nextTick(run) -}) - -function run () { - const current = Atomics.load(state, READ_INDEX) - const end = Atomics.load(state, WRITE_INDEX) - - // process._rawDebug(`pre state ${current} ${end}`) - - if (end === current) { - if (end === data.length) { - waitDiff(state, READ_INDEX, end, Infinity, run) - } else { - waitDiff(state, WRITE_INDEX, end, Infinity, run) - } - return - } - - // process._rawDebug(`post state ${current} ${end}`) - - if (end === -1) { - // process._rawDebug('end') - destination.end() - return - } - - const toWrite = data.toString('utf8', current, end) - // process._rawDebug('worker writing: ' + toWrite) - - const res = destination.write(toWrite) - - if (res) { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - setImmediate(run) - } else { - destination.once('drain', function () { - Atomics.store(state, READ_INDEX, end) - Atomics.notify(state, READ_INDEX) - run() - }) - } -} - -process.on('unhandledRejection', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.on('uncaughtException', function (err) { - parentPort.postMessage({ - code: 'ERROR', - err - }) - process.exit(1) -}) - -process.once('exit', exitCode => { - if (exitCode !== 0) { - process.exit(exitCode) - return - } - if (destination?.writableNeedDrain && !destination?.writableEnded) { - parentPort.postMessage({ - code: 'WARNING', - err: new Error('ThreadStream: process exited before destination stream was drained. this may indicate that the destination stream try to write to a another missing stream') - }) - } - - process.exit(0) -}) diff --git a/eslint.config.ts b/eslint.config.ts new file mode 100644 index 0000000..274b1b1 --- /dev/null +++ b/eslint.config.ts @@ -0,0 +1 @@ +export {default} from '@bfra.me/eslint-config' diff --git a/index.js b/index.js index 0ef2f49..159fb08 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -const {run} = require('@probot/adapter-github-actions'); -const app = require('./app'); +import {run} from '@probot/adapter-github-actions' +import app from './app.js' -run(app); +run(app) diff --git a/package.json b/package.json index f2b712c..bd6216c 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,58 @@ { "name": "github-app", "version": "0.0.0-development", - "description": "GitHub App template repository", "private": true, - "packageManager": "pnpm@9.14.2", - "author": "Marcus R. Brown ", - "license": "MIT", + "description": "GitHub App template repository", "repository": "github:bfra-me/github-app", - "engines": { - "node": "^16.20.0 || >=18" - }, + "license": "MIT", + "author": "Marcus R. Brown ", + "type": "module", + "main": "dist/index.js", "scripts": { - "test": "node test/app.test.js || true", - "build": "ncc build index.js -o dist", + "bootstrap": "pnpm install --ignore-scripts --prefer-frozen-lockfile --prefer-offline --loglevel error", + "build": "tsup", "check-format": "prettier --check .", - "format": "prettier --write ." + "fix": "pnpm run lint --fix", + "format": "prettier --write .", + "lint": "eslint --flag unstable_ts_config .", + "test": "node test/app.test.js || true" }, + "prettier": "@bfra.me/prettier-config/120-proof", "dependencies": { "@probot/adapter-github-actions": "4.0.0", "probot": "13.4.0" }, "devDependencies": { + "@bfra.me/eslint-config": "0.4.7", + "@bfra.me/prettier-config": "0.9.4", "@semantic-release/git": "10.0.1", - "@vercel/ncc": "0.38.3", + "@swc/core": "1.9.3", + "@vitest/eslint-plugin": "1.1.10", "conventional-changelog-conventionalcommits": "8.0.0", + "eslint-plugin-no-only-tests": "3.3.0", + "jiti": "2.4.0", "nock": "13.5.6", "prettier": "3.3.3", "semantic-release": "24.2.0", + "tsup": "8.3.5", "uvu": "0.5.6" }, - "jest": { - "testEnvironment": "node" + "packageManager": "pnpm@9.14.2", + "engines": { + "node": "^16.20.0 || >=18" + }, + "tsup": { + "banner": { + "js": "import {createRequire} from 'node:module';const require=createRequire(import.meta.url);" + }, + "clean": true, + "entry": [ + "index.js" + ], + "format": "esm", + "noExternal": [ + "@probot/adapter-github-actions", + "probot" + ] } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e64ed72..a4d369d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,15 +15,30 @@ importers: specifier: 13.4.0 version: 13.4.0 devDependencies: + '@bfra.me/eslint-config': + specifier: 0.4.7 + version: 0.4.7(@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.10(@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint-plugin-no-only-tests@3.3.0)(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@bfra.me/prettier-config': + specifier: 0.9.4 + version: 0.9.4(prettier@3.3.3) '@semantic-release/git': specifier: 10.0.1 - version: 10.0.1(semantic-release@24.2.0) - '@vercel/ncc': - specifier: 0.38.3 - version: 0.38.3 + version: 10.0.1(semantic-release@24.2.0(typescript@5.7.2)) + '@swc/core': + specifier: 1.9.3 + version: 1.9.3 + '@vitest/eslint-plugin': + specifier: 1.1.10 + version: 1.1.10(@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) conventional-changelog-conventionalcommits: specifier: 8.0.0 version: 8.0.0 + eslint-plugin-no-only-tests: + specifier: 3.3.0 + version: 3.3.0 + jiti: + specifier: 2.4.0 + version: 2.4.0 nock: specifier: 13.5.6 version: 13.5.6 @@ -32,7 +47,10 @@ importers: version: 3.3.3 semantic-release: specifier: 24.2.0 - version: 24.2.0 + version: 24.2.0(typescript@5.7.2) + tsup: + specifier: 8.3.5 + version: 8.3.5(@swc/core@1.9.3)(jiti@2.4.0)(typescript@5.7.2) uvu: specifier: 0.5.6 version: 0.5.6 @@ -59,10 +77,233 @@ packages: resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} + '@bfra.me/eslint-config@0.4.7': + resolution: {integrity: sha512-rYZ46W+oY/VZqO0TDBCoiOVbjWNq/Yw/qwkT6nQNy8KzzYtNN2F0za2K1GKSNcWd7T5PftMyBvvYsg0c8VCAMQ==} + peerDependencies: + '@vitest/eslint-plugin': ^1.1.4 + eslint: ^9.10.0 + eslint-plugin-no-only-tests: ^3.3.0 + peerDependenciesMeta: + '@vitest/eslint-plugin': + optional: true + eslint-plugin-no-only-tests: + optional: true + + '@bfra.me/prettier-config@0.9.4': + resolution: {integrity: sha512-OGoH+PWCoYpSZwtQQQx+RyqJVvwTT4QqMVVE1olUZtamSyZ5Da/0GWRyl7b2WfgaTDuWo20asFizmLRXf1FKjA==} + peerDependencies: + prettier: ^3.0.0 + + '@bfra.me/prettier-plugins@0.5.2': + resolution: {integrity: sha512-XeeLPHUL4V30EXGkDMq/D6noMR9ueusIvqXq7qCwNmm0s8GjoFrGPvofdOnXKZ5lZH2pGa+9YXINvrIKmmHxbw==} + peerDependencies: + prettier: ^3.0.0 + '@colors/colors@1.5.0': resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} + '@es-joy/jsdoccomment@0.48.0': + resolution: {integrity: sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==} + engines: {node: '>=16'} + + '@es-joy/jsdoccomment@0.49.0': + resolution: {integrity: sha512-xjZTSFgECpb9Ohuk5yMX5RhUEbfeQcuOp8IF60e+wyzWEF0M5xeSgqsfLtvPEX8BIyOX9saZqzuGPmZ8oWc+5Q==} + engines: {node: '>=16'} + + '@esbuild/aix-ppc64@0.24.0': + resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.24.0': + resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.24.0': + resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.24.0': + resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.24.0': + resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.24.0': + resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.24.0': + resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.24.0': + resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.24.0': + resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.24.0': + resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.24.0': + resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.24.0': + resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.24.0': + resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.24.0': + resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.24.0': + resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.24.0': + resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.24.0': + resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.24.0': + resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.0': + resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.24.0': + resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.24.0': + resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.24.0': + resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.24.0': + resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.24.0': + resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-plugin-eslint-comments@4.4.1': + resolution: {integrity: sha512-lb/Z/MzbTf7CaVYM9WCFNQZ4L1yi3ev2fsFPF99h31ljhSEyUoyEsKsNWiU+qD1glbYTDJdqgyaLKtyTkkqtuQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/compat@1.2.3': + resolution: {integrity: sha512-wlZhwlDFxkxIZ571aH0FoK4h4Vwx7P3HJx62Gp8hTc10bfpwT2x0nULuAHmQSJBOWPgPeVf+9YtnD4j50zVHmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.10.0 + peerDependenciesMeta: + eslint: + optional: true + + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.15.0': + resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@fastify/busboy@2.1.1': resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} engines: {node: '>=14'} @@ -70,9 +311,51 @@ packages: '@hapi/bourne@2.1.0': resolution: {integrity: sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} + + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + engines: {node: '>=18.18'} + '@ioredis/commands@1.2.0': resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -230,6 +513,14 @@ packages: resolution: {integrity: sha512-BVwtWE3rRXB9IugmQTfKspqjNa8q+ab73ddkV9k1Zok3XbuOxJUi4lTYk5zBZDhfWb/Y2H+RO9Iggm25gsqeow==} engines: {node: '>= 18'} + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@pkgr/core@0.1.1': + resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@pnpm/config.env-replace@1.1.0': resolution: {integrity: sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==} engines: {node: '>=12.22.0'} @@ -258,6 +549,96 @@ packages: resolution: {integrity: sha512-I7zI6MWP1wz9qvTY8U3wOWeRXY2NiuTDqf91v/LQl9oiffUHl+Z1YelRvNcvHbaUo/GK7E1mJr+Sw4dHuSGxpg==} hasBin: true + '@rollup/rollup-android-arm-eabi@4.27.4': + resolution: {integrity: sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.27.4': + resolution: {integrity: sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.27.4': + resolution: {integrity: sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.27.4': + resolution: {integrity: sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.27.4': + resolution: {integrity: sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.27.4': + resolution: {integrity: sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.27.4': + resolution: {integrity: sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.27.4': + resolution: {integrity: sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.27.4': + resolution: {integrity: sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.27.4': + resolution: {integrity: sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.27.4': + resolution: {integrity: sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.27.4': + resolution: {integrity: sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.27.4': + resolution: {integrity: sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.27.4': + resolution: {integrity: sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.27.4': + resolution: {integrity: sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.27.4': + resolution: {integrity: sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.27.4': + resolution: {integrity: sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.27.4': + resolution: {integrity: sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==} + cpu: [x64] + os: [win32] + '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -335,6 +716,81 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} + '@swc/core-darwin-arm64@1.9.3': + resolution: {integrity: sha512-hGfl/KTic/QY4tB9DkTbNuxy5cV4IeejpPD4zo+Lzt4iLlDWIeANL4Fkg67FiVceNJboqg48CUX+APhDHO5G1w==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + + '@swc/core-darwin-x64@1.9.3': + resolution: {integrity: sha512-IaRq05ZLdtgF5h9CzlcgaNHyg4VXuiStnOFpfNEMuI5fm5afP2S0FHq8WdakUz5WppsbddTdplL+vpeApt/WCQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + + '@swc/core-linux-arm-gnueabihf@1.9.3': + resolution: {integrity: sha512-Pbwe7xYprj/nEnZrNBvZfjnTxlBIcfApAGdz2EROhjpPj+FBqBa3wOogqbsuGGBdCphf8S+KPprL1z+oDWkmSQ==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + + '@swc/core-linux-arm64-gnu@1.9.3': + resolution: {integrity: sha512-AQ5JZiwNGVV/2K2TVulg0mw/3LYfqpjZO6jDPtR2evNbk9Yt57YsVzS+3vHSlUBQDRV9/jqMuZYVU3P13xrk+g==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-arm64-musl@1.9.3': + resolution: {integrity: sha512-tzVH480RY6RbMl/QRgh5HK3zn1ZTFsThuxDGo6Iuk1MdwIbdFYUY034heWUTI4u3Db97ArKh0hNL0xhO3+PZdg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + + '@swc/core-linux-x64-gnu@1.9.3': + resolution: {integrity: sha512-ivXXBRDXDc9k4cdv10R21ccBmGebVOwKXT/UdH1PhxUn9m/h8erAWjz5pcELwjiMf27WokqPgaWVfaclDbgE+w==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-linux-x64-musl@1.9.3': + resolution: {integrity: sha512-ILsGMgfnOz1HwdDz+ZgEuomIwkP1PHT6maigZxaCIuC6OPEhKE8uYna22uU63XvYcLQvZYDzpR3ms47WQPuNEg==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + + '@swc/core-win32-arm64-msvc@1.9.3': + resolution: {integrity: sha512-e+XmltDVIHieUnNJHtspn6B+PCcFOMYXNJB1GqoCcyinkEIQNwC8KtWgMqUucUbEWJkPc35NHy9k8aCXRmw9Kg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + + '@swc/core-win32-ia32-msvc@1.9.3': + resolution: {integrity: sha512-rqpzNfpAooSL4UfQnHhkW8aL+oyjqJniDP0qwZfGnjDoJSbtPysHg2LpcOBEdSnEH+uIZq6J96qf0ZFD8AGfXA==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + + '@swc/core-win32-x64-msvc@1.9.3': + resolution: {integrity: sha512-3YJJLQ5suIEHEKc1GHtqVq475guiyqisKSoUnoaRtxkDaW5g1yvPt9IoSLOe2mRs7+FFhGGU693RsBUSwOXSdQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + + '@swc/core@1.9.3': + resolution: {integrity: sha512-oRj0AFePUhtatX+BscVhnzaAmWjpfAeySpM1TCbxA1rtBDeH/JDhi5yYzAKneDYtVtBvA7ApfeuzhMC9ye4xSg==} + engines: {node: '>=10'} + peerDependencies: + '@swc/helpers': '*' + peerDependenciesMeta: + '@swc/helpers': + optional: true + + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + + '@swc/types@0.1.17': + resolution: {integrity: sha512-V5gRru+aD8YVyCOMAjMpWR1Ui577DD5KSJsHP8RAxopAH22jFz6GZd/qxqjO6MJHQhcsjvjOFXyDhyLQUnMveQ==} + '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -344,6 +800,9 @@ packages: '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/express-serve-static-core@4.19.6': resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} @@ -353,6 +812,9 @@ packages: '@types/http-errors@2.0.4': resolution: {integrity: sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/jsonwebtoken@9.0.7': resolution: {integrity: sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg==} @@ -380,9 +842,80 @@ packages: '@types/serve-static@1.15.7': resolution: {integrity: sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==} - '@vercel/ncc@0.38.3': - resolution: {integrity: sha512-rnK6hJBS6mwc+Bkab+PGPs9OiS0i/3kdTO+CkI8V0/VrW3vmz7O2Pxjw/owOlmo6PKEIxRSeZKv/kuL9itnpYA==} - hasBin: true + '@typescript-eslint/eslint-plugin@8.15.0': + resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/parser@8.15.0': + resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/scope-manager@8.15.0': + resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.15.0': + resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/types@8.15.0': + resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.15.0': + resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@8.15.0': + resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/visitor-keys@8.15.0': + resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/eslint-plugin@1.1.10': + resolution: {integrity: sha512-uScH5Kz5v32vvtQYB2iodpoPg2mGASK+VKpjlc2IUgE0+16uZKqVKi2vQxjxJ6sMCQLBs4xhBFZlmZBszsmfKQ==} + peerDependencies: + '@typescript-eslint/utils': '>= 8.0' + eslint: '>= 8.57.0' + typescript: '>= 5.0.0' + vitest: '*' + peerDependenciesMeta: + typescript: + optional: true + vitest: + optional: true '@wolfy1339/lru-cache@11.0.2-patch.1': resolution: {integrity: sha512-BgYZfL2ADCXKOw2wJtkM3slhHotawWkgIRRxq4wEybnZQPjvAp71SPX35xepMykTw8gXlzWcWPTY31hlbnRsDA==} @@ -396,6 +929,16 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -408,6 +951,9 @@ packages: resolution: {integrity: sha512-gOsf2YwSlleG6IjRYG2A7k0HmBMEo6qVNk9Bp/EaLgAJT5ngH6PXbqa4ItvnEwCm/velL5jAnQgsHsWnjhGmvw==} engines: {node: '>=18'} + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + ansi-escapes@7.0.0: resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} engines: {node: '>=18'} @@ -428,9 +974,17 @@ packages: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + are-docs-informative@0.0.2: + resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} + engines: {node: '>=14'} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -451,6 +1005,9 @@ packages: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -467,6 +1024,12 @@ packages: bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -480,10 +1043,20 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + bytes@3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -512,6 +1085,10 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + clean-stack@2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -560,12 +1137,30 @@ packages: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + + comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + confbox@0.1.8: + resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -638,6 +1233,14 @@ packages: supports-color: optional: true + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.7: resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} engines: {node: '>=6.0'} @@ -651,6 +1254,9 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -678,6 +1284,14 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + detect-indent@7.0.1: + resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} + engines: {node: '>=12.20'} + + detect-newline@4.0.1: + resolution: {integrity: sha512-qE3Veg1YXzGHQhlA6jzebZN2qVf6NX+A7m7qlhCGG30dJixrAQhYOsJjsnBjJkCSmuOPpCk30145fr8FV0bzog==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + diff@5.2.0: resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} @@ -686,6 +1300,10 @@ packages: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dot-prop@5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -697,6 +1315,9 @@ packages: duplexer2@0.1.4: resolution: {integrity: sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==} + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} @@ -706,6 +1327,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} @@ -743,6 +1367,14 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@1.5.4: + resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + + esbuild@0.24.0: + resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -754,10 +1386,116 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + eslint-config-flat-gitignore@0.3.0: + resolution: {integrity: sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og==} + peerDependencies: + eslint: ^9.5.0 + + eslint-flat-config-utils@0.4.0: + resolution: {integrity: sha512-kfd5kQZC+BMO0YwTol6zxjKX1zAsk8JfSAopbKjKqmENTJcew+yBejuvccAg37cvOrN0Mh+DVbeyznuNWEjt4A==} + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-plugin-command@0.2.6: + resolution: {integrity: sha512-T0bHZ1oblW1xUHUVoBKZJR2osSNNGkfZuK4iqboNwuNS/M7tdp3pmURaJtTi/XDzitxaQ02lvOdFH0mUd5QLvQ==} + peerDependencies: + eslint: '*' + + eslint-plugin-import-x@4.4.3: + resolution: {integrity: sha512-QBprHvhLsfDhP++2T1NnjsOUt6bLDX3NMHaYwAB1FD3xmYTkdFH+HS1OamGhz28jLkRyIZa6UNAzTxbHnJwz5w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + + eslint-plugin-jsdoc@50.5.0: + resolution: {integrity: sha512-xTkshfZrUbiSHXBwZ/9d5ulZ2OcHXxSvm/NPo494H/hadLRJwOq5PMV0EUpMqsb9V+kQo+9BAgi6Z7aJtdBp2A==} + engines: {node: '>=18'} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-no-only-tests@3.3.0: + resolution: {integrity: sha512-brcKcxGnISN2CcVhXJ/kEQlNa0MEfGRtwKtWA16SkqXHKitaKIMrfemJKLKX1YqDU5C/5JY3PvZXd5jEW04e0Q==} + engines: {node: '>=5.0.0'} + + eslint-plugin-perfectionist@3.9.1: + resolution: {integrity: sha512-9WRzf6XaAxF4Oi5t/3TqKP5zUjERhasHmLFHin2Yw6ZAp/EP/EVA2dr3BhQrrHWCm5SzTMZf0FcjDnBkO2xFkA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + astro-eslint-parser: ^1.0.2 + eslint: '>=8.0.0' + svelte: '>=3.0.0' + svelte-eslint-parser: ^0.41.1 + vue-eslint-parser: '>=9.0.0' + peerDependenciesMeta: + astro-eslint-parser: + optional: true + svelte: + optional: true + svelte-eslint-parser: + optional: true + vue-eslint-parser: + optional: true + + eslint-plugin-unused-imports@4.1.4: + resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} + peerDependencies: + '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 + eslint: ^9.0.0 || ^8.0.0 + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -786,10 +1524,19 @@ packages: resolution: {integrity: sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==} engines: {node: '>= 0.10.0'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-redact@3.5.0: resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} @@ -800,6 +1547,14 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -808,6 +1563,10 @@ packages: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -828,13 +1587,28 @@ packages: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + find-versions@6.0.0: resolution: {integrity: sha512-2kCCtc+JvcZ86IGAz3Z2Y0A1baIz9fL31pH/0S1IqZr9Iwnjq8izfPtrCyQKO6TLMPELLsQMre7VDqeIKCsHkA==} engines: {node: '>=18'} - forwarded@0.2.0: - resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} - engines: {node: '>= 0.6'} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} fresh@0.5.2: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} @@ -847,6 +1621,11 @@ packages: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -862,6 +1641,10 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-stdin@9.0.0: + resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} + engines: {node: '>=12'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -878,6 +1661,12 @@ packages: resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} engines: {node: '>=18'} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + + git-hooks-list@3.1.0: + resolution: {integrity: sha512-LF8VeHeR7v+wAbXqfgRlTSX/1BJR9Q1vEMR8JAz1cEg6GX07+zyj3sAdDvYjj/xnlIfVuGgj4qBei1K3hKH+PA==} + git-log-parser@1.2.1: resolution: {integrity: sha512-PI+sPDvHXNPl5WNOErAK05s3j0lgwUzMN6o8cyQrDaKfT3qd7TmNJKeXX+SknI5I0QhG5fVPAEwSY4tRGDtYoQ==} @@ -885,6 +1674,22 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + engines: {node: '>=18'} + globby@14.0.2: resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} engines: {node: '>=18'} @@ -898,6 +1703,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} @@ -990,6 +1798,10 @@ packages: import-meta-resolve@4.1.0: resolution: {integrity: sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==} + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + indent-string@4.0.0: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} @@ -1023,6 +1835,10 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-core-module@2.15.1: + resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} + engines: {node: '>= 0.4'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1035,6 +1851,11 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-in-ci@1.0.0: + resolution: {integrity: sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==} + engines: {node: '>=18'} + hasBin: true + is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -1073,10 +1894,17 @@ packages: resolution: {integrity: sha512-3YZcUUR2Wt1WsapF+S/WiA2WmlW0cWAoPccMqne7AxEBhCdFeTPjfv/Axb8V2gyCgY3nRw+ksZ3xSUX+R47iAg==} engines: {node: ^18.17 || >=20.6.1} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + java-properties@1.0.2: resolution: {integrity: sha512-qjdpeo2yKlYTH7nFdK0vbZWuTCesk4o63v5iVOlhMQPfuIZQfW/HI35SjfhA+4qpg36rnFSvUK5b1m+ckIblQQ==} engines: {node: '>= 0.6.0'} + jiti@2.4.0: + resolution: {integrity: sha512-H5UpaUI+aHOqZXlYOaFP/8AzKsg+guWu+Pr3Y8i7+Y3zr1aXAvCvTAQ1RxSc6oVD8R8c7brgNtTVP91E7upH/g==} + hasBin: true + jmespath@0.15.0: resolution: {integrity: sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w==} engines: {node: '>= 0.6.0'} @@ -1092,12 +1920,25 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsdoc-type-pratt-parser@4.1.0: + resolution: {integrity: sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==} + engines: {node: '>=12.0.0'} + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -1114,6 +1955,9 @@ packages: jws@3.2.2: resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -1122,9 +1966,17 @@ packages: resolution: {integrity: sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==} engines: {node: '>=0.10.0'} + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + lie@3.1.1: resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -1136,6 +1988,14 @@ packages: resolution: {integrity: sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==} engines: {node: '>=6'} + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + local-pkg@0.5.1: + resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==} + engines: {node: '>=14'} + localforage@1.10.0: resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} @@ -1147,6 +2007,10 @@ packages: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -1180,9 +2044,15 @@ packages: lodash.isstring@4.0.1: resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.uniqby@4.7.0: resolution: {integrity: sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==} @@ -1255,9 +2125,23 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + mlly@1.7.3: + resolution: {integrity: sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A==} + mri@1.1.4: resolution: {integrity: sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==} engines: {node: '>=4'} @@ -1275,6 +2159,12 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -1420,6 +2310,10 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + p-each-series@3.0.0: resolution: {integrity: sha512-lastgtAdoH9YaLyDa5i5z64q+kzOcQHsQ5SsZJD3q0VEyI8mq872S3geuNbRUQLVAE9siMfgKrpj7MloKFHruw==} engines: {node: '>=12'} @@ -1440,6 +2334,10 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-locate@2.0.0: resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} engines: {node: '>=4'} @@ -1448,6 +2346,10 @@ packages: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-map@7.0.2: resolution: {integrity: sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==} engines: {node: '>=18'} @@ -1468,10 +2370,17 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-imports@2.2.1: + resolution: {integrity: sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==} + engines: {node: '>= 18'} + parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -1505,6 +2414,10 @@ packages: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} engines: {node: '>=4'} + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -1513,6 +2426,13 @@ packages: resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} engines: {node: '>=12'} + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + path-to-regexp@0.1.10: resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==} @@ -1524,6 +2444,9 @@ packages: resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} engines: {node: '>=12'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1531,6 +2454,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@3.0.0: resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} engines: {node: '>=4'} @@ -1566,6 +2493,10 @@ packages: resolution: {integrity: sha512-xSEmD4pLnV54t0NOUN16yCl7RIB1c5UUOse5HSyEXtBp+FgFQyPeDutc+Q2ZO7/22vImV7VfEjH/1zV2QuqvYw==} hasBin: true + pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + pkg-conf@2.1.0: resolution: {integrity: sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==} engines: {node: '>=4'} @@ -1574,6 +2505,31 @@ packages: resolution: {integrity: sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==} engines: {node: '>=6'} + pkg-types@1.2.1: + resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} + + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@3.3.3: resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} @@ -1615,6 +2571,10 @@ packages: pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + qs@6.13.0: resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} @@ -1656,6 +2616,10 @@ packages: resolution: {integrity: sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + real-require@0.2.0: resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} engines: {node: '>= 12.13.0'} @@ -1684,6 +2648,13 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -1691,6 +2662,11 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rollup@4.27.4: + resolution: {integrity: sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -1775,16 +2751,30 @@ packages: resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} engines: {node: '>=14.16'} + slashes@3.0.12: + resolution: {integrity: sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==} + sonic-boom@3.8.1: resolution: {integrity: sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==} sonic-boom@4.2.0: resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} + sort-object-keys@1.1.3: + resolution: {integrity: sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==} + + sort-package-json@2.11.0: + resolution: {integrity: sha512-pBs3n/wcsbnMSiO5EYV4AVnZVtyQslfZ/0v6VbrRRVApqyNf0Uqo4MOXJsBmIplGY1hYZ4bq5qjO9xTgY+K8xw==} + hasBin: true + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + spawn-error-forwarder@1.0.0: resolution: {integrity: sha512-gRjMgK5uFjbCvdibeGJuy3I5OYz6VLoVdsOJdA6wV0WlfQVLFueoqMxwwYD9RODdgb6oUIvlRlsyFSiQkMKu0g==} @@ -1797,6 +2787,9 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + spdx-expression-parse@4.0.0: + resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + spdx-license-ids@3.0.20: resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} @@ -1810,6 +2803,9 @@ packages: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} engines: {node: '>= 10.x'} + stable-hash@0.0.4: + resolution: {integrity: sha512-LjdcbuBeLcdETCrPn9i8AYAZ1eCtu4ECAWtP7UleOiZ9LzVxRzzUZEoZ8zB24nhkQnDWyET0I+3sWokSDS3E7g==} + standard-as-callback@2.1.0: resolution: {integrity: sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A==} @@ -1824,6 +2820,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -1834,6 +2834,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -1858,6 +2862,11 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + super-regex@1.0.0: resolution: {integrity: sha512-CY8u7DtbvucKuquCmOFEKhr9Besln7n9uN8eFbwcoGYWXOMW07u2o8njWaiXt11ylS3qoGF55pILjRmPlbodyg==} engines: {node: '>=18'} @@ -1874,6 +2883,14 @@ packages: resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} engines: {node: '>=14.18'} + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + engines: {node: ^14.18.0 || >=16.0.0} + temp-dir@3.0.0: resolution: {integrity: sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==} engines: {node: '>=14.16'} @@ -1905,6 +2922,13 @@ packages: resolution: {integrity: sha512-75voc/9G4rDIJleOo4jPvN4/YC4GRZrY8yy1uU4lwrB3XEQbWve8zXoO5No4eFrGcTAMYyoY67p8jRQdtA1HbA==} engines: {node: '>=12'} + tinyexec@0.3.1: + resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -1913,14 +2937,56 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + traverse@0.6.8: resolution: {integrity: sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==} engines: {node: '>= 0.4'} + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + + ts-api-utils@1.4.1: + resolution: {integrity: sha512-5RU2/lxTA3YUZxju61HO2U6EoZLvBLtmV2mbTvqyu4a/7s7RmJPT+1YekhMVsQhznRWk/czIwDUg+V8Q9ZuG4w==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + tsup@8.3.5: + resolution: {integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + tunnel@0.0.6: resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==} engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + type-fest@0.3.1: resolution: {integrity: sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==} engines: {node: '>=6'} @@ -1941,6 +3007,24 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} + typescript-eslint@8.15.0: + resolution: {integrity: sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -1991,6 +3075,9 @@ packages: peerDependencies: dotenv: '*' + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-join@5.0.0: resolution: {integrity: sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2014,11 +3101,21 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} hasBin: true + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -2026,6 +3123,10 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -2053,6 +3154,10 @@ packages: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + yoctocolors@2.1.1: resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} engines: {node: '>=18'} @@ -2083,15 +3188,224 @@ snapshots: '@babel/helper-validator-identifier@7.25.9': {} + '@bfra.me/eslint-config@0.4.7(@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.10(@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint-plugin-no-only-tests@3.3.0)(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.15.0(jiti@2.4.0)) + eslint: 9.15.0(jiti@2.4.0) + eslint-config-flat-gitignore: 0.3.0(eslint@9.15.0(jiti@2.4.0)) + eslint-flat-config-utils: 0.4.0 + eslint-plugin-command: 0.2.6(eslint@9.15.0(jiti@2.4.0)) + eslint-plugin-import-x: 4.4.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint-plugin-jsdoc: 50.5.0(eslint@9.15.0(jiti@2.4.0)) + eslint-plugin-perfectionist: 3.9.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint-plugin-unused-imports: 4.1.4(@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0)) + globals: 15.12.0 + is-in-ci: 1.0.0 + local-pkg: 0.5.1 + typescript-eslint: 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + optionalDependencies: + '@vitest/eslint-plugin': 1.1.10(@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint-plugin-no-only-tests: 3.3.0 + transitivePeerDependencies: + - '@typescript-eslint/eslint-plugin' + - astro-eslint-parser + - supports-color + - svelte + - svelte-eslint-parser + - typescript + - vue-eslint-parser + + '@bfra.me/prettier-config@0.9.4(prettier@3.3.3)': + dependencies: + '@bfra.me/prettier-plugins': 0.5.2(prettier@3.3.3) + prettier: 3.3.3 + + '@bfra.me/prettier-plugins@0.5.2(prettier@3.3.3)': + dependencies: + prettier: 3.3.3 + sort-package-json: 2.11.0 + '@colors/colors@1.5.0': optional: true + '@es-joy/jsdoccomment@0.48.0': + dependencies: + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.1.0 + + '@es-joy/jsdoccomment@0.49.0': + dependencies: + comment-parser: 1.4.1 + esquery: 1.6.0 + jsdoc-type-pratt-parser: 4.1.0 + + '@esbuild/aix-ppc64@0.24.0': + optional: true + + '@esbuild/android-arm64@0.24.0': + optional: true + + '@esbuild/android-arm@0.24.0': + optional: true + + '@esbuild/android-x64@0.24.0': + optional: true + + '@esbuild/darwin-arm64@0.24.0': + optional: true + + '@esbuild/darwin-x64@0.24.0': + optional: true + + '@esbuild/freebsd-arm64@0.24.0': + optional: true + + '@esbuild/freebsd-x64@0.24.0': + optional: true + + '@esbuild/linux-arm64@0.24.0': + optional: true + + '@esbuild/linux-arm@0.24.0': + optional: true + + '@esbuild/linux-ia32@0.24.0': + optional: true + + '@esbuild/linux-loong64@0.24.0': + optional: true + + '@esbuild/linux-mips64el@0.24.0': + optional: true + + '@esbuild/linux-ppc64@0.24.0': + optional: true + + '@esbuild/linux-riscv64@0.24.0': + optional: true + + '@esbuild/linux-s390x@0.24.0': + optional: true + + '@esbuild/linux-x64@0.24.0': + optional: true + + '@esbuild/netbsd-x64@0.24.0': + optional: true + + '@esbuild/openbsd-arm64@0.24.0': + optional: true + + '@esbuild/openbsd-x64@0.24.0': + optional: true + + '@esbuild/sunos-x64@0.24.0': + optional: true + + '@esbuild/win32-arm64@0.24.0': + optional: true + + '@esbuild/win32-ia32@0.24.0': + optional: true + + '@esbuild/win32-x64@0.24.0': + optional: true + + '@eslint-community/eslint-plugin-eslint-comments@4.4.1(eslint@9.15.0(jiti@2.4.0))': + dependencies: + escape-string-regexp: 4.0.0 + eslint: 9.15.0(jiti@2.4.0) + ignore: 5.3.2 + + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0(jiti@2.4.0))': + dependencies: + eslint: 9.15.0(jiti@2.4.0) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/compat@1.2.3(eslint@9.15.0(jiti@2.4.0))': + optionalDependencies: + eslint: 9.15.0(jiti@2.4.0) + + '@eslint/config-array@0.19.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.9.0': {} + + '@eslint/eslintrc@3.2.0': + dependencies: + ajv: 6.12.6 + debug: 4.3.7 + espree: 10.3.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.15.0': {} + + '@eslint/object-schema@2.1.4': {} + + '@eslint/plugin-kit@0.2.3': + dependencies: + levn: 0.4.1 + '@fastify/busboy@2.1.1': {} '@hapi/bourne@2.1.0': {} + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': + dependencies: + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.1 + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.3.1': {} + + '@humanwhocodes/retry@0.4.1': {} + '@ioredis/commands@1.2.0': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@jridgewell/gen-mapping@0.3.5': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2296,6 +3610,11 @@ snapshots: '@octokit/webhooks-types': 7.6.1 aggregate-error: 3.1.0 + '@pkgjs/parseargs@0.11.0': + optional: true + + '@pkgr/core@0.1.1': {} + '@pnpm/config.env-replace@1.1.0': {} '@pnpm/network.ca-file@1.0.2': @@ -2332,9 +3651,63 @@ snapshots: readable-stream: 3.6.2 split2: 4.2.0 + '@rollup/rollup-android-arm-eabi@4.27.4': + optional: true + + '@rollup/rollup-android-arm64@4.27.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.27.4': + optional: true + + '@rollup/rollup-darwin-x64@4.27.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.27.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.27.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.27.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.27.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.27.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.27.4': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.27.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.27.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.27.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.27.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.27.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.27.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.27.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.27.4': + optional: true + '@sec-ant/readable-stream@0.4.1': {} - '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.0)': + '@semantic-release/commit-analyzer@13.0.0(semantic-release@24.2.0(typescript@5.7.2))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -2344,7 +3717,7 @@ snapshots: import-from-esm: 1.3.4 lodash-es: 4.17.21 micromatch: 4.0.8 - semantic-release: 24.2.0 + semantic-release: 24.2.0(typescript@5.7.2) transitivePeerDependencies: - supports-color @@ -2352,7 +3725,7 @@ snapshots: '@semantic-release/error@4.0.0': {} - '@semantic-release/git@10.0.1(semantic-release@24.2.0)': + '@semantic-release/git@10.0.1(semantic-release@24.2.0(typescript@5.7.2))': dependencies: '@semantic-release/error': 3.0.0 aggregate-error: 3.1.0 @@ -2362,11 +3735,11 @@ snapshots: lodash: 4.17.21 micromatch: 4.0.8 p-reduce: 2.1.0 - semantic-release: 24.2.0 + semantic-release: 24.2.0(typescript@5.7.2) transitivePeerDependencies: - supports-color - '@semantic-release/github@11.0.1(semantic-release@24.2.0)': + '@semantic-release/github@11.0.1(semantic-release@24.2.0(typescript@5.7.2))': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.5(@octokit/core@6.1.2) @@ -2383,12 +3756,12 @@ snapshots: lodash-es: 4.17.21 mime: 4.0.4 p-filter: 4.1.0 - semantic-release: 24.2.0 + semantic-release: 24.2.0(typescript@5.7.2) url-join: 5.0.0 transitivePeerDependencies: - supports-color - '@semantic-release/npm@12.0.1(semantic-release@24.2.0)': + '@semantic-release/npm@12.0.1(semantic-release@24.2.0(typescript@5.7.2))': dependencies: '@semantic-release/error': 4.0.0 aggregate-error: 5.0.0 @@ -2401,11 +3774,11 @@ snapshots: rc: 1.2.8 read-pkg: 9.0.1 registry-auth-token: 5.0.2 - semantic-release: 24.2.0 + semantic-release: 24.2.0(typescript@5.7.2) semver: 7.6.3 tempy: 3.1.0 - '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.2.0)': + '@semantic-release/release-notes-generator@14.0.1(semantic-release@24.2.0(typescript@5.7.2))': dependencies: conventional-changelog-angular: 8.0.0 conventional-changelog-writer: 8.0.0 @@ -2417,7 +3790,7 @@ snapshots: into-stream: 7.0.0 lodash-es: 4.17.21 read-package-up: 11.0.0 - semantic-release: 24.2.0 + semantic-release: 24.2.0(typescript@5.7.2) transitivePeerDependencies: - supports-color @@ -2459,6 +3832,58 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} + '@swc/core-darwin-arm64@1.9.3': + optional: true + + '@swc/core-darwin-x64@1.9.3': + optional: true + + '@swc/core-linux-arm-gnueabihf@1.9.3': + optional: true + + '@swc/core-linux-arm64-gnu@1.9.3': + optional: true + + '@swc/core-linux-arm64-musl@1.9.3': + optional: true + + '@swc/core-linux-x64-gnu@1.9.3': + optional: true + + '@swc/core-linux-x64-musl@1.9.3': + optional: true + + '@swc/core-win32-arm64-msvc@1.9.3': + optional: true + + '@swc/core-win32-ia32-msvc@1.9.3': + optional: true + + '@swc/core-win32-x64-msvc@1.9.3': + optional: true + + '@swc/core@1.9.3': + dependencies: + '@swc/counter': 0.1.3 + '@swc/types': 0.1.17 + optionalDependencies: + '@swc/core-darwin-arm64': 1.9.3 + '@swc/core-darwin-x64': 1.9.3 + '@swc/core-linux-arm-gnueabihf': 1.9.3 + '@swc/core-linux-arm64-gnu': 1.9.3 + '@swc/core-linux-arm64-musl': 1.9.3 + '@swc/core-linux-x64-gnu': 1.9.3 + '@swc/core-linux-x64-musl': 1.9.3 + '@swc/core-win32-arm64-msvc': 1.9.3 + '@swc/core-win32-ia32-msvc': 1.9.3 + '@swc/core-win32-x64-msvc': 1.9.3 + + '@swc/counter@0.1.3': {} + + '@swc/types@0.1.17': + dependencies: + '@swc/counter': 0.1.3 + '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 @@ -2470,6 +3895,8 @@ snapshots: dependencies: '@types/node': 22.9.0 + '@types/estree@1.0.6': {} + '@types/express-serve-static-core@4.19.6': dependencies: '@types/node': 22.9.0 @@ -2486,6 +3913,8 @@ snapshots: '@types/http-errors@2.0.4': {} + '@types/json-schema@7.0.15': {} + '@types/jsonwebtoken@9.0.7': dependencies: '@types/node': 22.9.0 @@ -2515,7 +3944,94 @@ snapshots: '@types/node': 22.9.0 '@types/send': 0.17.4 - '@vercel/ncc@0.38.3': {} + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.15.0 + eslint: 9.15.0(jiti@2.4.0) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.1(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.15.0 + debug: 4.3.7 + eslint: 9.15.0(jiti@2.4.0) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + debug: 4.3.7 + eslint: 9.15.0(jiti@2.4.0) + ts-api-utils: 1.4.1(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.15.0': {} + + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.1(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.0)) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.7.2) + eslint: 9.15.0(jiti@2.4.0) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + eslint-visitor-keys: 4.2.0 + + '@vitest/eslint-plugin@1.1.10(@typescript-eslint/utils@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2)': + dependencies: + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint: 9.15.0(jiti@2.4.0) + optionalDependencies: + typescript: 5.7.2 '@wolfy1339/lru-cache@11.0.2-patch.1': {} @@ -2528,6 +4044,12 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + + acorn@8.14.0: {} + agent-base@7.1.1: dependencies: debug: 4.3.7 @@ -2544,6 +4066,13 @@ snapshots: clean-stack: 5.2.0 indent-string: 5.0.0 + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ansi-escapes@7.0.0: dependencies: environment: 1.1.0 @@ -2560,8 +4089,12 @@ snapshots: dependencies: color-convert: 2.0.1 + ansi-styles@6.2.1: {} + any-promise@1.3.0: {} + are-docs-informative@0.0.2: {} + argparse@2.0.1: {} args@5.0.3: @@ -2579,6 +4112,8 @@ snapshots: atomic-sleep@1.0.0: {} + balanced-match@1.0.2: {} + base64-js@1.5.1: {} before-after-hook@2.2.3: {} @@ -2604,6 +4139,15 @@ snapshots: bottleneck@2.19.5: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -2617,8 +4161,15 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + bundle-require@5.0.0(esbuild@0.24.0): + dependencies: + esbuild: 0.24.0 + load-tsconfig: 0.2.5 + bytes@3.1.2: {} + cac@6.7.14: {} + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -2646,6 +4197,10 @@ snapshots: char-regex@1.0.2: {} + chokidar@4.0.1: + dependencies: + readdirp: 4.0.2 + clean-stack@2.2.0: {} clean-stack@5.2.0: @@ -2697,16 +4252,26 @@ snapshots: commander@12.1.0: {} + commander@4.1.1: {} + + comment-parser@1.4.1: {} + compare-func@2.0.0: dependencies: array-ify: 1.0.0 dot-prop: 5.3.0 + concat-map@0.0.1: {} + + confbox@0.1.8: {} + config-chain@1.1.13: dependencies: ini: 1.3.8 proto-list: 1.2.4 + consola@3.2.3: {} + content-disposition@0.5.4: dependencies: safe-buffer: 5.2.1 @@ -2743,12 +4308,14 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig@9.0.0: + cosmiconfig@9.0.0(typescript@5.7.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 + optionalDependencies: + typescript: 5.7.2 cross-spawn@7.0.5: dependencies: @@ -2766,12 +4333,18 @@ snapshots: dependencies: ms: 2.0.0 + debug@3.2.7: + dependencies: + ms: 2.1.3 + debug@4.3.7: dependencies: ms: 2.1.3 deep-extend@0.6.0: {} + deep-is@0.1.4: {} + deepmerge@4.3.1: {} define-data-property@1.1.4: @@ -2790,12 +4363,20 @@ snapshots: destroy@1.2.0: {} + detect-indent@7.0.1: {} + + detect-newline@4.0.1: {} + diff@5.2.0: {} dir-glob@3.0.1: dependencies: path-type: 4.0.0 + doctrine@3.0.0: + dependencies: + esutils: 2.0.3 + dot-prop@5.3.0: dependencies: is-obj: 2.0.0 @@ -2806,6 +4387,8 @@ snapshots: dependencies: readable-stream: 2.3.8 + eastasianwidth@0.2.0: {} + ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer: 5.2.1 @@ -2814,6 +4397,8 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + emojilib@2.4.0: {} encodeurl@1.0.2: {} @@ -2843,14 +4428,189 @@ snapshots: es-errors@1.3.0: {} + es-module-lexer@1.5.4: {} + + esbuild@0.24.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.0 + '@esbuild/android-arm': 0.24.0 + '@esbuild/android-arm64': 0.24.0 + '@esbuild/android-x64': 0.24.0 + '@esbuild/darwin-arm64': 0.24.0 + '@esbuild/darwin-x64': 0.24.0 + '@esbuild/freebsd-arm64': 0.24.0 + '@esbuild/freebsd-x64': 0.24.0 + '@esbuild/linux-arm': 0.24.0 + '@esbuild/linux-arm64': 0.24.0 + '@esbuild/linux-ia32': 0.24.0 + '@esbuild/linux-loong64': 0.24.0 + '@esbuild/linux-mips64el': 0.24.0 + '@esbuild/linux-ppc64': 0.24.0 + '@esbuild/linux-riscv64': 0.24.0 + '@esbuild/linux-s390x': 0.24.0 + '@esbuild/linux-x64': 0.24.0 + '@esbuild/netbsd-x64': 0.24.0 + '@esbuild/openbsd-arm64': 0.24.0 + '@esbuild/openbsd-x64': 0.24.0 + '@esbuild/sunos-x64': 0.24.0 + '@esbuild/win32-arm64': 0.24.0 + '@esbuild/win32-ia32': 0.24.0 + '@esbuild/win32-x64': 0.24.0 + escalade@3.2.0: {} escape-html@1.0.3: {} escape-string-regexp@1.0.5: {} + escape-string-regexp@4.0.0: {} + escape-string-regexp@5.0.0: {} + eslint-config-flat-gitignore@0.3.0(eslint@9.15.0(jiti@2.4.0)): + dependencies: + '@eslint/compat': 1.2.3(eslint@9.15.0(jiti@2.4.0)) + eslint: 9.15.0(jiti@2.4.0) + find-up-simple: 1.0.0 + + eslint-flat-config-utils@0.4.0: + dependencies: + pathe: 1.1.2 + + eslint-import-resolver-node@0.3.9: + dependencies: + debug: 3.2.7 + is-core-module: 2.15.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + eslint-plugin-command@0.2.6(eslint@9.15.0(jiti@2.4.0)): + dependencies: + '@es-joy/jsdoccomment': 0.48.0 + eslint: 9.15.0(jiti@2.4.0) + + eslint-plugin-import-x@4.4.3(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2): + dependencies: + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + debug: 4.3.7 + doctrine: 3.0.0 + eslint: 9.15.0(jiti@2.4.0) + eslint-import-resolver-node: 0.3.9 + get-tsconfig: 4.8.1 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + stable-hash: 0.0.4 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-jsdoc@50.5.0(eslint@9.15.0(jiti@2.4.0)): + dependencies: + '@es-joy/jsdoccomment': 0.49.0 + are-docs-informative: 0.0.2 + comment-parser: 1.4.1 + debug: 4.3.7 + escape-string-regexp: 4.0.0 + eslint: 9.15.0(jiti@2.4.0) + espree: 10.3.0 + esquery: 1.6.0 + parse-imports: 2.2.1 + semver: 7.6.3 + spdx-expression-parse: 4.0.0 + synckit: 0.9.2 + transitivePeerDependencies: + - supports-color + + eslint-plugin-no-only-tests@3.3.0: {} + + eslint-plugin-perfectionist@3.9.1(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2): + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint: 9.15.0(jiti@2.4.0) + minimatch: 9.0.5 + natural-compare-lite: 1.4.0 + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0)): + dependencies: + eslint: 9.15.0(jiti@2.4.0) + optionalDependencies: + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + + eslint-scope@8.2.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.0: {} + + eslint@9.15.0(jiti@2.4.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0(jiti@2.4.0)) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.15.0 + '@eslint/plugin-kit': 0.2.3 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.5 + debug: 4.3.7 + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.4.0 + transitivePeerDependencies: + - supports-color + + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + etag@1.8.1: {} event-target-shim@5.0.1: {} @@ -2932,6 +4692,8 @@ snapshots: transitivePeerDependencies: - supports-color + fast-deep-equal@3.1.3: {} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2940,6 +4702,10 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fast-redact@3.5.0: {} fast-safe-stringify@2.1.1: {} @@ -2948,6 +4714,10 @@ snapshots: dependencies: reusify: 1.0.4 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -2956,6 +4726,10 @@ snapshots: dependencies: is-unicode-supported: 2.1.0 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -2982,11 +4756,28 @@ snapshots: dependencies: locate-path: 3.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + find-versions@6.0.0: dependencies: semver-regex: 4.0.5 super-regex: 1.0.0 + flat-cache@4.0.1: + dependencies: + flatted: 3.3.2 + keyv: 4.5.4 + + flatted@3.3.2: {} + + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.5 + signal-exit: 4.1.0 + forwarded@0.2.0: {} fresh@0.5.2: {} @@ -3002,6 +4793,9 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.1 + fsevents@2.3.3: + optional: true + function-bind@1.1.2: {} function-timeout@1.0.2: {} @@ -3016,6 +4810,8 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 + get-stdin@9.0.0: {} + get-stream@6.0.1: {} get-stream@7.0.1: {} @@ -3027,6 +4823,12 @@ snapshots: '@sec-ant/readable-stream': 0.4.1 is-stream: 4.0.1 + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + + git-hooks-list@3.1.0: {} + git-log-parser@1.2.1: dependencies: argv-formatter: 1.0.0 @@ -3040,6 +4842,23 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@10.4.5: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + + globals@14.0.0: {} + + globals@15.12.0: {} + globby@14.0.2: dependencies: '@sindresorhus/merge-streams': 2.3.0 @@ -3057,6 +4876,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + handlebars@4.7.8: dependencies: minimist: 1.2.8 @@ -3146,6 +4967,8 @@ snapshots: import-meta-resolve@4.1.0: {} + imurmurhash@0.1.4: {} + indent-string@4.0.0: {} indent-string@5.0.0: {} @@ -3179,6 +5002,10 @@ snapshots: is-arrayish@0.2.1: {} + is-core-module@2.15.1: + dependencies: + hasown: 2.0.2 + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -3187,6 +5014,8 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-in-ci@1.0.0: {} + is-number@7.0.0: {} is-obj@2.0.0: {} @@ -3213,8 +5042,16 @@ snapshots: lodash.isstring: 4.0.1 lodash.uniqby: 4.7.0 + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + java-properties@1.0.2: {} + jiti@2.4.0: {} + jmespath@0.15.0: {} joycon@3.1.1: {} @@ -3225,10 +5062,18 @@ snapshots: dependencies: argparse: 2.0.1 + jsdoc-type-pratt-parser@4.1.0: {} + + json-buffer@3.0.1: {} + json-parse-better-errors@1.0.2: {} json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: {} jsonfile@6.1.0: @@ -3261,14 +5106,25 @@ snapshots: jwa: 1.4.1 safe-buffer: 5.2.1 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + kleur@4.1.5: {} leven@2.1.0: {} + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + lie@3.1.1: dependencies: immediate: 3.0.6 + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} load-json-file@4.0.0: @@ -3286,6 +5142,13 @@ snapshots: strip-bom: 3.0.0 type-fest: 0.3.1 + load-tsconfig@0.2.5: {} + + local-pkg@0.5.1: + dependencies: + mlly: 1.7.3 + pkg-types: 1.2.1 + localforage@1.10.0: dependencies: lie: 3.1.1 @@ -3300,6 +5163,10 @@ snapshots: p-locate: 3.0.0 path-exists: 3.0.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash-es@4.17.21: {} lodash.capitalize@4.2.1: {} @@ -3322,8 +5189,12 @@ snapshots: lodash.isstring@4.0.1: {} + lodash.merge@4.6.2: {} + lodash.once@4.1.1: {} + lodash.sortby@4.7.0: {} + lodash.uniqby@4.7.0: {} lodash@4.17.21: {} @@ -3374,8 +5245,25 @@ snapshots: mimic-fn@4.0.0: {} + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 + + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + minimist@1.2.8: {} + minipass@7.1.2: {} + + mlly@1.7.3: + dependencies: + acorn: 8.14.0 + pathe: 1.1.2 + pkg-types: 1.2.1 + ufo: 1.5.4 + mri@1.1.4: {} mri@1.2.0: {} @@ -3390,6 +5278,10 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 + natural-compare-lite@1.4.0: {} + + natural-compare@1.4.0: {} + negotiator@0.6.3: {} neo-async@2.6.2: {} @@ -3464,6 +5356,15 @@ snapshots: dependencies: mimic-fn: 4.0.0 + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + p-each-series@3.0.0: {} p-filter@4.1.0: @@ -3480,6 +5381,10 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-locate@2.0.0: dependencies: p-limit: 1.3.0 @@ -3488,6 +5393,10 @@ snapshots: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-map@7.0.2: {} p-reduce@2.1.0: {} @@ -3498,10 +5407,17 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 + parse-imports@2.2.1: + dependencies: + es-module-lexer: 1.5.4 + slashes: 3.0.12 + parse-json@4.0.0: dependencies: error-ex: 1.3.2 @@ -3534,20 +5450,33 @@ snapshots: path-exists@3.0.0: {} + path-exists@4.0.0: {} + path-key@3.1.1: {} path-key@4.0.0: {} + path-parse@1.0.7: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + path-to-regexp@0.1.10: {} path-type@4.0.0: {} path-type@5.0.0: {} + pathe@1.1.2: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@3.0.0: {} pify@4.0.1: {} @@ -3615,6 +5544,8 @@ snapshots: sonic-boom: 4.2.0 thread-stream: 3.1.0 + pirates@4.0.6: {} + pkg-conf@2.1.0: dependencies: find-up: 2.1.0 @@ -3625,6 +5556,20 @@ snapshots: find-up: 3.0.0 load-json-file: 5.3.0 + pkg-types@1.2.1: + dependencies: + confbox: 0.1.8 + mlly: 1.7.3 + pathe: 1.1.2 + + postcss-load-config@6.0.1(jiti@2.4.0): + dependencies: + lilconfig: 3.1.2 + optionalDependencies: + jiti: 2.4.0 + + prelude-ls@1.2.1: {} + prettier@3.3.3: {} pretty-ms@9.2.0: @@ -3684,6 +5629,8 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode@2.3.1: {} + qs@6.13.0: dependencies: side-channel: 1.0.6 @@ -3746,6 +5693,8 @@ snapshots: process: 0.11.10 string_decoder: 1.3.0 + readdirp@4.0.2: {} + real-require@0.2.0: {} redis-errors@1.2.0: {} @@ -3764,10 +5713,42 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + + resolve@1.22.8: + dependencies: + is-core-module: 2.15.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + reusify@1.0.4: {} rfdc@1.4.1: {} + rollup@4.27.4: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.27.4 + '@rollup/rollup-android-arm64': 4.27.4 + '@rollup/rollup-darwin-arm64': 4.27.4 + '@rollup/rollup-darwin-x64': 4.27.4 + '@rollup/rollup-freebsd-arm64': 4.27.4 + '@rollup/rollup-freebsd-x64': 4.27.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.27.4 + '@rollup/rollup-linux-arm-musleabihf': 4.27.4 + '@rollup/rollup-linux-arm64-gnu': 4.27.4 + '@rollup/rollup-linux-arm64-musl': 4.27.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.27.4 + '@rollup/rollup-linux-riscv64-gnu': 4.27.4 + '@rollup/rollup-linux-s390x-gnu': 4.27.4 + '@rollup/rollup-linux-x64-gnu': 4.27.4 + '@rollup/rollup-linux-x64-musl': 4.27.4 + '@rollup/rollup-win32-arm64-msvc': 4.27.4 + '@rollup/rollup-win32-ia32-msvc': 4.27.4 + '@rollup/rollup-win32-x64-msvc': 4.27.4 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -3784,15 +5765,15 @@ snapshots: safer-buffer@2.1.2: {} - semantic-release@24.2.0: + semantic-release@24.2.0(typescript@5.7.2): dependencies: - '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.0) + '@semantic-release/commit-analyzer': 13.0.0(semantic-release@24.2.0(typescript@5.7.2)) '@semantic-release/error': 4.0.0 - '@semantic-release/github': 11.0.1(semantic-release@24.2.0) - '@semantic-release/npm': 12.0.1(semantic-release@24.2.0) - '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.2.0) + '@semantic-release/github': 11.0.1(semantic-release@24.2.0(typescript@5.7.2)) + '@semantic-release/npm': 12.0.1(semantic-release@24.2.0(typescript@5.7.2)) + '@semantic-release/release-notes-generator': 14.0.1(semantic-release@24.2.0(typescript@5.7.2)) aggregate-error: 5.0.0 - cosmiconfig: 9.0.0 + cosmiconfig: 9.0.0(typescript@5.7.2) debug: 4.3.7 env-ci: 11.1.0 execa: 9.5.1 @@ -3894,6 +5875,8 @@ snapshots: slash@5.1.0: {} + slashes@3.0.12: {} + sonic-boom@3.8.1: dependencies: atomic-sleep: 1.0.0 @@ -3902,8 +5885,25 @@ snapshots: dependencies: atomic-sleep: 1.0.0 + sort-object-keys@1.1.3: {} + + sort-package-json@2.11.0: + dependencies: + detect-indent: 7.0.1 + detect-newline: 4.0.1 + get-stdin: 9.0.0 + git-hooks-list: 3.1.0 + is-plain-obj: 4.1.0 + semver: 7.6.3 + sort-object-keys: 1.1.3 + tinyglobby: 0.2.10 + source-map@0.6.1: {} + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + spawn-error-forwarder@1.0.0: {} spdx-correct@3.2.0: @@ -3918,6 +5918,11 @@ snapshots: spdx-exceptions: 2.5.0 spdx-license-ids: 3.0.20 + spdx-expression-parse@4.0.0: + dependencies: + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.20 + spdx-license-ids@3.0.20: {} split2@1.0.0: @@ -3930,6 +5935,8 @@ snapshots: split2@4.2.0: {} + stable-hash@0.0.4: {} + standard-as-callback@2.1.0: {} statuses@2.0.1: {} @@ -3945,6 +5952,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 @@ -3957,6 +5970,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + strip-bom@3.0.0: {} strip-final-newline@2.0.0: {} @@ -3969,6 +5986,16 @@ snapshots: strip-json-comments@3.1.1: {} + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.4.5 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + super-regex@1.0.0: dependencies: function-timeout: 1.0.2 @@ -3987,6 +6014,13 @@ snapshots: has-flag: 4.0.0 supports-color: 7.2.0 + supports-preserve-symlinks-flag@1.0.0: {} + + synckit@0.9.2: + dependencies: + '@pkgr/core': 0.1.1 + tslib: 2.8.1 + temp-dir@3.0.0: {} tempy@3.1.0: @@ -4025,16 +6059,68 @@ snapshots: dependencies: convert-hrtime: 5.0.0 + tinyexec@0.3.1: {} + + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 toidentifier@1.0.1: {} + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + traverse@0.6.8: {} + tree-kill@1.2.2: {} + + ts-api-utils@1.4.1(typescript@5.7.2): + dependencies: + typescript: 5.7.2 + + ts-interface-checker@0.1.13: {} + + tslib@2.8.1: {} + + tsup@8.3.5(@swc/core@1.9.3)(jiti@2.4.0)(typescript@5.7.2): + dependencies: + bundle-require: 5.0.0(esbuild@0.24.0) + cac: 6.7.14 + chokidar: 4.0.1 + consola: 3.2.3 + debug: 4.3.7 + esbuild: 0.24.0 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@2.4.0) + resolve-from: 5.0.0 + rollup: 4.27.4 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.1 + tinyglobby: 0.2.10 + tree-kill: 1.2.2 + optionalDependencies: + '@swc/core': 1.9.3 + typescript: 5.7.2 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tunnel@0.0.6: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + type-fest@0.3.1: {} type-fest@1.4.0: {} @@ -4048,6 +6134,21 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 + typescript-eslint@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2): + dependencies: + '@typescript-eslint/eslint-plugin': 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0(jiti@2.4.0))(typescript@5.7.2) + eslint: 9.15.0(jiti@2.4.0) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + + typescript@5.7.2: {} + + ufo@1.5.4: {} + uglify-js@3.19.3: optional: true @@ -4084,6 +6185,10 @@ snapshots: dependencies: dotenv: 16.4.5 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + url-join@5.0.0: {} util-deprecate@1.0.2: {} @@ -4104,10 +6209,20 @@ snapshots: vary@1.1.2: {} + webidl-conversions@4.0.2: {} + + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + which@2.0.2: dependencies: isexe: 2.0.0 + word-wrap@1.2.5: {} + wordwrap@1.0.0: {} wrap-ansi@7.0.0: @@ -4116,6 +6231,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrappy@1.0.2: {} xtend@4.0.2: {} @@ -4146,4 +6267,6 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 + yocto-queue@0.1.0: {} + yoctocolors@2.1.1: {} diff --git a/test/app.test.js b/test/app.test.js index 97606ed..ff13fe5 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -1,18 +1,18 @@ -const {suite} = require('uvu'); -const assert = require('uvu/assert'); +import {suite} from 'uvu' +import * as assert from 'uvu/assert' -const nock = require('nock'); -nock.disableNetConnect(); +import nock from 'nock' +import {Probot, ProbotOctokit} from 'probot' -// disable Probot logs -process.env.LOG_LEVEL = 'fatal'; -const {Probot, ProbotOctokit} = require('probot'); +import app from '../app.js' +nock.disableNetConnect() -const app = require('../app'); +// disable Probot logs +process.env.LOG_LEVEL = 'fatal' /** @type {import('probot').Probot */ -let probot; -const test = suite('app'); +let probot +const test = suite('app') test.before.each(() => { probot = new Probot({ id: 1, @@ -21,19 +21,19 @@ test.before.each(() => { throttle: {enabled: false}, retry: {enabled: false}, }), - }); - probot.load(app); -}); + }) + probot.load(app) +}) test('receives issues.opened event', async function () { const mock = nock('https://api.github.com') // create new check run - .post('/repos/bfra-me/github-app/issues/1/comments', (requestBody) => { - assert.equal(requestBody, {body: 'Hello, World!'}); + .post('/repos/bfra-me/github-app/issues/1/comments', requestBody => { + assert.equal(requestBody, {body: 'Hello, World!'}) - return true; + return true }) - .reply(201, {}); + .reply(201, {}) await probot.receive({ name: 'issues', @@ -50,9 +50,9 @@ test('receives issues.opened event', async function () { number: 1, }, }, - }); + }) - assert.equal(mock.activeMocks(), []); -}); + assert.equal(mock.activeMocks(), []) +}) -test.run(); +test.run()